diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-12-26 10:47:36 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-12-26 10:47:36 +0900 |
| commit | 5a8cc7851b4af9ae4a0d7efc5b66b224bbe9b4c8 (patch) | |
| tree | 18f6338f1d5935c401298515d4e400d5a2306301 /src/client/components/note.vue | |
| parent | wip (diff) | |
| download | misskey-5a8cc7851b4af9ae4a0d7efc5b66b224bbe9b4c8.tar.gz misskey-5a8cc7851b4af9ae4a0d7efc5b66b224bbe9b4c8.tar.bz2 misskey-5a8cc7851b4af9ae4a0d7efc5b66b224bbe9b4c8.zip | |
wip
Diffstat (limited to 'src/client/components/note.vue')
| -rw-r--r-- | src/client/components/note.vue | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/src/client/components/note.vue b/src/client/components/note.vue index 6d5750451e..2d87cb29af 100644 --- a/src/client/components/note.vue +++ b/src/client/components/note.vue @@ -10,13 +10,13 @@ > <XSub v-for="note in conversation" class="reply-to-more" :key="note.id" :note="note"/> <XSub :note="appearNote.reply" class="reply-to" v-if="appearNote.reply"/> - <div class="info" v-if="pinned"><Fa :icon="faThumbtack"/> {{ $t('pinnedNote') }}</div> - <div class="info" v-if="appearNote._prId_"><Fa :icon="faBullhorn"/> {{ $t('promotion') }}<button class="_textButton hide" @click="readPromo()">{{ $t('hideThisNote') }} <Fa :icon="faTimes"/></button></div> - <div class="info" v-if="appearNote._featuredId_"><Fa :icon="faBolt"/> {{ $t('featured') }}</div> + <div class="info" v-if="pinned"><Fa :icon="faThumbtack"/> {{ $ts.pinnedNote }}</div> + <div class="info" v-if="appearNote._prId_"><Fa :icon="faBullhorn"/> {{ $ts.promotion }}<button class="_textButton hide" @click="readPromo()">{{ $ts.hideThisNote }} <Fa :icon="faTimes"/></button></div> + <div class="info" v-if="appearNote._featuredId_"><Fa :icon="faBolt"/> {{ $ts.featured }}</div> <div class="renote" v-if="isRenote"> <MkAvatar class="avatar" :user="note.user"/> <Fa :icon="faRetweet"/> - <I18n src="renotedBy" tag="span"> + <I18n :src="$ts.renotedBy" tag="span"> <template #user> <MkA class="name" :to="userPage(note.user)" v-user-preview="note.userId"> <MkUserName :user="note.user"/> @@ -48,7 +48,7 @@ </p> <div class="content" v-show="appearNote.cw == null || showContent"> <div class="text"> - <span v-if="appearNote.isHidden" style="opacity: 0.5">({{ $t('private') }})</span> + <span v-if="appearNote.isHidden" style="opacity: 0.5">({{ $ts.private }})</span> <MkA class="reply" v-if="appearNote.replyId" :to="`/notes/${appearNote.replyId}`"><Fa :icon="faReply"/></MkA> <Mfm v-if="appearNote.text" :text="appearNote.text" :author="appearNote.user" :i="$i" :custom-emojis="appearNote.emojis"/> <a class="rp" v-if="appearNote.renote != null">RN:</a> @@ -90,7 +90,7 @@ <XSub v-for="note in replies" :key="note.id" :note="note" class="reply" :detail="true"/> </div> <div v-else class="_panel muted" @click="muted = false"> - <I18n src="userSaysSomething" tag="small"> + <I18n :src="$ts.userSaysSomething" tag="small"> <template #name> <MkA class="name" :to="userPage(appearNote.user)" v-user-preview="appearNote.userId"> <MkUserName :user="appearNote.user"/> @@ -469,7 +469,7 @@ export default defineComponent({ pleaseLogin(); this.blur(); os.modalMenu([{ - text: this.$t('renote'), + text: this.$ts.renote, icon: faRetweet, action: () => { os.api('notes/create', { @@ -477,7 +477,7 @@ export default defineComponent({ }); } }, { - text: this.$t('quote'), + text: this.$ts.quote, icon: faQuoteRight, action: () => { os.post({ @@ -495,18 +495,18 @@ export default defineComponent({ }, undefined, (res: any) => { os.dialog({ type: 'success', - text: this.$t('renoted'), + text: this.$ts.renoted, }); }, (e: Error) => { if (e.id === 'b5c90186-4ab0-49c8-9bba-a1f76c282ba4') { os.dialog({ type: 'error', - text: this.$t('cantRenote'), + text: this.$ts.cantRenote, }); } else if (e.id === 'fd4cc33e-2a37-48dd-99cc-9b806eb2031a') { os.dialog({ type: 'error', - text: this.$t('cantReRenote'), + text: this.$ts.cantReRenote, }); } }); @@ -553,18 +553,18 @@ export default defineComponent({ }, undefined, (res: any) => { os.dialog({ type: 'success', - text: this.$t('favorited'), + text: this.$ts.favorited, }); }, (e: Error) => { if (e.id === 'a402c12b-34dd-41d2-97d8-4d2ffd96a1a6') { os.dialog({ type: 'error', - text: this.$t('alreadyFavorited'), + text: this.$ts.alreadyFavorited, }); } else if (e.id === '6dd26674-e060-4816-909a-45ba3f4da458') { os.dialog({ type: 'error', - text: this.$t('cantFavorite'), + text: this.$ts.cantFavorite, }); } }); @@ -573,7 +573,7 @@ export default defineComponent({ del() { os.dialog({ type: 'warning', - text: this.$t('noteDeleteConfirm'), + text: this.$ts.noteDeleteConfirm, showCancelButton: true }).then(({ canceled }) => { if (canceled) return; @@ -587,7 +587,7 @@ export default defineComponent({ delEdit() { os.dialog({ type: 'warning', - text: this.$t('deleteAndEditConfirm'), + text: this.$ts.deleteAndEditConfirm, showCancelButton: true }).then(({ canceled }) => { if (canceled) return; @@ -621,15 +621,15 @@ export default defineComponent({ menu = [{ icon: faCopy, - text: this.$t('copyContent'), + text: this.$ts.copyContent, action: this.copyContent }, { icon: faLink, - text: this.$t('copyLink'), + text: this.$ts.copyLink, action: this.copyLink }, (this.appearNote.url || this.appearNote.uri) ? { icon: faExternalLinkSquareAlt, - text: this.$t('showOnRemote'), + text: this.$ts.showOnRemote, action: () => { window.open(this.appearNote.url || this.appearNote.uri, '_blank'); } @@ -637,41 +637,41 @@ export default defineComponent({ null, statePromise.then(state => state.isFavorited ? { icon: faStar, - text: this.$t('unfavorite'), + text: this.$ts.unfavorite, action: () => this.toggleFavorite(false) } : { icon: faStar, - text: this.$t('favorite'), + text: this.$ts.favorite, action: () => this.toggleFavorite(true) }), { icon: faPaperclip, - text: this.$t('clip'), + text: this.$ts.clip, action: () => this.clip() }, (this.appearNote.userId != this.$i.id) ? statePromise.then(state => state.isWatching ? { icon: faEyeSlash, - text: this.$t('unwatch'), + text: this.$ts.unwatch, action: () => this.toggleWatch(false) } : { icon: faEye, - text: this.$t('watch'), + text: this.$ts.watch, action: () => this.toggleWatch(true) }) : undefined, this.appearNote.userId == this.$i.id ? (this.$i.pinnedNoteIds || []).includes(this.appearNote.id) ? { icon: faThumbtack, - text: this.$t('unpin'), + text: this.$ts.unpin, action: () => this.togglePin(false) } : { icon: faThumbtack, - text: this.$t('pin'), + text: this.$ts.pin, action: () => this.togglePin(true) } : undefined, ...(this.$i.isModerator || this.$i.isAdmin ? [ null, { icon: faBullhorn, - text: this.$t('promote'), + text: this.$ts.promote, action: this.promote }] : [] @@ -680,7 +680,7 @@ export default defineComponent({ null, { icon: faExclamationCircle, - text: this.$t('reportAbuse'), + text: this.$ts.reportAbuse, action: () => { const u = `${url}/notes/${this.appearNote.id}`; os.popup(import('@/components/abuse-report-window.vue'), { @@ -695,12 +695,12 @@ export default defineComponent({ null, this.appearNote.userId == this.$i.id ? { icon: faEdit, - text: this.$t('deleteAndEdit'), + text: this.$ts.deleteAndEdit, action: this.delEdit } : undefined, { icon: faTrashAlt, - text: this.$t('delete'), + text: this.$ts.delete, danger: true, action: this.del }] @@ -710,15 +710,15 @@ export default defineComponent({ } else { menu = [{ icon: faCopy, - text: this.$t('copyContent'), + text: this.$ts.copyContent, action: this.copyContent }, { icon: faLink, - text: this.$t('copyLink'), + text: this.$ts.copyLink, action: this.copyLink }, (this.appearNote.url || this.appearNote.uri) ? { icon: faExternalLinkSquareAlt, - text: this.$t('showOnRemote'), + text: this.$ts.showOnRemote, action: () => { window.open(this.appearNote.url || this.appearNote.uri, '_blank'); } @@ -760,7 +760,7 @@ export default defineComponent({ showRenoteMenu(viaKeyboard = false) { if (!this.isMyRenote) return; os.modalMenu([{ - text: this.$t('unrenote'), + text: this.$ts.unrenote, icon: faTrashAlt, danger: true, action: () => { @@ -795,7 +795,7 @@ export default defineComponent({ if (e.id === '72dab508-c64d-498f-8740-a8eec1ba385a') { os.dialog({ type: 'error', - text: this.$t('pinLimitExceeded') + text: this.$ts.pinLimitExceeded }); } }); @@ -805,22 +805,22 @@ export default defineComponent({ const clips = await os.api('clips/list'); os.modalMenu([{ icon: faPlus, - text: this.$t('createNew'), + text: this.$ts.createNew, action: async () => { - const { canceled, result } = await os.form(this.$t('createNewClip'), { + const { canceled, result } = await os.form(this.$ts.createNewClip, { name: { type: 'string', - label: this.$t('name') + label: this.$ts.name }, description: { type: 'string', required: false, multiline: true, - label: this.$t('description') + label: this.$ts.description }, isPublic: { type: 'boolean', - label: this.$t('public'), + label: this.$ts.public, default: false } }); @@ -841,7 +841,7 @@ export default defineComponent({ async promote() { const { canceled, result: days } = await os.dialog({ - title: this.$t('numberOfDays'), + title: this.$ts.numberOfDays, input: { type: 'number' } }); |