[Client] Update theme setting

This commit is contained in:
syuilo 2018-12-30 13:02:06 +09:00
parent d8f3e9d4a3
commit cdb8e41176
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
4 changed files with 103 additions and 103 deletions

View File

@ -283,6 +283,7 @@ common/views/components/media-banner.vue:
click-to-show: "クリックして表示"
common/views/components/theme.vue:
theme: "テーマ"
light-theme: "非ダークモード時に使用するテーマ"
dark-theme: "ダークモード時に使用するテーマ"
light-themes: "明るいテーマ"
@ -299,6 +300,7 @@ common/views/components/theme.vue:
base-theme: "ベーステーマ"
base-theme-light: "Light"
base-theme-dark: "Dark"
find-more-theme: "その他のテーマを入手"
theme-name: "テーマ名"
preview-created-theme: "プレビュー"
invalid-theme: "テーマが正しくありません。"
@ -1628,7 +1630,6 @@ mobile/views/pages/settings.vue:
notification-position: "通知の表示"
notification-position-bottom: "下"
notification-position-top: "上"
theme: "テーマ"
behavior: "動作"
fetch-on-scroll: "スクロールで自動読み込み"
note-visibility: "投稿の公開範囲"

View File

@ -1,8 +1,10 @@
<template>
<div class="nicnklzforebnpfgasiypmpdaaglujqm">
<ui-card>
<div slot="title"><fa icon="palette"/> {{ $t('theme') }}</div>
<section class="nicnklzforebnpfgasiypmpdaaglujqm fit-top">
<label>
<span><fa :icon="faSun"/> {{ $t('light-theme') }}</span>
<ui-select v-model="light" :placeholder="$t('light-theme')">
<span slot="label"><fa :icon="faSun"/> {{ $t('light-theme') }}</span>
<optgroup :label="$t('light-themes')">
<option v-for="x in lightThemes" :value="x.id" :key="x.id">{{ x.name }}</option>
</optgroup>
@ -13,8 +15,8 @@
</label>
<label>
<span><fa :icon="faMoon"/> {{ $t('dark-theme') }}</span>
<ui-select v-model="dark" :placeholder="$t('dark-theme')">
<span slot="label"><fa :icon="faMoon"/> {{ $t('dark-theme') }}</span>
<optgroup :label="$t('dark-themes')">
<option v-for="x in darkThemes" :value="x.id" :key="x.id">{{ x.name }}</option>
</optgroup>
@ -24,6 +26,8 @@
</ui-select>
</label>
<a href="https://assets.msky.cafe/theme/list" target="_blank">{{ $t('find-more-theme') }}</a>
<details class="creator">
<summary><fa icon="palette"/> {{ $t('create-a-theme') }}</summary>
<div>
@ -86,14 +90,15 @@
<ui-textarea v-if="selectedTheme.desc" readonly :value="selectedTheme.desc">
<span>{{ $t('desc') }}</span>
</ui-textarea>
<ui-textarea readonly :value="selectedThemeCode">
<ui-textarea readonly tall :value="selectedThemeCode">
<span>{{ $t('theme-code') }}</span>
</ui-textarea>
<ui-button @click="export_()" link :download="`${selectedTheme.name}.misskeytheme`" ref="export"><fa icon="box"/> {{ $t('export') }}</ui-button>
<ui-button @click="uninstall()" v-if="!builtinThemes.some(t => t.id == selectedTheme.id)"><fa :icon="['far', 'trash-alt']"/> {{ $t('uninstall') }}</ui-button>
</template>
</details>
</div>
</section>
</ui-card>
</template>
<script lang="ts">
@ -331,6 +336,11 @@ export default Vue.extend({
<style lang="stylus" scoped>
.nicnklzforebnpfgasiypmpdaaglujqm
> a
display block
margin-top -16px
margin-bottom 16px
> details
border-top solid 1px var(--faceDivider)

View File

@ -19,13 +19,7 @@
<x-integration-settings/>
</div>
<ui-card class="theme" v-show="page == 'theme'">
<div slot="title"><fa icon="palette"/> {{ $t('theme') }}</div>
<section>
<x-theme/>
</section>
</ui-card>
<x-theme class="theme" v-show="page == 'theme'"/>
<ui-card class="web" v-show="page == 'web'">
<div slot="title"><fa icon="sliders-h"/> {{ $t('behaviour') }}</div>

View File

@ -7,12 +7,7 @@
<div>
<x-profile-editor/>
<ui-card>
<div slot="title"><fa icon="palette"/> {{ $t('theme') }}</div>
<section>
<x-theme/>
</section>
</ui-card>
<ui-card>
<div slot="title"><fa icon="poll-h"/> {{ $t('design') }}</div>