This commit is contained in:
syuilo 2020-12-26 10:47:36 +09:00
parent 9d81d06853
commit 5a8cc7851b
200 changed files with 1562 additions and 1533 deletions

View file

@ -2,7 +2,7 @@
<XWindow ref="window" :initial-width="400" :initial-height="500" :can-resize="true" @closed="$emit('closed')"> <XWindow ref="window" :initial-width="400" :initial-height="500" :can-resize="true" @closed="$emit('closed')">
<template #header> <template #header>
<Fa :icon="faExclamationCircle" style="margin-right: 0.5em;"/> <Fa :icon="faExclamationCircle" style="margin-right: 0.5em;"/>
<I18n src="reportAbuseOf" tag="span"> <I18n :src="$ts.reportAbuseOf" tag="span">
<template #name> <template #name>
<b><MkAcct :user="user"/></b> <b><MkAcct :user="user"/></b>
</template> </template>
@ -12,14 +12,14 @@
<div class="_section"> <div class="_section">
<div class="_content"> <div class="_content">
<MkTextarea v-model:value="comment"> <MkTextarea v-model:value="comment">
<span>{{ $t('details') }}</span> <span>{{ $ts.details }}</span>
<template #desc>{{ $t('fillAbuseReportDescription') }}</template> <template #desc>{{ $ts.fillAbuseReportDescription }}</template>
</MkTextarea> </MkTextarea>
</div> </div>
</div> </div>
<div class="_section"> <div class="_section">
<div class="_content"> <div class="_content">
<MkButton @click="send" primary full :disabled="comment.length === 0">{{ $t('send') }}</MkButton> <MkButton @click="send" primary full :disabled="comment.length === 0">{{ $ts.send }}</MkButton>
</div> </div>
</div> </div>
</div> </div>
@ -69,7 +69,7 @@ export default defineComponent({
}, undefined, res => { }, undefined, res => {
os.dialog({ os.dialog({
type: 'success', type: 'success',
text: this.$t('abuseReported') text: this.$ts.abuseReported
}); });
this.$refs.window.close(); this.$refs.window.close();
}); });

View file

@ -8,7 +8,7 @@
</span> </span>
<span class="username">@{{ acct(user) }}</span> <span class="username">@{{ acct(user) }}</span>
</li> </li>
<li @click="chooseUser()" @keydown="onKeydown" tabindex="-1" class="choose">{{ $t('selectUser') }}</li> <li @click="chooseUser()" @keydown="onKeydown" tabindex="-1" class="choose">{{ $ts.selectUser }}</li>
</ol> </ol>
<ol class="hashtags" ref="suggests" v-if="hashtags.length > 0"> <ol class="hashtags" ref="suggests" v-if="hashtags.length > 0">
<li v-for="hashtag in hashtags" @click="complete(type, hashtag)" @keydown="onKeydown" tabindex="-1"> <li v-for="hashtag in hashtags" @click="complete(type, hashtag)" @keydown="onKeydown" tabindex="-1">

View file

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<span v-if="!available">{{ $t('waiting') }}<MkEllipsis/></span> <span v-if="!available">{{ $ts.waiting }}<MkEllipsis/></span>
<div ref="captcha"></div> <div ref="captcha"></div>
</div> </div>
</template> </template>

View file

@ -6,14 +6,14 @@
> >
<template v-if="!wait"> <template v-if="!wait">
<template v-if="isFollowing"> <template v-if="isFollowing">
<span v-if="full">{{ $t('unfollow') }}</span><Fa :icon="faMinus"/> <span v-if="full">{{ $ts.unfollow }}</span><Fa :icon="faMinus"/>
</template> </template>
<template v-else> <template v-else>
<span v-if="full">{{ $t('follow') }}</span><Fa :icon="faPlus"/> <span v-if="full">{{ $ts.follow }}</span><Fa :icon="faPlus"/>
</template> </template>
</template> </template>
<template v-else> <template v-else>
<span v-if="full">{{ $t('processing') }}</span><Fa :icon="faSpinner" pulse fixed-width/> <span v-if="full">{{ $ts.processing }}</span><Fa :icon="faSpinner" pulse fixed-width/>
</template> </template>
</button> </button>
</template> </template>

View file

@ -6,7 +6,7 @@
<div class="status"> <div class="status">
<div> <div>
<Fa :icon="faUsers" fixed-width/> <Fa :icon="faUsers" fixed-width/>
<I18n src="_channel.usersCount" tag="span" style="margin-left: 4px;"> <I18n :src="$ts._channel.usersCount" tag="span" style="margin-left: 4px;">
<template #n> <template #n>
<b>{{ channel.usersCount }}</b> <b>{{ channel.usersCount }}</b>
</template> </template>
@ -14,7 +14,7 @@
</div> </div>
<div> <div>
<Fa :icon="faPencilAlt" fixed-width/> <Fa :icon="faPencilAlt" fixed-width/>
<I18n src="_channel.notesCount" tag="span" style="margin-left: 4px;"> <I18n :src="$ts._channel.notesCount" tag="span" style="margin-left: 4px;">
<template #n> <template #n>
<b>{{ channel.notesCount }}</b> <b>{{ channel.notesCount }}</b>
</template> </template>
@ -27,7 +27,7 @@
</article> </article>
<footer> <footer>
<span v-if="channel.lastNotedAt"> <span v-if="channel.lastNotedAt">
{{ $t('updatedAt') }}: <MkTime :time="channel.lastNotedAt"/> {{ $ts.updatedAt }}: <MkTime :time="channel.lastNotedAt"/>
</span> </span>
</footer> </footer>
</MkA> </MkA>

View file

@ -1,6 +1,6 @@
<template> <template>
<button class="nrvgflfu _button" @click="toggle"> <button class="nrvgflfu _button" @click="toggle">
<b>{{ value ? $t('_cw.hide') : $t('_cw.show') }}</b> <b>{{ value ? $ts._cw.hide : $ts._cw.show }}</b>
<span v-if="!value">{{ label }}</span> <span v-if="!value">{{ label }}</span>
</button> </button>
</template> </template>
@ -27,7 +27,7 @@ export default defineComponent({
return concat([ return concat([
this.note.text ? [this.$t('_cw.chars', { count: length(this.note.text) })] : [], this.note.text ? [this.$t('_cw.chars', { count: length(this.note.text) })] : [],
this.note.files && this.note.files.length !== 0 ? [this.$t('_cw.files', { count: this.note.files.length }) ] : [], this.note.files && this.note.files.length !== 0 ? [this.$t('_cw.files', { count: this.note.files.length }) ] : [],
this.note.poll != null ? [this.$t('poll')] : [] this.note.poll != null ? [this.$ts.poll] : []
] as string[][]).join(' / '); ] as string[][]).join(' / ');
} }
}, },

View file

@ -26,8 +26,8 @@
</template> </template>
</MkSelect> </MkSelect>
<div class="buttons" v-if="(showOkButton || showCancelButton) && !actions"> <div class="buttons" v-if="(showOkButton || showCancelButton) && !actions">
<MkButton inline @click="ok" v-if="showOkButton" primary :autofocus="!input && !select">{{ (showCancelButton || input || select) ? $t('ok') : $t('gotIt') }}</MkButton> <MkButton inline @click="ok" v-if="showOkButton" primary :autofocus="!input && !select">{{ (showCancelButton || input || select) ? $ts.ok : $ts.gotIt }}</MkButton>
<MkButton inline @click="cancel" v-if="showCancelButton || input || select">{{ $t('cancel') }}</MkButton> <MkButton inline @click="cancel" v-if="showCancelButton || input || select">{{ $ts.cancel }}</MkButton>
</div> </div>
<div class="buttons" v-if="actions"> <div class="buttons" v-if="actions">
<MkButton v-for="action in actions" inline @click="() => { action.callback(); close(); }" :primary="action.primary" :key="action.text">{{ action.text }}</MkButton> <MkButton v-for="action in actions" inline @click="() => { action.callback(); close(); }" :primary="action.primary" :key="action.text">{{ action.text }}</MkButton>

View file

@ -10,7 +10,7 @@
@closed="$emit('closed')" @closed="$emit('closed')"
> >
<template #header> <template #header>
{{ multiple ? ((type === 'file') ? $t('selectFiles') : $t('selectFolders')) : ((type === 'file') ? $t('selectFile') : $t('selectFolder')) }} {{ multiple ? ((type === 'file') ? $ts.selectFiles : $ts.selectFolders) : ((type === 'file') ? $ts.selectFile : $ts.selectFolder) }}
<span v-if="selected.length > 0" style="margin-left: 8px; opacity: 0.5;">({{ number(selected.length) }})</span> <span v-if="selected.length > 0" style="margin-left: 8px; opacity: 0.5;">({{ number(selected.length) }})</span>
</template> </template>
<XDrive :multiple="multiple" @changeSelection="onChangeSelection" @selected="ok()" :select="type"/> <XDrive :multiple="multiple" @changeSelection="onChangeSelection" @selected="ok()" :select="type"/>

View file

@ -6,7 +6,7 @@
@closed="$emit('closed')" @closed="$emit('closed')"
> >
<template #header> <template #header>
{{ $t('drive') }} {{ $ts.drive }}
</template> </template>
<XDrive :initial-folder="initialFolder"/> <XDrive :initial-folder="initialFolder"/>
</XWindow> </XWindow>

View file

@ -10,15 +10,15 @@
> >
<div class="label" v-if="$i.avatarId == file.id"> <div class="label" v-if="$i.avatarId == file.id">
<img src="/assets/label.svg"/> <img src="/assets/label.svg"/>
<p>{{ $t('avatar') }}</p> <p>{{ $ts.avatar }}</p>
</div> </div>
<div class="label" v-if="$i.bannerId == file.id"> <div class="label" v-if="$i.bannerId == file.id">
<img src="/assets/label.svg"/> <img src="/assets/label.svg"/>
<p>{{ $t('banner') }}</p> <p>{{ $ts.banner }}</p>
</div> </div>
<div class="label red" v-if="file.isSensitive"> <div class="label red" v-if="file.isSensitive">
<img src="/assets/label-red.svg"/> <img src="/assets/label-red.svg"/>
<p>{{ $t('nsfw') }}</p> <p>{{ $ts.nsfw }}</p>
</div> </div>
<MkDriveFileThumbnail class="thumbnail" :file="file" fit="contain"/> <MkDriveFileThumbnail class="thumbnail" :file="file" fit="contain"/>
@ -82,26 +82,26 @@ export default defineComponent({
methods: { methods: {
getMenu() { getMenu() {
return [{ return [{
text: this.$t('rename'), text: this.$ts.rename,
icon: faICursor, icon: faICursor,
action: this.rename action: this.rename
}, { }, {
text: this.file.isSensitive ? this.$t('unmarkAsSensitive') : this.$t('markAsSensitive'), text: this.file.isSensitive ? this.$ts.unmarkAsSensitive : this.$ts.markAsSensitive,
icon: this.file.isSensitive ? faEye : faEyeSlash, icon: this.file.isSensitive ? faEye : faEyeSlash,
action: this.toggleSensitive action: this.toggleSensitive
}, null, { }, null, {
text: this.$t('copyUrl'), text: this.$ts.copyUrl,
icon: faLink, icon: faLink,
action: this.copyUrl action: this.copyUrl
}, { }, {
type: 'a', type: 'a',
href: this.file.url, href: this.file.url,
target: '_blank', target: '_blank',
text: this.$t('download'), text: this.$ts.download,
icon: faDownload, icon: faDownload,
download: this.file.name download: this.file.name
}, null, { }, null, {
text: this.$t('delete'), text: this.$ts.delete,
icon: faTrashAlt, icon: faTrashAlt,
danger: true, danger: true,
action: this.deleteFile action: this.deleteFile
@ -137,9 +137,9 @@ export default defineComponent({
rename() { rename() {
os.dialog({ os.dialog({
title: this.$t('renameFile'), title: this.$ts.renameFile,
input: { input: {
placeholder: this.$t('inputNewFileName'), placeholder: this.$ts.inputNewFileName,
default: this.file.name, default: this.file.name,
allowEmpty: false allowEmpty: false
} }

View file

@ -20,7 +20,7 @@
{{ folder.name }} {{ folder.name }}
</p> </p>
<p class="upload" v-if="$store.state.uploadFolder == folder.id"> <p class="upload" v-if="$store.state.uploadFolder == folder.id">
{{ $t('uploadFolder') }} {{ $ts.uploadFolder }}
</p> </p>
<button v-if="selectMode" class="checkbox _button" :class="{ checked: isSelected }" @click.prevent.stop="checkboxClicked"></button> <button v-if="selectMode" class="checkbox _button" :class="{ checked: isSelected }" @click.prevent.stop="checkboxClicked"></button>
</div> </div>
@ -155,14 +155,14 @@ export default defineComponent({
switch (err) { switch (err) {
case 'detected-circular-definition': case 'detected-circular-definition':
os.dialog({ os.dialog({
title: this.$t('unableToProcess'), title: this.$ts.unableToProcess,
text: this.$t('circularReferenceFolder') text: this.$ts.circularReferenceFolder
}); });
break; break;
default: default:
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('somethingHappened') text: this.$ts.somethingHappened
}); });
} }
}); });
@ -195,9 +195,9 @@ export default defineComponent({
rename() { rename() {
os.dialog({ os.dialog({
title: this.$t('renameFolder'), title: this.$ts.renameFolder,
input: { input: {
placeholder: this.$t('inputNewFolderName'), placeholder: this.$ts.inputNewFolderName,
default: this.folder.name default: this.folder.name
} }
}).then(({ canceled, result: name }) => { }).then(({ canceled, result: name }) => {
@ -221,14 +221,14 @@ export default defineComponent({
case 'b0fc8a17-963c-405d-bfbc-859a487295e1': case 'b0fc8a17-963c-405d-bfbc-859a487295e1':
os.dialog({ os.dialog({
type: 'error', type: 'error',
title: this.$t('unableToDelete'), title: this.$ts.unableToDelete,
text: this.$t('hasChildFilesOrFolders') text: this.$ts.hasChildFilesOrFolders
}); });
break; break;
default: default:
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('unableToDelete') text: this.$ts.unableToDelete
}); });
} }
}); });
@ -240,7 +240,7 @@ export default defineComponent({
onContextmenu(e) { onContextmenu(e) {
os.contextMenu([{ os.contextMenu([{
text: this.$t('openInWindow'), text: this.$ts.openInWindow,
icon: faWindowRestore, icon: faWindowRestore,
action: () => { action: () => {
os.popup(import('./drive-window.vue'), { os.popup(import('./drive-window.vue'), {
@ -249,11 +249,11 @@ export default defineComponent({
}, 'closed'); }, 'closed');
} }
}, null, { }, null, {
text: this.$t('rename'), text: this.$ts.rename,
icon: faICursor, icon: faICursor,
action: this.rename action: this.rename
}, null, { }, null, {
text: this.$t('delete'), text: this.$ts.delete,
icon: faTrashAlt, icon: faTrashAlt,
danger: true, danger: true,
action: this.deleteFolder action: this.deleteFolder

View file

@ -8,7 +8,7 @@
@drop.stop="onDrop" @drop.stop="onDrop"
> >
<i v-if="folder == null"><Fa :icon="faCloud"/></i> <i v-if="folder == null"><Fa :icon="faCloud"/></i>
<span>{{ folder == null ? $t('drive') : folder.name }}</span> <span>{{ folder == null ? $ts.drive : folder.name }}</span>
</div> </div>
</template> </template>

View file

@ -24,18 +24,18 @@
<XFolder v-for="f in folders" :key="f.id" class="folder" :folder="f" :select-mode="select === 'folder'" :is-selected="selectedFolders.some(x => x.id === f.id)" @chosen="chooseFolder"/> <XFolder v-for="f in folders" :key="f.id" class="folder" :folder="f" :select-mode="select === 'folder'" :is-selected="selectedFolders.some(x => x.id === f.id)" @chosen="chooseFolder"/>
<!-- SEE: https://stackoverflow.com/questions/18744164/flex-box-align-last-row-to-grid --> <!-- SEE: https://stackoverflow.com/questions/18744164/flex-box-align-last-row-to-grid -->
<div class="padding" v-for="(n, i) in 16" :key="i"></div> <div class="padding" v-for="(n, i) in 16" :key="i"></div>
<MkButton ref="moreFolders" v-if="moreFolders">{{ $t('loadMore') }}</MkButton> <MkButton ref="moreFolders" v-if="moreFolders">{{ $ts.loadMore }}</MkButton>
</div> </div>
<div class="files" ref="filesContainer" v-show="files.length > 0"> <div class="files" ref="filesContainer" v-show="files.length > 0">
<XFile v-for="file in files" :key="file.id" class="file" :file="file" :select-mode="select === 'file'" :is-selected="selectedFiles.some(x => x.id === file.id)" @chosen="chooseFile"/> <XFile v-for="file in files" :key="file.id" class="file" :file="file" :select-mode="select === 'file'" :is-selected="selectedFiles.some(x => x.id === file.id)" @chosen="chooseFile"/>
<!-- SEE: https://stackoverflow.com/questions/18744164/flex-box-align-last-row-to-grid --> <!-- SEE: https://stackoverflow.com/questions/18744164/flex-box-align-last-row-to-grid -->
<div class="padding" v-for="(n, i) in 16" :key="i"></div> <div class="padding" v-for="(n, i) in 16" :key="i"></div>
<MkButton ref="loadMoreFiles" @click="fetchMoreFiles" v-show="moreFiles">{{ $t('loadMore') }}</MkButton> <MkButton ref="loadMoreFiles" @click="fetchMoreFiles" v-show="moreFiles">{{ $ts.loadMore }}</MkButton>
</div> </div>
<div class="empty" v-if="files.length == 0 && folders.length == 0 && !fetching"> <div class="empty" v-if="files.length == 0 && folders.length == 0 && !fetching">
<p v-if="draghover">{{ $t('empty-draghover') }}</p> <p v-if="draghover">{{ $t('empty-draghover') }}</p>
<p v-if="!draghover && folder == null"><strong>{{ $t('emptyDrive') }}</strong><br/>{{ $t('empty-drive-description') }}</p> <p v-if="!draghover && folder == null"><strong>{{ $ts.emptyDrive }}</strong><br/>{{ $t('empty-drive-description') }}</p>
<p v-if="!draghover && folder != null">{{ $t('emptyFolder') }}</p> <p v-if="!draghover && folder != null">{{ $ts.emptyFolder }}</p>
</div> </div>
</div> </div>
<MkLoading v-if="fetching"/> <MkLoading v-if="fetching"/>
@ -277,14 +277,14 @@ export default defineComponent({
switch (err) { switch (err) {
case 'detected-circular-definition': case 'detected-circular-definition':
os.dialog({ os.dialog({
title: this.$t('unableToProcess'), title: this.$ts.unableToProcess,
text: this.$t('circularReferenceFolder') text: this.$ts.circularReferenceFolder
}); });
break; break;
default: default:
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('somethingHappened') text: this.$ts.somethingHappened
}); });
} }
}); });
@ -298,9 +298,9 @@ export default defineComponent({
urlUpload() { urlUpload() {
os.dialog({ os.dialog({
title: this.$t('uploadFromUrl'), title: this.$ts.uploadFromUrl,
input: { input: {
placeholder: this.$t('uploadFromUrlDescription') placeholder: this.$ts.uploadFromUrlDescription
} }
}).then(({ canceled, result: url }) => { }).then(({ canceled, result: url }) => {
if (canceled) return; if (canceled) return;
@ -310,17 +310,17 @@ export default defineComponent({
}); });
os.dialog({ os.dialog({
title: this.$t('uploadFromUrlRequested'), title: this.$ts.uploadFromUrlRequested,
text: this.$t('uploadFromUrlMayTakeTime') text: this.$ts.uploadFromUrlMayTakeTime
}); });
}); });
}, },
createFolder() { createFolder() {
os.dialog({ os.dialog({
title: this.$t('createFolder'), title: this.$ts.createFolder,
input: { input: {
placeholder: this.$t('folderName') placeholder: this.$ts.folderName
} }
}).then(({ canceled, result: name }) => { }).then(({ canceled, result: name }) => {
if (canceled) return; if (canceled) return;
@ -335,9 +335,9 @@ export default defineComponent({
renameFolder(folder) { renameFolder(folder) {
os.dialog({ os.dialog({
title: this.$t('renameFolder'), title: this.$ts.renameFolder,
input: { input: {
placeholder: this.$t('inputNewFolderName'), placeholder: this.$ts.inputNewFolderName,
default: folder.name default: folder.name
} }
}).then(({ canceled, result: name }) => { }).then(({ canceled, result: name }) => {
@ -363,14 +363,14 @@ export default defineComponent({
case 'b0fc8a17-963c-405d-bfbc-859a487295e1': case 'b0fc8a17-963c-405d-bfbc-859a487295e1':
os.dialog({ os.dialog({
type: 'error', type: 'error',
title: this.$t('unableToDelete'), title: this.$ts.unableToDelete,
text: this.$t('hasChildFilesOrFolders') text: this.$ts.hasChildFilesOrFolders
}); });
break; break;
default: default:
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('unableToDelete') text: this.$ts.unableToDelete
}); });
} }
}); });
@ -602,29 +602,29 @@ export default defineComponent({
getMenu() { getMenu() {
return [{ return [{
text: this.$t('addFile'), text: this.$ts.addFile,
type: 'label' type: 'label'
}, { }, {
text: this.$t('upload'), text: this.$ts.upload,
icon: faUpload, icon: faUpload,
action: () => { this.selectLocalFile(); } action: () => { this.selectLocalFile(); }
}, { }, {
text: this.$t('fromUrl'), text: this.$ts.fromUrl,
icon: faLink, icon: faLink,
action: () => { this.urlUpload(); } action: () => { this.urlUpload(); }
}, null, { }, null, {
text: this.folder ? this.folder.name : this.$t('drive'), text: this.folder ? this.folder.name : this.$ts.drive,
type: 'label' type: 'label'
}, this.folder ? { }, this.folder ? {
text: this.$t('renameFolder'), text: this.$ts.renameFolder,
icon: faICursor, icon: faICursor,
action: () => { this.renameFolder(this.folder); } action: () => { this.renameFolder(this.folder); }
} : undefined, this.folder ? { } : undefined, this.folder ? {
text: this.$t('deleteFolder'), text: this.$ts.deleteFolder,
icon: faTrashAlt, icon: faTrashAlt,
action: () => { this.deleteFolder(this.folder); } action: () => { this.deleteFolder(this.folder); }
} : undefined, { } : undefined, {
text: this.$t('createFolder'), text: this.$ts.createFolder,
icon: faFolderPlus, icon: faFolderPlus,
action: () => { this.createFolder(); } action: () => { this.createFolder(); }
}]; }];

View file

@ -1,7 +1,7 @@
<template> <template>
<MkModal ref="modal" :src="src" @click="$refs.modal.close()" @closed="$emit('closed')"> <MkModal ref="modal" :src="src" @click="$refs.modal.close()" @closed="$emit('closed')">
<div class="omfetrab _popup" :class="['w' + width, 'h' + height, { big }]"> <div class="omfetrab _popup" :class="['w' + width, 'h' + height, { big }]">
<input ref="search" class="search" :class="{ filled: q != null && q != '' }" v-model.trim="q" :placeholder="$t('search')" @paste.stop="paste" @keyup.enter="done()"> <input ref="search" class="search" :class="{ filled: q != null && q != '' }" v-model.trim="q" :placeholder="$ts.search" @paste.stop="paste" @keyup.enter="done()">
<div class="emojis"> <div class="emojis">
<section class="result"> <section class="result">
<div v-if="searchResultCustom.length > 0"> <div v-if="searchResultCustom.length > 0">
@ -43,7 +43,7 @@
</section> </section>
<section> <section>
<header class="_acrylic"><Fa :icon="faClock" fixed-width/> {{ $t('recentUsed') }}</header> <header class="_acrylic"><Fa :icon="faClock" fixed-width/> {{ $ts.recentUsed }}</header>
<div> <div>
<button v-for="emoji in $store.state.recentlyUsedEmojis" <button v-for="emoji in $store.state.recentlyUsedEmojis"
class="_button" class="_button"
@ -59,7 +59,7 @@
</div> </div>
<section v-for="category in customEmojiCategories" :key="'custom:' + category" class="custom"> <section v-for="category in customEmojiCategories" :key="'custom:' + category" class="custom">
<header class="_acrylic" v-appear="() => visibleCategories[category] = true">{{ category || $t('other') }}</header> <header class="_acrylic" v-appear="() => visibleCategories[category] = true">{{ category || $ts.other }}</header>
<div v-if="visibleCategories[category]"> <div v-if="visibleCategories[category]">
<button v-for="emoji in customEmojis.filter(e => e.category === category)" <button v-for="emoji in customEmojis.filter(e => e.category === category)"
class="_button" class="_button"

View file

@ -6,23 +6,23 @@
> >
<template v-if="!wait"> <template v-if="!wait">
<template v-if="hasPendingFollowRequestFromYou && user.isLocked"> <template v-if="hasPendingFollowRequestFromYou && user.isLocked">
<span v-if="full">{{ $t('followRequestPending') }}</span><Fa :icon="faHourglassHalf"/> <span v-if="full">{{ $ts.followRequestPending }}</span><Fa :icon="faHourglassHalf"/>
</template> </template>
<template v-else-if="hasPendingFollowRequestFromYou && !user.isLocked"> <!-- つまりリモートフォローの場合 --> <template v-else-if="hasPendingFollowRequestFromYou && !user.isLocked"> <!-- つまりリモートフォローの場合 -->
<span v-if="full">{{ $t('processing') }}</span><Fa :icon="faSpinner" pulse/> <span v-if="full">{{ $ts.processing }}</span><Fa :icon="faSpinner" pulse/>
</template> </template>
<template v-else-if="isFollowing"> <template v-else-if="isFollowing">
<span v-if="full">{{ $t('unfollow') }}</span><Fa :icon="faMinus"/> <span v-if="full">{{ $ts.unfollow }}</span><Fa :icon="faMinus"/>
</template> </template>
<template v-else-if="!isFollowing && user.isLocked"> <template v-else-if="!isFollowing && user.isLocked">
<span v-if="full">{{ $t('followRequest') }}</span><Fa :icon="faPlus"/> <span v-if="full">{{ $ts.followRequest }}</span><Fa :icon="faPlus"/>
</template> </template>
<template v-else-if="!isFollowing && !user.isLocked"> <template v-else-if="!isFollowing && !user.isLocked">
<span v-if="full">{{ $t('follow') }}</span><Fa :icon="faPlus"/> <span v-if="full">{{ $ts.follow }}</span><Fa :icon="faPlus"/>
</template> </template>
</template> </template>
<template v-else> <template v-else>
<span v-if="full">{{ $t('processing') }}</span><Fa :icon="faSpinner" pulse fixed-width/> <span v-if="full">{{ $ts.processing }}</span><Fa :icon="faSpinner" pulse fixed-width/>
</template> </template>
</button> </button>
</template> </template>

View file

@ -15,15 +15,15 @@
<FormBase class="xkpnjxcv"> <FormBase class="xkpnjxcv">
<template v-for="item in Object.keys(form).filter(item => !form[item].hidden)"> <template v-for="item in Object.keys(form).filter(item => !form[item].hidden)">
<FormInput v-if="form[item].type === 'number'" v-model:value="values[item]" type="number" :step="form[item].step || 1"> <FormInput v-if="form[item].type === 'number'" v-model:value="values[item]" type="number" :step="form[item].step || 1">
<span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $t('optional') }})</span> <span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span>
<template v-if="form[item].description" #desc>{{ form[item].description }}</template> <template v-if="form[item].description" #desc>{{ form[item].description }}</template>
</FormInput> </FormInput>
<FormInput v-else-if="form[item].type === 'string' && !form[item].multiline" v-model:value="values[item]" type="text"> <FormInput v-else-if="form[item].type === 'string' && !form[item].multiline" v-model:value="values[item]" type="text">
<span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $t('optional') }})</span> <span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span>
<template v-if="form[item].description" #desc>{{ form[item].description }}</template> <template v-if="form[item].description" #desc>{{ form[item].description }}</template>
</FormInput> </FormInput>
<FormTextarea v-else-if="form[item].type === 'string' && form[item].multiline" v-model:value="values[item]"> <FormTextarea v-else-if="form[item].type === 'string' && form[item].multiline" v-model:value="values[item]">
<span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $t('optional') }})</span> <span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span>
<template v-if="form[item].description" #desc>{{ form[item].description }}</template> <template v-if="form[item].description" #desc>{{ form[item].description }}</template>
</FormTextarea> </FormTextarea>
<FormSwitch v-else-if="form[item].type === 'boolean'" v-model:value="values[item]"> <FormSwitch v-else-if="form[item].type === 'boolean'" v-model:value="values[item]">
@ -31,11 +31,11 @@
<template v-if="form[item].description" #desc>{{ form[item].description }}</template> <template v-if="form[item].description" #desc>{{ form[item].description }}</template>
</FormSwitch> </FormSwitch>
<FormSelect v-else-if="form[item].type === 'enum'" v-model:value="values[item]"> <FormSelect v-else-if="form[item].type === 'enum'" v-model:value="values[item]">
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $t('optional') }})</span></template> <template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
<option v-for="item in form[item].enum" :value="item.value" :key="item.value">{{ item.label }}</option> <option v-for="item in form[item].enum" :value="item.value" :key="item.value">{{ item.label }}</option>
</FormSelect> </FormSelect>
<FormRange v-else-if="form[item].type === 'range'" v-model:value="values[item]" :min="form[item].mim" :max="form[item].max" :step="form[item].step"> <FormRange v-else-if="form[item].type === 'range'" v-model:value="values[item]" :min="form[item].mim" :max="form[item].max" :step="form[item].step">
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $t('optional') }})</span></template> <template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
<template v-if="form[item].description" #desc>{{ form[item].description }}</template> <template v-if="form[item].description" #desc>{{ form[item].description }}</template>
</FormRange> </FormRange>
<FormButton v-else-if="form[item].type === 'button'" @click="form[item].action($event, values)"> <FormButton v-else-if="form[item].type === 'button'" @click="form[item].action($event, values)">

View file

@ -44,7 +44,7 @@
</datalist> </datalist>
<div class="suffix" ref="suffixEl"><slot name="suffix"></slot></div> <div class="suffix" ref="suffixEl"><slot name="suffix"></slot></div>
</div> </div>
<button class="save _textButton" v-if="save && changed" @click="() => { changed = false; save(); }">{{ $t('save') }}</button> <button class="save _textButton" v-if="save && changed" @click="() => { changed = false; save(); }">{{ $ts.save }}</button>
<div class="_formCaption"><slot name="desc"></slot></div> <div class="_formCaption"><slot name="desc"></slot></div>
</div> </div>
</template> </template>

View file

@ -6,7 +6,7 @@
<slot name="empty"></slot> <slot name="empty"></slot>
</div> </div>
<FormButton v-show="more" class="button" @click="fetchMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }" primary> <FormButton v-show="more" class="button" @click="fetchMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }" primary>
<template v-if="!moreFetching">{{ $t('loadMore') }}</template> <template v-if="!moreFetching">{{ $ts.loadMore }}</template>
<template v-if="moreFetching"><MkLoading inline/></template> <template v-if="moreFetching"><MkLoading inline/></template>
</FormButton> </FormButton>
</FormGroup> </FormGroup>

View file

@ -14,7 +14,7 @@
@blur="focused = false" @blur="focused = false"
></textarea> ></textarea>
</div> </div>
<button class="save _textButton" v-if="save && changed" @click="() => { changed = false; save(); }">{{ $t('save') }}</button> <button class="save _textButton" v-if="save && changed" @click="() => { changed = false; save(); }">{{ $ts.save }}</button>
<div class="_formCaption"><slot name="desc"></slot></div> <div class="_formCaption"><slot name="desc"></slot></div>
</div> </div>
</template> </template>

View file

@ -58,31 +58,31 @@ export default defineComponent({
text: this.to, text: this.to,
}, { }, {
icon: faWindowMaximize, icon: faWindowMaximize,
text: this.$t('openInWindow'), text: this.$ts.openInWindow,
action: () => { action: () => {
os.pageWindow(this.to); os.pageWindow(this.to);
} }
}, this.sideViewHook ? { }, this.sideViewHook ? {
icon: faColumns, icon: faColumns,
text: this.$t('openInSideView'), text: this.$ts.openInSideView,
action: () => { action: () => {
this.sideViewHook(this.to); this.sideViewHook(this.to);
} }
} : undefined, { } : undefined, {
icon: faExpandAlt, icon: faExpandAlt,
text: this.$t('showInPage'), text: this.$ts.showInPage,
action: () => { action: () => {
this.$router.push(this.to); this.$router.push(this.to);
} }
}, null, { }, null, {
icon: faExternalLinkAlt, icon: faExternalLinkAlt,
text: this.$t('openInNewTab'), text: this.$ts.openInNewTab,
action: () => { action: () => {
window.open(this.to, '_blank'); window.open(this.to, '_blank');
} }
}, { }, {
icon: faLink, icon: faLink,
text: this.$t('copyLink'), text: this.$ts.copyLink,
action: () => { action: () => {
copyToClipboard(`${url}${this.to}`); copyToClipboard(`${url}${this.to}`);
} }

View file

@ -2,8 +2,8 @@
<transition :name="$store.state.animation ? 'zoom' : ''" appear> <transition :name="$store.state.animation ? 'zoom' : ''" appear>
<div class="mjndxjcg"> <div class="mjndxjcg">
<img src="https://xn--931a.moe/assets/error.jpg" class="_ghost"/> <img src="https://xn--931a.moe/assets/error.jpg" class="_ghost"/>
<p><Fa :icon="faExclamationTriangle"/> {{ $t('somethingHappened') }}</p> <p><Fa :icon="faExclamationTriangle"/> {{ $ts.somethingHappened }}</p>
<MkButton @click="() => $emit('retry')" class="button">{{ $t('retry') }}</MkButton> <MkButton @click="() => $emit('retry')" class="button">{{ $ts.retry }}</MkButton>
</div> </div>
</transition> </transition>
</template> </template>

View file

@ -1,15 +1,37 @@
import { h, Fragment, defineComponent } from 'vue'; import { h, defineComponent } from 'vue';
import type { SetupContext, VNodeChild, RenderFunction } from 'vue';
export default defineComponent({ export default defineComponent({
props: { props: {
src: { src: {
type: String, type: String,
required: true required: true,
},
tag: {
type: String,
required: false,
default: 'span',
}, },
}, },
render() { render() {
// TODO let str = this.src;
return h('span', this.src); const parsed = [] as (string | { arg: string; })[];
while (true) {
const nextBracketOpen = str.indexOf('{');
const nextBracketClose = str.indexOf('}');
if (nextBracketOpen === -1) {
parsed.push(str);
break;
} else {
if (nextBracketOpen > 0) parsed.push(str.substr(0, nextBracketOpen));
parsed.push({
arg: str.substring(nextBracketOpen + 1, nextBracketClose)
});
}
str = str.substr(nextBracketClose + 1);
}
return h(this.tag, parsed.map(x => typeof x === 'string' ? x : this.$slots[x.arg]()));
} }
}); });

View file

@ -44,9 +44,9 @@ export default defineComponent({
ago >= 3600 ? this.$t('_ago.hoursAgo', { n: (~~(ago / 3600)).toString() }) : ago >= 3600 ? this.$t('_ago.hoursAgo', { n: (~~(ago / 3600)).toString() }) :
ago >= 60 ? this.$t('_ago.minutesAgo', { n: (~~(ago / 60)).toString() }) : ago >= 60 ? this.$t('_ago.minutesAgo', { n: (~~(ago / 60)).toString() }) :
ago >= 10 ? this.$t('_ago.secondsAgo', { n: (~~(ago % 60)).toString() }) : ago >= 10 ? this.$t('_ago.secondsAgo', { n: (~~(ago % 60)).toString() }) :
ago >= -1 ? this.$t('_ago.justNow') : ago >= -1 ? this.$ts._ago.justNow :
ago < -1 ? this.$t('_ago.future') : ago < -1 ? this.$ts._ago.future :
this.$t('_ago.unknown')); this.$ts._ago.unknown);
} }
}, },
created() { created() {

View file

@ -1,7 +1,7 @@
<template> <template>
<div class="mk-google"> <div class="mk-google">
<input type="search" v-model="query" :placeholder="q"> <input type="search" v-model="query" :placeholder="q">
<button @click="search"><Fa :icon="faSearch"/> {{ $t('search') }}</button> <button @click="search"><Fa :icon="faSearch"/> {{ $ts.search }}</button>
</div> </div>
</template> </template>

View file

@ -3,80 +3,80 @@
<div class="stats" v-if="info"> <div class="stats" v-if="info">
<div class="_panel"> <div class="_panel">
<div> <div>
<b><Fa :icon="faUser"/>{{ $t('users') }}</b> <b><Fa :icon="faUser"/>{{ $ts.users }}</b>
<small>{{ $t('local') }}</small> <small>{{ $ts.local }}</small>
</div> </div>
<div> <div>
<dl class="total"> <dl class="total">
<dt>{{ $t('total') }}</dt> <dt>{{ $ts.total }}</dt>
<dd>{{ number(info.originalUsersCount) }}</dd> <dd>{{ number(info.originalUsersCount) }}</dd>
</dl> </dl>
<dl class="diff" :class="{ inc: usersLocalDoD > 0 }"> <dl class="diff" :class="{ inc: usersLocalDoD > 0 }">
<dt>{{ $t('dayOverDayChanges') }}</dt> <dt>{{ $ts.dayOverDayChanges }}</dt>
<dd>{{ number(usersLocalDoD) }}</dd> <dd>{{ number(usersLocalDoD) }}</dd>
</dl> </dl>
<dl class="diff" :class="{ inc: usersLocalWoW > 0 }"> <dl class="diff" :class="{ inc: usersLocalWoW > 0 }">
<dt>{{ $t('weekOverWeekChanges') }}</dt> <dt>{{ $ts.weekOverWeekChanges }}</dt>
<dd>{{ number(usersLocalWoW) }}</dd> <dd>{{ number(usersLocalWoW) }}</dd>
</dl> </dl>
</div> </div>
</div> </div>
<div class="_panel"> <div class="_panel">
<div> <div>
<b><Fa :icon="faUser"/>{{ $t('users') }}</b> <b><Fa :icon="faUser"/>{{ $ts.users }}</b>
<small>{{ $t('remote') }}</small> <small>{{ $ts.remote }}</small>
</div> </div>
<div> <div>
<dl class="total"> <dl class="total">
<dt>{{ $t('total') }}</dt> <dt>{{ $ts.total }}</dt>
<dd>{{ number((info.usersCount - info.originalUsersCount)) }}</dd> <dd>{{ number((info.usersCount - info.originalUsersCount)) }}</dd>
</dl> </dl>
<dl class="diff" :class="{ inc: usersRemoteDoD > 0 }"> <dl class="diff" :class="{ inc: usersRemoteDoD > 0 }">
<dt>{{ $t('dayOverDayChanges') }}</dt> <dt>{{ $ts.dayOverDayChanges }}</dt>
<dd>{{ number(usersRemoteDoD) }}</dd> <dd>{{ number(usersRemoteDoD) }}</dd>
</dl> </dl>
<dl class="diff" :class="{ inc: usersRemoteWoW > 0 }"> <dl class="diff" :class="{ inc: usersRemoteWoW > 0 }">
<dt>{{ $t('weekOverWeekChanges') }}</dt> <dt>{{ $ts.weekOverWeekChanges }}</dt>
<dd>{{ number(usersRemoteWoW) }}</dd> <dd>{{ number(usersRemoteWoW) }}</dd>
</dl> </dl>
</div> </div>
</div> </div>
<div class="_panel"> <div class="_panel">
<div> <div>
<b><Fa :icon="faPencilAlt"/>{{ $t('notes') }}</b> <b><Fa :icon="faPencilAlt"/>{{ $ts.notes }}</b>
<small>{{ $t('local') }}</small> <small>{{ $ts.local }}</small>
</div> </div>
<div> <div>
<dl class="total"> <dl class="total">
<dt>{{ $t('total') }}</dt> <dt>{{ $ts.total }}</dt>
<dd>{{ number(info.originalNotesCount) }}</dd> <dd>{{ number(info.originalNotesCount) }}</dd>
</dl> </dl>
<dl class="diff" :class="{ inc: notesLocalDoD > 0 }"> <dl class="diff" :class="{ inc: notesLocalDoD > 0 }">
<dt>{{ $t('dayOverDayChanges') }}</dt> <dt>{{ $ts.dayOverDayChanges }}</dt>
<dd>{{ number(notesLocalDoD) }}</dd> <dd>{{ number(notesLocalDoD) }}</dd>
</dl> </dl>
<dl class="diff" :class="{ inc: notesLocalWoW > 0 }"> <dl class="diff" :class="{ inc: notesLocalWoW > 0 }">
<dt>{{ $t('weekOverWeekChanges') }}</dt> <dt>{{ $ts.weekOverWeekChanges }}</dt>
<dd>{{ number(notesLocalWoW) }}</dd> <dd>{{ number(notesLocalWoW) }}</dd>
</dl> </dl>
</div> </div>
</div> </div>
<div class="_panel"> <div class="_panel">
<div> <div>
<b><Fa :icon="faPencilAlt"/>{{ $t('notes') }}</b> <b><Fa :icon="faPencilAlt"/>{{ $ts.notes }}</b>
<small>{{ $t('remote') }}</small> <small>{{ $ts.remote }}</small>
</div> </div>
<div> <div>
<dl class="total"> <dl class="total">
<dt>{{ $t('total') }}</dt> <dt>{{ $ts.total }}</dt>
<dd>{{ number((info.notesCount - info.originalNotesCount)) }}</dd> <dd>{{ number((info.notesCount - info.originalNotesCount)) }}</dd>
</dl> </dl>
<dl class="diff" :class="{ inc: notesRemoteDoD > 0 }"> <dl class="diff" :class="{ inc: notesRemoteDoD > 0 }">
<dt>{{ $t('dayOverDayChanges') }}</dt> <dt>{{ $ts.dayOverDayChanges }}</dt>
<dd>{{ number(notesRemoteDoD) }}</dd> <dd>{{ number(notesRemoteDoD) }}</dd>
</dl> </dl>
<dl class="diff" :class="{ inc: notesRemoteWoW > 0 }"> <dl class="diff" :class="{ inc: notesRemoteWoW > 0 }">
<dt>{{ $t('weekOverWeekChanges') }}</dt> <dt>{{ $ts.weekOverWeekChanges }}</dt>
<dd>{{ number(notesRemoteWoW) }}</dd> <dd>{{ number(notesRemoteWoW) }}</dd>
</dl> </dl>
</div> </div>
@ -84,35 +84,35 @@
</div> </div>
<section class="_card"> <section class="_card">
<div class="_title" style="position: relative;"><Fa :icon="faChartBar"/> {{ $t('statistics') }}<button @click="fetchChart" class="_button" style="position: absolute; right: 0; bottom: 0; top: 0; padding: inherit;"><Fa :icon="faSync"/></button></div> <div class="_title" style="position: relative;"><Fa :icon="faChartBar"/> {{ $ts.statistics }}<button @click="fetchChart" class="_button" style="position: absolute; right: 0; bottom: 0; top: 0; padding: inherit;"><Fa :icon="faSync"/></button></div>
<div class="_content" style="margin-top: -8px;"> <div class="_content" style="margin-top: -8px;">
<div class="selects" style="display: flex;"> <div class="selects" style="display: flex;">
<MkSelect v-model:value="chartSrc" style="margin: 0; flex: 1;"> <MkSelect v-model:value="chartSrc" style="margin: 0; flex: 1;">
<optgroup :label="$t('federation')"> <optgroup :label="$ts.federation">
<option value="federation-instances">{{ $t('_charts.federationInstancesIncDec') }}</option> <option value="federation-instances">{{ $ts._charts.federationInstancesIncDec }}</option>
<option value="federation-instances-total">{{ $t('_charts.federationInstancesTotal') }}</option> <option value="federation-instances-total">{{ $ts._charts.federationInstancesTotal }}</option>
</optgroup> </optgroup>
<optgroup :label="$t('users')"> <optgroup :label="$ts.users">
<option value="users">{{ $t('_charts.usersIncDec') }}</option> <option value="users">{{ $ts._charts.usersIncDec }}</option>
<option value="users-total">{{ $t('_charts.usersTotal') }}</option> <option value="users-total">{{ $ts._charts.usersTotal }}</option>
<option value="active-users">{{ $t('_charts.activeUsers') }}</option> <option value="active-users">{{ $ts._charts.activeUsers }}</option>
</optgroup> </optgroup>
<optgroup :label="$t('notes')"> <optgroup :label="$ts.notes">
<option value="notes">{{ $t('_charts.notesIncDec') }}</option> <option value="notes">{{ $ts._charts.notesIncDec }}</option>
<option value="local-notes">{{ $t('_charts.localNotesIncDec') }}</option> <option value="local-notes">{{ $ts._charts.localNotesIncDec }}</option>
<option value="remote-notes">{{ $t('_charts.remoteNotesIncDec') }}</option> <option value="remote-notes">{{ $ts._charts.remoteNotesIncDec }}</option>
<option value="notes-total">{{ $t('_charts.notesTotal') }}</option> <option value="notes-total">{{ $ts._charts.notesTotal }}</option>
</optgroup> </optgroup>
<optgroup :label="$t('drive')"> <optgroup :label="$ts.drive">
<option value="drive-files">{{ $t('_charts.filesIncDec') }}</option> <option value="drive-files">{{ $ts._charts.filesIncDec }}</option>
<option value="drive-files-total">{{ $t('_charts.filesTotal') }}</option> <option value="drive-files-total">{{ $ts._charts.filesTotal }}</option>
<option value="drive">{{ $t('_charts.storageUsageIncDec') }}</option> <option value="drive">{{ $ts._charts.storageUsageIncDec }}</option>
<option value="drive-total">{{ $t('_charts.storageUsageTotal') }}</option> <option value="drive-total">{{ $ts._charts.storageUsageTotal }}</option>
</optgroup> </optgroup>
</MkSelect> </MkSelect>
<MkSelect v-model:value="chartSpan" style="margin: 0;"> <MkSelect v-model:value="chartSpan" style="margin: 0;">
<option value="hour">{{ $t('perHour') }}</option> <option value="hour">{{ $ts.perHour }}</option>
<option value="day">{{ $t('perDay') }}</option> <option value="day">{{ $ts.perDay }}</option>
</MkSelect> </MkSelect>
</div> </div>
<canvas ref="chart"></canvas> <canvas ref="chart"></canvas>

View file

@ -18,7 +18,7 @@
<div class="sub"> <div class="sub">
<MkA to="/docs" @click.passive="close()"> <MkA to="/docs" @click.passive="close()">
<Fa :icon="faQuestionCircle" class="icon"/> <Fa :icon="faQuestionCircle" class="icon"/>
<div class="text">{{ $t('help') }}</div> <div class="text">{{ $ts.help }}</div>
</MkA> </MkA>
<MkA to="/about" @click.passive="close()"> <MkA to="/about" @click.passive="close()">
<Fa :icon="faInfoCircle" class="icon"/> <Fa :icon="faInfoCircle" class="icon"/>
@ -26,7 +26,7 @@
</MkA> </MkA>
<MkA to="/about-misskey" @click.passive="close()"> <MkA to="/about-misskey" @click.passive="close()">
<Fa :icon="faInfoCircle" class="icon"/> <Fa :icon="faInfoCircle" class="icon"/>
<div class="text">{{ $t('aboutMisskey') }}</div> <div class="text">{{ $ts.aboutMisskey }}</div>
</MkA> </MkA>
</div> </div>
</div> </div>

View file

@ -2,8 +2,8 @@
<div class="mk-media-banner"> <div class="mk-media-banner">
<div class="sensitive" v-if="media.isSensitive && hide" @click="hide = false"> <div class="sensitive" v-if="media.isSensitive && hide" @click="hide = false">
<span class="icon"><Fa :icon="faExclamationTriangle"/></span> <span class="icon"><Fa :icon="faExclamationTriangle"/></span>
<b>{{ $t('sensitive') }}</b> <b>{{ $ts.sensitive }}</b>
<span>{{ $t('clickToShow') }}</span> <span>{{ $ts.clickToShow }}</span>
</div> </div>
<div class="audio" v-else-if="media.type.startsWith('audio') && media.type !== 'audio/midi'"> <div class="audio" v-else-if="media.type.startsWith('audio') && media.type !== 'audio/midi'">
<audio class="audio" <audio class="audio"

View file

@ -3,8 +3,8 @@
<ImgWithBlurhash class="bg" :hash="image.blurhash" :title="image.name"/> <ImgWithBlurhash class="bg" :hash="image.blurhash" :title="image.name"/>
<div class="text"> <div class="text">
<div> <div>
<b><Fa :icon="faExclamationTriangle"/> {{ $t('sensitive') }}</b> <b><Fa :icon="faExclamationTriangle"/> {{ $ts.sensitive }}</b>
<span>{{ $t('clickToShow') }}</span> <span>{{ $ts.clickToShow }}</span>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,8 +1,8 @@
<template> <template>
<div class="icozogqfvdetwohsdglrbswgrejoxbdj" v-if="hide" @click="hide = false"> <div class="icozogqfvdetwohsdglrbswgrejoxbdj" v-if="hide" @click="hide = false">
<div> <div>
<b><Fa :icon="faExclamationTriangle"/> {{ $t('sensitive') }}</b> <b><Fa :icon="faExclamationTriangle"/> {{ $ts.sensitive }}</b>
<span>{{ $t('clickToShow') }}</span> <span>{{ $ts.clickToShow }}</span>
</div> </div>
</div> </div>
<div class="kkjnbbplepmiyuadieoenjgutgcmtsvu" v-else> <div class="kkjnbbplepmiyuadieoenjgutgcmtsvu" v-else>

View file

@ -1,6 +1,6 @@
<template> <template>
<MkA class="ldlomzub" :class="{ isMe }" :to="url" v-user-preview="canonical" v-if="url.startsWith('/')"> <MkA class="ldlomzub" :class="{ isMe }" :to="url" v-user-preview="canonical" v-if="url.startsWith('/')">
<span class="me" v-if="isMe">{{ $t('you') }}</span> <span class="me" v-if="isMe">{{ $ts.you }}</span>
<span class="main"> <span class="main">
<span class="username">@{{ username }}</span> <span class="username">@{{ username }}</span>
<span class="host" v-if="(host != localHost) || $store.state.showFullAcct">@{{ toUnicode(host) }}</span> <span class="host" v-if="(host != localHost) || $store.state.showFullAcct">@{{ toUnicode(host) }}</span>

View file

@ -10,13 +10,13 @@
> >
<XSub v-for="note in conversation" class="reply-to-more" :key="note.id" :note="note"/> <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"/> <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="pinned"><Fa :icon="faThumbtack"/> {{ $ts.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._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"/> {{ $t('featured') }}</div> <div class="info" v-if="appearNote._featuredId_"><Fa :icon="faBolt"/> {{ $ts.featured }}</div>
<div class="renote" v-if="isRenote"> <div class="renote" v-if="isRenote">
<MkAvatar class="avatar" :user="note.user"/> <MkAvatar class="avatar" :user="note.user"/>
<Fa :icon="faRetweet"/> <Fa :icon="faRetweet"/>
<I18n src="renotedBy" tag="span"> <I18n :src="$ts.renotedBy" tag="span">
<template #user> <template #user>
<MkA class="name" :to="userPage(note.user)" v-user-preview="note.userId"> <MkA class="name" :to="userPage(note.user)" v-user-preview="note.userId">
<MkUserName :user="note.user"/> <MkUserName :user="note.user"/>
@ -48,7 +48,7 @@
</p> </p>
<div class="content" v-show="appearNote.cw == null || showContent"> <div class="content" v-show="appearNote.cw == null || showContent">
<div class="text"> <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> <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"/> <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> <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"/> <XSub v-for="note in replies" :key="note.id" :note="note" class="reply" :detail="true"/>
</div> </div>
<div v-else class="_panel muted" @click="muted = false"> <div v-else class="_panel muted" @click="muted = false">
<I18n src="userSaysSomething" tag="small"> <I18n :src="$ts.userSaysSomething" tag="small">
<template #name> <template #name>
<MkA class="name" :to="userPage(appearNote.user)" v-user-preview="appearNote.userId"> <MkA class="name" :to="userPage(appearNote.user)" v-user-preview="appearNote.userId">
<MkUserName :user="appearNote.user"/> <MkUserName :user="appearNote.user"/>
@ -469,7 +469,7 @@ export default defineComponent({
pleaseLogin(); pleaseLogin();
this.blur(); this.blur();
os.modalMenu([{ os.modalMenu([{
text: this.$t('renote'), text: this.$ts.renote,
icon: faRetweet, icon: faRetweet,
action: () => { action: () => {
os.api('notes/create', { os.api('notes/create', {
@ -477,7 +477,7 @@ export default defineComponent({
}); });
} }
}, { }, {
text: this.$t('quote'), text: this.$ts.quote,
icon: faQuoteRight, icon: faQuoteRight,
action: () => { action: () => {
os.post({ os.post({
@ -495,18 +495,18 @@ export default defineComponent({
}, undefined, (res: any) => { }, undefined, (res: any) => {
os.dialog({ os.dialog({
type: 'success', type: 'success',
text: this.$t('renoted'), text: this.$ts.renoted,
}); });
}, (e: Error) => { }, (e: Error) => {
if (e.id === 'b5c90186-4ab0-49c8-9bba-a1f76c282ba4') { if (e.id === 'b5c90186-4ab0-49c8-9bba-a1f76c282ba4') {
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('cantRenote'), text: this.$ts.cantRenote,
}); });
} else if (e.id === 'fd4cc33e-2a37-48dd-99cc-9b806eb2031a') { } else if (e.id === 'fd4cc33e-2a37-48dd-99cc-9b806eb2031a') {
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('cantReRenote'), text: this.$ts.cantReRenote,
}); });
} }
}); });
@ -553,18 +553,18 @@ export default defineComponent({
}, undefined, (res: any) => { }, undefined, (res: any) => {
os.dialog({ os.dialog({
type: 'success', type: 'success',
text: this.$t('favorited'), text: this.$ts.favorited,
}); });
}, (e: Error) => { }, (e: Error) => {
if (e.id === 'a402c12b-34dd-41d2-97d8-4d2ffd96a1a6') { if (e.id === 'a402c12b-34dd-41d2-97d8-4d2ffd96a1a6') {
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('alreadyFavorited'), text: this.$ts.alreadyFavorited,
}); });
} else if (e.id === '6dd26674-e060-4816-909a-45ba3f4da458') { } else if (e.id === '6dd26674-e060-4816-909a-45ba3f4da458') {
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('cantFavorite'), text: this.$ts.cantFavorite,
}); });
} }
}); });
@ -573,7 +573,7 @@ export default defineComponent({
del() { del() {
os.dialog({ os.dialog({
type: 'warning', type: 'warning',
text: this.$t('noteDeleteConfirm'), text: this.$ts.noteDeleteConfirm,
showCancelButton: true showCancelButton: true
}).then(({ canceled }) => { }).then(({ canceled }) => {
if (canceled) return; if (canceled) return;
@ -587,7 +587,7 @@ export default defineComponent({
delEdit() { delEdit() {
os.dialog({ os.dialog({
type: 'warning', type: 'warning',
text: this.$t('deleteAndEditConfirm'), text: this.$ts.deleteAndEditConfirm,
showCancelButton: true showCancelButton: true
}).then(({ canceled }) => { }).then(({ canceled }) => {
if (canceled) return; if (canceled) return;
@ -621,15 +621,15 @@ export default defineComponent({
menu = [{ menu = [{
icon: faCopy, icon: faCopy,
text: this.$t('copyContent'), text: this.$ts.copyContent,
action: this.copyContent action: this.copyContent
}, { }, {
icon: faLink, icon: faLink,
text: this.$t('copyLink'), text: this.$ts.copyLink,
action: this.copyLink action: this.copyLink
}, (this.appearNote.url || this.appearNote.uri) ? { }, (this.appearNote.url || this.appearNote.uri) ? {
icon: faExternalLinkSquareAlt, icon: faExternalLinkSquareAlt,
text: this.$t('showOnRemote'), text: this.$ts.showOnRemote,
action: () => { action: () => {
window.open(this.appearNote.url || this.appearNote.uri, '_blank'); window.open(this.appearNote.url || this.appearNote.uri, '_blank');
} }
@ -637,41 +637,41 @@ export default defineComponent({
null, null,
statePromise.then(state => state.isFavorited ? { statePromise.then(state => state.isFavorited ? {
icon: faStar, icon: faStar,
text: this.$t('unfavorite'), text: this.$ts.unfavorite,
action: () => this.toggleFavorite(false) action: () => this.toggleFavorite(false)
} : { } : {
icon: faStar, icon: faStar,
text: this.$t('favorite'), text: this.$ts.favorite,
action: () => this.toggleFavorite(true) action: () => this.toggleFavorite(true)
}), }),
{ {
icon: faPaperclip, icon: faPaperclip,
text: this.$t('clip'), text: this.$ts.clip,
action: () => this.clip() action: () => this.clip()
}, },
(this.appearNote.userId != this.$i.id) ? statePromise.then(state => state.isWatching ? { (this.appearNote.userId != this.$i.id) ? statePromise.then(state => state.isWatching ? {
icon: faEyeSlash, icon: faEyeSlash,
text: this.$t('unwatch'), text: this.$ts.unwatch,
action: () => this.toggleWatch(false) action: () => this.toggleWatch(false)
} : { } : {
icon: faEye, icon: faEye,
text: this.$t('watch'), text: this.$ts.watch,
action: () => this.toggleWatch(true) action: () => this.toggleWatch(true)
}) : undefined, }) : undefined,
this.appearNote.userId == this.$i.id ? (this.$i.pinnedNoteIds || []).includes(this.appearNote.id) ? { this.appearNote.userId == this.$i.id ? (this.$i.pinnedNoteIds || []).includes(this.appearNote.id) ? {
icon: faThumbtack, icon: faThumbtack,
text: this.$t('unpin'), text: this.$ts.unpin,
action: () => this.togglePin(false) action: () => this.togglePin(false)
} : { } : {
icon: faThumbtack, icon: faThumbtack,
text: this.$t('pin'), text: this.$ts.pin,
action: () => this.togglePin(true) action: () => this.togglePin(true)
} : undefined, } : undefined,
...(this.$i.isModerator || this.$i.isAdmin ? [ ...(this.$i.isModerator || this.$i.isAdmin ? [
null, null,
{ {
icon: faBullhorn, icon: faBullhorn,
text: this.$t('promote'), text: this.$ts.promote,
action: this.promote action: this.promote
}] }]
: [] : []
@ -680,7 +680,7 @@ export default defineComponent({
null, null,
{ {
icon: faExclamationCircle, icon: faExclamationCircle,
text: this.$t('reportAbuse'), text: this.$ts.reportAbuse,
action: () => { action: () => {
const u = `${url}/notes/${this.appearNote.id}`; const u = `${url}/notes/${this.appearNote.id}`;
os.popup(import('@/components/abuse-report-window.vue'), { os.popup(import('@/components/abuse-report-window.vue'), {
@ -695,12 +695,12 @@ export default defineComponent({
null, null,
this.appearNote.userId == this.$i.id ? { this.appearNote.userId == this.$i.id ? {
icon: faEdit, icon: faEdit,
text: this.$t('deleteAndEdit'), text: this.$ts.deleteAndEdit,
action: this.delEdit action: this.delEdit
} : undefined, } : undefined,
{ {
icon: faTrashAlt, icon: faTrashAlt,
text: this.$t('delete'), text: this.$ts.delete,
danger: true, danger: true,
action: this.del action: this.del
}] }]
@ -710,15 +710,15 @@ export default defineComponent({
} else { } else {
menu = [{ menu = [{
icon: faCopy, icon: faCopy,
text: this.$t('copyContent'), text: this.$ts.copyContent,
action: this.copyContent action: this.copyContent
}, { }, {
icon: faLink, icon: faLink,
text: this.$t('copyLink'), text: this.$ts.copyLink,
action: this.copyLink action: this.copyLink
}, (this.appearNote.url || this.appearNote.uri) ? { }, (this.appearNote.url || this.appearNote.uri) ? {
icon: faExternalLinkSquareAlt, icon: faExternalLinkSquareAlt,
text: this.$t('showOnRemote'), text: this.$ts.showOnRemote,
action: () => { action: () => {
window.open(this.appearNote.url || this.appearNote.uri, '_blank'); window.open(this.appearNote.url || this.appearNote.uri, '_blank');
} }
@ -760,7 +760,7 @@ export default defineComponent({
showRenoteMenu(viaKeyboard = false) { showRenoteMenu(viaKeyboard = false) {
if (!this.isMyRenote) return; if (!this.isMyRenote) return;
os.modalMenu([{ os.modalMenu([{
text: this.$t('unrenote'), text: this.$ts.unrenote,
icon: faTrashAlt, icon: faTrashAlt,
danger: true, danger: true,
action: () => { action: () => {
@ -795,7 +795,7 @@ export default defineComponent({
if (e.id === '72dab508-c64d-498f-8740-a8eec1ba385a') { if (e.id === '72dab508-c64d-498f-8740-a8eec1ba385a') {
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('pinLimitExceeded') text: this.$ts.pinLimitExceeded
}); });
} }
}); });
@ -805,22 +805,22 @@ export default defineComponent({
const clips = await os.api('clips/list'); const clips = await os.api('clips/list');
os.modalMenu([{ os.modalMenu([{
icon: faPlus, icon: faPlus,
text: this.$t('createNew'), text: this.$ts.createNew,
action: async () => { action: async () => {
const { canceled, result } = await os.form(this.$t('createNewClip'), { const { canceled, result } = await os.form(this.$ts.createNewClip, {
name: { name: {
type: 'string', type: 'string',
label: this.$t('name') label: this.$ts.name
}, },
description: { description: {
type: 'string', type: 'string',
required: false, required: false,
multiline: true, multiline: true,
label: this.$t('description') label: this.$ts.description
}, },
isPublic: { isPublic: {
type: 'boolean', type: 'boolean',
label: this.$t('public'), label: this.$ts.public,
default: false default: false
} }
}); });
@ -841,7 +841,7 @@ export default defineComponent({
async promote() { async promote() {
const { canceled, result: days } = await os.dialog({ const { canceled, result: days } = await os.dialog({
title: this.$t('numberOfDays'), title: this.$ts.numberOfDays,
input: { type: 'number' } input: { type: 'number' }
}); });

View file

@ -2,14 +2,14 @@
<div class="_list_"> <div class="_list_">
<div class="_fullinfo" v-if="empty"> <div class="_fullinfo" v-if="empty">
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/> <img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
<div>{{ $t('noNotes') }}</div> <div>{{ $ts.noNotes }}</div>
</div> </div>
<MkError v-if="error" @retry="init()"/> <MkError v-if="error" @retry="init()"/>
<div v-show="more && reversed" style="margin-bottom: var(--margin);"> <div v-show="more && reversed" style="margin-bottom: var(--margin);">
<button class="_loadMore" @click="fetchMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }"> <button class="_loadMore" @click="fetchMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }">
<template v-if="!moreFetching">{{ $t('loadMore') }}</template> <template v-if="!moreFetching">{{ $ts.loadMore }}</template>
<template v-if="moreFetching"><MkLoading inline/></template> <template v-if="moreFetching"><MkLoading inline/></template>
</button> </button>
</div> </div>
@ -20,7 +20,7 @@
<div v-show="more && !reversed" style="margin-top: var(--margin);"> <div v-show="more && !reversed" style="margin-top: var(--margin);">
<button class="_loadMore" v-appear="$store.state.enableInfiniteScroll ? fetchMore : null" @click="fetchMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }"> <button class="_loadMore" v-appear="$store.state.enableInfiniteScroll ? fetchMore : null" @click="fetchMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }">
<template v-if="!moreFetching">{{ $t('loadMore') }}</template> <template v-if="!moreFetching">{{ $ts.loadMore }}</template>
<template v-if="moreFetching"><MkLoading inline/></template> <template v-if="moreFetching"><MkLoading inline/></template>
</button> </button>
</div> </div>

View file

@ -8,17 +8,17 @@
@close="$refs.dialog.close()" @close="$refs.dialog.close()"
@closed="$emit('closed')" @closed="$emit('closed')"
> >
<template #header>{{ $t('notificationSetting') }}</template> <template #header>{{ $ts.notificationSetting }}</template>
<div v-if="showGlobalToggle" class="_section"> <div v-if="showGlobalToggle" class="_section">
<MkSwitch v-model:value="useGlobalSetting"> <MkSwitch v-model:value="useGlobalSetting">
{{ $t('useGlobalSetting') }} {{ $ts.useGlobalSetting }}
<template #desc>{{ $t('useGlobalSettingDesc') }}</template> <template #desc>{{ $ts.useGlobalSettingDesc }}</template>
</MkSwitch> </MkSwitch>
</div> </div>
<div v-if="!useGlobalSetting" class="_section"> <div v-if="!useGlobalSetting" class="_section">
<MkInfo>{{ $t('notificationSettingDesc') }}</MkInfo> <MkInfo>{{ $ts.notificationSettingDesc }}</MkInfo>
<MkButton inline @click="disableAll">{{ $t('disableAll') }}</MkButton> <MkButton inline @click="disableAll">{{ $ts.disableAll }}</MkButton>
<MkButton inline @click="enableAll">{{ $t('enableAll') }}</MkButton> <MkButton inline @click="enableAll">{{ $ts.enableAll }}</MkButton>
<MkSwitch v-for="type in notificationTypes" :key="type" v-model:value="typesMap[type]">{{ $t(`_notification._types.${type}`) }}</MkSwitch> <MkSwitch v-for="type in notificationTypes" :key="type" v-model:value="typesMap[type]">{{ $t(`_notification._types.${type}`) }}</MkSwitch>
</div> </div>
</XModalWindow> </XModalWindow>

View file

@ -46,10 +46,10 @@
<Mfm :text="getNoteSummary(notification.note)" :plain="true" :nowrap="!full" :custom-emojis="notification.note.emojis"/> <Mfm :text="getNoteSummary(notification.note)" :plain="true" :nowrap="!full" :custom-emojis="notification.note.emojis"/>
<Fa :icon="faQuoteRight"/> <Fa :icon="faQuoteRight"/>
</MkA> </MkA>
<span v-if="notification.type === 'follow'" class="text" style="opacity: 0.6;">{{ $t('youGotNewFollower') }}<div v-if="full"><MkFollowButton :user="notification.user" :full="true"/></div></span> <span v-if="notification.type === 'follow'" class="text" style="opacity: 0.6;">{{ $ts.youGotNewFollower }}<div v-if="full"><MkFollowButton :user="notification.user" :full="true"/></div></span>
<span v-if="notification.type === 'followRequestAccepted'" class="text" style="opacity: 0.6;">{{ $t('followRequestAccepted') }}</span> <span v-if="notification.type === 'followRequestAccepted'" class="text" style="opacity: 0.6;">{{ $ts.followRequestAccepted }}</span>
<span v-if="notification.type === 'receiveFollowRequest'" class="text" style="opacity: 0.6;">{{ $t('receiveFollowRequest') }}<div v-if="full && !followRequestDone"><button class="_textButton" @click="acceptFollowRequest()">{{ $t('accept') }}</button> | <button class="_textButton" @click="rejectFollowRequest()">{{ $t('reject') }}</button></div></span> <span v-if="notification.type === 'receiveFollowRequest'" class="text" style="opacity: 0.6;">{{ $ts.receiveFollowRequest }}<div v-if="full && !followRequestDone"><button class="_textButton" @click="acceptFollowRequest()">{{ $ts.accept }}</button> | <button class="_textButton" @click="rejectFollowRequest()">{{ $ts.reject }}</button></div></span>
<span v-if="notification.type === 'groupInvited'" class="text" style="opacity: 0.6;">{{ $t('groupInvited') }}: <b>{{ notification.invitation.group.name }}</b><div v-if="full && !groupInviteDone"><button class="_textButton" @click="acceptGroupInvitation()">{{ $t('accept') }}</button> | <button class="_textButton" @click="rejectGroupInvitation()">{{ $t('reject') }}</button></div></span> <span v-if="notification.type === 'groupInvited'" class="text" style="opacity: 0.6;">{{ $ts.groupInvited }}: <b>{{ notification.invitation.group.name }}</b><div v-if="full && !groupInviteDone"><button class="_textButton" @click="acceptGroupInvitation()">{{ $ts.accept }}</button> | <button class="_textButton" @click="rejectGroupInvitation()">{{ $ts.reject }}</button></div></span>
<span v-if="notification.type === 'app'" class="text"> <span v-if="notification.type === 'app'" class="text">
<Mfm :text="notification.body" :nowrap="!full"/> <Mfm :text="notification.body" :nowrap="!full"/>
</span> </span>

View file

@ -6,11 +6,11 @@
</XList> </XList>
<button class="_loadMore" v-appear="$store.state.enableInfiniteScroll ? fetchMore : null" @click="fetchMore" v-show="more" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }"> <button class="_loadMore" v-appear="$store.state.enableInfiniteScroll ? fetchMore : null" @click="fetchMore" v-show="more" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }">
<template v-if="!moreFetching">{{ $t('loadMore') }}</template> <template v-if="!moreFetching">{{ $ts.loadMore }}</template>
<template v-if="moreFetching"><MkLoading inline/></template> <template v-if="moreFetching"><MkLoading inline/></template>
</button> </button>
<p class="empty" v-if="empty">{{ $t('noNotifications') }}</p> <p class="empty" v-if="empty">{{ $ts.noNotifications }}</p>
<MkError v-if="error" @retry="init()"/> <MkError v-if="error" @retry="init()"/>
</div> </div>

View file

@ -90,29 +90,29 @@ export default defineComponent({
text: this.path, text: this.path,
}, { }, {
icon: faExpandAlt, icon: faExpandAlt,
text: this.$t('showInPage'), text: this.$ts.showInPage,
action: this.expand action: this.expand
}, this.sideViewHook ? { }, this.sideViewHook ? {
icon: faColumns, icon: faColumns,
text: this.$t('openInSideView'), text: this.$ts.openInSideView,
action: () => { action: () => {
this.sideViewHook(this.path); this.sideViewHook(this.path);
this.$refs.window.close(); this.$refs.window.close();
} }
} : undefined, { } : undefined, {
icon: faExternalLinkAlt, icon: faExternalLinkAlt,
text: this.$t('popout'), text: this.$ts.popout,
action: this.popout action: this.popout
}, null, { }, null, {
icon: faExternalLinkAlt, icon: faExternalLinkAlt,
text: this.$t('openInNewTab'), text: this.$ts.openInNewTab,
action: () => { action: () => {
window.open(this.url, '_blank'); window.open(this.url, '_blank');
this.$refs.window.close(); this.$refs.window.close();
} }
}, { }, {
icon: faLink, icon: faLink,
text: this.$t('copyLink'), text: this.$ts.copyLink,
action: () => { action: () => {
copyToClipboard(this.url); copyToClipboard(this.url);
} }

View file

@ -1,7 +1,7 @@
<template> <template>
<div class="zmdxowus"> <div class="zmdxowus">
<p class="caution" v-if="choices.length < 2"> <p class="caution" v-if="choices.length < 2">
<Fa :icon="faExclamationTriangle"/>{{ $t('_poll.noOnlyOneChoice') }} <Fa :icon="faExclamationTriangle"/>{{ $ts._poll.noOnlyOneChoice }}
</p> </p>
<ul ref="choices"> <ul ref="choices">
<li v-for="(choice, i) in choices" :key="i"> <li v-for="(choice, i) in choices" :key="i">
@ -13,34 +13,34 @@
</button> </button>
</li> </li>
</ul> </ul>
<MkButton class="add" v-if="choices.length < 10" @click="add">{{ $t('add') }}</MkButton> <MkButton class="add" v-if="choices.length < 10" @click="add">{{ $ts.add }}</MkButton>
<MkButton class="add" v-else disabled>{{ $t('_poll.noMore') }}</MkButton> <MkButton class="add" v-else disabled>{{ $ts._poll.noMore }}</MkButton>
<section> <section>
<MkSwitch v-model:value="multiple">{{ $t('_poll.canMultipleVote') }}</MkSwitch> <MkSwitch v-model:value="multiple">{{ $ts._poll.canMultipleVote }}</MkSwitch>
<div> <div>
<MkSelect v-model:value="expiration"> <MkSelect v-model:value="expiration">
<template #label>{{ $t('_poll.expiration') }}</template> <template #label>{{ $ts._poll.expiration }}</template>
<option value="infinite">{{ $t('_poll.infinite') }}</option> <option value="infinite">{{ $ts._poll.infinite }}</option>
<option value="at">{{ $t('_poll.at') }}</option> <option value="at">{{ $ts._poll.at }}</option>
<option value="after">{{ $t('_poll.after') }}</option> <option value="after">{{ $ts._poll.after }}</option>
</MkSelect> </MkSelect>
<section v-if="expiration === 'at'"> <section v-if="expiration === 'at'">
<MkInput v-model:value="atDate" type="date" class="input"> <MkInput v-model:value="atDate" type="date" class="input">
<span>{{ $t('_poll.deadlineDate') }}</span> <span>{{ $ts._poll.deadlineDate }}</span>
</MkInput> </MkInput>
<MkInput v-model:value="atTime" type="time" class="input"> <MkInput v-model:value="atTime" type="time" class="input">
<span>{{ $t('_poll.deadlineTime') }}</span> <span>{{ $ts._poll.deadlineTime }}</span>
</MkInput> </MkInput>
</section> </section>
<section v-if="expiration === 'after'"> <section v-if="expiration === 'after'">
<MkInput v-model:value="after" type="number" class="input"> <MkInput v-model:value="after" type="number" class="input">
<span>{{ $t('_poll.duration') }}</span> <span>{{ $ts._poll.duration }}</span>
</MkInput> </MkInput>
<MkSelect v-model:value="unit"> <MkSelect v-model:value="unit">
<option value="second">{{ $t('_time.second') }}</option> <option value="second">{{ $ts._time.second }}</option>
<option value="minute">{{ $t('_time.minute') }}</option> <option value="minute">{{ $ts._time.minute }}</option>
<option value="hour">{{ $t('_time.hour') }}</option> <option value="hour">{{ $ts._time.hour }}</option>
<option value="day">{{ $t('_time.day') }}</option> <option value="day">{{ $ts._time.day }}</option>
</MkSelect> </MkSelect>
</section> </section>
</div> </div>

View file

@ -13,9 +13,9 @@
<p> <p>
<span>{{ $t('_poll.totalVotes', { n: total }) }}</span> <span>{{ $t('_poll.totalVotes', { n: total }) }}</span>
<span> · </span> <span> · </span>
<a v-if="!closed && !isVoted" @click="toggleShowResult">{{ showResult ? $t('_poll.vote') : $t('_poll.showResult') }}</a> <a v-if="!closed && !isVoted" @click="toggleShowResult">{{ showResult ? $ts._poll.vote : $ts._poll.showResult }}</a>
<span v-if="isVoted">{{ $t('_poll.voted') }}</span> <span v-if="isVoted">{{ $ts._poll.voted }}</span>
<span v-else-if="closed">{{ $t('_poll.closed') }}</span> <span v-else-if="closed">{{ $ts._poll.closed }}</span>
<span v-if="remaining > 0"> · {{ timer }}</span> <span v-if="remaining > 0"> · {{ timer }}</span>
</p> </p>
</div> </div>

View file

@ -77,7 +77,7 @@ export default defineComponent({
}, },
async rename(file) { async rename(file) {
const { canceled, result } = await os.dialog({ const { canceled, result } = await os.dialog({
title: this.$t('enterFileName'), title: this.$ts.enterFileName,
input: { input: {
default: file.name default: file.name
}, },
@ -95,15 +95,15 @@ export default defineComponent({
showFileMenu(file, ev: MouseEvent) { showFileMenu(file, ev: MouseEvent) {
if (this.menu) return; if (this.menu) return;
this.menu = os.modalMenu([{ this.menu = os.modalMenu([{
text: this.$t('renameFile'), text: this.$ts.renameFile,
icon: faICursor, icon: faICursor,
action: () => { this.rename(file) } action: () => { this.rename(file) }
}, { }, {
text: file.isSensitive ? this.$t('unmarkAsSensitive') : this.$t('markAsSensitive'), text: file.isSensitive ? this.$ts.unmarkAsSensitive : this.$ts.markAsSensitive,
icon: file.isSensitive ? faEyeSlash : faEye, icon: file.isSensitive ? faEyeSlash : faEye,
action: () => { this.toggleSensitive(file) } action: () => { this.toggleSensitive(file) }
}, { }, {
text: this.$t('attachCancel'), text: this.$ts.attachCancel,
icon: faTimesCircle, icon: faTimesCircle,
action: () => { this.detachMedia(file.id) } action: () => { this.detachMedia(file.id) }
}], ev.currentTarget || ev.target).then(() => this.menu = null); }], ev.currentTarget || ev.target).then(() => this.menu = null);

View file

@ -11,7 +11,7 @@
<div> <div>
<span class="text-count" :class="{ over: trimmedLength(text) > max }">{{ max - trimmedLength(text) }}</span> <span class="text-count" :class="{ over: trimmedLength(text) > max }">{{ max - trimmedLength(text) }}</span>
<span class="local-only" v-if="localOnly"><Fa :icon="faBiohazard"/></span> <span class="local-only" v-if="localOnly"><Fa :icon="faBiohazard"/></span>
<button class="_button visibility" @click="setVisibility" ref="visibilityButton" v-tooltip="$t('visibility')" :disabled="channel != null"> <button class="_button visibility" @click="setVisibility" ref="visibilityButton" v-tooltip="$ts.visibility" :disabled="channel != null">
<span v-if="visibility === 'public'"><Fa :icon="faGlobe"/></span> <span v-if="visibility === 'public'"><Fa :icon="faGlobe"/></span>
<span v-if="visibility === 'home'"><Fa :icon="faHome"/></span> <span v-if="visibility === 'home'"><Fa :icon="faHome"/></span>
<span v-if="visibility === 'followers'"><Fa :icon="faUnlock"/></span> <span v-if="visibility === 'followers'"><Fa :icon="faUnlock"/></span>
@ -23,9 +23,9 @@
<div class="form" :class="{ fixed }"> <div class="form" :class="{ fixed }">
<XNotePreview class="preview" v-if="reply" :note="reply"/> <XNotePreview class="preview" v-if="reply" :note="reply"/>
<XNotePreview class="preview" v-if="renote" :note="renote"/> <XNotePreview class="preview" v-if="renote" :note="renote"/>
<div class="with-quote" v-if="quoteId"><Fa icon="quote-left"/> {{ $t('quoteAttached') }}<button @click="quoteId = null"><Fa icon="times"/></button></div> <div class="with-quote" v-if="quoteId"><Fa icon="quote-left"/> {{ $ts.quoteAttached }}<button @click="quoteId = null"><Fa icon="times"/></button></div>
<div v-if="visibility === 'specified'" class="to-specified"> <div v-if="visibility === 'specified'" class="to-specified">
<span style="margin-right: 8px;">{{ $t('recipient') }}</span> <span style="margin-right: 8px;">{{ $ts.recipient }}</span>
<div class="visibleUsers"> <div class="visibleUsers">
<span v-for="u in visibleUsers" :key="u.id"> <span v-for="u in visibleUsers" :key="u.id">
<MkAcct :user="u"/> <MkAcct :user="u"/>
@ -34,17 +34,17 @@
<button @click="addVisibleUser" class="_buttonPrimary"><Fa :icon="faPlus" fixed-width/></button> <button @click="addVisibleUser" class="_buttonPrimary"><Fa :icon="faPlus" fixed-width/></button>
</div> </div>
</div> </div>
<input v-show="useCw" ref="cw" class="cw" v-model="cw" :placeholder="$t('annotation')" @keydown="onKeydown"> <input v-show="useCw" ref="cw" class="cw" v-model="cw" :placeholder="$ts.annotation" @keydown="onKeydown">
<textarea v-model="text" class="text" :class="{ withCw: useCw }" ref="text" :disabled="posting" :placeholder="placeholder" @keydown="onKeydown" @paste="onPaste"></textarea> <textarea v-model="text" class="text" :class="{ withCw: useCw }" ref="text" :disabled="posting" :placeholder="placeholder" @keydown="onKeydown" @paste="onPaste"></textarea>
<XPostFormAttaches class="attaches" :files="files" @updated="updateFiles" @detach="detachFile" @changeSensitive="updateFileSensitive" @changeName="updateFileName"/> <XPostFormAttaches class="attaches" :files="files" @updated="updateFiles" @detach="detachFile" @changeSensitive="updateFileSensitive" @changeName="updateFileName"/>
<XPollEditor v-if="poll" :poll="poll" @destroyed="poll = null" @updated="onPollUpdate"/> <XPollEditor v-if="poll" :poll="poll" @destroyed="poll = null" @updated="onPollUpdate"/>
<footer> <footer>
<button class="_button" @click="chooseFileFrom" v-tooltip="$t('attachFile')"><Fa :icon="faPhotoVideo"/></button> <button class="_button" @click="chooseFileFrom" v-tooltip="$ts.attachFile"><Fa :icon="faPhotoVideo"/></button>
<button class="_button" @click="togglePoll" :class="{ active: poll }" v-tooltip="$t('poll')"><Fa :icon="faPollH"/></button> <button class="_button" @click="togglePoll" :class="{ active: poll }" v-tooltip="$ts.poll"><Fa :icon="faPollH"/></button>
<button class="_button" @click="useCw = !useCw" :class="{ active: useCw }" v-tooltip="$t('useCw')"><Fa :icon="faEyeSlash"/></button> <button class="_button" @click="useCw = !useCw" :class="{ active: useCw }" v-tooltip="$ts.useCw"><Fa :icon="faEyeSlash"/></button>
<button class="_button" @click="insertMention" v-tooltip="$t('mention')"><Fa :icon="faAt"/></button> <button class="_button" @click="insertMention" v-tooltip="$ts.mention"><Fa :icon="faAt"/></button>
<button class="_button" @click="insertEmoji" v-tooltip="$t('emoji')"><Fa :icon="faLaughSquint"/></button> <button class="_button" @click="insertEmoji" v-tooltip="$ts.emoji"><Fa :icon="faLaughSquint"/></button>
<button class="_button" @click="showActions" v-tooltip="$t('plugin')" v-if="postFormActions.length > 0"><Fa :icon="faPlug"/></button> <button class="_button" @click="showActions" v-tooltip="$ts.plugin" v-if="postFormActions.length > 0"><Fa :icon="faPlug"/></button>
</footer> </footer>
</div> </div>
</div> </div>
@ -164,19 +164,19 @@ export default defineComponent({
placeholder(): string { placeholder(): string {
if (this.renote) { if (this.renote) {
return this.$t('_postForm.quotePlaceholder'); return this.$ts._postForm.quotePlaceholder;
} else if (this.reply) { } else if (this.reply) {
return this.$t('_postForm.replyPlaceholder'); return this.$ts._postForm.replyPlaceholder;
} else if (this.channel) { } else if (this.channel) {
return this.$t('_postForm.channelPlaceholder'); return this.$ts._postForm.channelPlaceholder;
} else { } else {
const xs = [ const xs = [
this.$t('_postForm._placeholders.a'), this.$ts._postForm._placeholders.a,
this.$t('_postForm._placeholders.b'), this.$ts._postForm._placeholders.b,
this.$t('_postForm._placeholders.c'), this.$ts._postForm._placeholders.c,
this.$t('_postForm._placeholders.d'), this.$ts._postForm._placeholders.d,
this.$t('_postForm._placeholders.e'), this.$ts._postForm._placeholders.e,
this.$t('_postForm._placeholders.f') this.$ts._postForm._placeholders.f
]; ];
return xs[Math.floor(Math.random() * xs.length)]; return xs[Math.floor(Math.random() * xs.length)];
} }
@ -184,10 +184,10 @@ export default defineComponent({
submitText(): string { submitText(): string {
return this.renote return this.renote
? this.$t('quote') ? this.$ts.quote
: this.reply : this.reply
? this.$t('reply') ? this.$ts.reply
: this.$t('note'); : this.$ts.note;
}, },
canPost(): boolean { canPost(): boolean {
@ -352,7 +352,7 @@ export default defineComponent({
}, },
chooseFileFrom(ev) { chooseFileFrom(ev) {
selectFile(ev.currentTarget || ev.target, this.$t('attachFile'), true).then(files => { selectFile(ev.currentTarget || ev.target, this.$ts.attachFile, true).then(files => {
for (const file of files) { for (const file of files) {
this.files.push(file); this.files.push(file);
} }
@ -452,7 +452,7 @@ export default defineComponent({
os.dialog({ os.dialog({
type: 'info', type: 'info',
text: this.$t('quoteQuestion'), text: this.$ts.quoteQuestion,
showCancelButton: true showCancelButton: true
}).then(({ canceled }) => { }).then(({ canceled }) => {
if (canceled) { if (canceled) {

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="jmgmzlwq _panel"><Fa :icon="faExclamationTriangle" style="margin-right: 8px;"/>{{ $t('remoteUserCaution') }}<a :href="href" rel="nofollow noopener" target="_blank">{{ $t('showOnRemote') }}</a></div> <div class="jmgmzlwq _panel"><Fa :icon="faExclamationTriangle" style="margin-right: 8px;"/>{{ $ts.remoteUserCaution }}<a :href="href" rel="nofollow noopener" target="_blank">{{ $ts.showOnRemote }}</a></div>
</template> </template>
<script lang="ts"> <script lang="ts">

View file

@ -15,7 +15,7 @@
<MkAvatar :user="$i" class="avatar"/><MkAcct class="text" :user="$i"/> <MkAvatar :user="$i" class="avatar"/><MkAcct class="text" :user="$i"/>
</button> </button>
<MkA class="item index" active-class="active" to="/" exact> <MkA class="item index" active-class="active" to="/" exact>
<Fa :icon="faHome" fixed-width/><span class="text">{{ $t('timeline') }}</span> <Fa :icon="faHome" fixed-width/><span class="text">{{ $ts.timeline }}</span>
</MkA> </MkA>
<template v-for="item in menu"> <template v-for="item in menu">
<div v-if="item === '-'" class="divider"></div> <div v-if="item === '-'" class="divider"></div>
@ -26,14 +26,14 @@
</template> </template>
<div class="divider"></div> <div class="divider"></div>
<button class="item _button" :class="{ active: $route.path === '/instance' || $route.path.startsWith('/instance/') }" v-if="$i.isAdmin || $i.isModerator" @click="oepnInstanceMenu"> <button class="item _button" :class="{ active: $route.path === '/instance' || $route.path.startsWith('/instance/') }" v-if="$i.isAdmin || $i.isModerator" @click="oepnInstanceMenu">
<Fa :icon="faServer" fixed-width/><span class="text">{{ $t('instance') }}</span> <Fa :icon="faServer" fixed-width/><span class="text">{{ $ts.instance }}</span>
</button> </button>
<button class="item _button" @click="more"> <button class="item _button" @click="more">
<Fa :icon="faEllipsisH" fixed-width/><span class="text">{{ $t('more') }}</span> <Fa :icon="faEllipsisH" fixed-width/><span class="text">{{ $ts.more }}</span>
<i v-if="otherNavItemIndicated"><Fa :icon="faCircle"/></i> <i v-if="otherNavItemIndicated"><Fa :icon="faCircle"/></i>
</button> </button>
<MkA class="item" active-class="active" to="/settings"> <MkA class="item" active-class="active" to="/settings">
<Fa :icon="faCog" fixed-width/><span class="text">{{ $t('settings') }}</span> <Fa :icon="faCog" fixed-width/><span class="text">{{ $ts.settings }}</span>
</MkA> </MkA>
</div> </div>
</nav> </nav>
@ -121,7 +121,7 @@ export default defineComponent({
if (this.searching) return; if (this.searching) return;
os.dialog({ os.dialog({
title: this.$t('search'), title: this.$ts.search,
input: true input: true
}).then(async ({ canceled, result: query }) => { }).then(async ({ canceled, result: query }) => {
if (canceled || query == null || query === '') return; if (canceled || query == null || query === '') return;
@ -145,18 +145,18 @@ export default defineComponent({
os.modalMenu([...[{ os.modalMenu([...[{
type: 'link', type: 'link',
text: this.$t('profile'), text: this.$ts.profile,
to: `/@${ this.$i.username }`, to: `/@${ this.$i.username }`,
avatar: this.$i, avatar: this.$i,
}, null, ...accountItems, { }, null, ...accountItems, {
icon: faPlus, icon: faPlus,
text: this.$t('addAcount'), text: this.$ts.addAcount,
action: () => { action: () => {
os.modalMenu([{ os.modalMenu([{
text: this.$t('existingAcount'), text: this.$ts.existingAcount,
action: () => { this.addAcount(); }, action: () => { this.addAcount(); },
}, { }, {
text: this.$t('createAccount'), text: this.$ts.createAccount,
action: () => { this.createAccount(); }, action: () => { this.createAccount(); },
}], ev.currentTarget || ev.target); }], ev.currentTarget || ev.target);
}, },
@ -168,57 +168,57 @@ export default defineComponent({
oepnInstanceMenu(ev) { oepnInstanceMenu(ev) {
os.modalMenu([{ os.modalMenu([{
type: 'link', type: 'link',
text: this.$t('dashboard'), text: this.$ts.dashboard,
to: '/instance', to: '/instance',
icon: faTachometerAlt, icon: faTachometerAlt,
}, null, this.$i.isAdmin ? { }, null, this.$i.isAdmin ? {
type: 'link', type: 'link',
text: this.$t('settings'), text: this.$ts.settings,
to: '/instance/settings', to: '/instance/settings',
icon: faCog, icon: faCog,
} : undefined, { } : undefined, {
type: 'link', type: 'link',
text: this.$t('customEmojis'), text: this.$ts.customEmojis,
to: '/instance/emojis', to: '/instance/emojis',
icon: faLaugh, icon: faLaugh,
}, { }, {
type: 'link', type: 'link',
text: this.$t('users'), text: this.$ts.users,
to: '/instance/users', to: '/instance/users',
icon: faUsers, icon: faUsers,
}, { }, {
type: 'link', type: 'link',
text: this.$t('files'), text: this.$ts.files,
to: '/instance/files', to: '/instance/files',
icon: faCloud, icon: faCloud,
}, { }, {
type: 'link', type: 'link',
text: this.$t('jobQueue'), text: this.$ts.jobQueue,
to: '/instance/queue', to: '/instance/queue',
icon: faExchangeAlt, icon: faExchangeAlt,
}, { }, {
type: 'link', type: 'link',
text: this.$t('federation'), text: this.$ts.federation,
to: '/instance/federation', to: '/instance/federation',
icon: faGlobe, icon: faGlobe,
}, { }, {
type: 'link', type: 'link',
text: this.$t('relays'), text: this.$ts.relays,
to: '/instance/relays', to: '/instance/relays',
icon: faProjectDiagram, icon: faProjectDiagram,
}, { }, {
type: 'link', type: 'link',
text: this.$t('announcements'), text: this.$ts.announcements,
to: '/instance/announcements', to: '/instance/announcements',
icon: faBroadcastTower, icon: faBroadcastTower,
}, { }, {
type: 'link', type: 'link',
text: this.$t('abuseReports'), text: this.$ts.abuseReports,
to: '/instance/abuses', to: '/instance/abuses',
icon: faExclamationCircle, icon: faExclamationCircle,
}, { }, {
type: 'link', type: 'link',
text: this.$t('logs'), text: this.$ts.logs,
to: '/instance/logs', to: '/instance/logs',
icon: faStream, icon: faStream,
}], ev.currentTarget || ev.target); }], ev.currentTarget || ev.target);

View file

@ -5,7 +5,7 @@
@close="$refs.dialog.close()" @close="$refs.dialog.close()"
@closed="$emit('closed')" @closed="$emit('closed')"
> >
<template #header>{{ $t('login') }}</template> <template #header>{{ $ts.login }}</template>
<MkSignin :auto-set="autoSet" @login="onLogin"/> <MkSignin :auto-set="autoSet" @login="onLogin"/>
</XModalWindow> </XModalWindow>

View file

@ -4,37 +4,37 @@
<div class="avatar" :style="{ backgroundImage: user ? `url('${ user.avatarUrl }')` : null }" v-show="withAvatar"></div> <div class="avatar" :style="{ backgroundImage: user ? `url('${ user.avatarUrl }')` : null }" v-show="withAvatar"></div>
<div class="normal-signin" v-if="!totpLogin"> <div class="normal-signin" v-if="!totpLogin">
<MkInput v-model:value="username" type="text" pattern="^[a-zA-Z0-9_]+$" spellcheck="false" autofocus required @update:value="onUsernameChange"> <MkInput v-model:value="username" type="text" pattern="^[a-zA-Z0-9_]+$" spellcheck="false" autofocus required @update:value="onUsernameChange">
<span>{{ $t('username') }}</span> <span>{{ $ts.username }}</span>
<template #prefix>@</template> <template #prefix>@</template>
<template #suffix>@{{ host }}</template> <template #suffix>@{{ host }}</template>
</MkInput> </MkInput>
<MkInput v-model:value="password" type="password" :with-password-toggle="true" v-if="!user || user && !user.usePasswordLessLogin" required> <MkInput v-model:value="password" type="password" :with-password-toggle="true" v-if="!user || user && !user.usePasswordLessLogin" required>
<span>{{ $t('password') }}</span> <span>{{ $ts.password }}</span>
<template #prefix><Fa :icon="faLock"/></template> <template #prefix><Fa :icon="faLock"/></template>
</MkInput> </MkInput>
<MkButton type="submit" primary :disabled="signing" style="margin: 0 auto;">{{ signing ? $t('loggingIn') : $t('login') }}</MkButton> <MkButton type="submit" primary :disabled="signing" style="margin: 0 auto;">{{ signing ? $ts.loggingIn : $ts.login }}</MkButton>
</div> </div>
<div class="2fa-signin" v-if="totpLogin" :class="{ securityKeys: user && user.securityKeys }"> <div class="2fa-signin" v-if="totpLogin" :class="{ securityKeys: user && user.securityKeys }">
<div v-if="user && user.securityKeys" class="twofa-group tap-group"> <div v-if="user && user.securityKeys" class="twofa-group tap-group">
<p>{{ $t('tapSecurityKey') }}</p> <p>{{ $ts.tapSecurityKey }}</p>
<MkButton @click="queryKey" v-if="!queryingKey"> <MkButton @click="queryKey" v-if="!queryingKey">
{{ $t('retry') }} {{ $ts.retry }}
</MkButton> </MkButton>
</div> </div>
<div class="or-hr" v-if="user && user.securityKeys"> <div class="or-hr" v-if="user && user.securityKeys">
<p class="or-msg">{{ $t('or') }}</p> <p class="or-msg">{{ $ts.or }}</p>
</div> </div>
<div class="twofa-group totp-group"> <div class="twofa-group totp-group">
<p style="margin-bottom:0;">{{ $t('twoStepAuthentication') }}</p> <p style="margin-bottom:0;">{{ $ts.twoStepAuthentication }}</p>
<MkInput v-model:value="password" type="password" :with-password-toggle="true" v-if="user && user.usePasswordLessLogin" required> <MkInput v-model:value="password" type="password" :with-password-toggle="true" v-if="user && user.usePasswordLessLogin" required>
<span>{{ $t('password') }}</span> <span>{{ $ts.password }}</span>
<template #prefix><Fa :icon="faLock"/></template> <template #prefix><Fa :icon="faLock"/></template>
</MkInput> </MkInput>
<MkInput v-model:value="token" type="text" pattern="^[0-9]{6}$" autocomplete="off" spellcheck="false" required> <MkInput v-model:value="token" type="text" pattern="^[0-9]{6}$" autocomplete="off" spellcheck="false" required>
<span>{{ $t('token') }}</span> <span>{{ $ts.token }}</span>
<template #prefix><Fa :icon="faGavel"/></template> <template #prefix><Fa :icon="faGavel"/></template>
</MkInput> </MkInput>
<MkButton type="submit" :disabled="signing" primary style="margin: 0 auto;">{{ signing ? $t('loggingIn') : $t('login') }}</MkButton> <MkButton type="submit" :disabled="signing" primary style="margin: 0 auto;">{{ signing ? $ts.loggingIn : $ts.login }}</MkButton>
</div> </div>
</div> </div>
</div> </div>
@ -153,7 +153,7 @@ export default defineComponent({
if (err === null) return; if (err === null) return;
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('signinFailed') text: this.$ts.signinFailed
}); });
this.signing = false; this.signing = false;
}); });
@ -174,7 +174,7 @@ export default defineComponent({
}).catch(() => { }).catch(() => {
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('signinFailed') text: this.$ts.signinFailed
}); });
this.challengeData = null; this.challengeData = null;
this.totpLogin = false; this.totpLogin = false;
@ -195,7 +195,7 @@ export default defineComponent({
}).catch(() => { }).catch(() => {
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('loginFailed') text: this.$ts.loginFailed
}); });
this.signing = false; this.signing = false;
}); });

View file

@ -5,7 +5,7 @@
@close="$refs.dialog.close()" @close="$refs.dialog.close()"
@closed="$emit('closed')" @closed="$emit('closed')"
> >
<template #header>{{ $t('signup') }}</template> <template #header>{{ $ts.signup }}</template>
<div class="_section"> <div class="_section">
<XSignup :auto-set="autoSet" @signup="onSignup"/> <XSignup :auto-set="autoSet" @signup="onSignup"/>

View file

@ -2,49 +2,49 @@
<form class="mk-signup" @submit.prevent="onSubmit" :autocomplete="Math.random()"> <form class="mk-signup" @submit.prevent="onSubmit" :autocomplete="Math.random()">
<template v-if="meta"> <template v-if="meta">
<MkInput v-if="meta.disableRegistration" v-model:value="invitationCode" type="text" :autocomplete="Math.random()" spellcheck="false" required> <MkInput v-if="meta.disableRegistration" v-model:value="invitationCode" type="text" :autocomplete="Math.random()" spellcheck="false" required>
<span>{{ $t('invitationCode') }}</span> <span>{{ $ts.invitationCode }}</span>
<template #prefix><Fa :icon="faKey"/></template> <template #prefix><Fa :icon="faKey"/></template>
</MkInput> </MkInput>
<MkInput v-model:value="username" type="text" pattern="^[a-zA-Z0-9_]{1,20}$" :autocomplete="Math.random()" spellcheck="false" required @update:value="onChangeUsername"> <MkInput v-model:value="username" type="text" pattern="^[a-zA-Z0-9_]{1,20}$" :autocomplete="Math.random()" spellcheck="false" required @update:value="onChangeUsername">
<span>{{ $t('username') }}</span> <span>{{ $ts.username }}</span>
<template #prefix>@</template> <template #prefix>@</template>
<template #suffix>@{{ host }}</template> <template #suffix>@{{ host }}</template>
<template #desc> <template #desc>
<span v-if="usernameState == 'wait'" style="color:#999"><Fa :icon="faSpinner" pulse fixed-width/> {{ $t('checking') }}</span> <span v-if="usernameState == 'wait'" style="color:#999"><Fa :icon="faSpinner" pulse fixed-width/> {{ $ts.checking }}</span>
<span v-if="usernameState == 'ok'" style="color:#3CB7B5"><Fa :icon="faCheck" fixed-width/> {{ $t('available') }}</span> <span v-if="usernameState == 'ok'" style="color:#3CB7B5"><Fa :icon="faCheck" fixed-width/> {{ $ts.available }}</span>
<span v-if="usernameState == 'unavailable'" style="color:#FF1161"><Fa :icon="faExclamationTriangle" fixed-width/> {{ $t('unavailable') }}</span> <span v-if="usernameState == 'unavailable'" style="color:#FF1161"><Fa :icon="faExclamationTriangle" fixed-width/> {{ $ts.unavailable }}</span>
<span v-if="usernameState == 'error'" style="color:#FF1161"><Fa :icon="faExclamationTriangle" fixed-width/> {{ $t('error') }}</span> <span v-if="usernameState == 'error'" style="color:#FF1161"><Fa :icon="faExclamationTriangle" fixed-width/> {{ $ts.error }}</span>
<span v-if="usernameState == 'invalid-format'" style="color:#FF1161"><Fa :icon="faExclamationTriangle" fixed-width/> {{ $t('usernameInvalidFormat') }}</span> <span v-if="usernameState == 'invalid-format'" style="color:#FF1161"><Fa :icon="faExclamationTriangle" fixed-width/> {{ $ts.usernameInvalidFormat }}</span>
<span v-if="usernameState == 'min-range'" style="color:#FF1161"><Fa :icon="faExclamationTriangle" fixed-width/> {{ $t('tooShort') }}</span> <span v-if="usernameState == 'min-range'" style="color:#FF1161"><Fa :icon="faExclamationTriangle" fixed-width/> {{ $ts.tooShort }}</span>
<span v-if="usernameState == 'max-range'" style="color:#FF1161"><Fa :icon="faExclamationTriangle" fixed-width/> {{ $t('tooLong') }}</span> <span v-if="usernameState == 'max-range'" style="color:#FF1161"><Fa :icon="faExclamationTriangle" fixed-width/> {{ $ts.tooLong }}</span>
</template> </template>
</MkInput> </MkInput>
<MkInput v-model:value="password" type="password" :autocomplete="Math.random()" required @update:value="onChangePassword"> <MkInput v-model:value="password" type="password" :autocomplete="Math.random()" required @update:value="onChangePassword">
<span>{{ $t('password') }}</span> <span>{{ $ts.password }}</span>
<template #prefix><Fa :icon="faLock"/></template> <template #prefix><Fa :icon="faLock"/></template>
<template #desc> <template #desc>
<p v-if="passwordStrength == 'low'" style="color:#FF1161"><Fa :icon="faExclamationTriangle" fixed-width/> {{ $t('weakPassword') }}</p> <p v-if="passwordStrength == 'low'" style="color:#FF1161"><Fa :icon="faExclamationTriangle" fixed-width/> {{ $ts.weakPassword }}</p>
<p v-if="passwordStrength == 'medium'" style="color:#3CB7B5"><Fa :icon="faCheck" fixed-width/> {{ $t('normalPassword') }}</p> <p v-if="passwordStrength == 'medium'" style="color:#3CB7B5"><Fa :icon="faCheck" fixed-width/> {{ $ts.normalPassword }}</p>
<p v-if="passwordStrength == 'high'" style="color:#3CB7B5"><Fa :icon="faCheck" fixed-width/> {{ $t('strongPassword') }}</p> <p v-if="passwordStrength == 'high'" style="color:#3CB7B5"><Fa :icon="faCheck" fixed-width/> {{ $ts.strongPassword }}</p>
</template> </template>
</MkInput> </MkInput>
<MkInput v-model:value="retypedPassword" type="password" :autocomplete="Math.random()" required @update:value="onChangePasswordRetype"> <MkInput v-model:value="retypedPassword" type="password" :autocomplete="Math.random()" required @update:value="onChangePasswordRetype">
<span>{{ $t('password') }} ({{ $t('retype') }})</span> <span>{{ $ts.password }} ({{ $ts.retype }})</span>
<template #prefix><Fa :icon="faLock"/></template> <template #prefix><Fa :icon="faLock"/></template>
<template #desc> <template #desc>
<p v-if="passwordRetypeState == 'match'" style="color:#3CB7B5"><Fa :icon="faCheck" fixed-width/> {{ $t('passwordMatched') }}</p> <p v-if="passwordRetypeState == 'match'" style="color:#3CB7B5"><Fa :icon="faCheck" fixed-width/> {{ $ts.passwordMatched }}</p>
<p v-if="passwordRetypeState == 'not-match'" style="color:#FF1161"><Fa :icon="faExclamationTriangle" fixed-width/> {{ $t('passwordNotMatched') }}</p> <p v-if="passwordRetypeState == 'not-match'" style="color:#FF1161"><Fa :icon="faExclamationTriangle" fixed-width/> {{ $ts.passwordNotMatched }}</p>
</template> </template>
</MkInput> </MkInput>
<label v-if="meta.tosUrl" class="tou"> <label v-if="meta.tosUrl" class="tou">
<input type="checkbox" v-model="ToSAgreement"> <input type="checkbox" v-model="ToSAgreement">
<I18n src="agreeTo"> <I18n :src="$ts.agreeTo">
<a :href="meta.tosUrl" class="_link" target="_blank">{{ $t('tos') }}</a> <a :href="meta.tosUrl" class="_link" target="_blank">{{ $ts.tos }}</a>
</I18n> </I18n>
</label> </label>
<captcha v-if="meta.enableHcaptcha" class="captcha" provider="hcaptcha" ref="hcaptcha" v-model:value="hCaptchaResponse" :sitekey="meta.hcaptchaSiteKey"/> <captcha v-if="meta.enableHcaptcha" class="captcha" provider="hcaptcha" ref="hcaptcha" v-model:value="hCaptchaResponse" :sitekey="meta.hcaptchaSiteKey"/>
<captcha v-if="meta.enableRecaptcha" class="captcha" provider="grecaptcha" ref="recaptcha" v-model:value="reCaptchaResponse" :sitekey="meta.recaptchaSiteKey"/> <captcha v-if="meta.enableRecaptcha" class="captcha" provider="grecaptcha" ref="recaptcha" v-model:value="reCaptchaResponse" :sitekey="meta.recaptchaSiteKey"/>
<MkButton type="submit" :disabled="shouldDisableSubmitting" primary>{{ $t('start') }}</MkButton> <MkButton type="submit" :disabled="shouldDisableSubmitting" primary>{{ $ts.start }}</MkButton>
</template> </template>
</form> </form>
</template> </template>
@ -195,7 +195,7 @@ export default defineComponent({
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('somethingHappened') text: this.$ts.somethingHappened
}); });
}); });
} }

View file

@ -1,8 +1,8 @@
<template> <template>
<div class="wrmlmaau"> <div class="wrmlmaau">
<div class="body"> <div class="body">
<span v-if="note.isHidden" style="opacity: 0.5">({{ $t('private') }})</span> <span v-if="note.isHidden" style="opacity: 0.5">({{ $ts.private }})</span>
<span v-if="note.deletedAt" style="opacity: 0.5">({{ $t('deleted') }})</span> <span v-if="note.deletedAt" style="opacity: 0.5">({{ $ts.deleted }})</span>
<MkA class="reply" v-if="note.replyId" :to="`/notes/${note.replyId}`"><Fa :icon="faReply"/></MkA> <MkA class="reply" v-if="note.replyId" :to="`/notes/${note.replyId}`"><Fa :icon="faReply"/></MkA>
<Mfm v-if="note.text" :text="note.text" :author="note.user" :i="$i" :custom-emojis="note.emojis"/> <Mfm v-if="note.text" :text="note.text" :author="note.user" :i="$i" :custom-emojis="note.emojis"/>
<MkA class="rp" v-if="note.renoteId" :to="`/notes/${note.renoteId}`">RN: ...</MkA> <MkA class="rp" v-if="note.renoteId" :to="`/notes/${note.renoteId}`">RN: ...</MkA>
@ -12,7 +12,7 @@
<XMediaList :media-list="note.files"/> <XMediaList :media-list="note.files"/>
</details> </details>
<details v-if="note.poll"> <details v-if="note.poll">
<summary>{{ $t('poll') }}</summary> <summary>{{ $ts.poll }}</summary>
<XPoll :note="note"/> <XPoll :note="note"/>
</details> </details>
</div> </div>

View file

@ -9,17 +9,17 @@
@closed="$emit('closed')" @closed="$emit('closed')"
@ok="ok()" @ok="ok()"
> >
<template #header>{{ title || $t('generateAccessToken') }}</template> <template #header>{{ title || $ts.generateAccessToken }}</template>
<div v-if="information" class="_section"> <div v-if="information" class="_section">
<MkInfo warn>{{ information }}</MkInfo> <MkInfo warn>{{ information }}</MkInfo>
</div> </div>
<div class="_section"> <div class="_section">
<MkInput v-model:value="name">{{ $t('name') }}</MkInput> <MkInput v-model:value="name">{{ $ts.name }}</MkInput>
</div> </div>
<div class="_section"> <div class="_section">
<div style="margin-bottom: 16px;"><b>{{ $t('permission') }}</b></div> <div style="margin-bottom: 16px;"><b>{{ $ts.permission }}</b></div>
<MkButton inline @click="disableAll">{{ $t('disableAll') }}</MkButton> <MkButton inline @click="disableAll">{{ $ts.disableAll }}</MkButton>
<MkButton inline @click="enableAll">{{ $t('enableAll') }}</MkButton> <MkButton inline @click="enableAll">{{ $ts.enableAll }}</MkButton>
<MkSwitch v-for="kind in (initialPermissions || kinds)" :key="kind" v-model:value="permissions[kind]">{{ $t(`_permissions.${kind}`) }}</MkSwitch> <MkSwitch v-for="kind in (initialPermissions || kinds)" :key="kind" v-model:value="permissions[kind]">{{ $t(`_permissions.${kind}`) }}</MkSwitch>
</div> </div>
</XModalWindow> </XModalWindow>

View file

@ -48,7 +48,7 @@
</datalist> </datalist>
<div class="suffix" ref="suffixEl"><slot name="suffix"></slot></div> <div class="suffix" ref="suffixEl"><slot name="suffix"></slot></div>
</div> </div>
<button class="save _textButton" v-if="save && changed" @click="() => { changed = false; save(); }">{{ $t('save') }}</button> <button class="save _textButton" v-if="save && changed" @click="() => { changed = false; save(); }">{{ $ts.save }}</button>
<div class="desc _caption"><slot name="desc"></slot></div> <div class="desc _caption"><slot name="desc"></slot></div>
</div> </div>
</template> </template>

View file

@ -35,7 +35,7 @@
</button> </button>
</template> </template>
<span v-if="_items.length === 0" class="none item"> <span v-if="_items.length === 0" class="none item">
<span>{{ $t('none') }}</span> <span>{{ $ts.none }}</span>
</span> </span>
</div> </div>
</template> </template>

View file

@ -6,7 +6,7 @@
</div> </div>
<div class="more" v-show="more" key="_more_"> <div class="more" v-show="more" key="_more_">
<MkButton class="button" v-appear="$store.state.enableInfiniteScroll ? fetchMore : null" @click="fetchMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }" primary> <MkButton class="button" v-appear="$store.state.enableInfiniteScroll ? fetchMore : null" @click="fetchMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }" primary>
<template v-if="!moreFetching">{{ $t('loadMore') }}</template> <template v-if="!moreFetching">{{ $ts.loadMore }}</template>
<template v-if="moreFetching"><MkLoading inline/></template> <template v-if="moreFetching"><MkLoading inline/></template>
</MkButton> </MkButton>
</div> </div>

View file

@ -14,7 +14,7 @@
@blur="focused = false" @blur="focused = false"
></textarea> ></textarea>
</div> </div>
<button class="save _textButton" v-if="save && changed" @click="() => { changed = false; save(); }">{{ $t('save') }}</button> <button class="save _textButton" v-if="save && changed" @click="() => { changed = false; save(); }">{{ $ts.save }}</button>
<div class="desc _caption"><slot name="desc"></slot></div> <div class="desc _caption"><slot name="desc"></slot></div>
</div> </div>
</template> </template>

View file

@ -1,6 +1,6 @@
<template> <template>
<div v-if="playerEnabled" class="player" :style="`padding: ${(player.height || 0) / (player.width || 1) * 100}% 0 0`"> <div v-if="playerEnabled" class="player" :style="`padding: ${(player.height || 0) / (player.width || 1) * 100}% 0 0`">
<button class="disablePlayer" @click="playerEnabled = false" :title="$t('disablePlayer')"><Fa icon="times"/></button> <button class="disablePlayer" @click="playerEnabled = false" :title="$ts.disablePlayer"><Fa icon="times"/></button>
<iframe :src="player.url + (player.url.match(/\?/) ? '&autoplay=1&auto_play=1' : '?autoplay=1&auto_play=1')" :width="player.width || '100%'" :heigth="player.height || 250" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen /> <iframe :src="player.url + (player.url.match(/\?/) ? '&autoplay=1&auto_play=1' : '?autoplay=1&auto_play=1')" :width="player.width || '100%'" :heigth="player.height || 250" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen />
</div> </div>
<div v-else-if="tweetId && tweetExpanded" class="twitter" ref="twitter"> <div v-else-if="tweetId && tweetExpanded" class="twitter" ref="twitter">
@ -10,7 +10,7 @@
<transition name="zoom" mode="out-in"> <transition name="zoom" mode="out-in">
<component :is="self ? 'MkA' : 'a'" :class="{ compact }" :[attr]="self ? url.substr(local.length) : url" rel="nofollow noopener" :target="target" :title="url" v-if="!fetching"> <component :is="self ? 'MkA' : 'a'" :class="{ compact }" :[attr]="self ? url.substr(local.length) : url" rel="nofollow noopener" :target="target" :title="url" v-if="!fetching">
<div class="thumbnail" v-if="thumbnail" :style="`background-image: url('${thumbnail}')`"> <div class="thumbnail" v-if="thumbnail" :style="`background-image: url('${thumbnail}')`">
<button class="_button" v-if="!playerEnabled && player.url" @click.prevent="playerEnabled = true" :title="$t('enablePlayer')"><Fa :icon="faPlayCircle"/></button> <button class="_button" v-if="!playerEnabled && player.url" @click.prevent="playerEnabled = true" :title="$ts.enablePlayer"><Fa :icon="faPlayCircle"/></button>
</div> </div>
<article> <article>
<header> <header>
@ -26,7 +26,7 @@
</transition> </transition>
<div class="expandTweet" v-if="tweetId"> <div class="expandTweet" v-if="tweetId">
<a @click="tweetExpanded = true"> <a @click="tweetExpanded = true">
<Fa :icon="faTwitter"/> {{ $t('expandTweet') }} <Fa :icon="faTwitter"/> {{ $ts.expandTweet }}
</a> </a>
</div> </div>
</div> </div>

View file

@ -10,17 +10,17 @@
<div class="mfm" v-if="user.description"> <div class="mfm" v-if="user.description">
<Mfm :text="user.description" :author="user" :i="$i" :custom-emojis="user.emojis"/> <Mfm :text="user.description" :author="user" :i="$i" :custom-emojis="user.emojis"/>
</div> </div>
<span v-else style="opacity: 0.7;">{{ $t('noAccountDescription') }}</span> <span v-else style="opacity: 0.7;">{{ $ts.noAccountDescription }}</span>
</div> </div>
<div class="status"> <div class="status">
<div> <div>
<p>{{ $t('notes') }}</p><span>{{ user.notesCount }}</span> <p>{{ $ts.notes }}</p><span>{{ user.notesCount }}</span>
</div> </div>
<div> <div>
<p>{{ $t('following') }}</p><span>{{ user.followingCount }}</span> <p>{{ $ts.following }}</p><span>{{ user.followingCount }}</span>
</div> </div>
<div> <div>
<p>{{ $t('followers') }}</p><span>{{ user.followersCount }}</span> <p>{{ $ts.followers }}</p><span>{{ user.followersCount }}</span>
</div> </div>
</div> </div>
<MkFollowButton class="koudoku-button" v-if="$i && user.id != $i.id" :user="user" mini/> <MkFollowButton class="koudoku-button" v-if="$i && user.id != $i.id" :user="user" mini/>

View file

@ -3,13 +3,13 @@
<div v-else class="efvhhmdq"> <div v-else class="efvhhmdq">
<div class="no-users" v-if="empty"> <div class="no-users" v-if="empty">
<p>{{ $t('noUsers') }}</p> <p>{{ $ts.noUsers }}</p>
</div> </div>
<div class="users"> <div class="users">
<MkUserInfo class="user" v-for="user in users" :user="user" :key="user.id"/> <MkUserInfo class="user" v-for="user in users" :user="user" :key="user.id"/>
</div> </div>
<button class="more" v-appear="$store.state.enableInfiniteScroll ? fetchMore : null" @click="fetchMore" :class="{ fetching: moreFetching }" v-show="more" :disabled="moreFetching"> <button class="more" v-appear="$store.state.enableInfiniteScroll ? fetchMore : null" @click="fetchMore" :class="{ fetching: moreFetching }" v-show="more" :disabled="moreFetching">
<template v-if="moreFetching"><Fa icon="spinner" pulse fixed-width/></template>{{ moreFetching ? $t('loading') : $t('loadMore') }} <template v-if="moreFetching"><Fa icon="spinner" pulse fixed-width/></template>{{ moreFetching ? $ts.loading : $ts.loadMore }}
</button> </button>
</div> </div>
</template> </template>

View file

@ -13,13 +13,13 @@
</div> </div>
<div class="status"> <div class="status">
<div> <div>
<p>{{ $t('notes') }}</p><span>{{ user.notesCount }}</span> <p>{{ $ts.notes }}</p><span>{{ user.notesCount }}</span>
</div> </div>
<div> <div>
<p>{{ $t('following') }}</p><span>{{ user.followingCount }}</span> <p>{{ $ts.following }}</p><span>{{ user.followingCount }}</span>
</div> </div>
<div> <div>
<p>{{ $t('followers') }}</p><span>{{ user.followersCount }}</span> <p>{{ $ts.followers }}</p><span>{{ user.followersCount }}</span>
</div> </div>
</div> </div>
<MkFollowButton class="koudoku-button" v-if="$i && user.id != $i.id" :user="user" mini/> <MkFollowButton class="koudoku-button" v-if="$i && user.id != $i.id" :user="user" mini/>

View file

@ -7,11 +7,11 @@
@ok="ok()" @ok="ok()"
@closed="$emit('closed')" @closed="$emit('closed')"
> >
<template #header>{{ $t('selectUser') }}</template> <template #header>{{ $ts.selectUser }}</template>
<div class="tbhwbxda _section"> <div class="tbhwbxda _section">
<div class="inputs"> <div class="inputs">
<MkInput v-model:value="username" class="input" @update:value="search" ref="username"><span>{{ $t('username') }}</span><template #prefix>@</template></MkInput> <MkInput v-model:value="username" class="input" @update:value="search" ref="username"><span>{{ $ts.username }}</span><template #prefix>@</template></MkInput>
<MkInput v-model:value="host" class="input" @update:value="search"><span>{{ $t('host') }}</span><template #prefix>@</template></MkInput> <MkInput v-model:value="host" class="input" @update:value="search"><span>{{ $ts.host }}</span><template #prefix>@</template></MkInput>
</div> </div>
</div> </div>
<div class="tbhwbxda _section result" v-if="username != '' || host != ''" :class="{ hit: users.length > 0 }"> <div class="tbhwbxda _section result" v-if="username != '' || host != ''" :class="{ hit: users.length > 0 }">
@ -25,7 +25,7 @@
</div> </div>
</div> </div>
<div v-else class="empty"> <div v-else class="empty">
<span>{{ $t('noUsers') }}</span> <span>{{ $ts.noUsers }}</span>
</div> </div>
</div> </div>
<div class="tbhwbxda _section recent" v-if="username == '' && host == ''"> <div class="tbhwbxda _section recent" v-if="username == '' && host == ''">

View file

@ -15,11 +15,11 @@
</MkA> </MkA>
</div> </div>
<button class="more _button" v-appear="$store.state.enableInfiniteScroll ? fetchMore : null" @click="fetchMore" v-show="more" :disabled="moreFetching"> <button class="more _button" v-appear="$store.state.enableInfiniteScroll ? fetchMore : null" @click="fetchMore" v-show="more" :disabled="moreFetching">
<template v-if="!moreFetching">{{ $t('loadMore') }}</template> <template v-if="!moreFetching">{{ $ts.loadMore }}</template>
<template v-if="moreFetching"><Fa :icon="faSpinner" pulse fixed-width/></template> <template v-if="moreFetching"><Fa :icon="faSpinner" pulse fixed-width/></template>
</button> </button>
<p class="empty" v-if="empty">{{ $t('noUsers') }}</p> <p class="empty" v-if="empty">{{ $ts.noUsers }}</p>
<MkError v-if="error" @retry="init()"/> <MkError v-if="error" @retry="init()"/>
</div> </div>

View file

@ -4,37 +4,37 @@
<button class="_button" @click="choose('public')" :class="{ active: v == 'public' }" data-index="1" key="public"> <button class="_button" @click="choose('public')" :class="{ active: v == 'public' }" data-index="1" key="public">
<div><Fa :icon="faGlobe"/></div> <div><Fa :icon="faGlobe"/></div>
<div> <div>
<span>{{ $t('_visibility.public') }}</span> <span>{{ $ts._visibility.public }}</span>
<span>{{ $t('_visibility.publicDescription') }}</span> <span>{{ $ts._visibility.publicDescription }}</span>
</div> </div>
</button> </button>
<button class="_button" @click="choose('home')" :class="{ active: v == 'home' }" data-index="2" key="home"> <button class="_button" @click="choose('home')" :class="{ active: v == 'home' }" data-index="2" key="home">
<div><Fa :icon="faHome"/></div> <div><Fa :icon="faHome"/></div>
<div> <div>
<span>{{ $t('_visibility.home') }}</span> <span>{{ $ts._visibility.home }}</span>
<span>{{ $t('_visibility.homeDescription') }}</span> <span>{{ $ts._visibility.homeDescription }}</span>
</div> </div>
</button> </button>
<button class="_button" @click="choose('followers')" :class="{ active: v == 'followers' }" data-index="3" key="followers"> <button class="_button" @click="choose('followers')" :class="{ active: v == 'followers' }" data-index="3" key="followers">
<div><Fa :icon="faUnlock"/></div> <div><Fa :icon="faUnlock"/></div>
<div> <div>
<span>{{ $t('_visibility.followers') }}</span> <span>{{ $ts._visibility.followers }}</span>
<span>{{ $t('_visibility.followersDescription') }}</span> <span>{{ $ts._visibility.followersDescription }}</span>
</div> </div>
</button> </button>
<button :disabled="localOnly" class="_button" @click="choose('specified')" :class="{ active: v == 'specified' }" data-index="4" key="specified"> <button :disabled="localOnly" class="_button" @click="choose('specified')" :class="{ active: v == 'specified' }" data-index="4" key="specified">
<div><Fa :icon="faEnvelope"/></div> <div><Fa :icon="faEnvelope"/></div>
<div> <div>
<span>{{ $t('_visibility.specified') }}</span> <span>{{ $ts._visibility.specified }}</span>
<span>{{ $t('_visibility.specifiedDescription') }}</span> <span>{{ $ts._visibility.specifiedDescription }}</span>
</div> </div>
</button> </button>
<div class="divider"></div> <div class="divider"></div>
<button class="_button localOnly" @click="localOnly = !localOnly" :class="{ active: localOnly }" data-index="5" key="localOnly"> <button class="_button localOnly" @click="localOnly = !localOnly" :class="{ active: localOnly }" data-index="5" key="localOnly">
<div><Fa :icon="faBiohazard"/></div> <div><Fa :icon="faBiohazard"/></div>
<div> <div>
<span>{{ $t('_visibility.localOnly') }}</span> <span>{{ $ts._visibility.localOnly }}</span>
<span>{{ $t('_visibility.localOnlyDescription') }}</span> <span>{{ $ts._visibility.localOnlyDescription }}</span>
</div> </div>
<div><Fa :icon="localOnly ? faToggleOn : faToggleOff" :key="localOnly"/></div> <div><Fa :icon="localOnly ? faToggleOn : faToggleOff" :key="localOnly"/></div>
</button> </button>

View file

@ -21,6 +21,13 @@ export class I18n<T extends Record<string, any>> {
public t(key: string, args?: Record<string, any>): string { public t(key: string, args?: Record<string, any>): string {
try { try {
let str = key.split('.').reduce((o, i) => o[i], this.locale) as string; let str = key.split('.').reduce((o, i) => o[i], this.locale) as string;
if (_DEV_) {
if (!str.includes('{')) {
console.warn(`i18n: '${key}' has no any arg. so ref prop directly instead of call this method.`);
}
}
if (args) { if (args) {
for (const [k, v] of Object.entries(args)) { for (const [k, v] of Object.entries(args)) {
str = str.replace(`{${k}}`, v); str = str.replace(`{${k}}`, v);

View file

@ -3,8 +3,8 @@
<div class="_section"> <div class="_section">
<div class="mjndxjch _content"> <div class="mjndxjch _content">
<img src="https://xn--931a.moe/assets/error.jpg" class="_ghost"/> <img src="https://xn--931a.moe/assets/error.jpg" class="_ghost"/>
<p><Fa :icon="faExclamationTriangle"/> {{ $t('pageLoadError') }}</p> <p><Fa :icon="faExclamationTriangle"/> {{ $ts.pageLoadError }}</p>
<p>{{ $t('pageLoadErrorDescription') }}</p> <p>{{ $ts.pageLoadErrorDescription }}</p>
</div> </div>
</div> </div>
</transition> </transition>
@ -22,7 +22,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('error'), title: this.$ts.error,
icon: faExclamationTriangle icon: faExclamationTriangle
}, },
faExclamationTriangle faExclamationTriangle

View file

@ -11,27 +11,27 @@
</div> </div>
</section> </section>
<section class="_formItem" style="text-align: center; padding: 0 16px;" @click="gravity"> <section class="_formItem" style="text-align: center; padding: 0 16px;" @click="gravity">
{{ $t('_aboutMisskey.about') }} {{ $ts._aboutMisskey.about }}
</section> </section>
<FormGroup> <FormGroup>
<FormLink to="https://github.com/syuilo/misskey" external> <FormLink to="https://github.com/syuilo/misskey" external>
<template #icon><Fa :icon="faCode"/></template> <template #icon><Fa :icon="faCode"/></template>
{{ $t('_aboutMisskey.source') }} {{ $ts._aboutMisskey.source }}
<template #suffix>GitHub</template> <template #suffix>GitHub</template>
</FormLink> </FormLink>
<FormLink to="https://crowdin.com/project/misskey" external> <FormLink to="https://crowdin.com/project/misskey" external>
<template #icon><Fa :icon="faLanguage"/></template> <template #icon><Fa :icon="faLanguage"/></template>
{{ $t('_aboutMisskey.translation') }} {{ $ts._aboutMisskey.translation }}
<template #suffix>Crowdin</template> <template #suffix>Crowdin</template>
</FormLink> </FormLink>
<FormLink to="https://www.patreon.com/syuilo" external> <FormLink to="https://www.patreon.com/syuilo" external>
<template #icon><Fa :icon="faHandHoldingMedical"/></template> <template #icon><Fa :icon="faHandHoldingMedical"/></template>
{{ $t('_aboutMisskey.donate') }} {{ $ts._aboutMisskey.donate }}
<template #suffix>Patreon</template> <template #suffix>Patreon</template>
</FormLink> </FormLink>
</FormGroup> </FormGroup>
<FormGroup> <FormGroup>
<template #label>{{ $t('_aboutMisskey.contributors') }}</template> <template #label>{{ $ts._aboutMisskey.contributors }}</template>
<FormLink to="https://github.com/syuilo" external>@syuilo</FormLink> <FormLink to="https://github.com/syuilo" external>@syuilo</FormLink>
<FormLink to="https://github.com/AyaMorisawa" external>@AyaMorisawa</FormLink> <FormLink to="https://github.com/AyaMorisawa" external>@AyaMorisawa</FormLink>
<FormLink to="https://github.com/mei23" external>@mei23</FormLink> <FormLink to="https://github.com/mei23" external>@mei23</FormLink>
@ -40,12 +40,12 @@
<FormLink to="https://github.com/rinsuki" external>@rinsuki</FormLink> <FormLink to="https://github.com/rinsuki" external>@rinsuki</FormLink>
<FormLink to="https://github.com/Xeltica" external>@Xeltica</FormLink> <FormLink to="https://github.com/Xeltica" external>@Xeltica</FormLink>
<FormLink to="https://github.com/u1-liquid" external>@u1-liquid</FormLink> <FormLink to="https://github.com/u1-liquid" external>@u1-liquid</FormLink>
<template #caption><MkLink url="https://github.com/syuilo/misskey/graphs/contributors">{{ $t('_aboutMisskey.allContributors') }}</MkLink></template> <template #caption><MkLink url="https://github.com/syuilo/misskey/graphs/contributors">{{ $ts._aboutMisskey.allContributors }}</MkLink></template>
</FormGroup> </FormGroup>
<FormGroup> <FormGroup>
<template #label><Mfm text="[jelly ❤]"/> {{ $t('_aboutMisskey.patrons') }}</template> <template #label><Mfm text="[jelly ❤]"/> {{ $ts._aboutMisskey.patrons }}</template>
<FormKeyValueView v-for="patron in patrons" :key="patron"><template #key>{{ patron }}</template></FormKeyValueView> <FormKeyValueView v-for="patron in patrons" :key="patron"><template #key>{{ patron }}</template></FormKeyValueView>
<template #caption>{{ $t('_aboutMisskey.morePatrons') }}</template> <template #caption>{{ $ts._aboutMisskey.morePatrons }}</template>
</FormGroup> </FormGroup>
</FormBase> </FormBase>
</div> </div>
@ -115,7 +115,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('aboutMisskey'), title: this.$ts.aboutMisskey,
icon: null icon: null
}, },
version, version,

View file

@ -13,16 +13,16 @@
<FormGroup> <FormGroup>
<FormKeyValueView> <FormKeyValueView>
<template #key>{{ $t('administrator') }}</template> <template #key>{{ $ts.administrator }}</template>
<template #value>{{ meta.maintainerName }}</template> <template #value>{{ meta.maintainerName }}</template>
</FormKeyValueView> </FormKeyValueView>
<FormKeyValueView> <FormKeyValueView>
<template #key>{{ $t('contact') }}</template> <template #key>{{ $ts.contact }}</template>
<template #value>{{ meta.maintainerEmail }}</template> <template #value>{{ meta.maintainerEmail }}</template>
</FormKeyValueView> </FormKeyValueView>
</FormGroup> </FormGroup>
<FormLink v-if="meta.tosUrl" :to="meta.tosUrl" external>{{ $t('tos') }}</FormLink> <FormLink v-if="meta.tosUrl" :to="meta.tosUrl" external>{{ $ts.tos }}</FormLink>
</FormBase> </FormBase>
</template> </template>
@ -47,7 +47,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('instanceInfo'), title: this.$ts.instanceInfo,
icon: faInfoCircle icon: faInfoCircle
}, },
version, version,

View file

@ -8,7 +8,7 @@
<img v-if="announcement.imageUrl" :src="announcement.imageUrl"/> <img v-if="announcement.imageUrl" :src="announcement.imageUrl"/>
</div> </div>
<div class="_footer" v-if="$i && !announcement.isRead"> <div class="_footer" v-if="$i && !announcement.isRead">
<MkButton @click="read(items, announcement, i)" primary><Fa :icon="faCheck"/> {{ $t('gotIt') }}</MkButton> <MkButton @click="read(items, announcement, i)" primary><Fa :icon="faCheck"/> {{ $ts.gotIt }}</MkButton>
</div> </div>
</section> </section>
</MkPagination> </MkPagination>
@ -31,7 +31,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('announcements'), title: this.$ts.announcements,
icon: faBroadcastTower icon: faBroadcastTower
}, },
pagination: { pagination: {

View file

@ -7,14 +7,14 @@
<p class="description">{{ app.description }}</p> <p class="description">{{ app.description }}</p>
</div> </div>
<div class="_content"> <div class="_content">
<h2>{{ $t('_auth.permissionAsk') }}</h2> <h2>{{ $ts._auth.permissionAsk }}</h2>
<ul> <ul>
<li v-for="p in app.permission" :key="p">{{ $t(`_permissions.${p}`) }}</li> <li v-for="p in app.permission" :key="p">{{ $t(`_permissions.${p}`) }}</li>
</ul> </ul>
</div> </div>
<div class="_footer"> <div class="_footer">
<MkButton @click="cancel" inline>{{ $t('cancel') }}</MkButton> <MkButton @click="cancel" inline>{{ $ts.cancel }}</MkButton>
<MkButton @click="accept" inline primary>{{ $t('accept') }}</MkButton> <MkButton @click="accept" inline primary>{{ $ts.accept }}</MkButton>
</div> </div>
</section> </section>
</template> </template>

View file

@ -12,15 +12,15 @@
@accepted="accepted" @accepted="accepted"
/> />
<div class="denied" v-if="state == 'denied'"> <div class="denied" v-if="state == 'denied'">
<h1>{{ $t('_auth.denied') }}</h1> <h1>{{ $ts._auth.denied }}</h1>
</div> </div>
<div class="accepted" v-if="state == 'accepted'"> <div class="accepted" v-if="state == 'accepted'">
<h1>{{ session.app.isAuthorized ? this.$t('already-authorized') : this.$t('allowed') }}</h1> <h1>{{ session.app.isAuthorized ? this.$t('already-authorized') : this.$ts.allowed }}</h1>
<p v-if="session.app.callbackUrl">{{ $t('_auth.callback') }}<MkEllipsis/></p> <p v-if="session.app.callbackUrl">{{ $ts._auth.callback }}<MkEllipsis/></p>
<p v-if="!session.app.callbackUrl">{{ $t('_auth.pleaseGoBack') }}</p> <p v-if="!session.app.callbackUrl">{{ $ts._auth.pleaseGoBack }}</p>
</div> </div>
<div class="error" v-if="state == 'fetch-session-error'"> <div class="error" v-if="state == 'fetch-session-error'">
<p>{{ $t('somethingHappened') }}</p> <p>{{ $ts.somethingHappened }}</p>
</div> </div>
</div> </div>
<div class="signin" v-else> <div class="signin" v-else>

View file

@ -2,20 +2,20 @@
<div> <div>
<div class="_section"> <div class="_section">
<div class="_content"> <div class="_content">
<MkInput v-model:value="name">{{ $t('name') }}</MkInput> <MkInput v-model:value="name">{{ $ts.name }}</MkInput>
<MkTextarea v-model:value="description">{{ $t('description') }}</MkTextarea> <MkTextarea v-model:value="description">{{ $ts.description }}</MkTextarea>
<div class="banner"> <div class="banner">
<MkButton v-if="bannerId == null" @click="setBannerImage"><Fa :icon="faPlus"/> {{ $t('_channel.setBanner') }}</MkButton> <MkButton v-if="bannerId == null" @click="setBannerImage"><Fa :icon="faPlus"/> {{ $ts._channel.setBanner }}</MkButton>
<div v-else-if="bannerUrl"> <div v-else-if="bannerUrl">
<img :src="bannerUrl" style="width: 100%;"/> <img :src="bannerUrl" style="width: 100%;"/>
<MkButton @click="removeBannerImage()"><Fa :icon="faTrashAlt"/> {{ $t('_channel.removeBanner') }}</MkButton> <MkButton @click="removeBannerImage()"><Fa :icon="faTrashAlt"/> {{ $ts._channel.removeBanner }}</MkButton>
</div> </div>
</div> </div>
</div> </div>
<div class="_footer"> <div class="_footer">
<MkButton @click="save()" primary><Fa :icon="faSave"/> {{ channelId ? $t('save') : $t('create') }}</MkButton> <MkButton @click="save()" primary><Fa :icon="faSave"/> {{ channelId ? $ts.save : $ts.create }}</MkButton>
</div> </div>
</div> </div>
</div> </div>
@ -46,10 +46,10 @@ export default defineComponent({
data() { data() {
return { return {
INFO: computed(() => this.channelId ? { INFO: computed(() => this.channelId ? {
title: this.$t('_channel.edit'), title: this.$ts._channel.edit,
icon: faSatelliteDish, icon: faSatelliteDish,
} : { } : {
title: this.$t('_channel.create'), title: this.$ts._channel.create,
icon: faSatelliteDish, icon: faSatelliteDish,
}), }),
channel: null, channel: null,

View file

@ -10,8 +10,8 @@
</div> </div>
<div :style="{ backgroundImage: channel.bannerUrl ? `url(${channel.bannerUrl})` : null }" class="banner"> <div :style="{ backgroundImage: channel.bannerUrl ? `url(${channel.bannerUrl})` : null }" class="banner">
<div class="status"> <div class="status">
<div><Fa :icon="faUsers" fixed-width/><I18n src="_channel.usersCount" tag="span" style="margin-left: 4px;"><template #n><b>{{ channel.usersCount }}</b></template></I18n></div> <div><Fa :icon="faUsers" fixed-width/><I18n :src="$ts._channel.usersCount" tag="span" style="margin-left: 4px;"><template #n><b>{{ channel.usersCount }}</b></template></I18n></div>
<div><Fa :icon="faPencilAlt" fixed-width/><I18n src="_channel.notesCount" tag="span" style="margin-left: 4px;"><template #n><b>{{ channel.notesCount }}</b></template></I18n></div> <div><Fa :icon="faPencilAlt" fixed-width/><I18n :src="$ts._channel.notesCount" tag="span" style="margin-left: 4px;"><template #n><b>{{ channel.notesCount }}</b></template></I18n></div>
</div> </div>
<div class="fade"></div> <div class="fade"></div>
</div> </div>

View file

@ -2,9 +2,9 @@
<div> <div>
<div class="_section" style="padding: 0;" v-if="$i"> <div class="_section" style="padding: 0;" v-if="$i">
<MkTab class="_content" v-model:value="tab"> <MkTab class="_content" v-model:value="tab">
<option value="featured"><Fa :icon="faFireAlt"/> {{ $t('_channel.featured') }}</option> <option value="featured"><Fa :icon="faFireAlt"/> {{ $ts._channel.featured }}</option>
<option value="following"><Fa :icon="faHeart"/> {{ $t('_channel.following') }}</option> <option value="following"><Fa :icon="faHeart"/> {{ $ts._channel.following }}</option>
<option value="owned"><Fa :icon="faEdit"/> {{ $t('_channel.owned') }}</option> <option value="owned"><Fa :icon="faEdit"/> {{ $ts._channel.owned }}</option>
</MkTab> </MkTab>
</div> </div>
@ -47,7 +47,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('channel'), title: this.$ts.channel,
icon: faSatelliteDish, icon: faSatelliteDish,
action: { action: {
icon: faPlus, icon: faPlus,

View file

@ -81,24 +81,24 @@ export default defineComponent({
menu(ev) { menu(ev) {
os.modalMenu([this.isOwned ? { os.modalMenu([this.isOwned ? {
icon: faPencilAlt, icon: faPencilAlt,
text: this.$t('edit'), text: this.$ts.edit,
action: async () => { action: async () => {
const { canceled, result } = await os.form(this.clip.name, { const { canceled, result } = await os.form(this.clip.name, {
name: { name: {
type: 'string', type: 'string',
label: this.$t('name'), label: this.$ts.name,
default: this.clip.name default: this.clip.name
}, },
description: { description: {
type: 'string', type: 'string',
required: false, required: false,
multiline: true, multiline: true,
label: this.$t('description'), label: this.$ts.description,
default: this.clip.description default: this.clip.description
}, },
isPublic: { isPublic: {
type: 'boolean', type: 'boolean',
label: this.$t('public'), label: this.$ts.public,
default: this.clip.isPublic default: this.clip.isPublic
} }
}); });
@ -111,7 +111,7 @@ export default defineComponent({
} }
} : undefined, this.isOwned ? { } : undefined, this.isOwned ? {
icon: faTrashAlt, icon: faTrashAlt,
text: this.$t('delete'), text: this.$ts.delete,
danger: true, danger: true,
action: async () => { action: async () => {
const { canceled } = await os.dialog({ const { canceled } = await os.dialog({

View file

@ -6,7 +6,7 @@
<div v-html="body" class="qyqbqfal"></div> <div v-html="body" class="qyqbqfal"></div>
</div> </div>
<div class="_footer"> <div class="_footer">
<MkLink :url="`https://github.com/syuilo/misskey/blob/master/src/docs/${doc}.ja-JP.md`" class="at">{{ $t('docSource') }}</MkLink> <MkLink :url="`https://github.com/syuilo/misskey/blob/master/src/docs/${doc}.ja-JP.md`" class="at">{{ $ts.docSource }}</MkLink>
</div> </div>
</main> </main>
</div> </div>

View file

@ -21,7 +21,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('help'), title: this.$ts.help,
icon: faQuestionCircle icon: faQuestionCircle
}, },
docs: [], docs: [],

View file

@ -18,7 +18,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: computed(() => this.folder ? this.folder.name : this.$t('drive')), title: computed(() => this.folder ? this.folder.name : this.$ts.drive),
icon: faCloud, icon: faCloud,
action: { action: {
icon: faEllipsisH, icon: faEllipsisH,

View file

@ -1,7 +1,7 @@
<template> <template>
<div class="lznhrdub"> <div class="lznhrdub">
<div class="_section"> <div class="_section">
<MkInput v-model:value="query" :debounce="true" type="search"><template #icon><Fa :icon="faSearch"/></template><span>{{ $t('searchUser') }}</span></MkInput> <MkInput v-model:value="query" :debounce="true" type="search"><template #icon><Fa :icon="faSearch"/></template><span>{{ $ts.searchUser }}</span></MkInput>
<XUserList v-if="query" class="_vMargin" :pagination="searchPagination" ref="search"/> <XUserList v-if="query" class="_vMargin" :pagination="searchPagination" ref="search"/>
@ -12,30 +12,30 @@
<template v-if="tag == null"> <template v-if="tag == null">
<MkFolder class="_vMargin" persist-key="explore-pinned-users"> <MkFolder class="_vMargin" persist-key="explore-pinned-users">
<template #header><Fa :icon="faBookmark" fixed-width style="margin-right: 0.5em;"/>{{ $t('pinnedUsers') }}</template> <template #header><Fa :icon="faBookmark" fixed-width style="margin-right: 0.5em;"/>{{ $ts.pinnedUsers }}</template>
<XUserList :pagination="pinnedUsers"/> <XUserList :pagination="pinnedUsers"/>
</MkFolder> </MkFolder>
<MkFolder class="_vMargin" persist-key="explore-popular-users"> <MkFolder class="_vMargin" persist-key="explore-popular-users">
<template #header><Fa :icon="faChartLine" fixed-width style="margin-right: 0.5em;"/>{{ $t('popularUsers') }}</template> <template #header><Fa :icon="faChartLine" fixed-width style="margin-right: 0.5em;"/>{{ $ts.popularUsers }}</template>
<XUserList :pagination="popularUsers"/> <XUserList :pagination="popularUsers"/>
</MkFolder> </MkFolder>
<MkFolder class="_vMargin" persist-key="explore-recently-updated-users"> <MkFolder class="_vMargin" persist-key="explore-recently-updated-users">
<template #header><Fa :icon="faCommentAlt" fixed-width style="margin-right: 0.5em;"/>{{ $t('recentlyUpdatedUsers') }}</template> <template #header><Fa :icon="faCommentAlt" fixed-width style="margin-right: 0.5em;"/>{{ $ts.recentlyUpdatedUsers }}</template>
<XUserList :pagination="recentlyUpdatedUsers"/> <XUserList :pagination="recentlyUpdatedUsers"/>
</MkFolder> </MkFolder>
<MkFolder class="_vMargin" persist-key="explore-recently-registered-users"> <MkFolder class="_vMargin" persist-key="explore-recently-registered-users">
<template #header><Fa :icon="faPlus" fixed-width style="margin-right: 0.5em;"/>{{ $t('recentlyRegisteredUsers') }}</template> <template #header><Fa :icon="faPlus" fixed-width style="margin-right: 0.5em;"/>{{ $ts.recentlyRegisteredUsers }}</template>
<XUserList :pagination="recentlyRegisteredUsers"/> <XUserList :pagination="recentlyRegisteredUsers"/>
</MkFolder> </MkFolder>
</template> </template>
</div> </div>
<div class="_section"> <div class="_section">
<div class="localfedi7 _panel _vMargin" v-if="tag == null" :style="{ backgroundImage: `url(/assets/fedi.jpg)` }"> <div class="localfedi7 _panel _vMargin" v-if="tag == null" :style="{ backgroundImage: `url(/assets/fedi.jpg)` }">
<header><span>{{ $t('exploreFediverse') }}</span></header> <header><span>{{ $ts.exploreFediverse }}</span></header>
</div> </div>
<MkFolder :body-togglable="true" :expanded="false" ref="tags" class="_vMargin"> <MkFolder :body-togglable="true" :expanded="false" ref="tags" class="_vMargin">
<template #header><Fa :icon="faHashtag" fixed-width style="margin-right: 0.5em;"/>{{ $t('popularTags') }}</template> <template #header><Fa :icon="faHashtag" fixed-width style="margin-right: 0.5em;"/>{{ $ts.popularTags }}</template>
<div class="vxjfqztj"> <div class="vxjfqztj">
<MkA v-for="tag in tagsLocal" :to="`/explore/tags/${tag.tag}`" :key="'local:' + tag.tag" class="local">{{ tag.tag }}</MkA> <MkA v-for="tag in tagsLocal" :to="`/explore/tags/${tag.tag}`" :key="'local:' + tag.tag" class="local">{{ tag.tag }}</MkA>
@ -50,15 +50,15 @@
<template v-if="tag == null"> <template v-if="tag == null">
<MkFolder class="_vMargin"> <MkFolder class="_vMargin">
<template #header><Fa :icon="faChartLine" fixed-width style="margin-right: 0.5em;"/>{{ $t('popularUsers') }}</template> <template #header><Fa :icon="faChartLine" fixed-width style="margin-right: 0.5em;"/>{{ $ts.popularUsers }}</template>
<XUserList :pagination="popularUsersF"/> <XUserList :pagination="popularUsersF"/>
</MkFolder> </MkFolder>
<MkFolder class="_vMargin"> <MkFolder class="_vMargin">
<template #header><Fa :icon="faCommentAlt" fixed-width style="margin-right: 0.5em;"/>{{ $t('recentlyUpdatedUsers') }}</template> <template #header><Fa :icon="faCommentAlt" fixed-width style="margin-right: 0.5em;"/>{{ $ts.recentlyUpdatedUsers }}</template>
<XUserList :pagination="recentlyUpdatedUsersF"/> <XUserList :pagination="recentlyUpdatedUsersF"/>
</MkFolder> </MkFolder>
<MkFolder class="_vMargin"> <MkFolder class="_vMargin">
<template #header><Fa :icon="faRocket" fixed-width style="margin-right: 0.5em;"/>{{ $t('recentlyDiscoveredUsers') }}</template> <template #header><Fa :icon="faRocket" fixed-width style="margin-right: 0.5em;"/>{{ $ts.recentlyDiscoveredUsers }}</template>
<XUserList :pagination="recentlyRegisteredUsersF"/> <XUserList :pagination="recentlyRegisteredUsersF"/>
</MkFolder> </MkFolder>
</template> </template>
@ -93,7 +93,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('explore'), title: this.$ts.explore,
icon: faHashtag icon: faHashtag
}, },
pinnedUsers: { endpoint: 'pinned-users' }, pinnedUsers: { endpoint: 'pinned-users' },

View file

@ -19,7 +19,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('favorites'), title: this.$ts.favorites,
icon: faStar icon: faStar
}, },
pagination: { pagination: {

View file

@ -18,7 +18,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('featured'), title: this.$ts.featured,
icon: faFireAlt icon: faFireAlt
}, },
pagination: { pagination: {

View file

@ -4,7 +4,7 @@
<template #empty> <template #empty>
<div class="_fullinfo"> <div class="_fullinfo">
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/> <img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
<div>{{ $t('noFollowRequests') }}</div> <div>{{ $ts.noFollowRequests }}</div>
</div> </div>
</template> </template>
<template #default="{items}"> <template #default="{items}">
@ -44,7 +44,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('followRequests'), title: this.$ts.followRequests,
icon: faUserClock, icon: faUserClock,
}, },
pagination: { pagination: {

View file

@ -40,7 +40,7 @@ export default defineComponent({
}); });
} }
os.promiseDialog(promise, null, null, this.$t('fetchingAsApObject')); os.promiseDialog(promise, null, null, this.$ts.fetchingAsApObject);
}, },
methods: { methods: {

View file

@ -4,31 +4,31 @@
<div class="_content"> <div class="_content">
<div class="inputs" style="display: flex;"> <div class="inputs" style="display: flex;">
<MkSelect v-model:value="state" style="margin: 0; flex: 1;"> <MkSelect v-model:value="state" style="margin: 0; flex: 1;">
<template #label>{{ $t('state') }}</template> <template #label>{{ $ts.state }}</template>
<option value="all">{{ $t('all') }}</option> <option value="all">{{ $ts.all }}</option>
<option value="unresolved">{{ $t('unresolved') }}</option> <option value="unresolved">{{ $ts.unresolved }}</option>
<option value="resolved">{{ $t('resolved') }}</option> <option value="resolved">{{ $ts.resolved }}</option>
</MkSelect> </MkSelect>
<MkSelect v-model:value="targetUserOrigin" style="margin: 0; flex: 1;"> <MkSelect v-model:value="targetUserOrigin" style="margin: 0; flex: 1;">
<template #label>{{ $t('targetUserOrigin') }}</template> <template #label>{{ $ts.targetUserOrigin }}</template>
<option value="combined">{{ $t('all') }}</option> <option value="combined">{{ $ts.all }}</option>
<option value="local">{{ $t('local') }}</option> <option value="local">{{ $ts.local }}</option>
<option value="remote">{{ $t('remote') }}</option> <option value="remote">{{ $ts.remote }}</option>
</MkSelect> </MkSelect>
<MkSelect v-model:value="reporterOrigin" style="margin: 0; flex: 1;"> <MkSelect v-model:value="reporterOrigin" style="margin: 0; flex: 1;">
<template #label>{{ $t('reporterOrigin') }}</template> <template #label>{{ $ts.reporterOrigin }}</template>
<option value="combined">{{ $t('all') }}</option> <option value="combined">{{ $ts.all }}</option>
<option value="local">{{ $t('local') }}</option> <option value="local">{{ $ts.local }}</option>
<option value="remote">{{ $t('remote') }}</option> <option value="remote">{{ $ts.remote }}</option>
</MkSelect> </MkSelect>
</div> </div>
<!-- TODO <!-- TODO
<div class="inputs" style="display: flex; padding-top: 1.2em;"> <div class="inputs" style="display: flex; padding-top: 1.2em;">
<MkInput v-model:value="searchUsername" style="margin: 0; flex: 1;" type="text" spellcheck="false" @update:value="$refs.reports.reload()"> <MkInput v-model:value="searchUsername" style="margin: 0; flex: 1;" type="text" spellcheck="false" @update:value="$refs.reports.reload()">
<span>{{ $t('username') }}</span> <span>{{ $ts.username }}</span>
</MkInput> </MkInput>
<MkInput v-model:value="searchHost" style="margin: 0; flex: 1;" type="text" spellcheck="false" @update:value="$refs.reports.reload()" :disabled="pagination.params().origin === 'local'"> <MkInput v-model:value="searchHost" style="margin: 0; flex: 1;" type="text" spellcheck="false" @update:value="$refs.reports.reload()" :disabled="pagination.params().origin === 'local'">
<span>{{ $t('host') }}</span> <span>{{ $ts.host }}</span>
</MkInput> </MkInput>
</div> </div>
--> -->
@ -52,7 +52,7 @@
</div> </div>
<div class="_footer"> <div class="_footer">
<div v-if="report.assignee">Assignee: <MkAcct :user="report.assignee"/></div> <div v-if="report.assignee">Assignee: <MkAcct :user="report.assignee"/></div>
<MkButton @click="resolve(report)" primary v-if="!report.resolved">{{ $t('abuseMarkAsResolved') }}</MkButton> <MkButton @click="resolve(report)" primary v-if="!report.resolved">{{ $ts.abuseMarkAsResolved }}</MkButton>
</div> </div>
</div> </div>
</MkPagination> </MkPagination>
@ -84,7 +84,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('abuseReports'), title: this.$ts.abuseReports,
icon: faExclamationCircle icon: faExclamationCircle
}, },
searchUsername: '', searchUsername: '',

View file

@ -2,22 +2,22 @@
<div class="ztgjmzrw"> <div class="ztgjmzrw">
<div class="_section"> <div class="_section">
<div class="_content"> <div class="_content">
<MkButton @click="add()" primary style="margin: 0 auto 16px auto;"><Fa :icon="faPlus"/> {{ $t('add') }}</MkButton> <MkButton @click="add()" primary style="margin: 0 auto 16px auto;"><Fa :icon="faPlus"/> {{ $ts.add }}</MkButton>
<section class="_card _vMargin announcements" v-for="announcement in announcements"> <section class="_card _vMargin announcements" v-for="announcement in announcements">
<div class="_content announcement"> <div class="_content announcement">
<MkInput v-model:value="announcement.title"> <MkInput v-model:value="announcement.title">
<span>{{ $t('title') }}</span> <span>{{ $ts.title }}</span>
</MkInput> </MkInput>
<MkTextarea v-model:value="announcement.text"> <MkTextarea v-model:value="announcement.text">
<span>{{ $t('text') }}</span> <span>{{ $ts.text }}</span>
</MkTextarea> </MkTextarea>
<MkInput v-model:value="announcement.imageUrl"> <MkInput v-model:value="announcement.imageUrl">
<span>{{ $t('imageUrl') }}</span> <span>{{ $ts.imageUrl }}</span>
</MkInput> </MkInput>
<p v-if="announcement.reads">{{ $t('nUsersRead', { n: announcement.reads }) }}</p> <p v-if="announcement.reads">{{ $t('nUsersRead', { n: announcement.reads }) }}</p>
<div class="buttons"> <div class="buttons">
<MkButton class="button" inline @click="save(announcement)" primary><Fa :icon="faSave"/> {{ $t('save') }}</MkButton> <MkButton class="button" inline @click="save(announcement)" primary><Fa :icon="faSave"/> {{ $ts.save }}</MkButton>
<MkButton class="button" inline @click="remove(announcement)"><Fa :icon="faTrashAlt"/> {{ $t('remove') }}</MkButton> <MkButton class="button" inline @click="remove(announcement)"><Fa :icon="faTrashAlt"/> {{ $ts.remove }}</MkButton>
</div> </div>
</div> </div>
</section> </section>
@ -45,7 +45,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('announcements'), title: this.$ts.announcements,
icon: faBroadcastTower icon: faBroadcastTower
}, },
announcements: [], announcements: [],
@ -86,7 +86,7 @@ export default defineComponent({
os.api('admin/announcements/create', announcement).then(() => { os.api('admin/announcements/create', announcement).then(() => {
os.dialog({ os.dialog({
type: 'success', type: 'success',
text: this.$t('saved') text: this.$ts.saved
}); });
}).catch(e => { }).catch(e => {
os.dialog({ os.dialog({
@ -98,7 +98,7 @@ export default defineComponent({
os.api('admin/announcements/update', announcement).then(() => { os.api('admin/announcements/update', announcement).then(() => {
os.dialog({ os.dialog({
type: 'success', type: 'success',
text: this.$t('saved') text: this.$ts.saved
}); });
}).catch(e => { }).catch(e => {
os.dialog({ os.dialog({

View file

@ -10,13 +10,13 @@
<div class="yigymqpb _section"> <div class="yigymqpb _section">
<img :src="emoji.url" class="img"/> <img :src="emoji.url" class="img"/>
<MkInput v-model:value="name"><span>{{ $t('name') }}</span></MkInput> <MkInput v-model:value="name"><span>{{ $ts.name }}</span></MkInput>
<MkInput v-model:value="category" :datalist="categories"><span>{{ $t('category') }}</span></MkInput> <MkInput v-model:value="category" :datalist="categories"><span>{{ $ts.category }}</span></MkInput>
<MkInput v-model:value="aliases"> <MkInput v-model:value="aliases">
<span>{{ $t('tags') }}</span> <span>{{ $ts.tags }}</span>
<template #desc>{{ $t('setMultipleBySeparatingWithSpace') }}</template> <template #desc>{{ $ts.setMultipleBySeparatingWithSpace }}</template>
</MkInput> </MkInput>
<MkButton danger @click="del()"><Fa :icon="faTrashAlt"/> {{ $t('delete') }}</MkButton> <MkButton danger @click="del()"><Fa :icon="faTrashAlt"/> {{ $ts.delete }}</MkButton>
</div> </div>
</XModalWindow> </XModalWindow>
</template> </template>

View file

@ -2,17 +2,17 @@
<div class="mk-instance-emojis"> <div class="mk-instance-emojis">
<div class="_section" style="padding: 0;"> <div class="_section" style="padding: 0;">
<MkTab v-model:value="tab"> <MkTab v-model:value="tab">
<option value="local">{{ $t('local') }}</option> <option value="local">{{ $ts.local }}</option>
<option value="remote">{{ $t('remote') }}</option> <option value="remote">{{ $ts.remote }}</option>
</MkTab> </MkTab>
</div> </div>
<div class="_section"> <div class="_section">
<div class="local" v-if="tab === 'local'"> <div class="local" v-if="tab === 'local'">
<MkButton primary @click="add" style="margin: 0 auto var(--margin) auto;"><Fa :icon="faPlus"/> {{ $t('addEmoji') }}</MkButton> <MkButton primary @click="add" style="margin: 0 auto var(--margin) auto;"><Fa :icon="faPlus"/> {{ $ts.addEmoji }}</MkButton>
<MkInput v-model:value="query" :debounce="true" type="search"><template #icon><Fa :icon="faSearch"/></template><span>{{ $t('search') }}</span></MkInput> <MkInput v-model:value="query" :debounce="true" type="search"><template #icon><Fa :icon="faSearch"/></template><span>{{ $ts.search }}</span></MkInput>
<MkPagination :pagination="pagination" ref="emojis"> <MkPagination :pagination="pagination" ref="emojis">
<template #empty><span>{{ $t('noCustomEmojis') }}</span></template> <template #empty><span>{{ $ts.noCustomEmojis }}</span></template>
<template #default="{items}"> <template #default="{items}">
<div class="emojis"> <div class="emojis">
<button class="emoji _panel _button" v-for="emoji in items" :key="emoji.id" @click="edit(emoji)"> <button class="emoji _panel _button" v-for="emoji in items" :key="emoji.id" @click="edit(emoji)">
@ -28,10 +28,10 @@
</div> </div>
<div class="remote" v-else-if="tab === 'remote'"> <div class="remote" v-else-if="tab === 'remote'">
<MkInput v-model:value="queryRemote" :debounce="true" type="search"><template #icon><Fa :icon="faSearch"/></template><span>{{ $t('search') }}</span></MkInput> <MkInput v-model:value="queryRemote" :debounce="true" type="search"><template #icon><Fa :icon="faSearch"/></template><span>{{ $ts.search }}</span></MkInput>
<MkInput v-model:value="host" :debounce="true"><span>{{ $t('host') }}</span></MkInput> <MkInput v-model:value="host" :debounce="true"><span>{{ $ts.host }}</span></MkInput>
<MkPagination :pagination="remotePagination" ref="remoteEmojis"> <MkPagination :pagination="remotePagination" ref="remoteEmojis">
<template #empty><span>{{ $t('noCustomEmojis') }}</span></template> <template #empty><span>{{ $ts.noCustomEmojis }}</span></template>
<template #default="{items}"> <template #default="{items}">
<div class="emojis"> <div class="emojis">
<div class="emoji _panel _button" v-for="emoji in items" :key="emoji.id" @click="remoteMenu(emoji, $event)"> <div class="emoji _panel _button" v-for="emoji in items" :key="emoji.id" @click="remoteMenu(emoji, $event)">
@ -71,7 +71,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('customEmojis'), title: this.$ts.customEmojis,
icon: faLaugh, icon: faLaugh,
action: { action: {
icon: faPlus, icon: faPlus,
@ -142,7 +142,7 @@ export default defineComponent({
type: 'label', type: 'label',
text: ':' + emoji.name + ':', text: ':' + emoji.name + ':',
}, { }, {
text: this.$t('import'), text: this.$ts.import,
icon: faPlus, icon: faPlus,
action: () => { this.im(emoji) } action: () => { this.im(emoji) }
}], ev.currentTarget || ev.target); }], ev.currentTarget || ev.target);

View file

@ -2,38 +2,38 @@
<div> <div>
<div class="_section"> <div class="_section">
<div class="_content"> <div class="_content">
<MkInput v-model:value="host" :debounce="true"><span>{{ $t('host') }}</span></MkInput> <MkInput v-model:value="host" :debounce="true"><span>{{ $ts.host }}</span></MkInput>
<div class="inputs" style="display: flex;"> <div class="inputs" style="display: flex;">
<MkSelect v-model:value="state" style="margin: 0; flex: 1;"> <MkSelect v-model:value="state" style="margin: 0; flex: 1;">
<template #label>{{ $t('state') }}</template> <template #label>{{ $ts.state }}</template>
<option value="all">{{ $t('all') }}</option> <option value="all">{{ $ts.all }}</option>
<option value="federating">{{ $t('federating') }}</option> <option value="federating">{{ $ts.federating }}</option>
<option value="subscribing">{{ $t('subscribing') }}</option> <option value="subscribing">{{ $ts.subscribing }}</option>
<option value="publishing">{{ $t('publishing') }}</option> <option value="publishing">{{ $ts.publishing }}</option>
<option value="suspended">{{ $t('suspended') }}</option> <option value="suspended">{{ $ts.suspended }}</option>
<option value="blocked">{{ $t('blocked') }}</option> <option value="blocked">{{ $ts.blocked }}</option>
<option value="notResponding">{{ $t('notResponding') }}</option> <option value="notResponding">{{ $ts.notResponding }}</option>
</MkSelect> </MkSelect>
<MkSelect v-model:value="sort" style="margin: 0; flex: 1;"> <MkSelect v-model:value="sort" style="margin: 0; flex: 1;">
<template #label>{{ $t('sort') }}</template> <template #label>{{ $ts.sort }}</template>
<option value="+pubSub">{{ $t('pubSub') }} ({{ $t('descendingOrder') }})</option> <option value="+pubSub">{{ $ts.pubSub }} ({{ $ts.descendingOrder }})</option>
<option value="-pubSub">{{ $t('pubSub') }} ({{ $t('ascendingOrder') }})</option> <option value="-pubSub">{{ $ts.pubSub }} ({{ $ts.ascendingOrder }})</option>
<option value="+notes">{{ $t('notes') }} ({{ $t('descendingOrder') }})</option> <option value="+notes">{{ $ts.notes }} ({{ $ts.descendingOrder }})</option>
<option value="-notes">{{ $t('notes') }} ({{ $t('ascendingOrder') }})</option> <option value="-notes">{{ $ts.notes }} ({{ $ts.ascendingOrder }})</option>
<option value="+users">{{ $t('users') }} ({{ $t('descendingOrder') }})</option> <option value="+users">{{ $ts.users }} ({{ $ts.descendingOrder }})</option>
<option value="-users">{{ $t('users') }} ({{ $t('ascendingOrder') }})</option> <option value="-users">{{ $ts.users }} ({{ $ts.ascendingOrder }})</option>
<option value="+following">{{ $t('following') }} ({{ $t('descendingOrder') }})</option> <option value="+following">{{ $ts.following }} ({{ $ts.descendingOrder }})</option>
<option value="-following">{{ $t('following') }} ({{ $t('ascendingOrder') }})</option> <option value="-following">{{ $ts.following }} ({{ $ts.ascendingOrder }})</option>
<option value="+followers">{{ $t('followers') }} ({{ $t('descendingOrder') }})</option> <option value="+followers">{{ $ts.followers }} ({{ $ts.descendingOrder }})</option>
<option value="-followers">{{ $t('followers') }} ({{ $t('ascendingOrder') }})</option> <option value="-followers">{{ $ts.followers }} ({{ $ts.ascendingOrder }})</option>
<option value="+caughtAt">{{ $t('caughtAt') }} ({{ $t('descendingOrder') }})</option> <option value="+caughtAt">{{ $ts.caughtAt }} ({{ $ts.descendingOrder }})</option>
<option value="-caughtAt">{{ $t('caughtAt') }} ({{ $t('ascendingOrder') }})</option> <option value="-caughtAt">{{ $ts.caughtAt }} ({{ $ts.ascendingOrder }})</option>
<option value="+lastCommunicatedAt">{{ $t('lastCommunicatedAt') }} ({{ $t('descendingOrder') }})</option> <option value="+lastCommunicatedAt">{{ $ts.lastCommunicatedAt }} ({{ $ts.descendingOrder }})</option>
<option value="-lastCommunicatedAt">{{ $t('lastCommunicatedAt') }} ({{ $t('ascendingOrder') }})</option> <option value="-lastCommunicatedAt">{{ $ts.lastCommunicatedAt }} ({{ $ts.ascendingOrder }})</option>
<option value="+driveUsage">{{ $t('driveUsage') }} ({{ $t('descendingOrder') }})</option> <option value="+driveUsage">{{ $ts.driveUsage }} ({{ $ts.descendingOrder }})</option>
<option value="-driveUsage">{{ $t('driveUsage') }} ({{ $t('ascendingOrder') }})</option> <option value="-driveUsage">{{ $ts.driveUsage }} ({{ $ts.ascendingOrder }})</option>
<option value="+driveFiles">{{ $t('driveFiles') }} ({{ $t('descendingOrder') }})</option> <option value="+driveFiles">{{ $ts.driveFiles }} ({{ $ts.descendingOrder }})</option>
<option value="-driveFiles">{{ $t('driveFiles') }} ({{ $t('ascendingOrder') }})</option> <option value="-driveFiles">{{ $ts.driveFiles }} ({{ $ts.ascendingOrder }})</option>
</MkSelect> </MkSelect>
</div> </div>
</div> </div>
@ -79,7 +79,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('federation'), title: this.$ts.federation,
icon: faGlobe icon: faGlobe
}, },
host: '', host: '',

View file

@ -21,8 +21,8 @@
</div> </div>
<div class="_section"> <div class="_section">
<div class="_content"> <div class="_content">
<MkButton full @click="showUser"><Fa :icon="faExternalLinkSquareAlt"/> {{ $t('user') }}</MkButton> <MkButton full @click="showUser"><Fa :icon="faExternalLinkSquareAlt"/> {{ $ts.user }}</MkButton>
<MkButton full danger @click="del"><Fa :icon="faTrashAlt"/> {{ $t('delete') }}</MkButton> <MkButton full danger @click="del"><Fa :icon="faTrashAlt"/> {{ $ts.delete }}</MkButton>
</div> </div>
</div> </div>
<div class="_section" v-if="info"> <div class="_section" v-if="info">

View file

@ -2,17 +2,17 @@
<div class="xrmjdkdw"> <div class="xrmjdkdw">
<div class="_section"> <div class="_section">
<div class="_content"> <div class="_content">
<MkButton primary @click="clear()"><Fa :icon="faTrashAlt"/> {{ $t('clearCachedFiles') }}</MkButton> <MkButton primary @click="clear()"><Fa :icon="faTrashAlt"/> {{ $ts.clearCachedFiles }}</MkButton>
</div> </div>
</div> </div>
<div class="_section lookup"> <div class="_section lookup">
<div class="_title"><Fa :icon="faSearch"/> {{ $t('lookup') }}</div> <div class="_title"><Fa :icon="faSearch"/> {{ $ts.lookup }}</div>
<div class="_content"> <div class="_content">
<MkInput class="target" v-model:value="q" type="text" @enter="find()"> <MkInput class="target" v-model:value="q" type="text" @enter="find()">
<span>{{ $t('fileIdOrUrl') }}</span> <span>{{ $ts.fileIdOrUrl }}</span>
</MkInput> </MkInput>
<MkButton @click="find()" primary><Fa :icon="faSearch"/> {{ $t('lookup') }}</MkButton> <MkButton @click="find()" primary><Fa :icon="faSearch"/> {{ $ts.lookup }}</MkButton>
</div> </div>
</div> </div>
@ -20,18 +20,18 @@
<div class="_content"> <div class="_content">
<div class="inputs" style="display: flex;"> <div class="inputs" style="display: flex;">
<MkSelect v-model:value="origin" style="margin: 0; flex: 1;"> <MkSelect v-model:value="origin" style="margin: 0; flex: 1;">
<template #label>{{ $t('instance') }}</template> <template #label>{{ $ts.instance }}</template>
<option value="combined">{{ $t('all') }}</option> <option value="combined">{{ $ts.all }}</option>
<option value="local">{{ $t('local') }}</option> <option value="local">{{ $ts.local }}</option>
<option value="remote">{{ $t('remote') }}</option> <option value="remote">{{ $ts.remote }}</option>
</MkSelect> </MkSelect>
<MkInput v-model:value="searchHost" :debounce="true" type="search" style="margin: 0; flex: 1;" :disabled="pagination.params().origin === 'local'"> <MkInput v-model:value="searchHost" :debounce="true" type="search" style="margin: 0; flex: 1;" :disabled="pagination.params().origin === 'local'">
<span>{{ $t('host') }}</span> <span>{{ $ts.host }}</span>
</MkInput> </MkInput>
</div> </div>
<div class="inputs" style="display: flex; padding-top: 1.2em;"> <div class="inputs" style="display: flex; padding-top: 1.2em;">
<MkInput v-model:value="type" :debounce="true" type="search" style="margin: 0; flex: 1;"> <MkInput v-model:value="type" :debounce="true" type="search" style="margin: 0; flex: 1;">
<span>{{ $t('type') }}</span> <span>{{ $ts.type }}</span>
</MkInput> </MkInput>
</div> </div>
<MkPagination :pagination="pagination" #default="{items}" class="urempief" ref="files"> <MkPagination :pagination="pagination" #default="{items}" class="urempief" ref="files">
@ -43,14 +43,14 @@
</div> </div>
<div> <div>
<MkAcct v-if="file.user" :user="file.user"/> <MkAcct v-if="file.user" :user="file.user"/>
<div v-else>{{ $t('system') }}</div> <div v-else>{{ $ts.system }}</div>
</div> </div>
<div> <div>
<span style="margin-right: 1em;">{{ file.type }}</span> <span style="margin-right: 1em;">{{ file.type }}</span>
<span>{{ bytes(file.size) }}</span> <span>{{ bytes(file.size) }}</span>
</div> </div>
<div> <div>
<span>{{ $t('registeredDate') }}: <MkTime :time="file.createdAt" mode="detail"/></span> <span>{{ $ts.registeredDate }}: <MkTime :time="file.createdAt" mode="detail"/></span>
</div> </div>
</div> </div>
</button> </button>
@ -84,7 +84,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('files'), title: this.$ts.files,
icon: faCloud icon: faCloud
}, },
q: null, q: null,
@ -120,7 +120,7 @@ export default defineComponent({
clear() { clear() {
os.dialog({ os.dialog({
type: 'warning', type: 'warning',
text: this.$t('clearCachedFilesConfirm'), text: this.$ts.clearCachedFilesConfirm,
showCancelButton: true showCancelButton: true
}).then(({ canceled }) => { }).then(({ canceled }) => {
if (canceled) return; if (canceled) return;
@ -142,7 +142,7 @@ export default defineComponent({
if (e.code === 'NO_SUCH_FILE') { if (e.code === 'NO_SUCH_FILE') {
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('notFound') text: this.$ts.notFound
}); });
} }
}); });

View file

@ -1,11 +1,11 @@
<template> <template>
<div> <div>
<MkFolder> <MkFolder>
<template #header><Fa :icon="faHeartbeat"/> {{ $t('metrics') }}</template> <template #header><Fa :icon="faHeartbeat"/> {{ $ts.metrics }}</template>
<div class="_section" style="padding: 0 var(--margin);"> <div class="_section" style="padding: 0 var(--margin);">
<div class="_content"> <div class="_content">
<MkContainer :body-togglable="false" class="_vMargin"> <MkContainer :body-togglable="false" class="_vMargin">
<template #header><Fa :icon="faMicrochip"/>{{ $t('cpuAndMemory') }}</template> <template #header><Fa :icon="faMicrochip"/>{{ $ts.cpuAndMemory }}</template>
<!-- <!--
<template #func> <template #func>
<button class="_button" @click="resume" :disabled="!paused"><Fa :icon="faPlay"/></button> <button class="_button" @click="resume" :disabled="!paused"><Fa :icon="faPlay"/></button>
@ -28,7 +28,7 @@
</MkContainer> </MkContainer>
<MkContainer :body-togglable="false" class="_vMargin"> <MkContainer :body-togglable="false" class="_vMargin">
<template #header><Fa :icon="faHdd"/> {{ $t('disk') }}</template> <template #header><Fa :icon="faHdd"/> {{ $ts.disk }}</template>
<!-- <!--
<template #func> <template #func>
<button class="_button" @click="resume" :disabled="!paused"><Fa :icon="faPlay"/></button> <button class="_button" @click="resume" :disabled="!paused"><Fa :icon="faPlay"/></button>
@ -51,7 +51,7 @@
</MkContainer> </MkContainer>
<MkContainer :body-togglable="false" class="_vMargin"> <MkContainer :body-togglable="false" class="_vMargin">
<template #header><Fa :icon="faExchangeAlt"/> {{ $t('network') }}</template> <template #header><Fa :icon="faExchangeAlt"/> {{ $ts.network }}</template>
<!-- <!--
<template #func> <template #func>
<button class="_button" @click="resume" :disabled="!paused"><Fa :icon="faPlay"/></button> <button class="_button" @click="resume" :disabled="!paused"><Fa :icon="faPlay"/></button>
@ -75,11 +75,11 @@
</MkFolder> </MkFolder>
<MkFolder> <MkFolder>
<template #header><Fa :icon="faClipboardList"/> {{ $t('jobQueue') }}</template> <template #header><Fa :icon="faClipboardList"/> {{ $ts.jobQueue }}</template>
<div class="vkyrmkwb" :style="{ gridTemplateRows: queueHeight }"> <div class="vkyrmkwb" :style="{ gridTemplateRows: queueHeight }">
<MkContainer :body-togglable="false" :scrollable="true" :resize-base-el="() => $el"> <MkContainer :body-togglable="false" :scrollable="true" :resize-base-el="() => $el">
<template #header><Fa :icon="faExclamationTriangle"/> {{ $t('delayed') }}</template> <template #header><Fa :icon="faExclamationTriangle"/> {{ $ts.delayed }}</template>
<div class="_content"> <div class="_content">
<div class="_keyValue" v-for="job in jobs" :key="job[0]"> <div class="_keyValue" v-for="job in jobs" :key="job[0]">

View file

@ -1,13 +1,13 @@
<template> <template>
<div v-if="meta" v-show="page === 'index'" class="xhexznfu _section"> <div v-if="meta" v-show="page === 'index'" class="xhexznfu _section">
<MkFolder> <MkFolder>
<template #header><Fa :icon="faTachometerAlt"/> {{ $t('overview') }}</template> <template #header><Fa :icon="faTachometerAlt"/> {{ $ts.overview }}</template>
<div class="sboqnrfi" :style="{ gridTemplateRows: overviewHeight }"> <div class="sboqnrfi" :style="{ gridTemplateRows: overviewHeight }">
<MkInstanceStats :chart-limit="300" :detailed="true" class="_vMargin" ref="stats"/> <MkInstanceStats :chart-limit="300" :detailed="true" class="_vMargin" ref="stats"/>
<MkContainer :body-togglable="true" class="_vMargin"> <MkContainer :body-togglable="true" class="_vMargin">
<template #header><Fa :icon="faInfoCircle"/>{{ $t('instanceInfo') }}</template> <template #header><Fa :icon="faInfoCircle"/>{{ $ts.instanceInfo }}</template>
<div class="_content"> <div class="_content">
<div class="_keyValue"><b>Misskey</b><span>v{{ version }}</span></div> <div class="_keyValue"><b>Misskey</b><span>v{{ version }}</span></div>
@ -20,7 +20,7 @@
</MkContainer> </MkContainer>
<MkContainer :body-togglable="true" :scrollable="true" class="_vMargin" style="height: 300px;"> <MkContainer :body-togglable="true" :scrollable="true" class="_vMargin" style="height: 300px;">
<template #header><Fa :icon="faDatabase"/>{{ $t('database') }}</template> <template #header><Fa :icon="faDatabase"/>{{ $ts.database }}</template>
<div class="_content" v-if="dbInfo"> <div class="_content" v-if="dbInfo">
<table style="border-collapse: collapse; width: 100%;"> <table style="border-collapse: collapse; width: 100%;">
@ -42,7 +42,7 @@
</div> </div>
<div v-if="page === 'logs'" class="_section"> <div v-if="page === 'logs'" class="_section">
<MkFolder> <MkFolder>
<template #header><Fa :icon="faStream"/> {{ $t('logs') }}</template> <template #header><Fa :icon="faStream"/> {{ $ts.logs }}</template>
<div class="_keyValue" v-for="log in modLogs"> <div class="_keyValue" v-for="log in modLogs">
<b>{{ log.type }}</b><span>by {{ log.user.username }}</span><MkTime :time="log.createdAt" style="opacity: 0.7;"/> <b>{{ log.type }}</b><span>by {{ log.user.username }}</span><MkTime :time="log.createdAt" style="opacity: 0.7;"/>
@ -89,21 +89,21 @@ export default defineComponent({
tabs: [{ tabs: [{
id: 'index', id: 'index',
title: null, title: null,
tooltip: this.$t('instance'), tooltip: this.$ts.instance,
icon: faServer, icon: faServer,
onClick: () => { this.page = 'index'; }, onClick: () => { this.page = 'index'; },
selected: computed(() => this.page === 'index') selected: computed(() => this.page === 'index')
}, { }, {
id: 'metrics', id: 'metrics',
title: null, title: null,
tooltip: this.$t('metrics'), tooltip: this.$ts.metrics,
icon: faHeartbeat, icon: faHeartbeat,
onClick: () => { this.page = 'metrics'; }, onClick: () => { this.page = 'metrics'; },
selected: computed(() => this.page === 'metrics') selected: computed(() => this.page === 'metrics')
}, { }, {
id: 'logs', id: 'logs',
title: null, title: null,
tooltip: this.$t('logs'), tooltip: this.$ts.logs,
icon: faStream, icon: faStream,
onClick: () => { this.page = 'logs'; }, onClick: () => { this.page = 'logs'; },
selected: computed(() => this.page === 'logs') selected: computed(() => this.page === 'logs')

View file

@ -10,11 +10,11 @@
<div class="_table section"> <div class="_table section">
<div class="_row"> <div class="_row">
<div class="_cell"> <div class="_cell">
<div class="_label">{{ $t('software') }}</div> <div class="_label">{{ $ts.software }}</div>
<div class="_data">{{ instance.softwareName || '?' }}</div> <div class="_data">{{ instance.softwareName || '?' }}</div>
</div> </div>
<div class="_cell"> <div class="_cell">
<div class="_label">{{ $t('version') }}</div> <div class="_label">{{ $ts.version }}</div>
<div class="_data">{{ instance.softwareVersion || '?' }}</div> <div class="_data">{{ instance.softwareVersion || '?' }}</div>
</div> </div>
</div> </div>
@ -22,77 +22,77 @@
<div class="_table data section"> <div class="_table data section">
<div class="_row"> <div class="_row">
<div class="_cell"> <div class="_cell">
<div class="_label">{{ $t('registeredAt') }}</div> <div class="_label">{{ $ts.registeredAt }}</div>
<div class="_data">{{ new Date(instance.caughtAt).toLocaleString() }} (<MkTime :time="instance.caughtAt"/>)</div> <div class="_data">{{ new Date(instance.caughtAt).toLocaleString() }} (<MkTime :time="instance.caughtAt"/>)</div>
</div> </div>
</div> </div>
<div class="_row"> <div class="_row">
<div class="_cell"> <div class="_cell">
<div class="_label">{{ $t('following') }}</div> <div class="_label">{{ $ts.following }}</div>
<button class="_data _textButton" @click="showFollowing()">{{ number(instance.followingCount) }}</button> <button class="_data _textButton" @click="showFollowing()">{{ number(instance.followingCount) }}</button>
</div> </div>
<div class="_cell"> <div class="_cell">
<div class="_label">{{ $t('followers') }}</div> <div class="_label">{{ $ts.followers }}</div>
<button class="_data _textButton" @click="showFollowers()">{{ number(instance.followersCount) }}</button> <button class="_data _textButton" @click="showFollowers()">{{ number(instance.followersCount) }}</button>
</div> </div>
</div> </div>
<div class="_row"> <div class="_row">
<div class="_cell"> <div class="_cell">
<div class="_label">{{ $t('users') }}</div> <div class="_label">{{ $ts.users }}</div>
<button class="_data _textButton" @click="showUsers()">{{ number(instance.usersCount) }}</button> <button class="_data _textButton" @click="showUsers()">{{ number(instance.usersCount) }}</button>
</div> </div>
<div class="_cell"> <div class="_cell">
<div class="_label">{{ $t('notes') }}</div> <div class="_label">{{ $ts.notes }}</div>
<div class="_data">{{ number(instance.notesCount) }}</div> <div class="_data">{{ number(instance.notesCount) }}</div>
</div> </div>
</div> </div>
<div class="_row"> <div class="_row">
<div class="_cell"> <div class="_cell">
<div class="_label">{{ $t('files') }}</div> <div class="_label">{{ $ts.files }}</div>
<div class="_data">{{ number(instance.driveFiles) }}</div> <div class="_data">{{ number(instance.driveFiles) }}</div>
</div> </div>
<div class="_cell"> <div class="_cell">
<div class="_label">{{ $t('storageUsage') }}</div> <div class="_label">{{ $ts.storageUsage }}</div>
<div class="_data">{{ bytes(instance.driveUsage) }}</div> <div class="_data">{{ bytes(instance.driveUsage) }}</div>
</div> </div>
</div> </div>
<div class="_row"> <div class="_row">
<div class="_cell"> <div class="_cell">
<div class="_label">{{ $t('latestRequestSentAt') }}</div> <div class="_label">{{ $ts.latestRequestSentAt }}</div>
<div class="_data"><MkTime v-if="instance.latestRequestSentAt" :time="instance.latestRequestSentAt"/><span v-else>N/A</span></div> <div class="_data"><MkTime v-if="instance.latestRequestSentAt" :time="instance.latestRequestSentAt"/><span v-else>N/A</span></div>
</div> </div>
<div class="_cell"> <div class="_cell">
<div class="_label">{{ $t('latestStatus') }}</div> <div class="_label">{{ $ts.latestStatus }}</div>
<div class="_data">{{ instance.latestStatus ? instance.latestStatus : 'N/A' }}</div> <div class="_data">{{ instance.latestStatus ? instance.latestStatus : 'N/A' }}</div>
</div> </div>
</div> </div>
<div class="_row"> <div class="_row">
<div class="_cell"> <div class="_cell">
<div class="_label">{{ $t('latestRequestReceivedAt') }}</div> <div class="_label">{{ $ts.latestRequestReceivedAt }}</div>
<div class="_data"><MkTime v-if="instance.latestRequestReceivedAt" :time="instance.latestRequestReceivedAt"/><span v-else>N/A</span></div> <div class="_data"><MkTime v-if="instance.latestRequestReceivedAt" :time="instance.latestRequestReceivedAt"/><span v-else>N/A</span></div>
</div> </div>
</div> </div>
</div> </div>
<div class="chart"> <div class="chart">
<div class="header"> <div class="header">
<span class="label">{{ $t('charts') }}</span> <span class="label">{{ $ts.charts }}</span>
<div class="selects"> <div class="selects">
<MkSelect v-model:value="chartSrc" style="margin: 0; flex: 1;"> <MkSelect v-model:value="chartSrc" style="margin: 0; flex: 1;">
<option value="requests">{{ $t('_instanceCharts.requests') }}</option> <option value="requests">{{ $ts._instanceCharts.requests }}</option>
<option value="users">{{ $t('_instanceCharts.users') }}</option> <option value="users">{{ $ts._instanceCharts.users }}</option>
<option value="users-total">{{ $t('_instanceCharts.usersTotal') }}</option> <option value="users-total">{{ $ts._instanceCharts.usersTotal }}</option>
<option value="notes">{{ $t('_instanceCharts.notes') }}</option> <option value="notes">{{ $ts._instanceCharts.notes }}</option>
<option value="notes-total">{{ $t('_instanceCharts.notesTotal') }}</option> <option value="notes-total">{{ $ts._instanceCharts.notesTotal }}</option>
<option value="ff">{{ $t('_instanceCharts.ff') }}</option> <option value="ff">{{ $ts._instanceCharts.ff }}</option>
<option value="ff-total">{{ $t('_instanceCharts.ffTotal') }}</option> <option value="ff-total">{{ $ts._instanceCharts.ffTotal }}</option>
<option value="drive-usage">{{ $t('_instanceCharts.cacheSize') }}</option> <option value="drive-usage">{{ $ts._instanceCharts.cacheSize }}</option>
<option value="drive-usage-total">{{ $t('_instanceCharts.cacheSizeTotal') }}</option> <option value="drive-usage-total">{{ $ts._instanceCharts.cacheSizeTotal }}</option>
<option value="drive-files">{{ $t('_instanceCharts.files') }}</option> <option value="drive-files">{{ $ts._instanceCharts.files }}</option>
<option value="drive-files-total">{{ $t('_instanceCharts.filesTotal') }}</option> <option value="drive-files-total">{{ $ts._instanceCharts.filesTotal }}</option>
</MkSelect> </MkSelect>
<MkSelect v-model:value="chartSpan" style="margin: 0;"> <MkSelect v-model:value="chartSpan" style="margin: 0;">
<option value="hour">{{ $t('perHour') }}</option> <option value="hour">{{ $ts.perHour }}</option>
<option value="day">{{ $t('perDay') }}</option> <option value="day">{{ $ts.perDay }}</option>
</MkSelect> </MkSelect>
</div> </div>
</div> </div>
@ -101,21 +101,21 @@
</div> </div>
</div> </div>
<div class="operations section"> <div class="operations section">
<span class="label">{{ $t('operations') }}</span> <span class="label">{{ $ts.operations }}</span>
<MkSwitch v-model:value="isSuspended" class="switch">{{ $t('stopActivityDelivery') }}</MkSwitch> <MkSwitch v-model:value="isSuspended" class="switch">{{ $ts.stopActivityDelivery }}</MkSwitch>
<MkSwitch :value="isBlocked" class="switch" @update:value="changeBlock">{{ $t('blockThisInstance') }}</MkSwitch> <MkSwitch :value="isBlocked" class="switch" @update:value="changeBlock">{{ $ts.blockThisInstance }}</MkSwitch>
<details> <details>
<summary>{{ $t('deleteAllFiles') }}</summary> <summary>{{ $ts.deleteAllFiles }}</summary>
<MkButton @click="deleteAllFiles()" style="margin: 0.5em 0 0.5em 0;"><Fa :icon="faTrashAlt"/> {{ $t('deleteAllFiles') }}</MkButton> <MkButton @click="deleteAllFiles()" style="margin: 0.5em 0 0.5em 0;"><Fa :icon="faTrashAlt"/> {{ $ts.deleteAllFiles }}</MkButton>
</details> </details>
<details> <details>
<summary>{{ $t('removeAllFollowing') }}</summary> <summary>{{ $ts.removeAllFollowing }}</summary>
<MkButton @click="removeAllFollowing()" style="margin: 0.5em 0 0.5em 0;"><Fa :icon="faMinusCircle"/> {{ $t('removeAllFollowing') }}</MkButton> <MkButton @click="removeAllFollowing()" style="margin: 0.5em 0 0.5em 0;"><Fa :icon="faMinusCircle"/> {{ $ts.removeAllFollowing }}</MkButton>
<MkInfo warn>{{ $t('removeAllFollowingDescription', { host: instance.host }) }}</MkInfo> <MkInfo warn>{{ $t('removeAllFollowingDescription', { host: instance.host }) }}</MkInfo>
</details> </details>
</div> </div>
<details class="metadata section"> <details class="metadata section">
<summary class="label">{{ $t('metadata') }}</summary> <summary class="label">{{ $ts.metadata }}</summary>
<pre><code>{{ JSON.stringify(instance, null, 2) }}</code></pre> <pre><code>{{ JSON.stringify(instance, null, 2) }}</code></pre>
</details> </details>
</div> </div>
@ -442,7 +442,7 @@ export default defineComponent({
showFollowing() { showFollowing() {
os.modal(MkUsersDialog, { os.modal(MkUsersDialog, {
title: this.$t('instanceFollowing'), title: this.$ts.instanceFollowing,
pagination: { pagination: {
endpoint: 'federation/following', endpoint: 'federation/following',
limit: 10, limit: 10,
@ -456,7 +456,7 @@ export default defineComponent({
showFollowers() { showFollowers() {
os.modal(MkUsersDialog, { os.modal(MkUsersDialog, {
title: this.$t('instanceFollowers'), title: this.$ts.instanceFollowers,
pagination: { pagination: {
endpoint: 'federation/followers', endpoint: 'federation/followers',
limit: 10, limit: 10,
@ -470,7 +470,7 @@ export default defineComponent({
showUsers() { showUsers() {
os.modal(MkUsersDialog, { os.modal(MkUsersDialog, {
title: this.$t('instanceUsers'), title: this.$ts.instanceUsers,
pagination: { pagination: {
endpoint: 'federation/users', endpoint: 'federation/users',
limit: 10, limit: 10,

View file

@ -2,16 +2,16 @@
<div class="_section"> <div class="_section">
<div class="_inputs"> <div class="_inputs">
<MkInput v-model:value="logDomain" :debounce="true"> <MkInput v-model:value="logDomain" :debounce="true">
<span>{{ $t('domain') }}</span> <span>{{ $ts.domain }}</span>
</MkInput> </MkInput>
<MkSelect v-model:value="logLevel"> <MkSelect v-model:value="logLevel">
<template #label>{{ $t('level') }}</template> <template #label>{{ $ts.level }}</template>
<option value="all">{{ $t('levels.all') }}</option> <option value="all">{{ $ts.levels.all }}</option>
<option value="info">{{ $t('levels.info') }}</option> <option value="info">{{ $ts.levels.info }}</option>
<option value="success">{{ $t('levels.success') }}</option> <option value="success">{{ $ts.levels.success }}</option>
<option value="warning">{{ $t('levels.warning') }}</option> <option value="warning">{{ $ts.levels.warning }}</option>
<option value="error">{{ $t('levels.error') }}</option> <option value="error">{{ $ts.levels.error }}</option>
<option value="debug">{{ $t('levels.debug') }}</option> <option value="debug">{{ $ts.levels.debug }}</option>
</MkSelect> </MkSelect>
</div> </div>
@ -24,7 +24,7 @@
</code> </code>
</div> </div>
<MkButton @click="deleteAllLogs()" primary><Fa :icon="faTrashAlt"/> {{ $t('deleteAll') }}</MkButton> <MkButton @click="deleteAllLogs()" primary><Fa :icon="faTrashAlt"/> {{ $ts.deleteAll }}</MkButton>
</div> </div>
</template> </template>
@ -49,7 +49,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('serverLogs'), title: this.$ts.serverLogs,
icon: faStream icon: faStream
}, },
logs: [], logs: [],

View file

@ -19,7 +19,7 @@
<span style="margin-left: 8px; opacity: 0.7;">({{ number(job[1]) }} jobs)</span> <span style="margin-left: 8px; opacity: 0.7;">({{ number(job[1]) }} jobs)</span>
</div> </div>
</div> </div>
<span v-else style="opacity: 0.5;">{{ $t('noJobs') }}</span> <span v-else style="opacity: 0.5;">{{ $ts.noJobs }}</span>
</div> </div>
</section> </section>
</template> </template>

View file

@ -8,7 +8,7 @@
</XQueue> </XQueue>
<section class="_section"> <section class="_section">
<div class="_content"> <div class="_content">
<MkButton @click="clear()"><Fa :icon="faTrashAlt"/> {{ $t('clearQueue') }}</MkButton> <MkButton @click="clear()"><Fa :icon="faTrashAlt"/> {{ $ts.clearQueue }}</MkButton>
</div> </div>
</section> </section>
</div> </div>
@ -31,7 +31,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('jobQueue'), title: this.$ts.jobQueue,
icon: faExchangeAlt, icon: faExchangeAlt,
}, },
connection: os.stream.useSharedConnection('queueStats'), connection: os.stream.useSharedConnection('queueStats'),
@ -56,8 +56,8 @@ export default defineComponent({
clear() { clear() {
os.dialog({ os.dialog({
type: 'warning', type: 'warning',
title: this.$t('clearQueueConfirmTitle'), title: this.$ts.clearQueueConfirmTitle,
text: this.$t('clearQueueConfirmText'), text: this.$ts.clearQueueConfirmText,
showCancelButton: true showCancelButton: true
}).then(({ canceled }) => { }).then(({ canceled }) => {
if (canceled) return; if (canceled) return;

View file

@ -1,21 +1,21 @@
<template> <template>
<div class="relaycxt"> <div class="relaycxt">
<section class="_section add"> <section class="_section add">
<div class="_title"><Fa :icon="faPlus"/> {{ $t('addRelay') }}</div> <div class="_title"><Fa :icon="faPlus"/> {{ $ts.addRelay }}</div>
<div class="_content"> <div class="_content">
<MkInput v-model:value="inbox"> <MkInput v-model:value="inbox">
<span>{{ $t('inboxUrl') }}</span> <span>{{ $ts.inboxUrl }}</span>
</MkInput> </MkInput>
<MkButton @click="add(inbox)" primary><Fa :icon="faPlus"/> {{ $t('add') }}</MkButton> <MkButton @click="add(inbox)" primary><Fa :icon="faPlus"/> {{ $ts.add }}</MkButton>
</div> </div>
</section> </section>
<section class="_section relays"> <section class="_section relays">
<div class="_title"><Fa :icon="faProjectDiagram"/> {{ $t('addedRelays') }}</div> <div class="_title"><Fa :icon="faProjectDiagram"/> {{ $ts.addedRelays }}</div>
<div class="_content relay" v-for="relay in relays" :key="relay.inbox"> <div class="_content relay" v-for="relay in relays" :key="relay.inbox">
<div>{{ relay.inbox }}</div> <div>{{ relay.inbox }}</div>
<div>{{ $t(`_relayStatus.${relay.status}`) }}</div> <div>{{ $t(`_relayStatus.${relay.status}`) }}</div>
<MkButton class="button" inline @click="remove(relay.inbox)"><Fa :icon="faTrashAlt"/> {{ $t('remove') }}</MkButton> <MkButton class="button" inline @click="remove(relay.inbox)"><Fa :icon="faTrashAlt"/> {{ $ts.remove }}</MkButton>
</div> </div>
</section> </section>
</div> </div>
@ -38,7 +38,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('relays'), title: this.$ts.relays,
icon: faProjectDiagram, icon: faProjectDiagram,
}, },
relays: [], relays: [],

View file

@ -1,110 +1,110 @@
<template> <template>
<div v-if="meta" class="_section"> <div v-if="meta" class="_section">
<section class="_card _vMargin"> <section class="_card _vMargin">
<div class="_title"><Fa :icon="faInfoCircle"/> {{ $t('basicInfo') }}</div> <div class="_title"><Fa :icon="faInfoCircle"/> {{ $ts.basicInfo }}</div>
<div class="_content"> <div class="_content">
<MkInput v-model:value="name">{{ $t('instanceName') }}</MkInput> <MkInput v-model:value="name">{{ $ts.instanceName }}</MkInput>
<MkTextarea v-model:value="description">{{ $t('instanceDescription') }}</MkTextarea> <MkTextarea v-model:value="description">{{ $ts.instanceDescription }}</MkTextarea>
<MkInput v-model:value="iconUrl"><template #icon><Fa :icon="faLink"/></template>{{ $t('iconUrl') }}</MkInput> <MkInput v-model:value="iconUrl"><template #icon><Fa :icon="faLink"/></template>{{ $ts.iconUrl }}</MkInput>
<MkInput v-model:value="bannerUrl"><template #icon><Fa :icon="faLink"/></template>{{ $t('bannerUrl') }}</MkInput> <MkInput v-model:value="bannerUrl"><template #icon><Fa :icon="faLink"/></template>{{ $ts.bannerUrl }}</MkInput>
<MkInput v-model:value="backgroundImageUrl"><template #icon><Fa :icon="faLink"/></template>{{ $t('backgroundImageUrl') }}</MkInput> <MkInput v-model:value="backgroundImageUrl"><template #icon><Fa :icon="faLink"/></template>{{ $ts.backgroundImageUrl }}</MkInput>
<MkInput v-model:value="logoImageUrl"><template #icon><Fa :icon="faLink"/></template>{{ $t('logoImageUrl') }}</MkInput> <MkInput v-model:value="logoImageUrl"><template #icon><Fa :icon="faLink"/></template>{{ $ts.logoImageUrl }}</MkInput>
<MkInput v-model:value="tosUrl"><template #icon><Fa :icon="faLink"/></template>{{ $t('tosUrl') }}</MkInput> <MkInput v-model:value="tosUrl"><template #icon><Fa :icon="faLink"/></template>{{ $ts.tosUrl }}</MkInput>
<MkInput v-model:value="maintainerName">{{ $t('maintainerName') }}</MkInput> <MkInput v-model:value="maintainerName">{{ $ts.maintainerName }}</MkInput>
<MkInput v-model:value="maintainerEmail" type="email"><template #icon><Fa :icon="faEnvelope"/></template>{{ $t('maintainerEmail') }}</MkInput> <MkInput v-model:value="maintainerEmail" type="email"><template #icon><Fa :icon="faEnvelope"/></template>{{ $ts.maintainerEmail }}</MkInput>
</div> </div>
<div class="_footer"> <div class="_footer">
<MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $t('save') }}</MkButton> <MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $ts.save }}</MkButton>
</div> </div>
</section> </section>
<MkInput v-model:value="pinnedClipId">{{ $t('pinnedClipId') }}</MkInput> <MkInput v-model:value="pinnedClipId">{{ $ts.pinnedClipId }}</MkInput>
<section class="_card _vMargin"> <section class="_card _vMargin">
<div class="_content"> <div class="_content">
<MkInput v-model:value="maxNoteTextLength" type="number" :save="() => save()"><template #icon><Fa :icon="faPencilAlt"/></template>{{ $t('maxNoteTextLength') }}</MkInput> <MkInput v-model:value="maxNoteTextLength" type="number" :save="() => save()"><template #icon><Fa :icon="faPencilAlt"/></template>{{ $ts.maxNoteTextLength }}</MkInput>
</div> </div>
<div class="_content"> <div class="_content">
<MkSwitch v-model:value="enableLocalTimeline" @update:value="save()">{{ $t('enableLocalTimeline') }}</MkSwitch> <MkSwitch v-model:value="enableLocalTimeline" @update:value="save()">{{ $ts.enableLocalTimeline }}</MkSwitch>
<MkSwitch v-model:value="enableGlobalTimeline" @update:value="save()">{{ $t('enableGlobalTimeline') }}</MkSwitch> <MkSwitch v-model:value="enableGlobalTimeline" @update:value="save()">{{ $ts.enableGlobalTimeline }}</MkSwitch>
<MkInfo>{{ $t('disablingTimelinesInfo') }}</MkInfo> <MkInfo>{{ $ts.disablingTimelinesInfo }}</MkInfo>
</div> </div>
<div class="_content"> <div class="_content">
<MkSwitch v-model:value="useStarForReactionFallback" @update:value="save()">{{ $t('useStarForReactionFallback') }}</MkSwitch> <MkSwitch v-model:value="useStarForReactionFallback" @update:value="save()">{{ $ts.useStarForReactionFallback }}</MkSwitch>
</div> </div>
</section> </section>
<section class="_card _vMargin"> <section class="_card _vMargin">
<div class="_title"><Fa :icon="faUser"/> {{ $t('registration') }}</div> <div class="_title"><Fa :icon="faUser"/> {{ $ts.registration }}</div>
<div class="_content"> <div class="_content">
<MkSwitch v-model:value="enableRegistration" @update:value="save()">{{ $t('enableRegistration') }}</MkSwitch> <MkSwitch v-model:value="enableRegistration" @update:value="save()">{{ $ts.enableRegistration }}</MkSwitch>
<MkButton v-if="!enableRegistration" @click="invite">{{ $t('invite') }}</MkButton> <MkButton v-if="!enableRegistration" @click="invite">{{ $ts.invite }}</MkButton>
</div> </div>
</section> </section>
<section class="_card _vMargin"> <section class="_card _vMargin">
<div class="_title"><Fa :icon="faShieldAlt"/> {{ $t('hcaptcha') }}</div> <div class="_title"><Fa :icon="faShieldAlt"/> {{ $ts.hcaptcha }}</div>
<div class="_content"> <div class="_content">
<MkSwitch v-model:value="enableHcaptcha">{{ $t('enableHcaptcha') }}</MkSwitch> <MkSwitch v-model:value="enableHcaptcha">{{ $ts.enableHcaptcha }}</MkSwitch>
<template v-if="enableHcaptcha"> <template v-if="enableHcaptcha">
<MkInput v-model:value="hcaptchaSiteKey" :disabled="!enableHcaptcha"><template #icon><Fa :icon="faKey"/></template>{{ $t('hcaptchaSiteKey') }}</MkInput> <MkInput v-model:value="hcaptchaSiteKey" :disabled="!enableHcaptcha"><template #icon><Fa :icon="faKey"/></template>{{ $ts.hcaptchaSiteKey }}</MkInput>
<MkInput v-model:value="hcaptchaSecretKey" :disabled="!enableHcaptcha"><template #icon><Fa :icon="faKey"/></template>{{ $t('hcaptchaSecretKey') }}</MkInput> <MkInput v-model:value="hcaptchaSecretKey" :disabled="!enableHcaptcha"><template #icon><Fa :icon="faKey"/></template>{{ $ts.hcaptchaSecretKey }}</MkInput>
</template> </template>
</div> </div>
<div class="_content" v-if="enableHcaptcha"> <div class="_content" v-if="enableHcaptcha">
<header>{{ $t('preview') }}</header> <header>{{ $ts.preview }}</header>
<captcha v-if="enableHcaptcha" provider="hcaptcha" :sitekey="hcaptchaSiteKey || '10000000-ffff-ffff-ffff-000000000001'"/> <captcha v-if="enableHcaptcha" provider="hcaptcha" :sitekey="hcaptchaSiteKey || '10000000-ffff-ffff-ffff-000000000001'"/>
</div> </div>
<div class="_footer"> <div class="_footer">
<MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $t('save') }}</MkButton> <MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $ts.save }}</MkButton>
</div> </div>
</section> </section>
<section class="_card _vMargin"> <section class="_card _vMargin">
<div class="_title"><Fa :icon="faShieldAlt"/> {{ $t('recaptcha') }}</div> <div class="_title"><Fa :icon="faShieldAlt"/> {{ $ts.recaptcha }}</div>
<div class="_content"> <div class="_content">
<MkSwitch v-model:value="enableRecaptcha" ref="enableRecaptcha">{{ $t('enableRecaptcha') }}</MkSwitch> <MkSwitch v-model:value="enableRecaptcha" ref="enableRecaptcha">{{ $ts.enableRecaptcha }}</MkSwitch>
<template v-if="enableRecaptcha"> <template v-if="enableRecaptcha">
<MkInput v-model:value="recaptchaSiteKey" :disabled="!enableRecaptcha"><template #icon><Fa :icon="faKey"/></template>{{ $t('recaptchaSiteKey') }}</MkInput> <MkInput v-model:value="recaptchaSiteKey" :disabled="!enableRecaptcha"><template #icon><Fa :icon="faKey"/></template>{{ $ts.recaptchaSiteKey }}</MkInput>
<MkInput v-model:value="recaptchaSecretKey" :disabled="!enableRecaptcha"><template #icon><Fa :icon="faKey"/></template>{{ $t('recaptchaSecretKey') }}</MkInput> <MkInput v-model:value="recaptchaSecretKey" :disabled="!enableRecaptcha"><template #icon><Fa :icon="faKey"/></template>{{ $ts.recaptchaSecretKey }}</MkInput>
</template> </template>
</div> </div>
<div class="_content" v-if="enableRecaptcha && recaptchaSiteKey"> <div class="_content" v-if="enableRecaptcha && recaptchaSiteKey">
<header>{{ $t('preview') }}</header> <header>{{ $ts.preview }}</header>
<captcha v-if="enableRecaptcha" provider="grecaptcha" :sitekey="recaptchaSiteKey"/> <captcha v-if="enableRecaptcha" provider="grecaptcha" :sitekey="recaptchaSiteKey"/>
</div> </div>
<div class="_footer"> <div class="_footer">
<MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $t('save') }}</MkButton> <MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $ts.save }}</MkButton>
</div> </div>
</section> </section>
<section class="_card _vMargin"> <section class="_card _vMargin">
<div class="_title"><Fa :icon="faEnvelope" /> {{ $t('emailConfig') }}</div> <div class="_title"><Fa :icon="faEnvelope" /> {{ $ts.emailConfig }}</div>
<div class="_content"> <div class="_content">
<MkSwitch v-model:value="enableEmail" @update:value="save()">{{ $t('enableEmail') }}<template #desc>{{ $t('emailConfigInfo') }}</template></MkSwitch> <MkSwitch v-model:value="enableEmail" @update:value="save()">{{ $ts.enableEmail }}<template #desc>{{ $ts.emailConfigInfo }}</template></MkSwitch>
<MkInput v-model:value="email" type="email" :disabled="!enableEmail">{{ $t('email') }}</MkInput> <MkInput v-model:value="email" type="email" :disabled="!enableEmail">{{ $ts.email }}</MkInput>
<div><b>{{ $t('smtpConfig') }}</b></div> <div><b>{{ $ts.smtpConfig }}</b></div>
<div class="_inputs"> <div class="_inputs">
<MkInput v-model:value="smtpHost" :disabled="!enableEmail">{{ $t('smtpHost') }}</MkInput> <MkInput v-model:value="smtpHost" :disabled="!enableEmail">{{ $ts.smtpHost }}</MkInput>
<MkInput v-model:value="smtpPort" type="number" :disabled="!enableEmail">{{ $t('smtpPort') }}</MkInput> <MkInput v-model:value="smtpPort" type="number" :disabled="!enableEmail">{{ $ts.smtpPort }}</MkInput>
</div> </div>
<div class="_inputs"> <div class="_inputs">
<MkInput v-model:value="smtpUser" :disabled="!enableEmail">{{ $t('smtpUser') }}</MkInput> <MkInput v-model:value="smtpUser" :disabled="!enableEmail">{{ $ts.smtpUser }}</MkInput>
<MkInput v-model:value="smtpPass" type="password" :disabled="!enableEmail">{{ $t('smtpPass') }}</MkInput> <MkInput v-model:value="smtpPass" type="password" :disabled="!enableEmail">{{ $ts.smtpPass }}</MkInput>
</div> </div>
<MkInfo>{{ $t('emptyToDisableSmtpAuth') }}</MkInfo> <MkInfo>{{ $ts.emptyToDisableSmtpAuth }}</MkInfo>
<MkSwitch v-model:value="smtpSecure" :disabled="!enableEmail">{{ $t('smtpSecure') }}<template #desc>{{ $t('smtpSecureInfo') }}</template></MkSwitch> <MkSwitch v-model:value="smtpSecure" :disabled="!enableEmail">{{ $ts.smtpSecure }}<template #desc>{{ $ts.smtpSecureInfo }}</template></MkSwitch>
<div> <div>
<MkButton :disabled="!enableEmail" primary inline @click="save(true)"><Fa :icon="faSave"/> {{ $t('save') }}</MkButton> <MkButton :disabled="!enableEmail" primary inline @click="save(true)"><Fa :icon="faSave"/> {{ $ts.save }}</MkButton>
<MkButton :disabled="!enableEmail" inline @click="testEmail()">{{ $t('testEmail') }}</MkButton> <MkButton :disabled="!enableEmail" inline @click="testEmail()">{{ $ts.testEmail }}</MkButton>
</div> </div>
</div> </div>
</section> </section>
<section class="_card _vMargin"> <section class="_card _vMargin">
<div class="_title"><Fa :icon="faBolt"/> {{ $t('serviceworker') }}</div> <div class="_title"><Fa :icon="faBolt"/> {{ $ts.serviceworker }}</div>
<div class="_content"> <div class="_content">
<MkSwitch v-model:value="enableServiceWorker">{{ $t('enableServiceworker') }}<template #desc>{{ $t('serviceworkerInfo') }}</template></MkSwitch> <MkSwitch v-model:value="enableServiceWorker">{{ $ts.enableServiceworker }}<template #desc>{{ $ts.serviceworkerInfo }}</template></MkSwitch>
<template v-if="enableServiceWorker"> <template v-if="enableServiceWorker">
<div class="_inputs"> <div class="_inputs">
<MkInput v-model:value="swPublicKey" :disabled="!enableServiceWorker"><template #icon><Fa :icon="faKey"/></template>Public key</MkInput> <MkInput v-model:value="swPublicKey" :disabled="!enableServiceWorker"><template #icon><Fa :icon="faKey"/></template>Public key</MkInput>
@ -113,100 +113,100 @@
</template> </template>
</div> </div>
<div class="_footer"> <div class="_footer">
<MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $t('save') }}</MkButton> <MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $ts.save }}</MkButton>
</div> </div>
</section> </section>
<section class="_card _vMargin"> <section class="_card _vMargin">
<div class="_title"><Fa :icon="faThumbtack"/> {{ $t('pinnedUsers') }}</div> <div class="_title"><Fa :icon="faThumbtack"/> {{ $ts.pinnedUsers }}</div>
<div class="_content"> <div class="_content">
<MkTextarea v-model:value="pinnedUsers"> <MkTextarea v-model:value="pinnedUsers">
<template #desc>{{ $t('pinnedUsersDescription') }} <button class="_textButton" @click="addPinUser">{{ $t('addUser') }}</button></template> <template #desc>{{ $ts.pinnedUsersDescription }} <button class="_textButton" @click="addPinUser">{{ $ts.addUser }}</button></template>
</MkTextarea> </MkTextarea>
</div> </div>
<div class="_footer"> <div class="_footer">
<MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $t('save') }}</MkButton> <MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $ts.save }}</MkButton>
</div> </div>
</section> </section>
<section class="_card _vMargin"> <section class="_card _vMargin">
<div class="_title"><Fa :icon="faThumbtack"/> {{ $t('pinnedPages') }}</div> <div class="_title"><Fa :icon="faThumbtack"/> {{ $ts.pinnedPages }}</div>
<div class="_content"> <div class="_content">
<MkTextarea v-model:value="pinnedPages"> <MkTextarea v-model:value="pinnedPages">
<template #desc>{{ $t('pinnedPagesDescription') }}</template> <template #desc>{{ $ts.pinnedPagesDescription }}</template>
</MkTextarea> </MkTextarea>
</div> </div>
<div class="_footer"> <div class="_footer">
<MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $t('save') }}</MkButton> <MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $ts.save }}</MkButton>
</div> </div>
</section> </section>
<section class="_card _vMargin"> <section class="_card _vMargin">
<div class="_title"><Fa :icon="faCloud"/> {{ $t('files') }}</div> <div class="_title"><Fa :icon="faCloud"/> {{ $ts.files }}</div>
<div class="_content"> <div class="_content">
<MkSwitch v-model:value="cacheRemoteFiles">{{ $t('cacheRemoteFiles') }}<template #desc>{{ $t('cacheRemoteFilesDescription') }}</template></MkSwitch> <MkSwitch v-model:value="cacheRemoteFiles">{{ $ts.cacheRemoteFiles }}<template #desc>{{ $ts.cacheRemoteFilesDescription }}</template></MkSwitch>
<MkSwitch v-model:value="proxyRemoteFiles">{{ $t('proxyRemoteFiles') }}<template #desc>{{ $t('proxyRemoteFilesDescription') }}</template></MkSwitch> <MkSwitch v-model:value="proxyRemoteFiles">{{ $ts.proxyRemoteFiles }}<template #desc>{{ $ts.proxyRemoteFilesDescription }}</template></MkSwitch>
<MkInput v-model:value="localDriveCapacityMb" type="number">{{ $t('driveCapacityPerLocalAccount') }}<template #suffix>MB</template><template #desc>{{ $t('inMb') }}</template></MkInput> <MkInput v-model:value="localDriveCapacityMb" type="number">{{ $ts.driveCapacityPerLocalAccount }}<template #suffix>MB</template><template #desc>{{ $ts.inMb }}</template></MkInput>
<MkInput v-model:value="remoteDriveCapacityMb" type="number" :disabled="!cacheRemoteFiles">{{ $t('driveCapacityPerRemoteAccount') }}<template #suffix>MB</template><template #desc>{{ $t('inMb') }}</template></MkInput> <MkInput v-model:value="remoteDriveCapacityMb" type="number" :disabled="!cacheRemoteFiles">{{ $ts.driveCapacityPerRemoteAccount }}<template #suffix>MB</template><template #desc>{{ $ts.inMb }}</template></MkInput>
</div> </div>
<div class="_footer"> <div class="_footer">
<MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $t('save') }}</MkButton> <MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $ts.save }}</MkButton>
</div> </div>
</section> </section>
<section class="_card _vMargin"> <section class="_card _vMargin">
<div class="_title"><Fa :icon="faCloud"/> {{ $t('objectStorage') }}</div> <div class="_title"><Fa :icon="faCloud"/> {{ $ts.objectStorage }}</div>
<div class="_content"> <div class="_content">
<MkSwitch v-model:value="useObjectStorage">{{ $t('useObjectStorage') }}</MkSwitch> <MkSwitch v-model:value="useObjectStorage">{{ $ts.useObjectStorage }}</MkSwitch>
<template v-if="useObjectStorage"> <template v-if="useObjectStorage">
<MkInput v-model:value="objectStorageBaseUrl" :disabled="!useObjectStorage">{{ $t('objectStorageBaseUrl') }}<template #desc>{{ $t('objectStorageBaseUrlDesc') }}</template></MkInput> <MkInput v-model:value="objectStorageBaseUrl" :disabled="!useObjectStorage">{{ $ts.objectStorageBaseUrl }}<template #desc>{{ $ts.objectStorageBaseUrlDesc }}</template></MkInput>
<div class="_inputs"> <div class="_inputs">
<MkInput v-model:value="objectStorageBucket" :disabled="!useObjectStorage">{{ $t('objectStorageBucket') }}<template #desc>{{ $t('objectStorageBucketDesc') }}</template></MkInput> <MkInput v-model:value="objectStorageBucket" :disabled="!useObjectStorage">{{ $ts.objectStorageBucket }}<template #desc>{{ $ts.objectStorageBucketDesc }}</template></MkInput>
<MkInput v-model:value="objectStoragePrefix" :disabled="!useObjectStorage">{{ $t('objectStoragePrefix') }}<template #desc>{{ $t('objectStoragePrefixDesc') }}</template></MkInput> <MkInput v-model:value="objectStoragePrefix" :disabled="!useObjectStorage">{{ $ts.objectStoragePrefix }}<template #desc>{{ $ts.objectStoragePrefixDesc }}</template></MkInput>
</div> </div>
<MkInput v-model:value="objectStorageEndpoint" :disabled="!useObjectStorage">{{ $t('objectStorageEndpoint') }}<template #desc>{{ $t('objectStorageEndpointDesc') }}</template></MkInput> <MkInput v-model:value="objectStorageEndpoint" :disabled="!useObjectStorage">{{ $ts.objectStorageEndpoint }}<template #desc>{{ $ts.objectStorageEndpointDesc }}</template></MkInput>
<div class="_inputs"> <div class="_inputs">
<MkInput v-model:value="objectStorageRegion" :disabled="!useObjectStorage">{{ $t('objectStorageRegion') }}<template #desc>{{ $t('objectStorageRegionDesc') }}</template></MkInput> <MkInput v-model:value="objectStorageRegion" :disabled="!useObjectStorage">{{ $ts.objectStorageRegion }}<template #desc>{{ $ts.objectStorageRegionDesc }}</template></MkInput>
</div> </div>
<div class="_inputs"> <div class="_inputs">
<MkInput v-model:value="objectStorageAccessKey" :disabled="!useObjectStorage"><template #icon><Fa :icon="faKey"/></template>Access key</MkInput> <MkInput v-model:value="objectStorageAccessKey" :disabled="!useObjectStorage"><template #icon><Fa :icon="faKey"/></template>Access key</MkInput>
<MkInput v-model:value="objectStorageSecretKey" :disabled="!useObjectStorage"><template #icon><Fa :icon="faKey"/></template>Secret key</MkInput> <MkInput v-model:value="objectStorageSecretKey" :disabled="!useObjectStorage"><template #icon><Fa :icon="faKey"/></template>Secret key</MkInput>
</div> </div>
<MkSwitch v-model:value="objectStorageUseSSL" :disabled="!useObjectStorage">{{ $t('objectStorageUseSSL') }}<template #desc>{{ $t('objectStorageUseSSLDesc') }}</template></MkSwitch> <MkSwitch v-model:value="objectStorageUseSSL" :disabled="!useObjectStorage">{{ $ts.objectStorageUseSSL }}<template #desc>{{ $ts.objectStorageUseSSLDesc }}</template></MkSwitch>
<MkSwitch v-model:value="objectStorageUseProxy" :disabled="!useObjectStorage">{{ $t('objectStorageUseProxy') }}<template #desc>{{ $t('objectStorageUseProxyDesc') }}</template></MkSwitch> <MkSwitch v-model:value="objectStorageUseProxy" :disabled="!useObjectStorage">{{ $ts.objectStorageUseProxy }}<template #desc>{{ $ts.objectStorageUseProxyDesc }}</template></MkSwitch>
<MkSwitch v-model:value="objectStorageSetPublicRead" :disabled="!useObjectStorage">{{ $t('objectStorageSetPublicRead') }}</MkSwitch> <MkSwitch v-model:value="objectStorageSetPublicRead" :disabled="!useObjectStorage">{{ $ts.objectStorageSetPublicRead }}</MkSwitch>
</template> </template>
</div> </div>
<div class="_footer"> <div class="_footer">
<MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $t('save') }}</MkButton> <MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $ts.save }}</MkButton>
</div> </div>
</section> </section>
<section class="_card _vMargin"> <section class="_card _vMargin">
<div class="_title"><Fa :icon="faGhost"/> {{ $t('proxyAccount') }}</div> <div class="_title"><Fa :icon="faGhost"/> {{ $ts.proxyAccount }}</div>
<div class="_content"> <div class="_content">
<MkInput :value="proxyAccount ? proxyAccount.username : null" disabled><template #prefix>@</template>{{ $t('proxyAccount') }}<template #desc>{{ $t('proxyAccountDescription') }}</template></MkInput> <MkInput :value="proxyAccount ? proxyAccount.username : null" disabled><template #prefix>@</template>{{ $ts.proxyAccount }}<template #desc>{{ $ts.proxyAccountDescription }}</template></MkInput>
<MkButton primary @click="chooseProxyAccount">{{ $t('chooseProxyAccount') }}</MkButton> <MkButton primary @click="chooseProxyAccount">{{ $ts.chooseProxyAccount }}</MkButton>
</div> </div>
</section> </section>
<section class="_card _vMargin"> <section class="_card _vMargin">
<div class="_title"><Fa :icon="faBan"/> {{ $t('blockedInstances') }}</div> <div class="_title"><Fa :icon="faBan"/> {{ $ts.blockedInstances }}</div>
<div class="_content"> <div class="_content">
<MkTextarea v-model:value="blockedHosts"> <MkTextarea v-model:value="blockedHosts">
<template #desc>{{ $t('blockedInstancesDescription') }}</template> <template #desc>{{ $ts.blockedInstancesDescription }}</template>
</MkTextarea> </MkTextarea>
</div> </div>
<div class="_footer"> <div class="_footer">
<MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $t('save') }}</MkButton> <MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $ts.save }}</MkButton>
</div> </div>
</section> </section>
<section class="_card _vMargin"> <section class="_card _vMargin">
<div class="_title"><Fa :icon="faShareAlt"/> {{ $t('integration') }}</div> <div class="_title"><Fa :icon="faShareAlt"/> {{ $ts.integration }}</div>
<div class="_content"> <div class="_content">
<header><Fa :icon="faTwitter"/> Twitter</header> <header><Fa :icon="faTwitter"/> Twitter</header>
<MkSwitch v-model:value="enableTwitterIntegration">{{ $t('enable') }}</MkSwitch> <MkSwitch v-model:value="enableTwitterIntegration">{{ $ts.enable }}</MkSwitch>
<template v-if="enableTwitterIntegration"> <template v-if="enableTwitterIntegration">
<MkInfo>Callback URL: {{ `${url}/api/tw/cb` }}</MkInfo> <MkInfo>Callback URL: {{ `${url}/api/tw/cb` }}</MkInfo>
<MkInput v-model:value="twitterConsumerKey" :disabled="!enableTwitterIntegration"><template #icon><Fa :icon="faKey"/></template>Consumer Key</MkInput> <MkInput v-model:value="twitterConsumerKey" :disabled="!enableTwitterIntegration"><template #icon><Fa :icon="faKey"/></template>Consumer Key</MkInput>
@ -215,7 +215,7 @@
</div> </div>
<div class="_content"> <div class="_content">
<header><Fa :icon="faGithub"/> GitHub</header> <header><Fa :icon="faGithub"/> GitHub</header>
<MkSwitch v-model:value="enableGithubIntegration">{{ $t('enable') }}</MkSwitch> <MkSwitch v-model:value="enableGithubIntegration">{{ $ts.enable }}</MkSwitch>
<template v-if="enableGithubIntegration"> <template v-if="enableGithubIntegration">
<MkInfo>Callback URL: {{ `${url}/api/gh/cb` }}</MkInfo> <MkInfo>Callback URL: {{ `${url}/api/gh/cb` }}</MkInfo>
<MkInput v-model:value="githubClientId" :disabled="!enableGithubIntegration"><template #icon><Fa :icon="faKey"/></template>Client ID</MkInput> <MkInput v-model:value="githubClientId" :disabled="!enableGithubIntegration"><template #icon><Fa :icon="faKey"/></template>Client ID</MkInput>
@ -224,7 +224,7 @@
</div> </div>
<div class="_content"> <div class="_content">
<header><Fa :icon="faDiscord"/> Discord</header> <header><Fa :icon="faDiscord"/> Discord</header>
<MkSwitch v-model:value="enableDiscordIntegration">{{ $t('enable') }}</MkSwitch> <MkSwitch v-model:value="enableDiscordIntegration">{{ $ts.enable }}</MkSwitch>
<template v-if="enableDiscordIntegration"> <template v-if="enableDiscordIntegration">
<MkInfo>Callback URL: {{ `${url}/api/dc/cb` }}</MkInfo> <MkInfo>Callback URL: {{ `${url}/api/dc/cb` }}</MkInfo>
<MkInput v-model:value="discordClientId" :disabled="!enableDiscordIntegration"><template #icon><Fa :icon="faKey"/></template>Client ID</MkInput> <MkInput v-model:value="discordClientId" :disabled="!enableDiscordIntegration"><template #icon><Fa :icon="faKey"/></template>Client ID</MkInput>
@ -232,7 +232,7 @@
</template> </template>
</div> </div>
<div class="_footer"> <div class="_footer">
<MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $t('save') }}</MkButton> <MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $ts.save }}</MkButton>
</div> </div>
</section> </section>
@ -240,7 +240,7 @@
<div class="_title"><Fa :icon="faArchway" /> Summaly Proxy</div> <div class="_title"><Fa :icon="faArchway" /> Summaly Proxy</div>
<div class="_content"> <div class="_content">
<MkInput v-model:value="summalyProxy">URL</MkInput> <MkInput v-model:value="summalyProxy">URL</MkInput>
<MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $t('save') }}</MkButton> <MkButton primary @click="save(true)"><Fa :icon="faSave"/> {{ $ts.save }}</MkButton>
</div> </div>
</section> </section>
</div> </div>
@ -274,7 +274,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('instance'), title: this.$ts.instance,
icon: faCog, icon: faCog,
}, },
meta: null, meta: null,
@ -423,8 +423,8 @@ export default defineComponent({
os.dialog({ os.dialog({
type: 'question', // warning cancel type: 'question', // warning cancel
showCancelButton: true, showCancelButton: true,
title: this.$t('settingGuide'), title: this.$ts.settingGuide,
text: this.$t('avoidMultiCaptchaConfirm'), text: this.$ts.avoidMultiCaptchaConfirm,
}).then(({ canceled }) => { }).then(({ canceled }) => {
if (canceled) { if (canceled) {
return; return;
@ -440,8 +440,8 @@ export default defineComponent({
os.dialog({ os.dialog({
type: 'question', // warning cancel type: 'question', // warning cancel
showCancelButton: true, showCancelButton: true,
title: this.$t('settingGuide'), title: this.$ts.settingGuide,
text: this.$t('avoidMultiCaptchaConfirm'), text: this.$ts.avoidMultiCaptchaConfirm,
}).then(({ canceled }) => { }).then(({ canceled }) => {
if (canceled) { if (canceled) {
return; return;

View file

@ -24,17 +24,17 @@
</div> </div>
<div class="_section"> <div class="_section">
<div class="_content"> <div class="_content">
<MkSwitch v-if="user.host == null && $i.isAdmin && (moderator || !user.isAdmin)" @update:value="toggleModerator" v-model:value="moderator">{{ $t('moderator') }}</MkSwitch> <MkSwitch v-if="user.host == null && $i.isAdmin && (moderator || !user.isAdmin)" @update:value="toggleModerator" v-model:value="moderator">{{ $ts.moderator }}</MkSwitch>
<MkSwitch @update:value="toggleSilence" v-model:value="silenced">{{ $t('silence') }}</MkSwitch> <MkSwitch @update:value="toggleSilence" v-model:value="silenced">{{ $ts.silence }}</MkSwitch>
<MkSwitch @update:value="toggleSuspend" v-model:value="suspended">{{ $t('suspend') }}</MkSwitch> <MkSwitch @update:value="toggleSuspend" v-model:value="suspended">{{ $ts.suspend }}</MkSwitch>
</div> </div>
</div> </div>
<div class="_section"> <div class="_section">
<div class="_content"> <div class="_content">
<MkButton full @click="openProfile"><Fa :icon="faExternalLinkSquareAlt"/> {{ $t('profile') }}</MkButton> <MkButton full @click="openProfile"><Fa :icon="faExternalLinkSquareAlt"/> {{ $ts.profile }}</MkButton>
<MkButton full v-if="user.host != null" @click="updateRemoteUser"><Fa :icon="faSync"/> {{ $t('updateRemoteUser') }}</MkButton> <MkButton full v-if="user.host != null" @click="updateRemoteUser"><Fa :icon="faSync"/> {{ $ts.updateRemoteUser }}</MkButton>
<MkButton full @click="resetPassword"><Fa :icon="faKey"/> {{ $t('resetPassword') }}</MkButton> <MkButton full @click="resetPassword"><Fa :icon="faKey"/> {{ $ts.resetPassword }}</MkButton>
<MkButton full @click="deleteAllFiles" danger><Fa :icon="faTrashAlt"/> {{ $t('deleteAllFiles') }}</MkButton> <MkButton full @click="deleteAllFiles" danger><Fa :icon="faTrashAlt"/> {{ $ts.deleteAllFiles }}</MkButton>
</div> </div>
</div> </div>
<div class="_section"> <div class="_section">
@ -139,7 +139,7 @@ export default defineComponent({
const confirm = await os.dialog({ const confirm = await os.dialog({
type: 'warning', type: 'warning',
showCancelButton: true, showCancelButton: true,
text: v ? this.$t('silenceConfirm') : this.$t('unsilenceConfirm'), text: v ? this.$ts.silenceConfirm : this.$ts.unsilenceConfirm,
}); });
if (confirm.canceled) { if (confirm.canceled) {
this.silenced = !v; this.silenced = !v;
@ -153,7 +153,7 @@ export default defineComponent({
const confirm = await os.dialog({ const confirm = await os.dialog({
type: 'warning', type: 'warning',
showCancelButton: true, showCancelButton: true,
text: v ? this.$t('suspendConfirm') : this.$t('unsuspendConfirm'), text: v ? this.$ts.suspendConfirm : this.$ts.unsuspendConfirm,
}); });
if (confirm.canceled) { if (confirm.canceled) {
this.suspended = !v; this.suspended = !v;
@ -172,7 +172,7 @@ export default defineComponent({
const confirm = await os.dialog({ const confirm = await os.dialog({
type: 'warning', type: 'warning',
showCancelButton: true, showCancelButton: true,
text: this.$t('deleteAllFilesConfirm'), text: this.$ts.deleteAllFilesConfirm,
}); });
if (confirm.canceled) return; if (confirm.canceled) return;
const process = async () => { const process = async () => {

View file

@ -2,53 +2,53 @@
<div class="mk-instance-users"> <div class="mk-instance-users">
<div class="_section"> <div class="_section">
<div class="_content"> <div class="_content">
<MkButton inline primary @click="addUser()"><Fa :icon="faPlus"/> {{ $t('addUser') }}</MkButton> <MkButton inline primary @click="addUser()"><Fa :icon="faPlus"/> {{ $ts.addUser }}</MkButton>
</div> </div>
</div> </div>
<div class="_section lookup"> <div class="_section lookup">
<div class="_title"><Fa :icon="faSearch"/> {{ $t('lookup') }}</div> <div class="_title"><Fa :icon="faSearch"/> {{ $ts.lookup }}</div>
<div class="_content"> <div class="_content">
<MkInput class="target" v-model:value="target" type="text" @enter="showUser()"> <MkInput class="target" v-model:value="target" type="text" @enter="showUser()">
<span>{{ $t('usernameOrUserId') }}</span> <span>{{ $ts.usernameOrUserId }}</span>
</MkInput> </MkInput>
<MkButton @click="showUser()" primary><Fa :icon="faSearch"/> {{ $t('lookup') }}</MkButton> <MkButton @click="showUser()" primary><Fa :icon="faSearch"/> {{ $ts.lookup }}</MkButton>
</div> </div>
</div> </div>
<div class="_section users"> <div class="_section users">
<div class="_title"><Fa :icon="faUsers"/> {{ $t('users') }}</div> <div class="_title"><Fa :icon="faUsers"/> {{ $ts.users }}</div>
<div class="_content"> <div class="_content">
<div class="inputs" style="display: flex;"> <div class="inputs" style="display: flex;">
<MkSelect v-model:value="sort" style="margin: 0; flex: 1;"> <MkSelect v-model:value="sort" style="margin: 0; flex: 1;">
<template #label>{{ $t('sort') }}</template> <template #label>{{ $ts.sort }}</template>
<option value="-createdAt">{{ $t('registeredDate') }} ({{ $t('ascendingOrder') }})</option> <option value="-createdAt">{{ $ts.registeredDate }} ({{ $ts.ascendingOrder }})</option>
<option value="+createdAt">{{ $t('registeredDate') }} ({{ $t('descendingOrder') }})</option> <option value="+createdAt">{{ $ts.registeredDate }} ({{ $ts.descendingOrder }})</option>
<option value="-updatedAt">{{ $t('lastUsed') }} ({{ $t('ascendingOrder') }})</option> <option value="-updatedAt">{{ $ts.lastUsed }} ({{ $ts.ascendingOrder }})</option>
<option value="+updatedAt">{{ $t('lastUsed') }} ({{ $t('descendingOrder') }})</option> <option value="+updatedAt">{{ $ts.lastUsed }} ({{ $ts.descendingOrder }})</option>
</MkSelect> </MkSelect>
<MkSelect v-model:value="state" style="margin: 0; flex: 1;"> <MkSelect v-model:value="state" style="margin: 0; flex: 1;">
<template #label>{{ $t('state') }}</template> <template #label>{{ $ts.state }}</template>
<option value="all">{{ $t('all') }}</option> <option value="all">{{ $ts.all }}</option>
<option value="available">{{ $t('normal') }}</option> <option value="available">{{ $ts.normal }}</option>
<option value="admin">{{ $t('administrator') }}</option> <option value="admin">{{ $ts.administrator }}</option>
<option value="moderator">{{ $t('moderator') }}</option> <option value="moderator">{{ $ts.moderator }}</option>
<option value="silenced">{{ $t('silence') }}</option> <option value="silenced">{{ $ts.silence }}</option>
<option value="suspended">{{ $t('suspend') }}</option> <option value="suspended">{{ $ts.suspend }}</option>
</MkSelect> </MkSelect>
<MkSelect v-model:value="origin" style="margin: 0; flex: 1;"> <MkSelect v-model:value="origin" style="margin: 0; flex: 1;">
<template #label>{{ $t('instance') }}</template> <template #label>{{ $ts.instance }}</template>
<option value="combined">{{ $t('all') }}</option> <option value="combined">{{ $ts.all }}</option>
<option value="local">{{ $t('local') }}</option> <option value="local">{{ $ts.local }}</option>
<option value="remote">{{ $t('remote') }}</option> <option value="remote">{{ $ts.remote }}</option>
</MkSelect> </MkSelect>
</div> </div>
<div class="inputs" style="display: flex; padding-top: 1.2em;"> <div class="inputs" style="display: flex; padding-top: 1.2em;">
<MkInput v-model:value="searchUsername" style="margin: 0; flex: 1;" type="text" spellcheck="false" @update:value="$refs.users.reload()"> <MkInput v-model:value="searchUsername" style="margin: 0; flex: 1;" type="text" spellcheck="false" @update:value="$refs.users.reload()">
<span>{{ $t('username') }}</span> <span>{{ $ts.username }}</span>
</MkInput> </MkInput>
<MkInput v-model:value="searchHost" style="margin: 0; flex: 1;" type="text" spellcheck="false" @update:value="$refs.users.reload()" :disabled="pagination.params().origin === 'local'"> <MkInput v-model:value="searchHost" style="margin: 0; flex: 1;" type="text" spellcheck="false" @update:value="$refs.users.reload()" :disabled="pagination.params().origin === 'local'">
<span>{{ $t('host') }}</span> <span>{{ $ts.host }}</span>
</MkInput> </MkInput>
</div> </div>
@ -65,10 +65,10 @@
<span class="punished" v-if="user.isSuspended"><Fa :icon="faSnowflake"/></span> <span class="punished" v-if="user.isSuspended"><Fa :icon="faSnowflake"/></span>
</header> </header>
<div> <div>
<span>{{ $t('lastUsed') }}: <MkTime v-if="user.updatedAt" :time="user.updatedAt" mode="detail"/></span> <span>{{ $ts.lastUsed }}: <MkTime v-if="user.updatedAt" :time="user.updatedAt" mode="detail"/></span>
</div> </div>
<div> <div>
<span>{{ $t('registeredDate') }}: <MkTime :time="user.createdAt" mode="detail"/></span> <span>{{ $ts.registeredDate }}: <MkTime :time="user.createdAt" mode="detail"/></span>
</div> </div>
</div> </div>
</button> </button>
@ -101,7 +101,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('users'), title: this.$ts.users,
icon: faUsers, icon: faUsers,
action: { action: {
icon: faSearch, icon: faSearch,
@ -153,7 +153,7 @@ export default defineComponent({
if (_notFound) { if (_notFound) {
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('noSuchUser') text: this.$ts.noSuchUser
}); });
} else { } else {
_notFound = true; _notFound = true;
@ -185,13 +185,13 @@ export default defineComponent({
async addUser() { async addUser() {
const { canceled: canceled1, result: username } = await os.dialog({ const { canceled: canceled1, result: username } = await os.dialog({
title: this.$t('username'), title: this.$ts.username,
input: true input: true
}); });
if (canceled1) return; if (canceled1) return;
const { canceled: canceled2, result: password } = await os.dialog({ const { canceled: canceled2, result: password } = await os.dialog({
title: this.$t('password'), title: this.$ts.password,
input: { type: 'password' } input: { type: 'password' }
}); });
if (canceled2) return; if (canceled2) return;

View file

@ -18,7 +18,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('mentions'), title: this.$ts.mentions,
icon: faAt icon: faAt
}, },
pagination: { pagination: {

View file

@ -18,7 +18,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('directNotes'), title: this.$ts.directNotes,
icon: faEnvelope icon: faEnvelope
}, },
pagination: { pagination: {

View file

@ -1,7 +1,7 @@
<template> <template>
<div class="_section"> <div class="_section">
<div class="mk-messaging _content" v-size="{ max: [400] }"> <div class="mk-messaging _content" v-size="{ max: [400] }">
<MkButton @click="start" primary class="start"><Fa :icon="faPlus"/> {{ $t('startMessaging') }}</MkButton> <MkButton @click="start" primary class="start"><Fa :icon="faPlus"/> {{ $ts.startMessaging }}</MkButton>
<div class="history" v-if="messages.length > 0"> <div class="history" v-if="messages.length > 0">
<MkA v-for="(message, i) in messages" <MkA v-for="(message, i) in messages"
@ -23,14 +23,14 @@
<MkTime :time="message.createdAt" class="time"/> <MkTime :time="message.createdAt" class="time"/>
</header> </header>
<div class="body"> <div class="body">
<p class="text"><span class="me" v-if="isMe(message)">{{ $t('you') }}:</span>{{ message.text }}</p> <p class="text"><span class="me" v-if="isMe(message)">{{ $ts.you }}:</span>{{ message.text }}</p>
</div> </div>
</div> </div>
</MkA> </MkA>
</div> </div>
<div class="_fullinfo" v-if="!fetching && messages.length == 0"> <div class="_fullinfo" v-if="!fetching && messages.length == 0">
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/> <img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
<div>{{ $t('noHistory') }}</div> <div>{{ $ts.noHistory }}</div>
</div> </div>
<MkLoading v-if="fetching"/> <MkLoading v-if="fetching"/>
</div> </div>
@ -53,7 +53,7 @@ export default defineComponent({
data() { data() {
return { return {
INFO: { INFO: {
title: this.$t('messaging'), title: this.$ts.messaging,
icon: faComments icon: faComments
}, },
fetching: true, fetching: true,
@ -119,11 +119,11 @@ export default defineComponent({
start(ev) { start(ev) {
os.modalMenu([{ os.modalMenu([{
text: this.$t('messagingWithUser'), text: this.$ts.messagingWithUser,
icon: faUser, icon: faUser,
action: () => { this.startUser() } action: () => { this.startUser() }
}, { }, {
text: this.$t('messagingWithGroup'), text: this.$ts.messagingWithGroup,
icon: faUsers, icon: faUsers,
action: () => { this.startGroup() } action: () => { this.startGroup() }
}], ev.currentTarget || ev.target); }], ev.currentTarget || ev.target);
@ -141,14 +141,14 @@ export default defineComponent({
if (groups1.length === 0 && groups2.length === 0) { if (groups1.length === 0 && groups2.length === 0) {
os.dialog({ os.dialog({
type: 'warning', type: 'warning',
title: this.$t('youHaveNoGroups'), title: this.$ts.youHaveNoGroups,
text: this.$t('joinOrCreateGroup'), text: this.$ts.joinOrCreateGroup,
}); });
return; return;
} }
const { canceled, result: group } = await os.dialog({ const { canceled, result: group } = await os.dialog({
type: null, type: null,
title: this.$t('group'), title: this.$ts.group,
select: { select: {
items: groups1.concat(groups2).map(group => ({ items: groups1.concat(groups2).map(group => ({
value: group, text: group.name value: group, text: group.name

View file

@ -8,10 +8,10 @@
ref="text" ref="text"
@keypress="onKeypress" @keypress="onKeypress"
@paste="onPaste" @paste="onPaste"
:placeholder="$t('inputMessageHere')" :placeholder="$ts.inputMessageHere"
></textarea> ></textarea>
<div class="file" @click="file = null" v-if="file">{{ file.name }}</div> <div class="file" @click="file = null" v-if="file">{{ file.name }}</div>
<button class="send _button" @click="send" :disabled="!canSend || sending" :title="$t('send')"> <button class="send _button" @click="send" :disabled="!canSend || sending" :title="$ts.send">
<template v-if="!sending"><Fa :icon="faPaperPlane"/></template><template v-if="sending"><Fa icon="spinner .spin"/></template> <template v-if="!sending"><Fa :icon="faPaperPlane"/></template><template v-if="sending"><Fa icon="spinner .spin"/></template>
</button> </button>
<button class="_button" @click="chooseFile"><Fa :icon="faPhotoVideo"/></button> <button class="_button" @click="chooseFile"><Fa :icon="faPhotoVideo"/></button>
@ -94,7 +94,7 @@ export default defineComponent({
const formatted = `${formatTimeString(new Date(file.lastModified), this.$store.state.pastedFileName).replace(/{{number}}/g, '1')}${ext}`; const formatted = `${formatTimeString(new Date(file.lastModified), this.$store.state.pastedFileName).replace(/{{number}}/g, '1')}${ext}`;
const name = this.$store.state.pasteDialog const name = this.$store.state.pasteDialog
? await os.dialog({ ? await os.dialog({
title: this.$t('enterFileName'), title: this.$ts.enterFileName,
input: { input: {
default: formatted default: formatted
}, },
@ -107,7 +107,7 @@ export default defineComponent({
if (items[0].kind == 'file') { if (items[0].kind == 'file') {
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('onlyOneFileCanBeAttached') text: this.$ts.onlyOneFileCanBeAttached
}); });
} }
} }
@ -132,7 +132,7 @@ export default defineComponent({
e.preventDefault(); e.preventDefault();
os.dialog({ os.dialog({
type: 'error', type: 'error',
text: this.$t('onlyOneFileCanBeAttached') text: this.$ts.onlyOneFileCanBeAttached
}); });
return; return;
} }
@ -153,7 +153,7 @@ export default defineComponent({
}, },
chooseFile(e) { chooseFile(e) {
selectFile(e.currentTarget || e.target, this.$t('selectFile'), false).then(file => { selectFile(e.currentTarget || e.target, this.$ts.selectFile, false).then(file => {
this.file = file; this.file = file;
}); });
}, },

View file

@ -3,7 +3,7 @@
<MkAvatar class="avatar" :user="message.user"/> <MkAvatar class="avatar" :user="message.user"/>
<div class="content"> <div class="content">
<div class="balloon" :class="{ noText: message.text == null }" > <div class="balloon" :class="{ noText: message.text == null }" >
<button class="delete-button" v-if="isMe" :title="$t('delete')" @click="del"> <button class="delete-button" v-if="isMe" :title="$ts.delete" @click="del">
<img src="/assets/remove.png" alt="Delete"/> <img src="/assets/remove.png" alt="Delete"/>
</button> </button>
<div class="content" v-if="!message.isDeleted"> <div class="content" v-if="!message.isDeleted">
@ -16,17 +16,17 @@
</div> </div>
</div> </div>
<div class="content" v-else> <div class="content" v-else>
<p class="is-deleted">{{ $t('deleted') }}</p> <p class="is-deleted">{{ $ts.deleted }}</p>
</div> </div>
</div> </div>
<div></div> <div></div>
<MkUrlPreview v-for="url in urls" :url="url" :key="url" style="margin: 8px 0;"/> <MkUrlPreview v-for="url in urls" :url="url" :key="url" style="margin: 8px 0;"/>
<footer> <footer>
<template v-if="isGroup"> <template v-if="isGroup">
<span class="read" v-if="message.reads.length > 0">{{ $t('messageRead') }} {{ message.reads.length }}</span> <span class="read" v-if="message.reads.length > 0">{{ $ts.messageRead }} {{ message.reads.length }}</span>
</template> </template>
<template v-else> <template v-else>
<span class="read" v-if="isMe && message.isRead">{{ $t('messageRead') }}</span> <span class="read" v-if="isMe && message.isRead">{{ $ts.messageRead }}</span>
</template> </template>
<MkTime :time="message.createdAt"/> <MkTime :time="message.createdAt"/>
<template v-if="message.is_edited"><Fa icon="pencil-alt"/></template> <template v-if="message.is_edited"><Fa icon="pencil-alt"/></template>

Some files were not shown because too many files have changed in this diff Show more