Revert "refactor(client): Use v-t for i18n"

This reverts commit 9c30b23358.
This commit is contained in:
syuilo
2020-07-25 01:56:52 +09:00
parent da874f3383
commit 166bc19131
108 changed files with 459 additions and 459 deletions

View File

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

View File

@ -21,7 +21,7 @@
<fa :icon="faSpinner" pulse v-if="type === 'waiting'"/>
</div>
<header v-if="title" v-html="title"></header>
<header v-if="title == null && user" v-t="'enterUsername'"></header>
<header v-if="title == null && user">{{ $t('enterUsername') }}</header>
<div class="body" v-if="text" v-html="text"></div>
<mk-input v-if="input" v-model="inputValue" autofocus :type="input.type || 'text'" :placeholder="input.placeholder" @keydown="onInputKeydown"></mk-input>
<mk-input v-if="user" v-model="userInputValue" autofocus @keydown="onInputKeydown"><template #prefix>@</template></mk-input>
@ -37,7 +37,7 @@
</mk-select>
<div class="buttons" v-if="!iconOnly && (showOkButton || showCancelButton) && !actions">
<mk-button inline @click="ok" v-if="showOkButton" primary :autofocus="!input && !select && !user" :disabled="!canOk">{{ (showCancelButton || input || select || user) ? $t('ok') : $t('gotIt') }}</mk-button>
<mk-button inline @click="cancel" v-if="showCancelButton || input || select || user" v-t="'cancel'"></mk-button>
<mk-button inline @click="cancel" v-if="showCancelButton || input || select || user">{{ $t('cancel') }}</mk-button>
</div>
<div class="buttons" v-if="actions">
<mk-button v-for="action in actions" inline @click="() => { action.callback(); close(); }" :primary="action.primary" :key="action.text">{{ action.text }}</mk-button>

View File

@ -9,15 +9,15 @@
>
<div class="label" v-if="$store.state.i.avatarId == file.id">
<img src="/assets/label.svg"/>
<p v-t="'avatar'"></p>
<p>{{ $t('avatar') }}</p>
</div>
<div class="label" v-if="$store.state.i.bannerId == file.id">
<img src="/assets/label.svg"/>
<p v-t="'banner'"></p>
<p>{{ $t('banner') }}</p>
</div>
<div class="label red" v-if="file.isSensitive">
<img src="/assets/label-red.svg"/>
<p v-t="'nsfw'"></p>
<p>{{ $t('nsfw') }}</p>
</div>
<x-file-thumbnail class="thumbnail" :file="file" fit="contain"/>

View File

@ -23,18 +23,18 @@
<x-folder 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 -->
<div class="padding" v-for="(n, i) in 16" :key="i"></div>
<mk-button ref="moreFolders" v-if="moreFolders" v-t="'loadMore'"></mk-button>
<mk-button ref="moreFolders" v-if="moreFolders">{{ $t('loadMore') }}</mk-button>
</div>
<div class="files" ref="filesContainer" v-show="files.length > 0">
<x-file 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 -->
<div class="padding" v-for="(n, i) in 16" :key="i"></div>
<mk-button ref="loadMoreFiles" @click="fetchMoreFiles" v-show="moreFiles" v-t="'loadMore'"></mk-button>
<mk-button ref="loadMoreFiles" @click="fetchMoreFiles" v-show="moreFiles">{{ $t('loadMore') }}</mk-button>
</div>
<div class="empty" v-if="files.length == 0 && folders.length == 0 && !fetching">
<p v-if="draghover">{{ $t('empty-draghover') }}</p>
<p v-if="!draghover && folder == null"><strong v-t="'emptyDrive'"></strong><br/>{{ $t('empty-drive-description') }}</p>
<p v-if="!draghover && folder != null" v-t="'emptyFolder'"></p>
<p v-if="!draghover && folder == null"><strong>{{ $t('emptyDrive') }}</strong><br/>{{ $t('empty-drive-description') }}</p>
<p v-if="!draghover && folder != null">{{ $t('emptyFolder') }}</p>
</div>
</div>
<mk-loading v-if="fetching"/>

View File

@ -3,7 +3,7 @@
<div class="mjndxjcg _panel">
<img src="https://xn--931a.moe/assets/error.jpg" class="_ghost"/>
<p><fa :icon="faExclamationTriangle"/> {{ $t('error') }}</p>
<mk-button @click="() => $emit('retry')" class="button" v-t="'retry'"></mk-button>
<mk-button @click="() => $emit('retry')" class="button">{{ $t('retry') }}</mk-button>
</div>
</transition>
</template>

View File

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

View File

@ -4,19 +4,19 @@
<div class="_panel">
<div>
<b><fa :icon="faUser"/>{{ $t('users') }}</b>
<small v-t="'local'"></small>
<small>{{ $t('local') }}</small>
</div>
<div>
<dl class="total">
<dt v-t="'total'"></dt>
<dt>{{ $t('total') }}</dt>
<dd>{{ info.originalUsersCount | number }}</dd>
</dl>
<dl class="diff" :class="{ inc: usersLocalDoD > 0 }">
<dt v-t="'dayOverDayChanges'"></dt>
<dt>{{ $t('dayOverDayChanges') }}</dt>
<dd>{{ usersLocalDoD | number }}</dd>
</dl>
<dl class="diff" :class="{ inc: usersLocalWoW > 0 }">
<dt v-t="'weekOverWeekChanges'"></dt>
<dt>{{ $t('weekOverWeekChanges') }}</dt>
<dd>{{ usersLocalWoW | number }}</dd>
</dl>
</div>
@ -24,19 +24,19 @@
<div class="_panel">
<div>
<b><fa :icon="faUser"/>{{ $t('users') }}</b>
<small v-t="'remote'"></small>
<small>{{ $t('remote') }}</small>
</div>
<div>
<dl class="total">
<dt v-t="'total'"></dt>
<dt>{{ $t('total') }}</dt>
<dd>{{ (info.usersCount - info.originalUsersCount) | number }}</dd>
</dl>
<dl class="diff" :class="{ inc: usersRemoteDoD > 0 }">
<dt v-t="'dayOverDayChanges'"></dt>
<dt>{{ $t('dayOverDayChanges') }}</dt>
<dd>{{ usersRemoteDoD | number }}</dd>
</dl>
<dl class="diff" :class="{ inc: usersRemoteWoW > 0 }">
<dt v-t="'weekOverWeekChanges'"></dt>
<dt>{{ $t('weekOverWeekChanges') }}</dt>
<dd>{{ usersRemoteWoW | number }}</dd>
</dl>
</div>
@ -44,19 +44,19 @@
<div class="_panel">
<div>
<b><fa :icon="faPencilAlt"/>{{ $t('notes') }}</b>
<small v-t="'local'"></small>
<small>{{ $t('local') }}</small>
</div>
<div>
<dl class="total">
<dt v-t="'total'"></dt>
<dt>{{ $t('total') }}</dt>
<dd>{{ info.originalNotesCount | number }}</dd>
</dl>
<dl class="diff" :class="{ inc: notesLocalDoD > 0 }">
<dt v-t="'dayOverDayChanges'"></dt>
<dt>{{ $t('dayOverDayChanges') }}</dt>
<dd>{{ notesLocalDoD | number }}</dd>
</dl>
<dl class="diff" :class="{ inc: notesLocalWoW > 0 }">
<dt v-t="'weekOverWeekChanges'"></dt>
<dt>{{ $t('weekOverWeekChanges') }}</dt>
<dd>{{ notesLocalWoW | number }}</dd>
</dl>
</div>
@ -64,19 +64,19 @@
<div class="_panel">
<div>
<b><fa :icon="faPencilAlt"/>{{ $t('notes') }}</b>
<small v-t="'remote'"></small>
<small>{{ $t('remote') }}</small>
</div>
<div>
<dl class="total">
<dt v-t="'total'"></dt>
<dt>{{ $t('total') }}</dt>
<dd>{{ (info.notesCount - info.originalNotesCount) | number }}</dd>
</dl>
<dl class="diff" :class="{ inc: notesRemoteDoD > 0 }">
<dt v-t="'dayOverDayChanges'"></dt>
<dt>{{ $t('dayOverDayChanges') }}</dt>
<dd>{{ notesRemoteDoD | number }}</dd>
</dl>
<dl class="diff" :class="{ inc: notesRemoteWoW > 0 }">
<dt v-t="'weekOverWeekChanges'"></dt>
<dt>{{ $t('weekOverWeekChanges') }}</dt>
<dd>{{ notesRemoteWoW | number }}</dd>
</dl>
</div>
@ -89,30 +89,30 @@
<div class="selects" style="display: flex;">
<mk-select v-model="chartSrc" style="margin: 0; flex: 1;">
<optgroup :label="$t('federation')">
<option value="federation-instances" v-t="'_charts.federationInstancesIncDec'"></option>
<option value="federation-instances-total" v-t="'_charts.federationInstancesTotal'"></option>
<option value="federation-instances">{{ $t('_charts.federationInstancesIncDec') }}</option>
<option value="federation-instances-total">{{ $t('_charts.federationInstancesTotal') }}</option>
</optgroup>
<optgroup :label="$t('users')">
<option value="users" v-t="'_charts.usersIncDec'"></option>
<option value="users-total" v-t="'_charts.usersTotal'"></option>
<option value="active-users" v-t="'_charts.activeUsers'"></option>
<option value="users">{{ $t('_charts.usersIncDec') }}</option>
<option value="users-total">{{ $t('_charts.usersTotal') }}</option>
<option value="active-users">{{ $t('_charts.activeUsers') }}</option>
</optgroup>
<optgroup :label="$t('notes')">
<option value="notes" v-t="'_charts.notesIncDec'"></option>
<option value="local-notes" v-t="'_charts.localNotesIncDec'"></option>
<option value="remote-notes" v-t="'_charts.remoteNotesIncDec'"></option>
<option value="notes-total" v-t="'_charts.notesTotal'"></option>
<option value="notes">{{ $t('_charts.notesIncDec') }}</option>
<option value="local-notes">{{ $t('_charts.localNotesIncDec') }}</option>
<option value="remote-notes">{{ $t('_charts.remoteNotesIncDec') }}</option>
<option value="notes-total">{{ $t('_charts.notesTotal') }}</option>
</optgroup>
<optgroup :label="$t('drive')">
<option value="drive-files" v-t="'_charts.filesIncDec'"></option>
<option value="drive-files-total" v-t="'_charts.filesTotal'"></option>
<option value="drive" v-t="'_charts.storageUsageIncDec'"></option>
<option value="drive-total" v-t="'_charts.storageUsageTotal'"></option>
<option value="drive-files">{{ $t('_charts.filesIncDec') }}</option>
<option value="drive-files-total">{{ $t('_charts.filesTotal') }}</option>
<option value="drive">{{ $t('_charts.storageUsageIncDec') }}</option>
<option value="drive-total">{{ $t('_charts.storageUsageTotal') }}</option>
</optgroup>
</mk-select>
<mk-select v-model="chartSpan" style="margin: 0;">
<option value="hour" v-t="'perHour'"></option>
<option value="day" v-t="'perDay'"></option>
<option value="hour">{{ $t('perHour') }}</option>
<option value="day">{{ $t('perDay') }}</option>
</mk-select>
</div>
<canvas ref="chart"></canvas>

View File

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

View File

@ -4,7 +4,7 @@
<div class="text">
<div>
<b><fa :icon="faExclamationTriangle"/> {{ $t('sensitive') }}</b>
<span v-t="'clickToShow'"></span>
<span>{{ $t('clickToShow') }}</span>
</div>
</div>
</div>

View File

@ -2,7 +2,7 @@
<div class="icozogqfvdetwohsdglrbswgrejoxbdj" v-if="hide" @click="hide = false">
<div>
<b><fa :icon="faExclamationTriangle"/> {{ $t('sensitive') }}</b>
<span v-t="'clickToShow'"></span>
<span>{{ $t('clickToShow') }}</span>
</div>
</div>
<div class="kkjnbbplepmiyuadieoenjgutgcmtsvu" v-else>

View File

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

View File

@ -80,7 +80,7 @@
<fa :icon="faEllipsisH"/>
</button>
</footer>
<div class="deleted" v-if="appearNote.deletedAt != null" v-t="'deleted'"></div>
<div class="deleted" v-if="appearNote.deletedAt != null">{{ $t('deleted') }}</div>
</div>
</article>
<x-sub v-for="note in replies" :key="note.id" :note="note" class="reply" :detail="true"/>

View File

@ -2,14 +2,14 @@
<div class="mk-notes">
<div class="_fullinfo" v-if="empty">
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
<div v-t="'noNotes'"></div>
<div>{{ $t('noNotes') }}</div>
</div>
<mk-error v-if="error" @retry="init()"/>
<div v-show="more && reversed" style="margin-bottom: var(--margin);">
<button class="_panel _button" ref="loadMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }">
<template v-if="!moreFetching" v-t="'loadMore'"></template>
<template v-if="!moreFetching">{{ $t('loadMore') }}</template>
<template v-if="moreFetching"><mk-loading inline/></template>
</button>
</div>
@ -20,7 +20,7 @@
<div v-show="more && !reversed" style="margin-top: var(--margin);">
<button class="_panel _button" ref="loadMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }">
<template v-if="!moreFetching" v-t="'loadMore'"></template>
<template v-if="!moreFetching">{{ $t('loadMore') }}</template>
<template v-if="moreFetching"><mk-loading inline/></template>
</button>
</div>

View File

@ -47,9 +47,9 @@
<fa :icon="faQuoteRight"/>
</router-link>
<span v-if="notification.type === 'follow'" class="text" style="opacity: 0.6;">{{ $t('youGotNewFollower') }}<div v-if="full"><mk-follow-button :user="notification.user" :full="true"/></div></span>
<span v-if="notification.type === 'followRequestAccepted'" class="text" style="opacity: 0.6;" v-t="'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()" v-t="'accept'"></button> | <button class="_textButton" @click="rejectFollowRequest()" v-t="'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()" v-t="'accept'"></button> | <button class="_textButton" @click="rejectGroupInvitation()" v-t="'reject'"></button></div></span>
<span v-if="notification.type === 'followRequestAccepted'" class="text" style="opacity: 0.6;">{{ $t('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 === '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 === 'app'" class="text">
<mfm :text="notification.body" :nowrap="!full"/>
</span>

View File

@ -6,11 +6,11 @@
</x-list>
<button class="_panel _button" ref="loadMore" v-show="more" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }">
<template v-if="!moreFetching" v-t="'loadMore'"></template>
<template v-if="!moreFetching">{{ $t('loadMore') }}</template>
<template v-if="moreFetching"><mk-loading inline/></template>
</button>
<p class="empty" v-if="empty" v-t="'noNotifications'"></p>
<p class="empty" v-if="empty">{{ $t('noNotifications') }}</p>
<mk-error v-if="error" @retry="init()"/>
</div>

View File

@ -13,34 +13,34 @@
</button>
</li>
</ul>
<mk-button class="add" v-if="choices.length < 10" @click="add" v-t="'add'"></mk-button>
<mk-button class="add" v-if="choices.length < 10" @click="add">{{ $t('add') }}</mk-button>
<mk-button class="add" v-else disabled>{{ $t('_poll.noMore') }}</mk-button>
<section>
<mk-switch v-model="multiple" v-t="'_poll.canMultipleVote'"></mk-switch>
<mk-switch v-model="multiple">{{ $t('_poll.canMultipleVote') }}</mk-switch>
<div>
<mk-select v-model="expiration">
<template #label>{{ $t('_poll.expiration') }}</template>
<option value="infinite" v-t="'_poll.infinite'"></option>
<option value="at" v-t="'_poll.at'"></option>
<option value="after" v-t="'_poll.after'"></option>
<option value="infinite">{{ $t('_poll.infinite') }}</option>
<option value="at">{{ $t('_poll.at') }}</option>
<option value="after">{{ $t('_poll.after') }}</option>
</mk-select>
<section v-if="expiration === 'at'">
<mk-input v-model="atDate" type="date" class="input">
<span v-t="'_poll.deadlineDate'"></span>
<span>{{ $t('_poll.deadlineDate') }}</span>
</mk-input>
<mk-input v-model="atTime" type="time" class="input">
<span v-t="'_poll.deadlineTime'"></span>
<span>{{ $t('_poll.deadlineTime') }}</span>
</mk-input>
</section>
<section v-if="expiration === 'after'">
<mk-input v-model="after" type="number" class="input">
<span v-t="'_poll.duration'"></span>
<span>{{ $t('_poll.duration') }}</span>
</mk-input>
<mk-select v-model="unit">
<option value="second" v-t="'_time.second'"></option>
<option value="minute" v-t="'_time.minute'"></option>
<option value="hour" v-t="'_time.hour'"></option>
<option value="day" v-t="'_time.day'"></option>
<option value="second">{{ $t('_time.second') }}</option>
<option value="minute">{{ $t('_time.minute') }}</option>
<option value="hour">{{ $t('_time.hour') }}</option>
<option value="day">{{ $t('_time.day') }}</option>
</mk-select>
</section>
</div>

View File

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

View File

@ -24,7 +24,7 @@
<x-note-preview 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 v-if="visibility === 'specified'" class="to-specified">
<span style="margin-right: 8px;" v-t="'recipient'"></span>
<span style="margin-right: 8px;">{{ $t('recipient') }}</span>
<div class="visibleUsers">
<span v-for="u in visibleUsers" :key="u.id">
<mk-acct :user="u"/>

View File

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

View File

@ -29,14 +29,14 @@
</template>
<div class="divider"></div>
<button class="item _button" :class="{ active: $route.path === '/instance' || $route.path.startsWith('/instance/') }" v-if="$store.getters.isSignedIn && ($store.state.i.isAdmin || $store.state.i.isModerator)" @click="oepnInstanceMenu">
<fa :icon="faServer" fixed-width/><span class="text" v-t="'instance'"></span>
<fa :icon="faServer" fixed-width/><span class="text">{{ $t('instance') }}</span>
</button>
<button class="item _button" @click="more">
<fa :icon="faEllipsisH" fixed-width/><span class="text" v-t="'more'"></span>
<fa :icon="faEllipsisH" fixed-width/><span class="text">{{ $t('more') }}</span>
<i v-if="otherNavItemIndicated"><fa :icon="faCircle"/></i>
</button>
<router-link class="item" active-class="active" to="/preferences">
<fa :icon="faCog" fixed-width/><span class="text" v-t="'settings'"></span>
<fa :icon="faCog" fixed-width/><span class="text">{{ $t('settings') }}</span>
</router-link>
</div>
</nav>

View File

@ -3,12 +3,12 @@
<div class="avatar" :style="{ backgroundImage: user ? `url('${ user.avatarUrl }')` : null }" v-show="withAvatar"></div>
<div class="normal-signin" v-if="!totpLogin">
<mk-input v-model="username" type="text" pattern="^[a-zA-Z0-9_]+$" spellcheck="false" autofocus required @input="onUsernameChange">
<span v-t="'username'"></span>
<span>{{ $t('username') }}</span>
<template #prefix>@</template>
<template #suffix>@{{ host }}</template>
</mk-input>
<mk-input v-model="password" type="password" :with-password-toggle="true" v-if="!user || user && !user.usePasswordLessLogin" required>
<span v-t="'password'"></span>
<span>{{ $t('password') }}</span>
<template #prefix><fa :icon="faLock"/></template>
</mk-input>
<mk-button type="submit" primary :disabled="signing" style="margin: 0 auto;">{{ signing ? $t('loggingIn') : $t('login') }}</mk-button>
@ -18,22 +18,22 @@
</div>
<div class="2fa-signin" v-if="totpLogin" :class="{ securityKeys: user && user.securityKeys }">
<div v-if="user && user.securityKeys" class="twofa-group tap-group">
<p v-t="'tapSecurityKey'"></p>
<p>{{ $t('tapSecurityKey') }}</p>
<mk-button @click="queryKey" v-if="!queryingKey">
{{ $t('retry') }}
</mk-button>
</div>
<div class="or-hr" v-if="user && user.securityKeys">
<p class="or-msg" v-t="'or'"></p>
<p class="or-msg">{{ $t('or') }}</p>
</div>
<div class="twofa-group totp-group">
<p style="margin-bottom:0;" v-t="'twoStepAuthentication'"></p>
<p style="margin-bottom:0;">{{ $t('twoStepAuthentication') }}</p>
<mk-input v-model="password" type="password" :with-password-toggle="true" v-if="user && user.usePasswordLessLogin" required>
<span v-t="'password'"></span>
<span>{{ $t('password') }}</span>
<template #prefix><fa :icon="faLock"/></template>
</mk-input>
<mk-input v-model="token" type="text" pattern="^[0-9]{6}$" autocomplete="off" spellcheck="false" required>
<span v-t="'token'"></span>
<span>{{ $t('token') }}</span>
<template #prefix><fa :icon="faGavel"/></template>
</mk-input>
<mk-button type="submit" :disabled="signing" primary style="margin: 0 auto;">{{ signing ? $t('loggingIn') : $t('login') }}</mk-button>

View File

@ -2,11 +2,11 @@
<form class="mk-signup" @submit.prevent="onSubmit" :autocomplete="Math.random()">
<template v-if="meta">
<mk-input v-if="meta.disableRegistration" v-model="invitationCode" type="text" :autocomplete="Math.random()" spellcheck="false" required>
<span v-t="'invitationCode'"></span>
<span>{{ $t('invitationCode') }}</span>
<template #prefix><fa :icon="faKey"/></template>
</mk-input>
<mk-input v-model="username" type="text" pattern="^[a-zA-Z0-9_]{1,20}$" :autocomplete="Math.random()" spellcheck="false" required @input="onChangeUsername">
<span v-t="'username'"></span>
<span>{{ $t('username') }}</span>
<template #prefix>@</template>
<template #suffix>@{{ host }}</template>
<template #desc>
@ -20,7 +20,7 @@
</template>
</mk-input>
<mk-input v-model="password" type="password" :autocomplete="Math.random()" required @input="onChangePassword">
<span v-t="'password'"></span>
<span>{{ $t('password') }}</span>
<template #prefix><fa :icon="faLock"/></template>
<template #desc>
<p v-if="passwordStrength == 'low'" style="color:#FF1161"><fa :icon="faExclamationTriangle" fixed-width/> {{ $t('weakPassword') }}</p>
@ -38,7 +38,7 @@
</mk-input>
<mk-switch v-model="ToSAgreement" v-if="meta.tosUrl">
<i18n path="agreeTo">
<a :href="meta.tosUrl" class="_link" target="_blank" v-t="'tos'"></a>
<a :href="meta.tosUrl" class="_link" target="_blank">{{ $t('tos') }}</a>
</i18n>
</mk-switch>
<captcha v-if="meta.enableHcaptcha" class="captcha" provider="hcaptcha" ref="hcaptcha" v-model="hCaptchaResponse" :sitekey="meta.hcaptchaSiteKey"/>

View File

@ -1,9 +1,9 @@
<template>
<div class="nsbbhtug" v-if="hasDisconnected" @click="resetDisconnected">
<div v-t="'disconnectedFromServer'"></div>
<div>{{ $t('disconnectedFromServer') }}</div>
<div class="command">
<button class="_textButton" @click="reload" v-t="'reload'"></button>
<button class="_textButton" v-t="'doNothing'"></button>
<button class="_textButton" @click="reload">{{ $t('reload') }}</button>
<button class="_textButton">{{ $t('doNothing') }}</button>
</div>
</div>
</template>

View File

@ -12,7 +12,7 @@
<x-media-list :media-list="note.files"/>
</details>
<details v-if="note.poll">
<summary v-t="'poll'"></summary>
<summary>{{ $t('poll') }}</summary>
<x-poll :note="note"/>
</details>
</div>

View File

@ -6,12 +6,12 @@
<mk-info warn v-if="information">{{ information }}</mk-info>
</div>
<div>
<mk-input v-model="name" v-t="'name'"></mk-input>
<mk-input v-model="name">{{ $t('name') }}</mk-input>
</div>
<div>
<div style="margin-bottom: 16px;"><b v-t="'permission'"></b></div>
<mk-button inline @click="disableAll" v-t="'disableAll'"></mk-button>
<mk-button inline @click="enableAll" v-t="'enableAll'"></mk-button>
<div style="margin-bottom: 16px;"><b>{{ $t('permission') }}</b></div>
<mk-button inline @click="disableAll">{{ $t('disableAll') }}</mk-button>
<mk-button inline @click="enableAll">{{ $t('enableAll') }}</mk-button>
<mk-switch v-for="kind in (initialPermissions || kinds)" :key="kind" v-model="permissions[kind]">{{ $t(`_permissions.${kind}`) }}</mk-switch>
</div>
</div>

View File

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

View File

@ -6,7 +6,7 @@
</div>
<div class="more" v-show="more" key="_more_">
<mk-button class="button" ref="loadMore" :disabled="moreFetching" :style="{ cursor: moreFetching ? 'wait' : 'pointer' }" primary>
<template v-if="!moreFetching" v-t="'loadMore'"></template>
<template v-if="!moreFetching">{{ $t('loadMore') }}</template>
<template v-if="moreFetching"><mk-loading inline/></template>
</mk-button>
</div>

View File

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

View File

@ -6,7 +6,7 @@
<div class="efvhhmdq">
<div class="no-users" v-if="empty">
<p v-t="'noUsers'"></p>
<p>{{ $t('noUsers') }}</p>
</div>
<div class="user" v-for="user in users" :key="user.id">
<mk-avatar class="avatar" :user="user"/>
@ -17,7 +17,7 @@
</div>
<div class="description">
<mfm v-if="user.description" :text="user.description" :is-note="false" :author="user" :i="$store.state.i" :custom-emojis="user.emojis"/>
<span v-else class="empty" v-t="'noAccountDescription'"></span>
<span v-else class="empty">{{ $t('noAccountDescription') }}</span>
</div>
</div>
<mk-follow-button class="koudoku-button" v-if="$store.getters.isSignedIn && user.id != $store.state.i.id" :user="user" mini/>

View File

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

View File

@ -3,8 +3,8 @@
<template #header>{{ $t('selectUser') }}</template>
<div class="tbhwbxda">
<div class="inputs">
<mk-input v-model="username" class="input" @input="search" ref="username"><span v-t="'username'"></span><template #prefix>@</template></mk-input>
<mk-input v-model="host" class="input" @input="search"><span v-t="'host'"></span><template #prefix>@</template></mk-input>
<mk-input v-model="username" class="input" @input="search" ref="username"><span>{{ $t('username') }}</span><template #prefix>@</template></mk-input>
<mk-input v-model="host" class="input" @input="search"><span>{{ $t('host') }}</span><template #prefix>@</template></mk-input>
</div>
<div class="users">
<div class="user" v-for="user in users" :key="user.id" :class="{ selected: selected && selected.id === user.id }" @click="selected = user" @dblclick="ok()">

View File

@ -16,11 +16,11 @@
</router-link>
</div>
<button class="more _button" ref="loadMore" v-show="more" @click="fetchMore" :disabled="moreFetching">
<template v-if="!moreFetching" v-t="'loadMore'"></template>
<template v-if="!moreFetching">{{ $t('loadMore') }}</template>
<template v-if="moreFetching"><fa :icon="faSpinner" pulse fixed-width/></template>
</button>
<p class="empty" v-if="empty" v-t="'noUsers'"></p>
<p class="empty" v-if="empty">{{ $t('noUsers') }}</p>
<mk-error v-if="error" @retry="init()"/>
</div>

View File

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