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

@ -1,9 +1,9 @@
<template>
<div>
<portal to="icon"><fa :icon="faCog"/></portal>
<portal to="title">{{ $t('clinetSettings') }}</portal>
<portal to="title" v-t="'clinetSettings'"></portal>
<router-link v-if="$store.getters.isSignedIn" class="_panel _buttonPrimary" to="/my/settings" style="margin-bottom: var(--margin);">{{ $t('accountSettings') }}</router-link>
<router-link v-if="$store.getters.isSignedIn" class="_panel _buttonPrimary" to="/my/settings" style="margin-bottom: var(--margin);" v-t="'accountSettings'"></router-link>
<x-theme/>
@ -16,37 +16,37 @@
<div class="_content">
<mk-range v-model="sfxVolume" :min="0" :max="1" :step="0.1">
<fa slot="icon" :icon="volumeIcon"/>
<span slot="title">{{ $t('volume') }}</span>
<span slot="title" v-t="'volume'"></span>
</mk-range>
</div>
<div class="_content">
<mk-select v-model="sfxNote">
<template #label>{{ $t('_sfx.note') }}</template>
<template #label v-t="'_sfx.note'"></template>
<option v-for="sound in sounds" :value="sound" :key="sound">{{ sound || $t('none') }}</option>
<template #text><button class="_textButton" @click="listen(sfxNote)" v-if="sfxNote"><fa :icon="faPlay"/> {{ $t('listen') }}</button></template>
</mk-select>
<mk-select v-model="sfxNoteMy">
<template #label>{{ $t('_sfx.noteMy') }}</template>
<template #label v-t="'_sfx.noteMy'"></template>
<option v-for="sound in sounds" :value="sound" :key="sound">{{ sound || $t('none') }}</option>
<template #text><button class="_textButton" @click="listen(sfxNoteMy)" v-if="sfxNoteMy"><fa :icon="faPlay"/> {{ $t('listen') }}</button></template>
</mk-select>
<mk-select v-model="sfxNotification">
<template #label>{{ $t('_sfx.notification') }}</template>
<template #label v-t="'_sfx.notification'"></template>
<option v-for="sound in sounds" :value="sound" :key="sound">{{ sound || $t('none') }}</option>
<template #text><button class="_textButton" @click="listen(sfxNotification)" v-if="sfxNotification"><fa :icon="faPlay"/> {{ $t('listen') }}</button></template>
</mk-select>
<mk-select v-model="sfxChat">
<template #label>{{ $t('_sfx.chat') }}</template>
<template #label v-t="'_sfx.chat'"></template>
<option v-for="sound in sounds" :value="sound" :key="sound">{{ sound || $t('none') }}</option>
<template #text><button class="_textButton" @click="listen(sfxChat)" v-if="sfxChat"><fa :icon="faPlay"/> {{ $t('listen') }}</button></template>
</mk-select>
<mk-select v-model="sfxChatBg">
<template #label>{{ $t('_sfx.chatBg') }}</template>
<template #label v-t="'_sfx.chatBg'"></template>
<option v-for="sound in sounds" :value="sound" :key="sound">{{ sound || $t('none') }}</option>
<template #text><button class="_textButton" @click="listen(sfxChatBg)" v-if="sfxChatBg"><fa :icon="faPlay"/> {{ $t('listen') }}</button></template>
</mk-select>
<mk-select v-model="sfxAntenna">
<template #label>{{ $t('_sfx.antenna') }}</template>
<template #label v-t="'_sfx.antenna'"></template>
<option v-for="sound in sounds" :value="sound" :key="sound">{{ sound || $t('none') }}</option>
<template #text><button class="_textButton" @click="listen(sfxAntenna)" v-if="sfxAntenna"><fa :icon="faPlay"/> {{ $t('listen') }}</button></template>
</mk-select>
@ -61,25 +61,25 @@
</mk-switch>
</div>
<div class="_content">
<div>{{ $t('_deck.columnAlign') }}</div>
<mk-radio v-model="deckColumnAlign" value="left">{{ $t('left') }}</mk-radio>
<mk-radio v-model="deckColumnAlign" value="center">{{ $t('center') }}</mk-radio>
<div v-t="'_deck.columnAlign'"></div>
<mk-radio v-model="deckColumnAlign" value="left" v-t="'left'"></mk-radio>
<mk-radio v-model="deckColumnAlign" value="center" v-t="'center'"></mk-radio>
</div>
</section>
<section class="_card">
<div class="_title"><fa :icon="faCog"/> {{ $t('appearance') }}</div>
<div class="_content">
<mk-switch v-model="disableAnimatedMfm">{{ $t('disableAnimatedMfm') }}</mk-switch>
<mk-switch v-model="reduceAnimation">{{ $t('reduceUiAnimation') }}</mk-switch>
<mk-switch v-model="useBlurEffectForModal">{{ $t('useBlurEffectForModal') }}</mk-switch>
<mk-switch v-model="disableAnimatedMfm" v-t="'disableAnimatedMfm'"></mk-switch>
<mk-switch v-model="reduceAnimation" v-t="'reduceUiAnimation'"></mk-switch>
<mk-switch v-model="useBlurEffectForModal" v-t="'useBlurEffectForModal'"></mk-switch>
<mk-switch v-model="useOsNativeEmojis">
{{ $t('useOsNativeEmojis') }}
<template #desc><mfm text="🍮🍦🍭🍩🍰🍫🍬🥞🍪"/></template>
</mk-switch>
</div>
<div class="_content">
<div>{{ $t('fontSize') }}</div>
<div v-t="'fontSize'"></div>
<mk-radio v-model="fontSize" value="small"><span style="font-size: 14px;">Aa</span></mk-radio>
<mk-radio v-model="fontSize" :value="null"><span style="font-size: 16px;">Aa</span></mk-radio>
<mk-radio v-model="fontSize" value="large"><span style="font-size: 18px;">Aa</span></mk-radio>
@ -95,22 +95,22 @@
</mk-switch>
</div>
<div class="_content">
<mk-switch v-model="imageNewTab">{{ $t('openImageInNewTab') }}</mk-switch>
<mk-switch v-model="showFixedPostForm">{{ $t('showFixedPostForm') }}</mk-switch>
<mk-switch v-model="enableInfiniteScroll">{{ $t('enableInfiniteScroll') }}</mk-switch>
<mk-switch v-model="fixedWidgetsPosition">{{ $t('fixedWidgetsPosition') }}</mk-switch>
<mk-switch v-model="disablePagesScript">{{ $t('disablePagesScript') }}</mk-switch>
<mk-switch v-model="imageNewTab" v-t="'openImageInNewTab'"></mk-switch>
<mk-switch v-model="showFixedPostForm" v-t="'showFixedPostForm'"></mk-switch>
<mk-switch v-model="enableInfiniteScroll" v-t="'enableInfiniteScroll'"></mk-switch>
<mk-switch v-model="fixedWidgetsPosition" v-t="'fixedWidgetsPosition'"></mk-switch>
<mk-switch v-model="disablePagesScript" v-t="'disablePagesScript'"></mk-switch>
</div>
<div class="_content">
<mk-select v-model="lang">
<template #label>{{ $t('uiLanguage') }}</template>
<template #label v-t="'uiLanguage'"></template>
<option v-for="x in langs" :value="x[0]" :key="x[0]">{{ x[1] }}</option>
</mk-select>
</div>
</section>
<mk-button @click="cacheClear()" primary style="margin: var(--margin) auto;">{{ $t('cacheClear') }}</mk-button>
<mk-button @click="cacheClear()" primary style="margin: var(--margin) auto;" v-t="'cacheClear'"></mk-button>
</div>
</template>

View file

@ -4,9 +4,9 @@
<div class="_content">
<details>
<summary><fa :icon="faDownload"/> {{ $t('install') }}</summary>
<mk-info warn>{{ $t('pluginInstallWarn') }}</mk-info>
<mk-info warn v-t="'pluginInstallWarn'"></mk-info>
<mk-textarea v-model="script" tall>
<span>{{ $t('script') }}</span>
<span v-t="'script'"></span>
</mk-textarea>
<mk-button @click="install()" primary><fa :icon="faSave"/> {{ $t('install') }}</mk-button>
</details>

View file

@ -3,8 +3,8 @@
<div class="_title"><fa :icon="faListUl"/> {{ $t('sidebar') }}</div>
<div class="_content">
<mk-textarea v-model="items" tall>
<span>{{ $t('sidebar') }}</span>
<template #desc><button class="_textButton" @click="addItem">{{ $t('addItem') }}</button></template>
<span v-t="'sidebar'"></span>
<template #desc><button class="_textButton" @click="addItem" v-t="'addItem'"></button></template>
</mk-textarea>
</div>
<div class="_footer">

View file

@ -6,8 +6,8 @@
<div class="toggleWrapper">
<input type="checkbox" class="dn" id="dn" v-model="darkMode" :disabled="syncDeviceDarkMode"/>
<label for="dn" class="toggle">
<span class="before">{{ $t('light') }}</span>
<span class="after">{{ $t('dark') }}</span>
<span class="before" v-t="'light'"></span>
<span class="after" v-t="'dark'"></span>
<span class="toggle__handler">
<span class="crater crater--1"></span>
<span class="crater crater--2"></span>
@ -22,11 +22,11 @@
</label>
</div>
</div>
<mk-switch v-model="syncDeviceDarkMode">{{ $t('syncDeviceDarkMode') }}</mk-switch>
<mk-switch v-model="syncDeviceDarkMode" v-t="'syncDeviceDarkMode'"></mk-switch>
</div>
<div class="_content">
<mk-select v-model="lightTheme">
<template #label>{{ $t('themeForLightMode') }}</template>
<template #label v-t="'themeForLightMode'"></template>
<optgroup :label="$t('lightThemes')">
<option v-for="x in lightThemes" :value="x.id" :key="x.id">{{ x.name }}</option>
</optgroup>
@ -35,7 +35,7 @@
</optgroup>
</mk-select>
<mk-select v-model="darkTheme">
<template #label>{{ $t('themeForDarkMode') }}</template>
<template #label v-t="'themeForDarkMode'"></template>
<optgroup :label="$t('darkThemes')">
<option v-for="x in darkThemes" :value="x.id" :key="x.id">{{ x.name }}</option>
</optgroup>
@ -43,17 +43,17 @@
<option v-for="x in lightThemes" :value="x.id" :key="x.id">{{ x.name }}</option>
</optgroup>
</mk-select>
<a href="https://assets.msky.cafe/theme/list" rel="noopener" target="_blank" class="_link">{{ $t('_theme.explore') }}</a><router-link to="/theme-editor" class="_link">{{ $t('_theme.make') }}</router-link>
<a href="https://assets.msky.cafe/theme/list" rel="noopener" target="_blank" class="_link" v-t="'_theme.explore'"></a>・<router-link to="/theme-editor" class="_link" v-t="'_theme.make'"></router-link>
</div>
<div class="_content">
<mk-button primary v-if="wallpaper == null" @click="setWallpaper">{{ $t('setWallpaper') }}</mk-button>
<mk-button primary v-else @click="wallpaper = null">{{ $t('removeWallpaper') }}</mk-button>
<mk-button primary v-if="wallpaper == null" @click="setWallpaper" v-t="'setWallpaper'"></mk-button>
<mk-button primary v-else @click="wallpaper = null" v-t="'removeWallpaper'"></mk-button>
</div>
<div class="_content">
<details>
<summary><fa :icon="faDownload"/> {{ $t('_theme.install') }}</summary>
<mk-textarea v-model="installThemeCode">
<span>{{ $t('_theme.code') }}</span>
<span v-t="'_theme.code'"></span>
</mk-textarea>
<mk-button @click="() => install(this.installThemeCode)" :disabled="installThemeCode == null" primary inline><fa :icon="faCheck"/> {{ $t('install') }}</mk-button>
<mk-button @click="() => preview(this.installThemeCode)" :disabled="installThemeCode == null" inline><fa :icon="faEye"/> {{ $t('preview') }}</mk-button>
@ -67,7 +67,7 @@
</mk-select>
<template v-if="selectedTheme">
<mk-textarea readonly tall :value="selectedThemeCode">
<span>{{ $t('_theme.code') }}</span>
<span v-t="'_theme.code'"></span>
</mk-textarea>
<mk-button @click="uninstall()" v-if="!builtinThemes.some(t => t.id == selectedTheme.id)"><fa :icon="faTrashAlt"/> {{ $t('uninstall') }}</mk-button>
</template>