This commit is contained in:
syuilo 2019-02-24 13:29:08 +09:00
parent 07e5fe6834
commit 84b0252a5f
3 changed files with 9 additions and 6 deletions

View file

@ -156,6 +156,8 @@ common:
view-on-remote: "正確な情報を見る" view-on-remote: "正確な情報を見る"
renoted-by: "{user}がRenote" renoted-by: "{user}がRenote"
no-notes: "投稿がありません" no-notes: "投稿がありません"
turn-on-darkmode: "闇に飲まれる"
turn-off-darkmode: "光あれ"
error: error:
title: "問題が発生しました" title: "問題が発生しました"

View file

@ -68,9 +68,8 @@
</li> </li>
<li @click="dark"> <li @click="dark">
<p> <p>
<span>{{ $t('dark') }}</span> <span>{{ $store.state.device.darkmode ? $t('@.turn-off-darkmode') : $t('@.turn-on-darkmode') }}</span>
<template v-if="$store.state.device.darkmode"><i><fa icon="moon"/></i></template> <template><i><fa :icon="$store.state.device.darkmode ? faSun : faMoon"/></i></template>
<template v-else><i><fa :icon="['far', 'moon']"/></i></template>
</p> </p>
</li> </li>
</ul> </ul>
@ -97,13 +96,14 @@ import MkSettingsWindow from './settings-window.vue';
import MkDriveWindow from './drive-window.vue'; import MkDriveWindow from './drive-window.vue';
import contains from '../../../common/scripts/contains'; import contains from '../../../common/scripts/contains';
import { faHome, faColumns } from '@fortawesome/free-solid-svg-icons'; import { faHome, faColumns } from '@fortawesome/free-solid-svg-icons';
import { faMoon, faSun } from '@fortawesome/free-regular-svg-icons';
export default Vue.extend({ export default Vue.extend({
i18n: i18n('desktop/views/components/ui.header.account.vue'), i18n: i18n('desktop/views/components/ui.header.account.vue'),
data() { data() {
return { return {
isOpen: false, isOpen: false,
faHome, faColumns faHome, faColumns, faMoon, faSun
}; };
}, },
computed: { computed: {

View file

@ -33,7 +33,7 @@
<li><a @click="search"><i><fa icon="search" fixed-width/></i>{{ $t('search') }}<i><fa icon="angle-right"/></i></a></li> <li><a @click="search"><i><fa icon="search" fixed-width/></i>{{ $t('search') }}<i><fa icon="angle-right"/></i></a></li>
<li><router-link to="/i/settings" :data-active="$route.name == 'settings'"><i><fa icon="cog" fixed-width/></i>{{ $t('settings') }}<i><fa icon="angle-right"/></i></router-link></li> <li><router-link to="/i/settings" :data-active="$route.name == 'settings'"><i><fa icon="cog" fixed-width/></i>{{ $t('settings') }}<i><fa icon="angle-right"/></i></router-link></li>
<li v-if="$store.getters.isSignedIn && ($store.state.i.isAdmin || $store.state.i.isModerator)"><a href="/admin"><i><fa icon="terminal" fixed-width/></i><span>{{ $t('admin') }}</span><i><fa icon="angle-right"/></i></a></li> <li v-if="$store.getters.isSignedIn && ($store.state.i.isAdmin || $store.state.i.isModerator)"><a href="/admin"><i><fa icon="terminal" fixed-width/></i><span>{{ $t('admin') }}</span><i><fa icon="angle-right"/></i></a></li>
<li @click="dark"><p><template v-if="$store.state.device.darkmode"><i><fa icon="moon" fixed-width/></i></template><template v-else><i><fa :icon="['far', 'moon']"/></i></template><span>{{ $t('darkmode') }}</span></p></li> <li @click="dark"><p><template><i><fa :icon="$store.state.device.darkmode ? faSun : faMoon" fixed-width/></i></template><span>{{ $store.state.device.darkmode ? $t('@.turn-off-darkmode') : $t('@.turn-on-darkmode') }}</span></p></li>
</ul> </ul>
</div> </div>
<div class="announcements" v-if="announcements && announcements.length > 0"> <div class="announcements" v-if="announcements && announcements.length > 0">
@ -53,6 +53,7 @@ import Vue from 'vue';
import i18n from '../../../i18n'; import i18n from '../../../i18n';
import { lang } from '../../../config'; import { lang } from '../../../config';
import { faNewspaper, faHashtag } from '@fortawesome/free-solid-svg-icons'; import { faNewspaper, faHashtag } from '@fortawesome/free-solid-svg-icons';
import { faMoon, faSun } from '@fortawesome/free-regular-svg-icons';
export default Vue.extend({ export default Vue.extend({
i18n: i18n('mobile/views/components/ui.nav.vue'), i18n: i18n('mobile/views/components/ui.nav.vue'),
@ -65,7 +66,7 @@ export default Vue.extend({
aboutUrl: `/docs/${lang}/about`, aboutUrl: `/docs/${lang}/about`,
announcements: [], announcements: [],
searching: false, searching: false,
faNewspaper, faHashtag faNewspaper, faHashtag, faMoon, faSun
}; };
}, },