diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-06-15 07:56:56 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-06-15 07:56:56 +0900 |
| commit | 0ac9120064b295a363b74a2c2afc487db2b50908 (patch) | |
| tree | 9b57129c2df6e17691f2f202d362e5150cc4d29c /src/client | |
| parent | wip (diff) | |
| download | misskey-0ac9120064b295a363b74a2c2afc487db2b50908.tar.gz misskey-0ac9120064b295a363b74a2c2afc487db2b50908.tar.bz2 misskey-0ac9120064b295a363b74a2c2afc487db2b50908.zip | |
wip
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/app/common/views/components/signup.vue | 10 | ||||
| -rw-r--r-- | src/client/app/common/views/components/ui/button.vue | 8 | ||||
| -rw-r--r-- | src/client/app/common/views/components/ui/card.vue | 4 | ||||
| -rw-r--r-- | src/client/app/common/views/components/ui/form.vue | 2 | ||||
| -rw-r--r-- | src/client/app/common/views/components/ui/input.vue | 8 | ||||
| -rw-r--r-- | src/client/app/common/views/components/ui/radio.vue | 2 | ||||
| -rw-r--r-- | src/client/app/common/views/components/ui/select.vue | 11 | ||||
| -rw-r--r-- | src/client/app/common/views/components/ui/switch.vue | 2 | ||||
| -rw-r--r-- | src/client/app/config.ts | 4 | ||||
| -rw-r--r-- | src/client/app/mobile/views/pages/settings.vue | 79 | ||||
| -rw-r--r-- | src/client/app/mobile/views/pages/settings/settings.profile.vue | 17 | ||||
| -rw-r--r-- | src/client/app/mobile/views/pages/welcome.vue | 6 |
12 files changed, 76 insertions, 77 deletions
diff --git a/src/client/app/common/views/components/signup.vue b/src/client/app/common/views/components/signup.vue index d1621a4848..987cc7e52d 100644 --- a/src/client/app/common/views/components/signup.vue +++ b/src/client/app/common/views/components/signup.vue @@ -1,6 +1,6 @@ <template> -<form class="mk-signup" @submit.prevent="onSubmit" autocomplete="off"> - <ui-input v-model="username" type="text" pattern="^[a-zA-Z0-9_]{1,20}$" autocomplete="off" required @input="onChangeUsername"> +<form class="mk-signup" @submit.prevent="onSubmit" :autocomplete="Math.random()"> + <ui-input v-model="username" type="text" pattern="^[a-zA-Z0-9_]{1,20}$" :autocomplete="Math.random()" required @input="onChangeUsername"> <span>%i18n:@username%</span> <span slot="prefix">@</span> <span slot="suffix">@{{ host }}</span> @@ -12,7 +12,7 @@ <p slot="text" v-if="usernameState == 'min-range'" style="color:#FF1161">%fa:exclamation-triangle .fw% %i18n:@too-short%</p> <p slot="text" v-if="usernameState == 'max-range'" style="color:#FF1161">%fa:exclamation-triangle .fw% %i18n:@too-long%</p> </ui-input> - <ui-input v-model="password" type="password" autocomplete="off" required @input="onChangePassword" :with-password-meter="true"> + <ui-input v-model="password" type="password" :autocomplete="Math.random()" required @input="onChangePassword" :with-password-meter="true"> <span>%i18n:@password%</span> <span slot="prefix">%fa:lock%</span> <div slot="text"> @@ -21,7 +21,7 @@ <p slot="text" v-if="passwordStrength == 'high'" style="color:#3CB7B5">%fa:check .fw% %i18n:@strong-password%</p> </div> </ui-input> - <ui-input v-model="retypedPassword" type="password" autocomplete="off" required @input="onChangePasswordRetype"> + <ui-input v-model="retypedPassword" type="password" :autocomplete="Math.random()" required @input="onChangePasswordRetype"> <span>%i18n:@password% (%i18n:@retype%)</span> <span slot="prefix">%fa:lock%</span> <div slot="text"> @@ -31,7 +31,7 @@ </ui-input> <div class="g-recaptcha" :data-sitekey="recaptchaSitekey" style="margin: 16px 0;"></div> <label class="agree-tou" style="display: block; margin: 16px 0;"> - <input name="agree-tou" type="checkbox" autocomplete="off" required/> + <input name="agree-tou" type="checkbox" required/> <p><a :href="touUrl" target="_blank">利用規約</a>に同意する</p> </label> <ui-button type="submit">%i18n:@create%</ui-button> diff --git a/src/client/app/common/views/components/ui/button.vue b/src/client/app/common/views/components/ui/button.vue index 7723c83f57..e778750354 100644 --- a/src/client/app/common/views/components/ui/button.vue +++ b/src/client/app/common/views/components/ui/button.vue @@ -1,6 +1,6 @@ <template> -<div class="ui-button"> - <button :type="type"> +<div class="ui-button" :class="[styl]"> + <button :type="type" @click="$emit('click')"> <slot></slot> </button> </div> @@ -20,7 +20,9 @@ export default Vue.extend({ styl: 'fill' }; }, - inject: ['isCardChild'], + inject: { + isCardChild: { default: false } + }, created() { if (this.isCardChild) { this.styl = 'line'; diff --git a/src/client/app/common/views/components/ui/card.vue b/src/client/app/common/views/components/ui/card.vue index e2b15240e4..05c51bca6b 100644 --- a/src/client/app/common/views/components/ui/card.vue +++ b/src/client/app/common/views/components/ui/card.vue @@ -25,9 +25,13 @@ export default Vue.extend({ root(isDark) margin 16px padding 16px + color isDark ? #fff : #000 background isDark ? #282C37 : #fff box-shadow 0 3px 1px -2px rgba(#000, 0.2), 0 2px 2px 0 rgba(#000, 0.14), 0 1px 5px 0 rgba(#000, 0.12) + @media (min-width 500px) + padding 32px + > header font-weight normal font-size 24px diff --git a/src/client/app/common/views/components/ui/form.vue b/src/client/app/common/views/components/ui/form.vue index b6b4a76d2a..fc8fdad9c4 100644 --- a/src/client/app/common/views/components/ui/form.vue +++ b/src/client/app/common/views/components/ui/form.vue @@ -11,7 +11,7 @@ import Vue from 'vue'; export default Vue.extend({ props: { disabled: { - type: String, + type: Boolean, required: false } } diff --git a/src/client/app/common/views/components/ui/input.vue b/src/client/app/common/views/components/ui/input.vue index 167dd4e2a9..ec91ca364c 100644 --- a/src/client/app/common/views/components/ui/input.vue +++ b/src/client/app/common/views/components/ui/input.vue @@ -1,7 +1,7 @@ <template> <div class="ui-input" :class="[{ focused, filled }, styl]"> <div class="icon" ref="icon"><slot name="icon"></slot></div> - <div class="input" @click="focus"> + <div class="input" @click="focus" @mousedown="focus"> <div class="password-meter" v-if="withPasswordMeter" v-show="passwordStrength != ''" :data-strength="passwordStrength"> <div class="value" ref="passwordMetar"></div> </div> @@ -62,7 +62,6 @@ export default Vue.extend({ required: false }, autocomplete: { - type: String, required: false }, withPasswordMeter: { @@ -113,7 +112,9 @@ export default Vue.extend({ } } }, - inject: ['isCardChild'], + inject: { + isCardChild: { default: false } + }, created() { if (this.isCardChild) { this.styl = 'line'; @@ -160,6 +161,7 @@ root(isDark, fill) > .input display flex + cursor text if fill padding 6px 12px diff --git a/src/client/app/common/views/components/ui/radio.vue b/src/client/app/common/views/components/ui/radio.vue index 2b7f1d9dd4..04a46c5a96 100644 --- a/src/client/app/common/views/components/ui/radio.vue +++ b/src/client/app/common/views/components/ui/radio.vue @@ -87,7 +87,7 @@ root(isDark) width 20px height 20px background none - border solid 2px rgba(#000, 0.54) + border solid 2px isDark ? rgba(#fff, 0.7) : rgba(#000, 0.54) border-radius 100% transition inherit diff --git a/src/client/app/common/views/components/ui/select.vue b/src/client/app/common/views/components/ui/select.vue index 4577a15f68..4273a4a0de 100644 --- a/src/client/app/common/views/components/ui/select.vue +++ b/src/client/app/common/views/components/ui/select.vue @@ -48,7 +48,9 @@ export default Vue.extend({ this.v = v; } }, - inject: ['isCardChild'], + inject: { + isCardChild: { default: false } + }, created() { if (this.isCardChild) { this.styl = 'line'; @@ -101,7 +103,7 @@ root(isDark, fill) left 0 right 0 height 1px - background rgba(#000, 0.42) + background isDark ? rgba(#fff, 0.7) : rgba(#000, 0.42) &:after content '' @@ -141,14 +143,15 @@ root(isDark, fill) font-weight fill ? bold : normal font-size 16px height 32px + color isDark ? #fff : #000 background transparent border none border-radius 0 outline none box-shadow none - &[type='file'] - display none + * + color #000 > .prefix > .suffix diff --git a/src/client/app/common/views/components/ui/switch.vue b/src/client/app/common/views/components/ui/switch.vue index 24611b9aa0..a9e00d73d2 100644 --- a/src/client/app/common/views/components/ui/switch.vue +++ b/src/client/app/common/views/components/ui/switch.vue @@ -92,7 +92,7 @@ root(isDark) margin 3px 0 0 0 width 34px height 14px - background isDark ? rgba(#fff, 0.1) : rgba(#000, 0.25) + background isDark ? rgba(#fff, 0.15) : rgba(#000, 0.25) outline none border-radius 14px transition inherit diff --git a/src/client/app/config.ts b/src/client/app/config.ts index 70c085de1c..e4a7ff6d38 100644 --- a/src/client/app/config.ts +++ b/src/client/app/config.ts @@ -1,6 +1,8 @@ declare const _HOST_: string; declare const _HOSTNAME_: string; declare const _URL_: string; +declare const _NAME_: string; +declare const _DESCRIPTION_: string; declare const _API_URL_: string; declare const _WS_URL_: string; declare const _DOCS_URL_: string; @@ -21,6 +23,8 @@ declare const _GOOGLE_MAPS_API_KEY_: string; export const host = _HOST_; export const hostname = _HOSTNAME_; export const url = _URL_; +export const name = _NAME_; +export const description = _DESCRIPTION_; export const apiUrl = _API_URL_; export const wsUrl = _WS_URL_; export const docsUrl = _DOCS_URL_; diff --git a/src/client/app/mobile/views/pages/settings.vue b/src/client/app/mobile/views/pages/settings.vue index beac788482..2a32e982ba 100644 --- a/src/client/app/mobile/views/pages/settings.vue +++ b/src/client/app/mobile/views/pages/settings.vue @@ -1,41 +1,27 @@ <template> <mk-ui> <span slot="header">%fa:cog%%i18n:@settings%</span> - <main> - <p v-html="'%i18n:@signed-in-as%'.replace('{}', '<b>' + name + '</b>')"></p> + <main :data-darkmode="$store.state.device.darkmode"> + <div class="signin-as" v-html="'%i18n:@signed-in-as%'.replace('{}', '<b>' + name + '</b>')"></div> + <div> <x-profile/> <ui-card> <div slot="title">%fa:palette% %i18n:@design%</div> - <div> - <ui-switch v-model="darkmode">%i18n:@dark-mode%</ui-switch> - </div> - - <div> - <ui-switch v-model="$store.state.settings.circleIcons" @change="onChangeCircleIcons">%i18n:@circle-icons%</ui-switch> - </div> + <ui-switch v-model="darkmode">%i18n:@dark-mode%</ui-switch> + <ui-switch v-model="$store.state.settings.circleIcons" @change="onChangeCircleIcons">%i18n:@circle-icons%</ui-switch> <div> <div class="md-body-2">%i18n:@timeline%</div> - - <div> - <ui-switch v-model="$store.state.settings.showReplyTarget" @change="onChangeShowReplyTarget">%i18n:@show-reply-target%</ui-switch> - </div> - - <div> - <ui-switch v-model="$store.state.settings.showMyRenotes" @change="onChangeShowMyRenotes">%i18n:@show-my-renotes%</ui-switch> - </div> - - <div> - <ui-switch v-model="$store.state.settings.showRenotedMyNotes" @change="onChangeShowRenotedMyNotes">%i18n:@show-renoted-my-notes%</ui-switch> - </div> + <ui-switch v-model="$store.state.settings.showReplyTarget" @change="onChangeShowReplyTarget">%i18n:@show-reply-target%</ui-switch> + <ui-switch v-model="$store.state.settings.showMyRenotes" @change="onChangeShowMyRenotes">%i18n:@show-my-renotes%</ui-switch> + <ui-switch v-model="$store.state.settings.showRenotedMyNotes" @change="onChangeShowRenotedMyNotes">%i18n:@show-renoted-my-notes%</ui-switch> </div> <div> <div class="md-body-2">%i18n:@post-style%</div> - <ui-radio v-model="postStyle" value="standard">%i18n:@post-style-standard%</ui-radio> <ui-radio v-model="postStyle" value="smart">%i18n:@post-style-smart%</ui-radio> </div> @@ -43,26 +29,11 @@ <ui-card> <div slot="title">%fa:cog% %i18n:@behavior%</div> - - <div> - <ui-switch v-model="$store.state.settings.fetchOnScroll" @change="onChangeFetchOnScroll">%i18n:@fetch-on-scroll%</ui-switch> - </div> - - <div> - <ui-switch v-model="$store.state.settings.disableViaMobile" @change="onChangeDisableViaMobile">%i18n:@disable-via-mobile%</ui-switch> - </div> - - <div> - <ui-switch v-model="loadRawImages">%i18n:@load-raw-images%</ui-switch> - </div> - - <div> - <ui-switch v-model="$store.state.settings.loadRemoteMedia" @change="onChangeLoadRemoteMedia">%i18n:@load-remote-media%</ui-switch> - </div> - - <div> - <ui-switch v-model="lightmode">%i18n:@i-am-under-limited-internet%</ui-switch> - </div> + <ui-switch v-model="$store.state.settings.fetchOnScroll" @change="onChangeFetchOnScroll">%i18n:@fetch-on-scroll%</ui-switch> + <ui-switch v-model="$store.state.settings.disableViaMobile" @change="onChangeDisableViaMobile">%i18n:@disable-via-mobile%</ui-switch> + <ui-switch v-model="loadRawImages">%i18n:@load-raw-images%</ui-switch> + <ui-switch v-model="$store.state.settings.loadRemoteMedia" @change="onChangeLoadRemoteMedia">%i18n:@load-remote-media%</ui-switch> + <ui-switch v-model="lightmode">%i18n:@i-am-under-limited-internet%</ui-switch> </ui-card> <ui-card> @@ -98,13 +69,16 @@ <template v-if="latestVersion !== undefined"> <div>%i18n:@latest-version% <i>{{ latestVersion ? latestVersion : version }}</i></div> </template> - <md-button class="md-raised md-primary" @click="checkForUpdate" :disabled="checkingForUpdate"> + <ui-button class="md-raised md-primary" @click="checkForUpdate" :disabled="checkingForUpdate"> <template v-if="checkingForUpdate">%i18n:@update-checking%<mk-ellipsis/></template> <template v-else>%i18n:@check-for-updates%</template> - </md-button> + </ui-button> </ui-card> </div> - <p><small>ver {{ version }} ({{ codename }})</small></p> + + <footer> + <small>ver {{ version }} ({{ codename }})</small> + </footer> </main> </mk-ui> </template> @@ -249,13 +223,18 @@ root(isDark) max-width 500px width 100% - > p - display block - margin 16px 0 + > .signin-as + margin 16px padding 16px text-align center - color isDark ? #cad2da : #2c662d - background #fcfff5 + color isDark ? #49ab63 : #2c662d + background isDark ? #273c34 : #fcfff5 + box-shadow 0 3px 1px -2px rgba(#000, 0.2), 0 2px 2px 0 rgba(#000, 0.14), 0 1px 5px 0 rgba(#000, 0.12) + + > footer + margin 16px + text-align center + color isDark ? #c9d2e0 : #888 main[data-darkmode] root(true) diff --git a/src/client/app/mobile/views/pages/settings/settings.profile.vue b/src/client/app/mobile/views/pages/settings/settings.profile.vue index 64adac01e6..da97cbebd7 100644 --- a/src/client/app/mobile/views/pages/settings/settings.profile.vue +++ b/src/client/app/mobile/views/pages/settings/settings.profile.vue @@ -30,11 +30,13 @@ <ui-input type="file" @change="onAvatarChange"> <span>%i18n:@avatar%</span> <span slot="icon">%fa:image%</span> + <span slot="text" v-if="avatarUploading">%i18n:@uploading%<mk-ellipsis/></span> </ui-input> <ui-input type="file" @change="onBannerChange"> <span>%i18n:@banner%</span> <span slot="icon">%fa:image%</span> + <span slot="text" v-if="bannerUploading">%i18n:@uploading%<mk-ellipsis/></span> </ui-input> <ui-switch v-model="isCat">%i18n:@is-cat%</ui-switch> @@ -62,7 +64,8 @@ export default Vue.extend({ isBot: false, isCat: false, saving: false, - uploading: false + avatarUploading: false, + bannerUploading: false }; }, @@ -80,7 +83,7 @@ export default Vue.extend({ methods: { onAvatarChange([file]) { - this.uploading = true; + this.avatarUploading = true; const data = new FormData(); data.append('file', file); @@ -93,16 +96,16 @@ export default Vue.extend({ .then(response => response.json()) .then(f => { this.avatarId = f.id; - this.uploading = false; + this.avatarUploading = false; }) .catch(e => { - this.uploading = false; + this.avatarUploading = false; alert('%18n:!@upload-failed%'); }); }, onBannerChange([file]) { - this.uploading = true; + this.bannerUploading = true; const data = new FormData(); data.append('file', file); @@ -115,10 +118,10 @@ export default Vue.extend({ .then(response => response.json()) .then(f => { this.bannerId = f.id; - this.uploading = false; + this.bannerUploading = false; }) .catch(e => { - this.uploading = false; + this.bannerUploading = false; alert('%18n:!@upload-failed%'); }); }, diff --git a/src/client/app/mobile/views/pages/welcome.vue b/src/client/app/mobile/views/pages/welcome.vue index 3b37a185bd..3bf2a0af9f 100644 --- a/src/client/app/mobile/views/pages/welcome.vue +++ b/src/client/app/mobile/views/pages/welcome.vue @@ -35,7 +35,7 @@ <script lang="ts"> import Vue from 'vue'; -import { apiUrl, copyright, host } from '../../../config'; +import { apiUrl, copyright, host, name, description } from '../../../config'; export default Vue.extend({ data() { @@ -48,7 +48,9 @@ export default Vue.extend({ apiUrl, copyright, users: [], - host + host, + name, + description }; }, mounted() { |