This commit is contained in:
syuilo 2020-07-24 20:14:08 +09:00
parent a02bd7061a
commit 8d049fd498
115 changed files with 539 additions and 539 deletions

View file

@ -2,28 +2,28 @@
<section class="_card">
<div class="_title"><fa :icon="faLock"/> {{ $t('twoStepAuthentication') }}</div>
<div class="_content">
<p v-if="!data && !$store.state.i.twoFactorEnabled"><mk-button @click="register">{{ $t('_2fa.registerDevice') }}</mk-button></p>
<p v-if="!data && !$store.state.i.twoFactorEnabled"><mk-button @click="register" v-t="'_2fa.registerDevice'"></mk-button></p>
<template v-if="$store.state.i.twoFactorEnabled">
<p>{{ $t('_2fa.alreadyRegistered') }}</p>
<mk-button @click="unregister">{{ $t('unregister') }}</mk-button>
<p v-t="'_2fa.alreadyRegistered'"></p>
<mk-button @click="unregister" v-t="'unregister'"></mk-button>
<template v-if="supportsCredentials">
<hr class="totp-method-sep">
<h2 class="heading">{{ $t('securityKey') }}</h2>
<p>{{ $t('_2fa.securityKeyInfo') }}</p>
<h2 class="heading" v-t="'securityKey'"></h2>
<p v-t="'_2fa.securityKeyInfo'"></p>
<div class="key-list">
<div class="key" v-for="key in $store.state.i.securityKeysList">
<h3>{{ key.name }}</h3>
<div class="last-used">{{ $t('lastUsed') }}<mk-time :time="key.lastUsed"/></div>
<mk-button @click="unregisterKey(key)">{{ $t('unregister') }}</mk-button>
<mk-button @click="unregisterKey(key)" v-t="'unregister'"></mk-button>
</div>
</div>
<mk-switch v-model="usePasswordLessLogin" @change="updatePasswordLessLogin" v-if="$store.state.i.securityKeysList.length > 0">{{ $t('passwordLessLogin') }}</mk-switch>
<mk-switch v-model="usePasswordLessLogin" @change="updatePasswordLessLogin" v-if="$store.state.i.securityKeysList.length > 0" v-t="'passwordLessLogin'"></mk-switch>
<mk-info warn v-if="registration && registration.error">{{ $t('error') }} {{ registration.error }}</mk-info>
<mk-button v-if="!registration || registration.error" @click="addSecurityKey">{{ $t('_2fa.registerKey') }}</mk-button>
<mk-button v-if="!registration || registration.error" @click="addSecurityKey" v-t="'_2fa.registerKey'"></mk-button>
<ol v-if="registration && !registration.error">
<li v-if="registration.stage >= 0">
@ -33,9 +33,9 @@
<li v-if="registration.stage >= 1">
<mk-form :disabled="registration.stage != 1 || registration.saving">
<mk-input v-model="keyName" :max="30">
<span>{{ $t('securityKeyName') }}</span>
<span v-t="'securityKeyName'"></span>
</mk-input>
<mk-button @click="registerKey" :disabled="keyName.length == 0">{{ $t('registerSecurityKey') }}</mk-button>
<mk-button @click="registerKey" :disabled="keyName.length == 0" v-t="'registerSecurityKey'"></mk-button>
<fa icon="spinner" pulse fixed-width v-if="registration.saving && registration.stage == 1" />
</mk-form>
</li>
@ -52,11 +52,11 @@
</li>
<li>{{ $t('_2fa.step2') }}<br><img :src="data.qr"></li>
<li>{{ $t('_2fa.step3') }}<br>
<mk-input v-model="token" type="text" pattern="^[0-9]{6}$" autocomplete="off" spellcheck="false">{{ $t('token') }}</mk-input>
<mk-button primary @click="submit">{{ $t('done') }}</mk-button>
<mk-input v-model="token" type="text" pattern="^[0-9]{6}$" autocomplete="off" spellcheck="false" v-t="'token'"></mk-input>
<mk-button primary @click="submit" v-t="'done'"></mk-button>
</li>
</ol>
<mk-info>{{ $t('_2fa.step4') }}</mk-info>
<mk-info v-t="'_2fa.step4'"></mk-info>
</div>
</div>
</section>

View file

@ -2,7 +2,7 @@
<section class="_card">
<div class="_title"><fa :icon="faKey"/> API</div>
<div class="_content">
<mk-button @click="generateToken">{{ $t('generateAccessToken') }}</mk-button>
<mk-button @click="generateToken" v-t="'generateAccessToken'"></mk-button>
<mk-button @click="regenerateToken"><fa :icon="faSyncAlt"/> {{ $t('regenerate') }}</mk-button>
</div>
</section>

View file

@ -3,11 +3,11 @@
<div class="_title"><fa :icon="faBoxes"/> {{ $t('importAndExport') }}</div>
<div class="_content">
<mk-select v-model="exportTarget">
<option value="notes">{{ $t('_exportOrImport.allNotes') }}</option>
<option value="following">{{ $t('_exportOrImport.followingList') }}</option>
<option value="user-lists">{{ $t('_exportOrImport.userLists') }}</option>
<option value="mute">{{ $t('_exportOrImport.muteList') }}</option>
<option value="blocking">{{ $t('_exportOrImport.blockingList') }}</option>
<option value="notes" v-t="'_exportOrImport.allNotes'"></option>
<option value="following" v-t="'_exportOrImport.followingList'"></option>
<option value="user-lists" v-t="'_exportOrImport.userLists'"></option>
<option value="mute" v-t="'_exportOrImport.muteList'"></option>
<option value="blocking" v-t="'_exportOrImport.blockingList'"></option>
</mk-select>
<mk-button inline @click="doExport()"><fa :icon="faDownload"/> {{ $t('export') }}</mk-button>
<mk-button inline @click="doImport()" :disabled="!['following', 'user-lists'].includes(exportTarget)"><fa :icon="faUpload"/> {{ $t('import') }}</mk-button>

View file

@ -1,7 +1,7 @@
<template>
<div>
<portal to="icon"><fa :icon="faCog"/></portal>
<portal to="title">{{ $t('accountSettings') }}</portal>
<portal to="title" v-t="'accountSettings'"></portal>
<x-profile-setting/>
<x-privacy-setting/>
@ -11,16 +11,16 @@
<div class="_title"><fa :icon="faCog"/> {{ $t('general') }}</div>
<div class="_content">
<mk-switch v-model="$store.state.i.autoWatch" @change="onChangeAutoWatch">
{{ $t('autoNoteWatch') }}<template #desc>{{ $t('autoNoteWatchDescription') }}</template>
{{ $t('autoNoteWatch') }}<template #desc v-t="'autoNoteWatchDescription'"></template>
</mk-switch>
<mk-switch v-model="$store.state.i.injectFeaturedNote" @change="onChangeInjectFeaturedNote">
{{ $t('showFeaturedNotesInTimeline') }}
</mk-switch>
</div>
<div class="_content">
<mk-button @click="readAllNotifications">{{ $t('markAsReadAllNotifications') }}</mk-button>
<mk-button @click="readAllUnreadNotes">{{ $t('markAsReadAllUnreadNotes') }}</mk-button>
<mk-button @click="readAllMessagingMessages">{{ $t('markAsReadAllTalkMessages') }}</mk-button>
<mk-button @click="readAllNotifications" v-t="'markAsReadAllNotifications'"></mk-button>
<mk-button @click="readAllUnreadNotes" v-t="'markAsReadAllUnreadNotes'"></mk-button>
<mk-button @click="readAllMessagingMessages" v-t="'markAsReadAllTalkMessages'"></mk-button>
</div>
</section>
@ -32,9 +32,9 @@
<x-integration/>
<x-api/>
<router-link class="_panel _buttonPrimary" to="/my/apps" style="margin: var(--margin) auto;">{{ $t('installedApps') }}</router-link>
<router-link class="_panel _buttonPrimary" to="/my/apps" style="margin: var(--margin) auto;" v-t="'installedApps'"></router-link>
<button class="_panel _buttonPrimary" @click="$root.signout()" style="margin: var(--margin) auto;">{{ $t('logout') }}</button>
<button class="_panel _buttonPrimary" @click="$root.signout()" style="margin: var(--margin) auto;" v-t="'logout'"></button>
</div>
</template>

View file

@ -5,22 +5,22 @@
<div class="_content" v-if="enableTwitterIntegration">
<header><fa :icon="faTwitter"/> Twitter</header>
<p v-if="integrations.twitter">{{ $t('connectedTo') }}: <a :href="`https://twitter.com/${integrations.twitter.screenName}`" rel="nofollow noopener" target="_blank">@{{ integrations.twitter.screenName }}</a></p>
<mk-button v-if="integrations.twitter" @click="disconnectTwitter">{{ $t('disconnectSerice') }}</mk-button>
<mk-button v-else @click="connectTwitter">{{ $t('connectSerice') }}</mk-button>
<mk-button v-if="integrations.twitter" @click="disconnectTwitter" v-t="'disconnectSerice'"></mk-button>
<mk-button v-else @click="connectTwitter" v-t="'connectSerice'"></mk-button>
</div>
<div class="_content" v-if="enableDiscordIntegration">
<header><fa :icon="faDiscord"/> Discord</header>
<p v-if="integrations.discord">{{ $t('connectedTo') }}: <a :href="`https://discordapp.com/users/${integrations.discord.id}`" rel="nofollow noopener" target="_blank">@{{ integrations.discord.username }}#{{ integrations.discord.discriminator }}</a></p>
<mk-button v-if="integrations.discord" @click="disconnectDiscord">{{ $t('disconnectSerice') }}</mk-button>
<mk-button v-else @click="connectDiscord">{{ $t('connectSerice') }}</mk-button>
<mk-button v-if="integrations.discord" @click="disconnectDiscord" v-t="'disconnectSerice'"></mk-button>
<mk-button v-else @click="connectDiscord" v-t="'connectSerice'"></mk-button>
</div>
<div class="_content" v-if="enableGithubIntegration">
<header><fa :icon="faGithub"/> GitHub</header>
<p v-if="integrations.github">{{ $t('connectedTo') }}: <a :href="`https://github.com/${integrations.github.login}`" rel="nofollow noopener" target="_blank">@{{ integrations.github.login }}</a></p>
<mk-button v-if="integrations.github" @click="disconnectGithub">{{ $t('disconnectSerice') }}</mk-button>
<mk-button v-else @click="connectGithub">{{ $t('connectSerice') }}</mk-button>
<mk-button v-if="integrations.github" @click="disconnectGithub" v-t="'disconnectSerice'"></mk-button>
<mk-button v-else @click="connectGithub" v-t="'connectSerice'"></mk-button>
</div>
</section>
</template>

View file

@ -2,9 +2,9 @@
<section class="rrfwjxfl _card">
<div class="_title"><fa :icon="faBan"/> {{ $t('muteAndBlock') }}</div>
<div class="_content">
<span>{{ $t('mutedUsers') }}</span>
<span v-t="'mutedUsers'"></span>
<mk-pagination :pagination="mutingPagination" class="muting">
<template #empty><span>{{ $t('noUsers') }}</span></template>
<template #empty><span v-t="'noUsers'"></span></template>
<template #default="{items}">
<div class="user" v-for="(mute, i) in items" :key="mute.id">
<router-link class="name" :to="mute.mutee | userPage">
@ -15,9 +15,9 @@
</mk-pagination>
</div>
<div class="_content">
<span>{{ $t('blockedUsers') }}</span>
<span v-t="'blockedUsers'"></span>
<mk-pagination :pagination="blockingPagination" class="blocking">
<template #empty><span>{{ $t('noUsers') }}</span></template>
<template #empty><span v-t="'noUsers'"></span></template>
<template #default="{items}">
<div class="user" v-for="(block, i) in items" :key="block.id">
<router-link class="name" :to="block.blockee | userPage">

View file

@ -2,19 +2,19 @@
<section class="_card">
<div class="_title"><fa :icon="faLock"/> {{ $t('privacy') }}</div>
<div class="_content">
<mk-switch v-model="isLocked" @change="save()">{{ $t('makeFollowManuallyApprove') }}</mk-switch>
<mk-switch v-model="autoAcceptFollowed" v-if="isLocked" @change="save()">{{ $t('autoAcceptFollowed') }}</mk-switch>
<mk-switch v-model="isLocked" @change="save()" v-t="'makeFollowManuallyApprove'"></mk-switch>
<mk-switch v-model="autoAcceptFollowed" v-if="isLocked" @change="save()" v-t="'autoAcceptFollowed'"></mk-switch>
</div>
<div class="_content">
<mk-switch v-model="rememberNoteVisibility" @change="save()">{{ $t('rememberNoteVisibility') }}</mk-switch>
<mk-switch v-model="rememberNoteVisibility" @change="save()" v-t="'rememberNoteVisibility'"></mk-switch>
<mk-select v-model="defaultNoteVisibility" style="margin-bottom: 8px;" v-if="!rememberNoteVisibility">
<template #label>{{ $t('defaultNoteVisibility') }}</template>
<option value="public">{{ $t('_visibility.public') }}</option>
<option value="home">{{ $t('_visibility.home') }}</option>
<option value="followers">{{ $t('_visibility.followers') }}</option>
<option value="specified">{{ $t('_visibility.specified') }}</option>
<template #label v-t="'defaultNoteVisibility'"></template>
<option value="public" v-t="'_visibility.public'"></option>
<option value="home" v-t="'_visibility.home'"></option>
<option value="followers" v-t="'_visibility.followers'"></option>
<option value="specified" v-t="'_visibility.specified'"></option>
</mk-select>
<mk-switch v-model="defaultNoteLocalOnly" v-if="!rememberNoteVisibility">{{ $t('_visibility.localOnly') }}</mk-switch>
<mk-switch v-model="defaultNoteLocalOnly" v-if="!rememberNoteVisibility" v-t="'_visibility.localOnly'"></mk-switch>
</div>
</section>
</template>

View file

@ -7,46 +7,46 @@
</div>
<mk-input v-model="name" :max="30">
<span>{{ $t('_profile.name') }}</span>
<span v-t="'_profile.name'"></span>
</mk-input>
<mk-textarea v-model="description" :max="500">
<span>{{ $t('_profile.description') }}</span>
<template #desc>{{ $t('_profile.youCanIncludeHashtags') }}</template>
<span v-t="'_profile.description'"></span>
<template #desc v-t="'_profile.youCanIncludeHashtags'"></template>
</mk-textarea>
<mk-input v-model="location">
<span>{{ $t('location') }}</span>
<span v-t="'location'"></span>
<template #prefix><fa :icon="faMapMarkerAlt"/></template>
</mk-input>
<mk-input v-model="birthday" type="date">
<template #title>{{ $t('birthday') }}</template>
<template #title v-t="'birthday'"></template>
<template #prefix><fa :icon="faBirthdayCake"/></template>
</mk-input>
<details class="fields">
<summary>{{ $t('_profile.metadata') }}</summary>
<summary v-t="'_profile.metadata'"></summary>
<div class="row">
<mk-input v-model="fieldName0">{{ $t('_profile.metadataLabel') }}</mk-input>
<mk-input v-model="fieldValue0">{{ $t('_profile.metadataContent') }}</mk-input>
<mk-input v-model="fieldName0" v-t="'_profile.metadataLabel'"></mk-input>
<mk-input v-model="fieldValue0" v-t="'_profile.metadataContent'"></mk-input>
</div>
<div class="row">
<mk-input v-model="fieldName1">{{ $t('_profile.metadataLabel') }}</mk-input>
<mk-input v-model="fieldValue1">{{ $t('_profile.metadataContent') }}</mk-input>
<mk-input v-model="fieldName1" v-t="'_profile.metadataLabel'"></mk-input>
<mk-input v-model="fieldValue1" v-t="'_profile.metadataContent'"></mk-input>
</div>
<div class="row">
<mk-input v-model="fieldName2">{{ $t('_profile.metadataLabel') }}</mk-input>
<mk-input v-model="fieldValue2">{{ $t('_profile.metadataContent') }}</mk-input>
<mk-input v-model="fieldName2" v-t="'_profile.metadataLabel'"></mk-input>
<mk-input v-model="fieldValue2" v-t="'_profile.metadataContent'"></mk-input>
</div>
<div class="row">
<mk-input v-model="fieldName3">{{ $t('_profile.metadataLabel') }}</mk-input>
<mk-input v-model="fieldValue3">{{ $t('_profile.metadataContent') }}</mk-input>
<mk-input v-model="fieldName3" v-t="'_profile.metadataLabel'"></mk-input>
<mk-input v-model="fieldValue3" v-t="'_profile.metadataContent'"></mk-input>
</div>
</details>
<mk-switch v-model="isBot">{{ $t('flagAsBot') }}</mk-switch>
<mk-switch v-model="isCat">{{ $t('flagAsCat') }}</mk-switch>
<mk-switch v-model="isBot" v-t="'flagAsBot'"></mk-switch>
<mk-switch v-model="isCat" v-t="'flagAsCat'"></mk-switch>
</div>
<div class="_footer">
<mk-button @click="save(true)" primary><fa :icon="faSave"/> {{ $t('save') }}</mk-button>

View file

@ -3,7 +3,7 @@
<div class="_title"><fa :icon="faLaugh"/> {{ $t('reaction') }}</div>
<div class="_content">
<mk-input v-model="reactions" style="font-family: 'Segoe UI Emoji', 'Noto Color Emoji', Roboto, HelveticaNeue, Arial, sans-serif">
{{ $t('reaction') }}<template #desc>{{ $t('reactionSettingDescription') }} <button class="_textButton" @click="chooseEmoji">{{ $t('chooseEmoji') }}</button></template>
{{ $t('reaction') }}<template #desc v-t="'reactionSettingDescription') }} <button class="_textButton" @click="chooseEmoji">{{ $t('chooseEmoji'"></button></template>
</mk-input>
<mk-button inline @click="setDefault"><fa :icon="faUndo"/> {{ $t('default') }}</mk-button>
</div>

View file

@ -2,7 +2,7 @@
<section class="_card">
<div class="_title"><fa :icon="faLock"/> {{ $t('password') }}</div>
<div class="_content">
<mk-button primary @click="change()">{{ $t('changePassword') }}</mk-button>
<mk-button primary @click="change()" v-t="'changePassword'"></mk-button>
</div>
</section>
</template>