mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 12:13:48 +01:00
Improve usability
This commit is contained in:
parent
73bae3751e
commit
25f7e00a66
@ -288,6 +288,8 @@ common/views/components/media-banner.vue:
|
||||
common/views/components/theme.vue:
|
||||
light-theme: "非ダークモード時に使用するテーマ"
|
||||
dark-theme: "ダークモード時に使用するテーマ"
|
||||
light-themes: "明るいテーマ"
|
||||
dark-themes: "暗いテーマ"
|
||||
install-a-theme: "テーマのインストール"
|
||||
theme-code: "テーマコード"
|
||||
install: "インストール"
|
||||
|
@ -3,14 +3,24 @@
|
||||
<label>
|
||||
<span>%i18n:@light-theme%</span>
|
||||
<ui-select v-model="light" placeholder="%i18n:@light-theme%">
|
||||
<option v-for="x in themes" :value="x.id" :key="x.id">{{ x.name }}</option>
|
||||
<optgroup label="%i18n:@light-themes%">
|
||||
<option v-for="x in lightThemes" :value="x.id" :key="x.id">{{ x.name }}</option>
|
||||
</optgroup>
|
||||
<optgroup label="%i18n:@dark-themes%">
|
||||
<option v-for="x in darkThemes" :value="x.id" :key="x.id">{{ x.name }}</option>
|
||||
</optgroup>
|
||||
</ui-select>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<span>%i18n:@dark-theme%</span>
|
||||
<ui-select v-model="dark" placeholder="%i18n:@dark-theme%">
|
||||
<option v-for="x in themes" :value="x.id" :key="x.id">{{ x.name }}</option>
|
||||
<optgroup label="%i18n:@dark-themes%">
|
||||
<option v-for="x in darkThemes" :value="x.id" :key="x.id">{{ x.name }}</option>
|
||||
</optgroup>
|
||||
<optgroup label="%i18n:@light-themes%">
|
||||
<option v-for="x in lightThemes" :value="x.id" :key="x.id">{{ x.name }}</option>
|
||||
</optgroup>
|
||||
</ui-select>
|
||||
</label>
|
||||
|
||||
@ -120,7 +130,15 @@ export default Vue.extend({
|
||||
|
||||
computed: {
|
||||
themes(): Theme[] {
|
||||
return this.$store.state.device.themes.concat(builtinThemes);
|
||||
return builtinThemes.concat(this.$store.state.device.themes);
|
||||
},
|
||||
|
||||
darkThemes(): Theme[] {
|
||||
return this.themes.filter(t => t.base == 'dark' || t.kind == 'dark');
|
||||
},
|
||||
|
||||
lightThemes(): Theme[] {
|
||||
return this.themes.filter(t => t.base == 'light' || t.kind == 'light');
|
||||
},
|
||||
|
||||
installedThemes(): Theme[] {
|
||||
|
@ -4,6 +4,7 @@
|
||||
name: 'Dark',
|
||||
author: 'syuilo',
|
||||
desc: 'Default dark theme',
|
||||
kind: 'dark',
|
||||
|
||||
vars: {
|
||||
primary: '#fb4e4e',
|
||||
|
@ -4,6 +4,7 @@
|
||||
name: 'Light',
|
||||
author: 'syuilo',
|
||||
desc: 'Default light theme',
|
||||
kind: 'light',
|
||||
|
||||
vars: {
|
||||
primary: '#fb4e4e',
|
||||
|
Loading…
Reference in New Issue
Block a user