2018-02-12 22:18:13 +09:00
|
|
|
<template>
|
|
|
|
<div class="mk-settings">
|
|
|
|
<div class="nav">
|
2018-04-15 01:04:40 +09:00
|
|
|
<p :class="{ active: page == 'profile' }" @mousedown="page = 'profile'">%fa:user .fw%%i18n:@profile%</p>
|
2018-02-12 22:18:13 +09:00
|
|
|
<p :class="{ active: page == 'web' }" @mousedown="page = 'web'">%fa:desktop .fw%Web</p>
|
2018-04-15 07:51:56 +09:00
|
|
|
<p :class="{ active: page == 'notification' }" @mousedown="page = 'notification'">%fa:R bell .fw%%i18n:@notification%</p>
|
2018-04-15 01:04:40 +09:00
|
|
|
<p :class="{ active: page == 'drive' }" @mousedown="page = 'drive'">%fa:cloud .fw%%i18n:@drive%</p>
|
2018-09-17 09:00:20 +09:00
|
|
|
<p :class="{ active: page == 'hashtags' }" @mousedown="page = 'hashtags'">%fa:hashtag .fw%%i18n:@tags%</p>
|
2018-04-15 01:04:40 +09:00
|
|
|
<p :class="{ active: page == 'mute' }" @mousedown="page = 'mute'">%fa:ban .fw%%i18n:@mute%</p>
|
2018-04-15 07:51:56 +09:00
|
|
|
<p :class="{ active: page == 'apps' }" @mousedown="page = 'apps'">%fa:puzzle-piece .fw%%i18n:@apps%</p>
|
2018-02-12 22:18:13 +09:00
|
|
|
<p :class="{ active: page == 'twitter' }" @mousedown="page = 'twitter'">%fa:B twitter .fw%Twitter</p>
|
2018-04-15 01:04:40 +09:00
|
|
|
<p :class="{ active: page == 'security' }" @mousedown="page = 'security'">%fa:unlock-alt .fw%%i18n:@security%</p>
|
2018-02-12 22:18:13 +09:00
|
|
|
<p :class="{ active: page == 'api' }" @mousedown="page = 'api'">%fa:key .fw%API</p>
|
2018-04-15 01:04:40 +09:00
|
|
|
<p :class="{ active: page == 'other' }" @mousedown="page = 'other'">%fa:cogs .fw%%i18n:@other%</p>
|
2018-02-12 22:18:13 +09:00
|
|
|
</div>
|
|
|
|
<div class="pages">
|
|
|
|
<section class="profile" v-show="page == 'profile'">
|
2018-04-15 01:04:40 +09:00
|
|
|
<h1>%i18n:@profile%</h1>
|
2018-02-20 23:22:19 +09:00
|
|
|
<x-profile/>
|
2018-02-12 22:18:13 +09:00
|
|
|
</section>
|
|
|
|
|
2018-09-29 00:01:11 +09:00
|
|
|
<section class="web" v-show="page == 'web'">
|
|
|
|
<h1>%i18n:@theme%</h1>
|
|
|
|
<mk-theme/>
|
|
|
|
</section>
|
|
|
|
|
2018-03-05 20:09:26 +09:00
|
|
|
<section class="web" v-show="page == 'web'">
|
2018-05-19 03:33:55 +09:00
|
|
|
<h1>%i18n:@behaviour%</h1>
|
2018-09-28 21:48:53 +09:00
|
|
|
<ui-switch v-model="fetchOnScroll">
|
|
|
|
%i18n:@fetch-on-scroll%
|
|
|
|
<span slot="desc">%i18n:@fetch-on-scroll-desc%</span>
|
|
|
|
</ui-switch>
|
|
|
|
<ui-switch v-model="autoPopout">
|
|
|
|
%i18n:@auto-popout%
|
|
|
|
<span slot="desc">%i18n:@auto-popout-desc%</span>
|
|
|
|
</ui-switch>
|
2018-09-07 21:13:15 +09:00
|
|
|
|
|
|
|
<section>
|
|
|
|
<header>%i18n:@note-visibility%</header>
|
2018-09-27 12:55:10 +09:00
|
|
|
<ui-switch v-model="rememberNoteVisibility">%i18n:@remember-note-visibility%</ui-switch>
|
2018-09-07 21:13:15 +09:00
|
|
|
<section>
|
|
|
|
<header>%i18n:@default-note-visibility%</header>
|
|
|
|
<ui-select v-model="defaultNoteVisibility">
|
|
|
|
<option value="public">%i18n:common.note-visibility.public%</option>
|
|
|
|
<option value="home">%i18n:common.note-visibility.home%</option>
|
|
|
|
<option value="followers">%i18n:common.note-visibility.followers%</option>
|
|
|
|
<option value="specified">%i18n:common.note-visibility.specified%</option>
|
|
|
|
<option value="private">%i18n:common.note-visibility.private%</option>
|
|
|
|
</ui-select>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
|
2018-04-12 06:18:55 +09:00
|
|
|
<details>
|
2018-05-19 03:33:55 +09:00
|
|
|
<summary>%i18n:@advanced%</summary>
|
2018-09-28 21:48:53 +09:00
|
|
|
<ui-switch v-model="apiViaStream">
|
|
|
|
%i18n:@api-via-stream%
|
|
|
|
<span slot="desc">%i18n:@api-via-stream-desc%</span>
|
|
|
|
</ui-switch>
|
2018-04-12 06:18:55 +09:00
|
|
|
</details>
|
2018-03-05 20:09:26 +09:00
|
|
|
</section>
|
|
|
|
|
2018-02-12 22:18:13 +09:00
|
|
|
<section class="web" v-show="page == 'web'">
|
2018-05-19 03:33:55 +09:00
|
|
|
<h1>%i18n:@display%</h1>
|
2018-03-02 18:46:08 +09:00
|
|
|
<div class="div">
|
2018-05-19 03:33:55 +09:00
|
|
|
<button class="ui button" @click="customizeHome" style="margin-bottom: 16px">%i18n:@customize%</button>
|
2018-04-20 03:41:24 +09:00
|
|
|
</div>
|
|
|
|
<div class="div">
|
2018-06-07 05:14:37 +09:00
|
|
|
<button class="ui" @click="updateWallpaper">%i18n:@choose-wallpaper%</button>
|
2018-06-07 06:15:57 +09:00
|
|
|
<button class="ui" @click="deleteWallpaper">%i18n:@delete-wallpaper%</button>
|
2018-09-27 12:55:10 +09:00
|
|
|
<ui-switch v-model="darkmode">%i18n:@dark-mode%</ui-switch>
|
|
|
|
<ui-switch v-model="useShadow">%i18n:@use-shadow%</ui-switch>
|
|
|
|
<ui-switch v-model="roundedCorners">%i18n:@rounded-corners%</ui-switch>
|
|
|
|
<ui-switch v-model="circleIcons">%i18n:@circle-icons%</ui-switch>
|
|
|
|
<ui-switch v-model="reduceMotion">%i18n:common.reduce-motion%</ui-switch>
|
|
|
|
<ui-switch v-model="contrastedAcct">%i18n:@contrasted-acct%</ui-switch>
|
|
|
|
<ui-switch v-model="showFullAcct">%i18n:common.show-full-acct%</ui-switch>
|
|
|
|
<ui-switch v-model="iLikeSushi">%i18n:common.i-like-sushi%</ui-switch>
|
2018-02-23 02:06:35 +09:00
|
|
|
</div>
|
2018-09-27 12:55:10 +09:00
|
|
|
<ui-switch v-model="showPostFormOnTopOfTl">%i18n:@post-form-on-timeline%</ui-switch>
|
|
|
|
<ui-switch v-model="suggestRecentHashtags">%i18n:@suggest-recent-hashtags%</ui-switch>
|
|
|
|
<ui-switch v-model="showClockOnHeader">%i18n:@show-clock-on-header%</ui-switch>
|
|
|
|
<ui-switch v-model="alwaysShowNsfw">%i18n:common.always-show-nsfw%</ui-switch>
|
|
|
|
<ui-switch v-model="showReplyTarget">%i18n:@show-reply-target%</ui-switch>
|
|
|
|
<ui-switch v-model="showMyRenotes">%i18n:@show-my-renotes%</ui-switch>
|
|
|
|
<ui-switch v-model="showRenotedMyNotes">%i18n:@show-renoted-my-notes%</ui-switch>
|
|
|
|
<ui-switch v-model="showLocalRenotes">%i18n:@show-local-renotes%</ui-switch>
|
2018-09-28 21:48:53 +09:00
|
|
|
<ui-switch v-model="showMaps">%i18n:@show-maps%</ui-switch>
|
2018-09-27 12:55:10 +09:00
|
|
|
<ui-switch v-model="disableAnimatedMfm">%i18n:common.disable-animated-mfm%</ui-switch>
|
|
|
|
<ui-switch v-model="games_reversi_showBoardLabels">%i18n:common.show-reversi-board-labels%</ui-switch>
|
|
|
|
<ui-switch v-model="games_reversi_useContrastStones">%i18n:common.use-contrast-reversi-stones%</ui-switch>
|
2018-03-03 09:49:47 +09:00
|
|
|
</section>
|
|
|
|
|
2018-03-04 18:50:30 +09:00
|
|
|
<section class="web" v-show="page == 'web'">
|
2018-05-19 03:33:55 +09:00
|
|
|
<h1>%i18n:@sound%</h1>
|
2018-09-28 21:48:53 +09:00
|
|
|
<ui-switch v-model="enableSounds">
|
|
|
|
%i18n:@enable-sounds%
|
|
|
|
<span slot="desc">%i18n:@enable-sounds-desc%</span>
|
|
|
|
</ui-switch>
|
2018-05-19 03:33:55 +09:00
|
|
|
<label>%i18n:@volume%</label>
|
2018-09-15 21:48:10 +09:00
|
|
|
<input type="range"
|
2018-03-06 18:06:45 +09:00
|
|
|
v-model="soundVolume"
|
|
|
|
:disabled="!enableSounds"
|
2018-09-15 21:48:10 +09:00
|
|
|
max="1"
|
|
|
|
step="0.1"
|
2018-03-06 18:06:45 +09:00
|
|
|
/>
|
2018-05-19 03:33:55 +09:00
|
|
|
<button class="ui button" @click="soundTest">%fa:volume-up% %i18n:@test%</button>
|
2018-03-04 18:50:30 +09:00
|
|
|
</section>
|
|
|
|
|
2018-03-04 09:39:25 +09:00
|
|
|
<section class="web" v-show="page == 'web'">
|
2018-05-19 03:33:55 +09:00
|
|
|
<h1>%i18n:@mobile%</h1>
|
2018-09-27 12:55:10 +09:00
|
|
|
<ui-switch v-model="disableViaMobile">%i18n:@disable-via-mobile%</ui-switch>
|
2018-03-04 09:39:25 +09:00
|
|
|
</section>
|
|
|
|
|
2018-03-03 09:49:47 +09:00
|
|
|
<section class="web" v-show="page == 'web'">
|
2018-05-19 03:33:55 +09:00
|
|
|
<h1>%i18n:@language%</h1>
|
2018-09-15 21:48:10 +09:00
|
|
|
<select v-model="lang" placeholder="%i18n:@pick-language%">
|
|
|
|
<optgroup label="%i18n:@recommended%">
|
|
|
|
<option value="">%i18n:@auto%</option>
|
|
|
|
</optgroup>
|
|
|
|
|
|
|
|
<optgroup label="%i18n:@specify-language%">
|
|
|
|
<option v-for="x in langs" :value="x[0]" :key="x[0]">{{ x[1] }}</option>
|
|
|
|
</optgroup>
|
|
|
|
</select>
|
2018-03-03 11:13:28 +09:00
|
|
|
<div class="none ui info">
|
2018-05-19 03:33:55 +09:00
|
|
|
<p>%fa:info-circle%%i18n:@language-desc%</p>
|
2018-03-03 11:13:28 +09:00
|
|
|
</div>
|
2018-03-02 18:46:08 +09:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="web" v-show="page == 'web'">
|
2018-05-19 03:33:55 +09:00
|
|
|
<h1>%i18n:@cache%</h1>
|
|
|
|
<button class="ui button" @click="clean">%i18n:@clean-cache%</button>
|
2018-03-03 11:13:28 +09:00
|
|
|
<div class="none ui info warn">
|
2018-05-19 03:33:55 +09:00
|
|
|
<p>%fa:exclamation-triangle%%i18n:@cache-warn%</p>
|
2018-03-02 18:46:08 +09:00
|
|
|
</div>
|
2018-02-12 22:18:13 +09:00
|
|
|
</section>
|
|
|
|
|
2018-03-05 08:07:09 +09:00
|
|
|
<section class="notification" v-show="page == 'notification'">
|
2018-05-18 03:07:11 +09:00
|
|
|
<h1>%i18n:@notification%</h1>
|
2018-09-28 21:48:53 +09:00
|
|
|
<ui-switch v-model="$store.state.i.settings.autoWatch" @change="onChangeAutoWatch">
|
|
|
|
%i18n:@auto-watch%
|
|
|
|
<span slot="desc">%i18n:@auto-watch-desc%</span>
|
|
|
|
</ui-switch>
|
2018-03-05 08:07:09 +09:00
|
|
|
</section>
|
|
|
|
|
2018-02-12 22:18:13 +09:00
|
|
|
<section class="drive" v-show="page == 'drive'">
|
2018-04-15 01:04:40 +09:00
|
|
|
<h1>%i18n:@drive%</h1>
|
2018-03-05 18:37:12 +09:00
|
|
|
<x-drive/>
|
2018-02-12 22:18:13 +09:00
|
|
|
</section>
|
|
|
|
|
2018-09-17 09:00:20 +09:00
|
|
|
<section class="hashtags" v-show="page == 'hashtags'">
|
|
|
|
<h1>%i18n:@tags%</h1>
|
|
|
|
<x-tags/>
|
|
|
|
</section>
|
|
|
|
|
2018-02-12 22:18:13 +09:00
|
|
|
<section class="mute" v-show="page == 'mute'">
|
2018-04-15 01:04:40 +09:00
|
|
|
<h1>%i18n:@mute%</h1>
|
2018-02-22 01:25:57 +09:00
|
|
|
<x-mute/>
|
2018-02-12 22:18:13 +09:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="apps" v-show="page == 'apps'">
|
2018-05-18 03:07:11 +09:00
|
|
|
<h1>%i18n:@apps%</h1>
|
2018-03-05 18:11:07 +09:00
|
|
|
<x-apps/>
|
2018-02-12 22:18:13 +09:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="twitter" v-show="page == 'twitter'">
|
|
|
|
<h1>Twitter</h1>
|
|
|
|
<mk-twitter-setting/>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="password" v-show="page == 'security'">
|
2018-04-15 01:04:40 +09:00
|
|
|
<h1>%i18n:@password%</h1>
|
2018-02-22 01:25:57 +09:00
|
|
|
<x-password/>
|
2018-02-12 22:18:13 +09:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="2fa" v-show="page == 'security'">
|
2018-04-15 01:04:40 +09:00
|
|
|
<h1>%i18n:@2fa%</h1>
|
2018-02-22 01:25:57 +09:00
|
|
|
<x-2fa/>
|
2018-02-12 22:18:13 +09:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="signin" v-show="page == 'security'">
|
2018-05-18 03:07:11 +09:00
|
|
|
<h1>%i18n:@signin%</h1>
|
2018-03-05 18:11:07 +09:00
|
|
|
<x-signins/>
|
2018-02-12 22:18:13 +09:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="api" v-show="page == 'api'">
|
|
|
|
<h1>API</h1>
|
2018-02-22 21:15:24 +09:00
|
|
|
<x-api/>
|
2018-02-12 22:18:13 +09:00
|
|
|
</section>
|
|
|
|
|
2018-03-03 09:49:47 +09:00
|
|
|
<section class="other" v-show="page == 'other'">
|
2018-05-19 03:33:55 +09:00
|
|
|
<h1>%i18n:@about%</h1>
|
|
|
|
<p v-if="meta">%i18n:@operator%: <i><a :href="meta.maintainer.url" target="_blank">{{ meta.maintainer.name }}</a></i></p>
|
2018-03-03 09:49:47 +09:00
|
|
|
</section>
|
|
|
|
|
2018-03-02 18:46:08 +09:00
|
|
|
<section class="other" v-show="page == 'other'">
|
2018-05-19 03:33:55 +09:00
|
|
|
<h1>%i18n:@update%</h1>
|
2018-03-02 18:46:08 +09:00
|
|
|
<p>
|
2018-05-19 03:33:55 +09:00
|
|
|
<span>%i18n:@version% <i>{{ version }}</i></span>
|
2018-03-02 18:46:08 +09:00
|
|
|
<template v-if="latestVersion !== undefined">
|
|
|
|
<br>
|
2018-05-19 03:33:55 +09:00
|
|
|
<span>%i18n:@latest-version% <i>{{ latestVersion ? latestVersion : version }}</i></span>
|
2018-03-02 18:46:08 +09:00
|
|
|
</template>
|
|
|
|
</p>
|
2018-03-04 14:10:14 +09:00
|
|
|
<button class="ui button block" @click="checkForUpdate" :disabled="checkingForUpdate">
|
2018-05-19 03:33:55 +09:00
|
|
|
<template v-if="checkingForUpdate">%i18n:@update-checking%<mk-ellipsis/></template>
|
|
|
|
<template v-else>%i18n:@do-update%</template>
|
2018-03-02 18:46:08 +09:00
|
|
|
</button>
|
2018-03-04 14:10:14 +09:00
|
|
|
<details>
|
2018-05-19 03:33:55 +09:00
|
|
|
<summary>%i18n:@update-settings%</summary>
|
2018-09-28 21:48:53 +09:00
|
|
|
<ui-switch v-model="preventUpdate">
|
|
|
|
%i18n:@prevent-update%
|
|
|
|
<span slot="desc">%i18n:@prevent-update-desc%</span>
|
|
|
|
</ui-switch>
|
2018-03-04 14:10:14 +09:00
|
|
|
</details>
|
2018-03-02 18:46:08 +09:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="other" v-show="page == 'other'">
|
2018-05-19 03:33:55 +09:00
|
|
|
<h1>%i18n:@advanced-settings%</h1>
|
2018-09-28 21:48:53 +09:00
|
|
|
<ui-switch v-model="debug">
|
|
|
|
%i18n:@debug-mode%
|
|
|
|
<span slot="desc">%i18n:@debug-mode-desc%</span>
|
|
|
|
</ui-switch>
|
|
|
|
<ui-switch v-model="enableExperimentalFeatures">
|
|
|
|
%i18n:@experimental%
|
|
|
|
<span slot="desc">%i18n:@experimental-desc%</span>
|
|
|
|
</ui-switch>
|
2018-03-02 18:46:08 +09:00
|
|
|
</section>
|
2018-02-12 22:18:13 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-02-20 23:22:19 +09:00
|
|
|
import XProfile from './settings.profile.vue';
|
2018-02-22 01:25:57 +09:00
|
|
|
import XMute from './settings.mute.vue';
|
|
|
|
import XPassword from './settings.password.vue';
|
|
|
|
import X2fa from './settings.2fa.vue';
|
2018-02-22 21:15:24 +09:00
|
|
|
import XApi from './settings.api.vue';
|
2018-03-05 18:11:07 +09:00
|
|
|
import XApps from './settings.apps.vue';
|
|
|
|
import XSignins from './settings.signins.vue';
|
2018-03-05 18:37:12 +09:00
|
|
|
import XDrive from './settings.drive.vue';
|
2018-09-17 09:00:20 +09:00
|
|
|
import XTags from './settings.tags.vue';
|
2018-08-21 05:42:31 +09:00
|
|
|
import { url, langs, version } from '../../../config';
|
2018-03-02 18:46:08 +09:00
|
|
|
import checkForUpdate from '../../../common/scripts/check-for-update';
|
2018-02-19 16:58:37 +09:00
|
|
|
|
2018-02-12 22:18:13 +09:00
|
|
|
export default Vue.extend({
|
2018-02-19 16:58:37 +09:00
|
|
|
components: {
|
2018-02-22 01:25:57 +09:00
|
|
|
XProfile,
|
|
|
|
XMute,
|
|
|
|
XPassword,
|
2018-02-22 21:15:24 +09:00
|
|
|
X2fa,
|
2018-03-05 18:11:07 +09:00
|
|
|
XApi,
|
|
|
|
XApps,
|
2018-03-05 18:37:12 +09:00
|
|
|
XSignins,
|
2018-09-17 09:00:20 +09:00
|
|
|
XDrive,
|
|
|
|
XTags
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
initialPage: {
|
|
|
|
type: String,
|
|
|
|
required: false
|
|
|
|
}
|
2018-02-19 16:58:37 +09:00
|
|
|
},
|
2018-02-12 22:18:13 +09:00
|
|
|
data() {
|
|
|
|
return {
|
2018-09-17 09:00:20 +09:00
|
|
|
page: this.initialPage || 'profile',
|
2018-03-03 07:32:18 +09:00
|
|
|
meta: null,
|
2018-03-02 18:46:08 +09:00
|
|
|
version,
|
2018-05-21 02:13:39 +09:00
|
|
|
langs,
|
2018-03-02 18:46:08 +09:00
|
|
|
latestVersion: undefined,
|
2018-05-24 05:28:46 +09:00
|
|
|
checkingForUpdate: false
|
2018-02-12 22:18:13 +09:00
|
|
|
};
|
2018-02-23 02:06:35 +09:00
|
|
|
},
|
2018-03-15 19:53:46 +09:00
|
|
|
computed: {
|
2018-09-16 21:40:48 +09:00
|
|
|
reduceMotion: {
|
|
|
|
get() { return this.$store.state.device.reduceMotion; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'reduceMotion', value }); }
|
2018-09-16 03:46:53 +09:00
|
|
|
},
|
|
|
|
|
2018-05-21 02:13:39 +09:00
|
|
|
apiViaStream: {
|
|
|
|
get() { return this.$store.state.device.apiViaStream; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'apiViaStream', value }); }
|
2018-04-22 17:28:21 +09:00
|
|
|
},
|
2018-05-21 02:13:39 +09:00
|
|
|
|
|
|
|
autoPopout: {
|
|
|
|
get() { return this.$store.state.device.autoPopout; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'autoPopout', value }); }
|
2018-03-04 18:50:30 +09:00
|
|
|
},
|
2018-05-21 02:13:39 +09:00
|
|
|
|
2018-05-24 05:28:46 +09:00
|
|
|
darkmode: {
|
|
|
|
get() { return this.$store.state.device.darkmode; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'darkmode', value }); }
|
|
|
|
},
|
|
|
|
|
2018-05-21 02:13:39 +09:00
|
|
|
enableSounds: {
|
|
|
|
get() { return this.$store.state.device.enableSounds; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'enableSounds', value }); }
|
2018-03-06 18:06:45 +09:00
|
|
|
},
|
2018-05-21 02:13:39 +09:00
|
|
|
|
|
|
|
soundVolume: {
|
|
|
|
get() { return this.$store.state.device.soundVolume; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'soundVolume', value }); }
|
2018-03-03 09:49:47 +09:00
|
|
|
},
|
2018-05-21 02:13:39 +09:00
|
|
|
|
|
|
|
lang: {
|
|
|
|
get() { return this.$store.state.device.lang; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'lang', value }); }
|
2018-03-04 14:10:14 +09:00
|
|
|
},
|
2018-05-21 02:13:39 +09:00
|
|
|
|
|
|
|
preventUpdate: {
|
|
|
|
get() { return this.$store.state.device.preventUpdate; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'preventUpdate', value }); }
|
2018-03-03 07:32:18 +09:00
|
|
|
},
|
2018-05-21 02:13:39 +09:00
|
|
|
|
|
|
|
debug: {
|
|
|
|
get() { return this.$store.state.device.debug; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'debug', value }); }
|
2018-03-15 12:56:50 +09:00
|
|
|
},
|
2018-05-21 02:13:39 +09:00
|
|
|
|
|
|
|
enableExperimentalFeatures: {
|
|
|
|
get() { return this.$store.state.device.enableExperimentalFeatures; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'enableExperimentalFeatures', value }); }
|
2018-09-14 15:14:59 +09:00
|
|
|
},
|
|
|
|
|
|
|
|
alwaysShowNsfw: {
|
|
|
|
get() { return this.$store.state.device.alwaysShowNsfw; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'alwaysShowNsfw', value }); }
|
|
|
|
},
|
|
|
|
|
2018-09-22 20:39:12 +09:00
|
|
|
useShadow: {
|
|
|
|
get() { return this.$store.state.settings.useShadow; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'useShadow', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
roundedCorners: {
|
|
|
|
get() { return this.$store.state.settings.roundedCorners; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'roundedCorners', value }); }
|
|
|
|
},
|
|
|
|
|
2018-09-14 15:14:59 +09:00
|
|
|
fetchOnScroll: {
|
|
|
|
get() { return this.$store.state.settings.fetchOnScroll; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'fetchOnScroll', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
rememberNoteVisibility: {
|
|
|
|
get() { return this.$store.state.settings.rememberNoteVisibility; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'rememberNoteVisibility', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
defaultNoteVisibility: {
|
|
|
|
get() { return this.$store.state.settings.defaultNoteVisibility; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'defaultNoteVisibility', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
showReplyTarget: {
|
|
|
|
get() { return this.$store.state.settings.showReplyTarget; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showReplyTarget', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
showMyRenotes: {
|
|
|
|
get() { return this.$store.state.settings.showMyRenotes; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showMyRenotes', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
showRenotedMyNotes: {
|
|
|
|
get() { return this.$store.state.settings.showRenotedMyNotes; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showRenotedMyNotes', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
showLocalRenotes: {
|
|
|
|
get() { return this.$store.state.settings.showLocalRenotes; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showLocalRenotes', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
showPostFormOnTopOfTl: {
|
|
|
|
get() { return this.$store.state.settings.showPostFormOnTopOfTl; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showPostFormOnTopOfTl', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
suggestRecentHashtags: {
|
|
|
|
get() { return this.$store.state.settings.suggestRecentHashtags; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'suggestRecentHashtags', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
showClockOnHeader: {
|
|
|
|
get() { return this.$store.state.settings.showClockOnHeader; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showClockOnHeader', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
showMaps: {
|
|
|
|
get() { return this.$store.state.settings.showMaps; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showMaps', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
circleIcons: {
|
|
|
|
get() { return this.$store.state.settings.circleIcons; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'circleIcons', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
contrastedAcct: {
|
|
|
|
get() { return this.$store.state.settings.contrastedAcct; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'contrastedAcct', value }); }
|
|
|
|
},
|
|
|
|
|
2018-09-14 20:33:27 +09:00
|
|
|
showFullAcct: {
|
|
|
|
get() { return this.$store.state.settings.showFullAcct; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showFullAcct', value }); }
|
|
|
|
},
|
|
|
|
|
2018-09-14 15:14:59 +09:00
|
|
|
iLikeSushi: {
|
|
|
|
get() { return this.$store.state.settings.iLikeSushi; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'iLikeSushi', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
games_reversi_showBoardLabels: {
|
|
|
|
get() { return this.$store.state.settings.games.reversi.showBoardLabels; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'games.reversi.showBoardLabels', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
games_reversi_useContrastStones: {
|
|
|
|
get() { return this.$store.state.settings.games.reversi.useContrastStones; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'games.reversi.useContrastStones', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
disableAnimatedMfm: {
|
|
|
|
get() { return this.$store.state.settings.disableAnimatedMfm; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'disableAnimatedMfm', value }); }
|
|
|
|
},
|
|
|
|
|
|
|
|
disableViaMobile: {
|
|
|
|
get() { return this.$store.state.settings.disableViaMobile; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'disableViaMobile', value }); }
|
2018-09-27 14:52:10 +09:00
|
|
|
}
|
2018-05-21 02:13:39 +09:00
|
|
|
},
|
2018-02-23 02:06:35 +09:00
|
|
|
created() {
|
2018-03-03 09:49:47 +09:00
|
|
|
(this as any).os.getMeta().then(meta => {
|
|
|
|
this.meta = meta;
|
|
|
|
});
|
2018-02-23 02:06:35 +09:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
customizeHome() {
|
|
|
|
this.$router.push('/i/customize-home');
|
|
|
|
this.$emit('done');
|
|
|
|
},
|
2018-06-07 05:14:37 +09:00
|
|
|
updateWallpaper() {
|
|
|
|
(this as any).apis.chooseDriveFile({
|
|
|
|
multiple: false
|
|
|
|
}).then(file => {
|
|
|
|
(this as any).api('i/update', {
|
|
|
|
wallpaperId: file.id
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
2018-06-07 06:15:57 +09:00
|
|
|
deleteWallpaper() {
|
|
|
|
(this as any).api('i/update', {
|
|
|
|
wallpaperId: null
|
|
|
|
});
|
|
|
|
},
|
2018-03-05 08:07:09 +09:00
|
|
|
onChangeAutoWatch(v) {
|
|
|
|
(this as any).api('i/update', {
|
2018-03-29 14:48:47 +09:00
|
|
|
autoWatch: v
|
2018-03-05 08:07:09 +09:00
|
|
|
});
|
|
|
|
},
|
2018-03-02 18:46:08 +09:00
|
|
|
checkForUpdate() {
|
|
|
|
this.checkingForUpdate = true;
|
|
|
|
checkForUpdate((this as any).os, true, true).then(newer => {
|
|
|
|
this.checkingForUpdate = false;
|
|
|
|
this.latestVersion = newer;
|
|
|
|
if (newer == null) {
|
|
|
|
(this as any).apis.dialog({
|
2018-05-20 20:26:38 +09:00
|
|
|
title: '%i18n:@no-updates%',
|
|
|
|
text: '%i18n:@no-updates-desc%'
|
2018-03-02 18:46:08 +09:00
|
|
|
});
|
|
|
|
} else {
|
|
|
|
(this as any).apis.dialog({
|
2018-05-20 20:26:38 +09:00
|
|
|
title: '%i18n:@update-available%',
|
|
|
|
text: '%i18n:@update-available-desc%'
|
2018-03-02 18:46:08 +09:00
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
clean() {
|
|
|
|
localStorage.clear();
|
|
|
|
(this as any).apis.dialog({
|
2018-05-20 20:26:38 +09:00
|
|
|
title: '%i18n:@cache-cleared%',
|
2018-07-08 20:15:10 +09:00
|
|
|
text: '%i18n:@cache-cleared-desc%'
|
2018-03-02 18:46:08 +09:00
|
|
|
});
|
2018-03-06 18:06:45 +09:00
|
|
|
},
|
|
|
|
soundTest() {
|
|
|
|
const sound = new Audio(`${url}/assets/message.mp3`);
|
2018-05-21 02:13:39 +09:00
|
|
|
sound.volume = this.$store.state.device.soundVolume;
|
2018-03-06 18:06:45 +09:00
|
|
|
sound.play();
|
2018-02-23 02:06:35 +09:00
|
|
|
}
|
2018-02-12 22:18:13 +09:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
2018-09-27 22:25:10 +09:00
|
|
|
.mk-settings
|
2018-02-12 22:18:13 +09:00
|
|
|
display flex
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
|
|
|
|
> .nav
|
|
|
|
flex 0 0 200px
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
padding 16px 0 0 0
|
|
|
|
overflow auto
|
2018-09-27 22:25:10 +09:00
|
|
|
border-right solid 1px var(--faceDivider)
|
2018-02-12 22:18:13 +09:00
|
|
|
|
|
|
|
> p
|
|
|
|
display block
|
|
|
|
padding 10px 16px
|
|
|
|
margin 0
|
2018-09-27 22:25:10 +09:00
|
|
|
color var(--desktopSettingsNavItem)
|
2018-02-12 22:18:13 +09:00
|
|
|
cursor pointer
|
|
|
|
user-select none
|
|
|
|
transition margin-left 0.2s ease
|
|
|
|
|
|
|
|
> [data-fa]
|
|
|
|
margin-right 4px
|
|
|
|
|
|
|
|
&:hover
|
2018-09-27 22:25:10 +09:00
|
|
|
color var(--desktopSettingsNavItemHover)
|
2018-02-12 22:18:13 +09:00
|
|
|
|
|
|
|
&.active
|
|
|
|
margin-left 8px
|
2018-09-26 20:19:35 +09:00
|
|
|
color var(--primary) !important
|
2018-02-12 22:18:13 +09:00
|
|
|
|
|
|
|
> .pages
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
flex auto
|
|
|
|
overflow auto
|
|
|
|
|
|
|
|
> section
|
|
|
|
margin 32px
|
2018-09-27 22:25:10 +09:00
|
|
|
color var(--text)
|
2018-02-12 22:18:13 +09:00
|
|
|
|
|
|
|
> h1
|
|
|
|
margin 0 0 1em 0
|
|
|
|
padding 0 0 8px 0
|
|
|
|
font-size 1em
|
2018-09-27 22:25:10 +09:00
|
|
|
border-bottom solid 1px var(--faceDivider)
|
2018-02-12 22:18:13 +09:00
|
|
|
|
2018-03-02 06:26:31 +09:00
|
|
|
&, >>> *
|
2018-03-04 14:10:14 +09:00
|
|
|
.ui.button.block
|
|
|
|
margin 16px 0
|
|
|
|
|
2018-03-02 06:26:31 +09:00
|
|
|
> section
|
|
|
|
margin 32px 0
|
|
|
|
|
|
|
|
> h2
|
|
|
|
margin 0 0 1em 0
|
|
|
|
padding 0 0 8px 0
|
|
|
|
font-size 1em
|
2018-09-27 22:25:10 +09:00
|
|
|
color var(--text)
|
|
|
|
border-bottom solid 1px var(--faceDivider)
|
2018-03-02 06:26:31 +09:00
|
|
|
|
2018-02-23 02:06:35 +09:00
|
|
|
> .web
|
2018-03-02 18:46:08 +09:00
|
|
|
> .div
|
2018-09-27 22:25:10 +09:00
|
|
|
border-bottom solid 1px var(--faceDivider)
|
2018-04-20 03:41:24 +09:00
|
|
|
margin 16px 0
|
2018-02-23 02:06:35 +09:00
|
|
|
|
2018-02-12 22:18:13 +09:00
|
|
|
</style>
|