diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2018-08-19 00:55:07 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-19 00:55:07 +0900 |
| commit | 0e45d0d47fca2f9cf2caf87a25442d3090bea2fb (patch) | |
| tree | 4591218074ce73b4f5d3be7582d76a170dc1b672 /src/client/app/common | |
| parent | New translations ja.yml (Japanese (Kansai-ben)) (diff) | |
| parent | Merge pull request #2330 from syuilo/patch (diff) | |
| download | misskey-0e45d0d47fca2f9cf2caf87a25442d3090bea2fb.tar.gz misskey-0e45d0d47fca2f9cf2caf87a25442d3090bea2fb.tar.bz2 misskey-0e45d0d47fca2f9cf2caf87a25442d3090bea2fb.zip | |
Merge branch 'master' into l10n_master
Diffstat (limited to 'src/client/app/common')
5 files changed, 33 insertions, 11 deletions
diff --git a/src/client/app/common/scripts/get-face.ts b/src/client/app/common/scripts/get-face.ts new file mode 100644 index 0000000000..79cf7a1be4 --- /dev/null +++ b/src/client/app/common/scripts/get-face.ts @@ -0,0 +1,10 @@ +const faces = [ + '(=^・・^=)', + 'v(\'ω\')v', + '🐡( \'-\' 🐡 )フグパンチ!!!!', + '🖕(´・_・`)🖕', + '(。>﹏<。)', + '(Δ・x・Δ)' +]; + +export default () => faces[Math.floor(Math.random() * faces.length)]; diff --git a/src/client/app/common/scripts/get-kao.ts b/src/client/app/common/scripts/get-kao.ts deleted file mode 100644 index ca83153b96..0000000000 --- a/src/client/app/common/scripts/get-kao.ts +++ /dev/null @@ -1,9 +0,0 @@ -const kaos = [ - '(=^・・^=)', - 'v(\'ω\')v', - '🐡( \'-\' 🐡 )フグパンチ!!!!', - '🖕(´・_・`)🖕', - '(。>﹏<。)' -]; - -export default () => kaos[Math.floor(Math.random() * kaos.length)]; diff --git a/src/client/app/common/views/components/games/reversi/reversi.index.vue b/src/client/app/common/views/components/games/reversi/reversi.index.vue index d4d35f6a86..fa88aeaaf4 100644 --- a/src/client/app/common/views/components/games/reversi/reversi.index.vue +++ b/src/client/app/common/views/components/games/reversi/reversi.index.vue @@ -32,6 +32,7 @@ <mk-avatar class="avatar" :user="g.user2"/> <span><b>{{ g.user1 | userName }}</b> vs <b>{{ g.user2 | userName }}</b></span> <span class="state">{{ g.isEnded ? '%i18n:@game-state.ended%' : '%i18n:@game-state.playing%' }}</span> + <mk-time :time="g.createdAt" /> </a> </section> <section v-if="games.length > 0"> @@ -41,6 +42,7 @@ <mk-avatar class="avatar" :user="g.user2"/> <span><b>{{ g.user1 | userName }}</b> vs <b>{{ g.user2 | userName }}</b></span> <span class="state">{{ g.isEnded ? '%i18n:@game-state.ended%' : '%i18n:@game-state.playing%' }}</span> + <mk-time :time="g.createdAt" /> </a> </section> </div> diff --git a/src/client/app/common/views/components/signup.vue b/src/client/app/common/views/components/signup.vue index 45a183e144..1d33702159 100644 --- a/src/client/app/common/views/components/signup.vue +++ b/src/client/app/common/views/components/signup.vue @@ -1,5 +1,10 @@ <template> <form class="mk-signup" @submit.prevent="onSubmit" :autocomplete="Math.random()"> + <ui-input v-if="meta.disableRegistration" v-model="invitationCode" type="text" :autocomplete="Math.random()" spellcheck="false" required> + <span>%i18n:@invitation-code%</span> + <span slot="prefix">%fa:id-card-alt%</span> + <p slot="text" v-html="'%i18n:@invitation-info%'.replace('{}', meta.maintainer.url)"></p> + </ui-input> <ui-input v-model="username" type="text" pattern="^[a-zA-Z0-9_]{1,20}$" :autocomplete="Math.random()" spellcheck="false" required @input="onChangeUsername"> <span>%i18n:@username%</span> <span slot="prefix">@</span> @@ -46,11 +51,13 @@ export default Vue.extend({ username: '', password: '', retypedPassword: '', + invitationCode: '', url, recaptchaSitekey, usernameState: null, passwordStrength: '', - passwordRetypeState: null + passwordRetypeState: null, + meta: null } }, computed: { @@ -61,6 +68,11 @@ export default Vue.extend({ this.usernameState != 'max-range'); } }, + created() { + (this as any).os.getMeta().then(meta => { + this.meta = meta; + }); + }, methods: { onChangeUsername() { if (this.username == '') { @@ -110,6 +122,7 @@ export default Vue.extend({ (this as any).api('signup', { username: this.username, password: this.password, + invitationCode: this.invitationCode, 'g-recaptcha-response': recaptchaSitekey != null ? (window as any).grecaptcha.getResponse() : null }).then(() => { (this as any).api('signin', { diff --git a/src/client/app/common/views/components/visibility-chooser.vue b/src/client/app/common/views/components/visibility-chooser.vue index cc9c75095e..4691604e57 100644 --- a/src/client/app/common/views/components/visibility-chooser.vue +++ b/src/client/app/common/views/components/visibility-chooser.vue @@ -44,7 +44,12 @@ import Vue from 'vue'; import * as anime from 'animejs'; export default Vue.extend({ - props: ['source', 'compact', 'v'], + props: ['source', 'compact'], + data() { + return { + v: this.$store.state.device.visibility || 'public' + } + }, mounted() { this.$nextTick(() => { const popover = this.$refs.popover as any; @@ -92,6 +97,7 @@ export default Vue.extend({ }, methods: { choose(visibility) { + this.$store.commit('device/setVisibility', visibility); this.$emit('chosen', visibility); this.$destroy(); }, |