2018-02-12 07:18:13 -06:00
|
|
|
<template>
|
|
|
|
<div class="mk-settings">
|
|
|
|
<div class="nav">
|
2018-04-14 11:04:40 -05:00
|
|
|
<p :class="{ active: page == 'profile' }" @mousedown="page = 'profile'">%fa:user .fw%%i18n:@profile%</p>
|
2018-02-12 07:18:13 -06:00
|
|
|
<p :class="{ active: page == 'web' }" @mousedown="page = 'web'">%fa:desktop .fw%Web</p>
|
2018-04-14 17:51:56 -05:00
|
|
|
<p :class="{ active: page == 'notification' }" @mousedown="page = 'notification'">%fa:R bell .fw%%i18n:@notification%</p>
|
2018-04-14 11:04:40 -05:00
|
|
|
<p :class="{ active: page == 'drive' }" @mousedown="page = 'drive'">%fa:cloud .fw%%i18n:@drive%</p>
|
|
|
|
<p :class="{ active: page == 'mute' }" @mousedown="page = 'mute'">%fa:ban .fw%%i18n:@mute%</p>
|
2018-04-14 17:51:56 -05:00
|
|
|
<p :class="{ active: page == 'apps' }" @mousedown="page = 'apps'">%fa:puzzle-piece .fw%%i18n:@apps%</p>
|
2018-02-12 07:18:13 -06:00
|
|
|
<p :class="{ active: page == 'twitter' }" @mousedown="page = 'twitter'">%fa:B twitter .fw%Twitter</p>
|
2018-04-14 11:04:40 -05:00
|
|
|
<p :class="{ active: page == 'security' }" @mousedown="page = 'security'">%fa:unlock-alt .fw%%i18n:@security%</p>
|
2018-02-12 07:18:13 -06:00
|
|
|
<p :class="{ active: page == 'api' }" @mousedown="page = 'api'">%fa:key .fw%API</p>
|
2018-04-14 11:04:40 -05:00
|
|
|
<p :class="{ active: page == 'other' }" @mousedown="page = 'other'">%fa:cogs .fw%%i18n:@other%</p>
|
2018-02-12 07:18:13 -06:00
|
|
|
</div>
|
|
|
|
<div class="pages">
|
|
|
|
<section class="profile" v-show="page == 'profile'">
|
2018-04-14 11:04:40 -05:00
|
|
|
<h1>%i18n:@profile%</h1>
|
2018-02-20 08:22:19 -06:00
|
|
|
<x-profile/>
|
2018-02-12 07:18:13 -06:00
|
|
|
</section>
|
|
|
|
|
2018-03-05 05:09:26 -06:00
|
|
|
<section class="web" v-show="page == 'web'">
|
2018-05-18 13:33:55 -05:00
|
|
|
<h1>%i18n:@behaviour%</h1>
|
2018-05-26 23:49:09 -05:00
|
|
|
<mk-switch v-model="$store.state.settings.fetchOnScroll" @change="onChangeFetchOnScroll" text="%i18n:@fetch-on-scroll%">
|
2018-05-18 13:33:55 -05:00
|
|
|
<span>%i18n:@fetch-on-scroll-desc%</span>
|
2018-03-05 05:09:26 -06:00
|
|
|
</mk-switch>
|
2018-05-18 13:33:55 -05:00
|
|
|
<mk-switch v-model="autoPopout" text="%i18n:@auto-popout%">
|
|
|
|
<span>%i18n:@auto-popout-desc%</span>
|
2018-03-14 02:12:36 -05:00
|
|
|
</mk-switch>
|
2018-09-07 07:13:15 -05:00
|
|
|
|
|
|
|
<section>
|
|
|
|
<header>%i18n:@note-visibility%</header>
|
|
|
|
<mk-switch v-model="$store.state.settings.rememberNoteVisibility" @change="onChangeRememberNoteVisibility" text="%i18n:@remember-note-visibility%"/>
|
|
|
|
<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-11 16:18:55 -05:00
|
|
|
<details>
|
2018-05-18 13:33:55 -05:00
|
|
|
<summary>%i18n:@advanced%</summary>
|
|
|
|
<mk-switch v-model="apiViaStream" text="%i18n:@api-via-stream%">
|
|
|
|
<span>%i18n:@api-via-stream-desc%</span>
|
2018-04-11 16:18:55 -05:00
|
|
|
</mk-switch>
|
|
|
|
</details>
|
2018-03-05 05:09:26 -06:00
|
|
|
</section>
|
|
|
|
|
2018-02-12 07:18:13 -06:00
|
|
|
<section class="web" v-show="page == 'web'">
|
2018-05-18 13:33:55 -05:00
|
|
|
<h1>%i18n:@display%</h1>
|
2018-03-02 03:46:08 -06:00
|
|
|
<div class="div">
|
2018-05-18 13:33:55 -05:00
|
|
|
<button class="ui button" @click="customizeHome" style="margin-bottom: 16px">%i18n:@customize%</button>
|
2018-04-19 13:41:24 -05:00
|
|
|
</div>
|
|
|
|
<div class="div">
|
2018-06-06 15:14:37 -05:00
|
|
|
<button class="ui" @click="updateWallpaper">%i18n:@choose-wallpaper%</button>
|
2018-06-06 16:15:57 -05:00
|
|
|
<button class="ui" @click="deleteWallpaper">%i18n:@delete-wallpaper%</button>
|
2018-05-18 13:33:55 -05:00
|
|
|
<mk-switch v-model="darkmode" text="%i18n:@dark-mode%"/>
|
2018-05-26 23:49:09 -05:00
|
|
|
<mk-switch v-model="$store.state.settings.circleIcons" @change="onChangeCircleIcons" text="%i18n:@circle-icons%"/>
|
2018-09-07 07:10:31 -05:00
|
|
|
<mk-switch v-model="$store.state.settings.contrastedAcct" @change="onChangeContrastedAcct" text="%i18n:@contrasted-acct%"/>
|
2018-05-26 23:49:09 -05:00
|
|
|
<mk-switch v-model="$store.state.settings.gradientWindowHeader" @change="onChangeGradientWindowHeader" text="%i18n:@gradient-window-header%"/>
|
2018-06-18 03:25:20 -05:00
|
|
|
<mk-switch v-model="$store.state.settings.iLikeSushi" @change="onChangeILikeSushi" text="%i18n:common.i-like-sushi%"/>
|
2018-02-22 11:06:35 -06:00
|
|
|
</div>
|
2018-05-26 23:49:09 -05:00
|
|
|
<mk-switch v-model="$store.state.settings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="%i18n:@post-form-on-timeline%"/>
|
2018-08-16 16:03:03 -05:00
|
|
|
<mk-switch v-model="$store.state.settings.suggestRecentHashtags" @change="onChangeSuggestRecentHashtags" text="%i18n:@suggest-recent-hashtags%"/>
|
2018-08-25 08:24:58 -05:00
|
|
|
<mk-switch v-model="$store.state.settings.showClockOnHeader" @change="onChangeShowClockOnHeader" text="%i18n:@show-clock-on-header%"/>
|
2018-05-26 23:49:09 -05:00
|
|
|
<mk-switch v-model="$store.state.settings.showReplyTarget" @change="onChangeShowReplyTarget" text="%i18n:@show-reply-target%"/>
|
|
|
|
<mk-switch v-model="$store.state.settings.showMyRenotes" @change="onChangeShowMyRenotes" text="%i18n:@show-my-renotes%"/>
|
|
|
|
<mk-switch v-model="$store.state.settings.showRenotedMyNotes" @change="onChangeShowRenotedMyNotes" text="%i18n:@show-renoted-my-notes%"/>
|
2018-08-16 09:59:22 -05:00
|
|
|
<mk-switch v-model="$store.state.settings.showLocalRenotes" @change="onChangeShowLocalRenotes" text="%i18n:@show-local-renotes%"/>
|
2018-05-26 23:49:09 -05:00
|
|
|
<mk-switch v-model="$store.state.settings.showMaps" @change="onChangeShowMaps" text="%i18n:@show-maps%">
|
2018-05-18 13:33:55 -05:00
|
|
|
<span>%i18n:@show-maps-desc%</span>
|
2018-03-05 17:35:25 -06:00
|
|
|
</mk-switch>
|
2018-08-04 08:48:35 -05:00
|
|
|
<mk-switch v-model="$store.state.settings.disableAnimatedMfm" @change="onChangeDisableAnimatedMfm" text="%i18n:common.disable-animated-mfm%"/>
|
2018-08-21 19:10:39 -05:00
|
|
|
<mk-switch v-model="$store.state.settings.games.reversi.showBoardLabels" @change="onChangeReversiBoardLabels" text="%i18n:common.show-reversi-board-labels%"/>
|
|
|
|
<mk-switch v-model="$store.state.settings.games.reversi.useContrastStones" @change="onChangeUseContrastReversiStones" text="%i18n:common.use-contrast-reversi-stones%"/>
|
2018-03-02 18:49:47 -06:00
|
|
|
</section>
|
|
|
|
|
2018-03-04 03:50:30 -06:00
|
|
|
<section class="web" v-show="page == 'web'">
|
2018-05-18 13:33:55 -05:00
|
|
|
<h1>%i18n:@sound%</h1>
|
|
|
|
<mk-switch v-model="enableSounds" text="%i18n:@enable-sounds%">
|
|
|
|
<span>%i18n:@enable-sounds-desc%</span>
|
2018-03-04 03:50:30 -06:00
|
|
|
</mk-switch>
|
2018-05-18 13:33:55 -05:00
|
|
|
<label>%i18n:@volume%</label>
|
2018-03-06 03:06:45 -06:00
|
|
|
<el-slider
|
|
|
|
v-model="soundVolume"
|
|
|
|
:show-input="true"
|
2018-05-20 12:13:39 -05:00
|
|
|
:format-tooltip="v => `${v * 100}%`"
|
2018-03-06 03:06:45 -06:00
|
|
|
:disabled="!enableSounds"
|
2018-05-20 12:13:39 -05:00
|
|
|
:max="1"
|
|
|
|
:step="0.1"
|
2018-03-06 03:06:45 -06:00
|
|
|
/>
|
2018-05-18 13:33:55 -05:00
|
|
|
<button class="ui button" @click="soundTest">%fa:volume-up% %i18n:@test%</button>
|
2018-03-04 03:50:30 -06:00
|
|
|
</section>
|
|
|
|
|
2018-03-03 18:39:25 -06:00
|
|
|
<section class="web" v-show="page == 'web'">
|
2018-05-18 13:33:55 -05:00
|
|
|
<h1>%i18n:@mobile%</h1>
|
2018-05-26 23:49:09 -05:00
|
|
|
<mk-switch v-model="$store.state.settings.disableViaMobile" @change="onChangeDisableViaMobile" text="%i18n:@disable-via-mobile%"/>
|
2018-03-03 18:39:25 -06:00
|
|
|
</section>
|
|
|
|
|
2018-03-02 18:49:47 -06:00
|
|
|
<section class="web" v-show="page == 'web'">
|
2018-05-18 13:33:55 -05:00
|
|
|
<h1>%i18n:@language%</h1>
|
|
|
|
<el-select v-model="lang" placeholder="%i18n:@pick-language%">
|
|
|
|
<el-option-group label="%i18n:@recommended%">
|
2018-05-20 12:13:39 -05:00
|
|
|
<el-option label="%i18n:@auto%" :value="null"/>
|
2018-03-02 18:49:47 -06:00
|
|
|
</el-option-group>
|
2018-05-18 13:33:55 -05:00
|
|
|
<el-option-group label="%i18n:@specify-language%">
|
2018-05-20 12:13:39 -05:00
|
|
|
<el-option v-for="x in langs" :label="x[1]" :value="x[0]" :key="x[0]"/>
|
2018-03-02 18:49:47 -06:00
|
|
|
</el-option-group>
|
|
|
|
</el-select>
|
2018-03-02 20:13:28 -06:00
|
|
|
<div class="none ui info">
|
2018-05-18 13:33:55 -05:00
|
|
|
<p>%fa:info-circle%%i18n:@language-desc%</p>
|
2018-03-02 20:13:28 -06:00
|
|
|
</div>
|
2018-03-02 03:46:08 -06:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="web" v-show="page == 'web'">
|
2018-05-18 13:33:55 -05:00
|
|
|
<h1>%i18n:@cache%</h1>
|
|
|
|
<button class="ui button" @click="clean">%i18n:@clean-cache%</button>
|
2018-03-02 20:13:28 -06:00
|
|
|
<div class="none ui info warn">
|
2018-05-18 13:33:55 -05:00
|
|
|
<p>%fa:exclamation-triangle%%i18n:@cache-warn%</p>
|
2018-03-02 03:46:08 -06:00
|
|
|
</div>
|
2018-02-12 07:18:13 -06:00
|
|
|
</section>
|
|
|
|
|
2018-03-04 17:07:09 -06:00
|
|
|
<section class="notification" v-show="page == 'notification'">
|
2018-05-17 13:07:11 -05:00
|
|
|
<h1>%i18n:@notification%</h1>
|
2018-05-26 23:49:09 -05:00
|
|
|
<mk-switch v-model="$store.state.i.settings.autoWatch" @change="onChangeAutoWatch" text="%i18n:@auto-watch%">
|
2018-05-18 13:33:55 -05:00
|
|
|
<span>%i18n:@auto-watch-desc%</span>
|
2018-03-04 17:07:09 -06:00
|
|
|
</mk-switch>
|
|
|
|
</section>
|
|
|
|
|
2018-02-12 07:18:13 -06:00
|
|
|
<section class="drive" v-show="page == 'drive'">
|
2018-04-14 11:04:40 -05:00
|
|
|
<h1>%i18n:@drive%</h1>
|
2018-03-05 03:37:12 -06:00
|
|
|
<x-drive/>
|
2018-02-12 07:18:13 -06:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="mute" v-show="page == 'mute'">
|
2018-04-14 11:04:40 -05:00
|
|
|
<h1>%i18n:@mute%</h1>
|
2018-02-21 10:25:57 -06:00
|
|
|
<x-mute/>
|
2018-02-12 07:18:13 -06:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="apps" v-show="page == 'apps'">
|
2018-05-17 13:07:11 -05:00
|
|
|
<h1>%i18n:@apps%</h1>
|
2018-03-05 03:11:07 -06:00
|
|
|
<x-apps/>
|
2018-02-12 07:18:13 -06: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-14 11:04:40 -05:00
|
|
|
<h1>%i18n:@password%</h1>
|
2018-02-21 10:25:57 -06:00
|
|
|
<x-password/>
|
2018-02-12 07:18:13 -06:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="2fa" v-show="page == 'security'">
|
2018-04-14 11:04:40 -05:00
|
|
|
<h1>%i18n:@2fa%</h1>
|
2018-02-21 10:25:57 -06:00
|
|
|
<x-2fa/>
|
2018-02-12 07:18:13 -06:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="signin" v-show="page == 'security'">
|
2018-05-17 13:07:11 -05:00
|
|
|
<h1>%i18n:@signin%</h1>
|
2018-03-05 03:11:07 -06:00
|
|
|
<x-signins/>
|
2018-02-12 07:18:13 -06:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="api" v-show="page == 'api'">
|
|
|
|
<h1>API</h1>
|
2018-02-22 06:15:24 -06:00
|
|
|
<x-api/>
|
2018-02-12 07:18:13 -06:00
|
|
|
</section>
|
|
|
|
|
2018-03-02 18:49:47 -06:00
|
|
|
<section class="other" v-show="page == 'other'">
|
2018-05-18 13:33:55 -05: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-02 18:49:47 -06:00
|
|
|
</section>
|
|
|
|
|
2018-03-02 03:46:08 -06:00
|
|
|
<section class="other" v-show="page == 'other'">
|
2018-05-18 13:33:55 -05:00
|
|
|
<h1>%i18n:@update%</h1>
|
2018-03-02 03:46:08 -06:00
|
|
|
<p>
|
2018-05-18 13:33:55 -05:00
|
|
|
<span>%i18n:@version% <i>{{ version }}</i></span>
|
2018-03-02 03:46:08 -06:00
|
|
|
<template v-if="latestVersion !== undefined">
|
|
|
|
<br>
|
2018-05-18 13:33:55 -05:00
|
|
|
<span>%i18n:@latest-version% <i>{{ latestVersion ? latestVersion : version }}</i></span>
|
2018-03-02 03:46:08 -06:00
|
|
|
</template>
|
|
|
|
</p>
|
2018-03-03 23:10:14 -06:00
|
|
|
<button class="ui button block" @click="checkForUpdate" :disabled="checkingForUpdate">
|
2018-05-18 13:33:55 -05:00
|
|
|
<template v-if="checkingForUpdate">%i18n:@update-checking%<mk-ellipsis/></template>
|
|
|
|
<template v-else>%i18n:@do-update%</template>
|
2018-03-02 03:46:08 -06:00
|
|
|
</button>
|
2018-03-03 23:10:14 -06:00
|
|
|
<details>
|
2018-05-18 13:33:55 -05:00
|
|
|
<summary>%i18n:@update-settings%</summary>
|
2018-05-18 17:22:39 -05:00
|
|
|
<mk-switch v-model="preventUpdate" text="%i18n:@prevent-update%">
|
2018-05-18 13:33:55 -05:00
|
|
|
<span>%i18n:@prevent-update-desc%</span>
|
2018-03-03 23:10:14 -06:00
|
|
|
</mk-switch>
|
|
|
|
</details>
|
2018-03-02 03:46:08 -06:00
|
|
|
</section>
|
|
|
|
|
|
|
|
<section class="other" v-show="page == 'other'">
|
2018-05-18 13:33:55 -05:00
|
|
|
<h1>%i18n:@advanced-settings%</h1>
|
|
|
|
<mk-switch v-model="debug" text="%i18n:@debug-mode%">
|
|
|
|
<span>%i18n:@debug-mode-desc%</span>
|
2018-03-02 03:46:08 -06:00
|
|
|
</mk-switch>
|
2018-05-20 12:13:39 -05:00
|
|
|
<mk-switch v-model="enableExperimentalFeatures" text="%i18n:@experimental%">
|
2018-05-18 13:33:55 -05:00
|
|
|
<span>%i18n:@experimental-desc%</span>
|
2018-03-14 22:56:50 -05:00
|
|
|
</mk-switch>
|
2018-03-15 05:53:46 -05:00
|
|
|
<details v-if="debug">
|
2018-05-18 13:33:55 -05:00
|
|
|
<summary>%i18n:@tools%</summary>
|
|
|
|
<button class="ui button block" @click="taskmngr">%i18n:@task-manager%</button>
|
2018-03-15 05:53:46 -05:00
|
|
|
</details>
|
2018-03-02 03:46:08 -06:00
|
|
|
</section>
|
2018-02-12 07:18:13 -06:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-02-20 08:22:19 -06:00
|
|
|
import XProfile from './settings.profile.vue';
|
2018-02-21 10:25:57 -06:00
|
|
|
import XMute from './settings.mute.vue';
|
|
|
|
import XPassword from './settings.password.vue';
|
|
|
|
import X2fa from './settings.2fa.vue';
|
2018-02-22 06:15:24 -06:00
|
|
|
import XApi from './settings.api.vue';
|
2018-03-05 03:11:07 -06:00
|
|
|
import XApps from './settings.apps.vue';
|
|
|
|
import XSignins from './settings.signins.vue';
|
2018-03-05 03:37:12 -06:00
|
|
|
import XDrive from './settings.drive.vue';
|
2018-08-20 15:42:31 -05:00
|
|
|
import { url, langs, version } from '../../../config';
|
2018-03-02 03:46:08 -06:00
|
|
|
import checkForUpdate from '../../../common/scripts/check-for-update';
|
2018-03-15 05:53:46 -05:00
|
|
|
import MkTaskManager from './taskmanager.vue';
|
2018-02-19 01:58:37 -06:00
|
|
|
|
2018-02-12 07:18:13 -06:00
|
|
|
export default Vue.extend({
|
2018-02-19 01:58:37 -06:00
|
|
|
components: {
|
2018-02-21 10:25:57 -06:00
|
|
|
XProfile,
|
|
|
|
XMute,
|
|
|
|
XPassword,
|
2018-02-22 06:15:24 -06:00
|
|
|
X2fa,
|
2018-03-05 03:11:07 -06:00
|
|
|
XApi,
|
|
|
|
XApps,
|
2018-03-05 03:37:12 -06:00
|
|
|
XSignins,
|
|
|
|
XDrive
|
2018-02-19 01:58:37 -06:00
|
|
|
},
|
2018-02-12 07:18:13 -06:00
|
|
|
data() {
|
|
|
|
return {
|
2018-02-22 11:06:35 -06:00
|
|
|
page: 'profile',
|
2018-03-02 16:32:18 -06:00
|
|
|
meta: null,
|
2018-03-02 03:46:08 -06:00
|
|
|
version,
|
2018-05-20 12:13:39 -05:00
|
|
|
langs,
|
2018-03-02 03:46:08 -06:00
|
|
|
latestVersion: undefined,
|
2018-05-23 15:28:46 -05:00
|
|
|
checkingForUpdate: false
|
2018-02-12 07:18:13 -06:00
|
|
|
};
|
2018-02-22 11:06:35 -06:00
|
|
|
},
|
2018-03-15 05:53:46 -05:00
|
|
|
computed: {
|
2018-05-20 12:13:39 -05:00
|
|
|
apiViaStream: {
|
|
|
|
get() { return this.$store.state.device.apiViaStream; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'apiViaStream', value }); }
|
2018-04-22 03:28:21 -05:00
|
|
|
},
|
2018-05-20 12:13:39 -05:00
|
|
|
|
2018-09-07 07:13:15 -05:00
|
|
|
defaultNoteVisibility: {
|
|
|
|
get() { return this.$store.state.settings.defaultNoteVisibility; },
|
|
|
|
set(value) { this.$store.commit('settings/set', { key: 'defaultNoteVisibility', value }); }
|
|
|
|
},
|
|
|
|
|
2018-05-20 12:13:39 -05:00
|
|
|
autoPopout: {
|
|
|
|
get() { return this.$store.state.device.autoPopout; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'autoPopout', value }); }
|
2018-03-04 03:50:30 -06:00
|
|
|
},
|
2018-05-20 12:13:39 -05:00
|
|
|
|
2018-05-23 15:28:46 -05:00
|
|
|
darkmode: {
|
|
|
|
get() { return this.$store.state.device.darkmode; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'darkmode', value }); }
|
|
|
|
},
|
|
|
|
|
2018-05-20 12:13:39 -05:00
|
|
|
enableSounds: {
|
|
|
|
get() { return this.$store.state.device.enableSounds; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'enableSounds', value }); }
|
2018-03-06 03:06:45 -06:00
|
|
|
},
|
2018-05-20 12:13:39 -05:00
|
|
|
|
|
|
|
soundVolume: {
|
|
|
|
get() { return this.$store.state.device.soundVolume; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'soundVolume', value }); }
|
2018-03-02 18:49:47 -06:00
|
|
|
},
|
2018-05-20 12:13:39 -05:00
|
|
|
|
|
|
|
lang: {
|
|
|
|
get() { return this.$store.state.device.lang; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'lang', value }); }
|
2018-03-03 23:10:14 -06:00
|
|
|
},
|
2018-05-20 12:13:39 -05:00
|
|
|
|
|
|
|
preventUpdate: {
|
|
|
|
get() { return this.$store.state.device.preventUpdate; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'preventUpdate', value }); }
|
2018-03-02 16:32:18 -06:00
|
|
|
},
|
2018-05-20 12:13:39 -05:00
|
|
|
|
|
|
|
debug: {
|
|
|
|
get() { return this.$store.state.device.debug; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'debug', value }); }
|
2018-03-14 22:56:50 -05:00
|
|
|
},
|
2018-05-20 12:13:39 -05:00
|
|
|
|
|
|
|
enableExperimentalFeatures: {
|
|
|
|
get() { return this.$store.state.device.enableExperimentalFeatures; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'enableExperimentalFeatures', value }); }
|
|
|
|
}
|
|
|
|
},
|
2018-02-22 11:06:35 -06:00
|
|
|
created() {
|
2018-03-02 18:49:47 -06:00
|
|
|
(this as any).os.getMeta().then(meta => {
|
|
|
|
this.meta = meta;
|
|
|
|
});
|
2018-02-22 11:06:35 -06:00
|
|
|
},
|
|
|
|
methods: {
|
2018-03-15 05:53:46 -05:00
|
|
|
taskmngr() {
|
|
|
|
(this as any).os.new(MkTaskManager);
|
|
|
|
},
|
2018-02-22 11:06:35 -06:00
|
|
|
customizeHome() {
|
|
|
|
this.$router.push('/i/customize-home');
|
|
|
|
this.$emit('done');
|
|
|
|
},
|
2018-06-06 15:14:37 -05:00
|
|
|
updateWallpaper() {
|
|
|
|
(this as any).apis.chooseDriveFile({
|
|
|
|
multiple: false
|
|
|
|
}).then(file => {
|
|
|
|
(this as any).api('i/update', {
|
|
|
|
wallpaperId: file.id
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
2018-06-06 16:15:57 -05:00
|
|
|
deleteWallpaper() {
|
|
|
|
(this as any).api('i/update', {
|
|
|
|
wallpaperId: null
|
|
|
|
});
|
|
|
|
},
|
2018-03-05 05:09:26 -06:00
|
|
|
onChangeFetchOnScroll(v) {
|
2018-04-29 03:17:15 -05:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'fetchOnScroll',
|
2018-03-05 05:09:26 -06:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-09-07 07:13:15 -05:00
|
|
|
onChangeRememberNoteVisibility(v) {
|
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'rememberNoteVisibility',
|
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-03-04 17:07:09 -06:00
|
|
|
onChangeAutoWatch(v) {
|
|
|
|
(this as any).api('i/update', {
|
2018-03-29 00:48:47 -05:00
|
|
|
autoWatch: v
|
2018-03-04 17:07:09 -06:00
|
|
|
});
|
|
|
|
},
|
2018-04-19 13:41:24 -05:00
|
|
|
onChangeDark(v) {
|
2018-04-29 03:17:15 -05:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'dark',
|
2018-04-19 13:41:24 -05:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-03-02 18:49:47 -06:00
|
|
|
onChangeShowPostFormOnTopOfTl(v) {
|
2018-04-29 03:17:15 -05:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'showPostFormOnTopOfTl',
|
2018-03-02 18:49:47 -06:00
|
|
|
value: v
|
2018-02-22 11:06:35 -06:00
|
|
|
});
|
2018-03-02 03:46:08 -06:00
|
|
|
},
|
2018-08-16 16:03:03 -05:00
|
|
|
onChangeSuggestRecentHashtags(v) {
|
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'suggestRecentHashtags',
|
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-08-25 08:24:58 -05:00
|
|
|
onChangeShowClockOnHeader(v) {
|
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'showClockOnHeader',
|
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-04-17 17:35:56 -05:00
|
|
|
onChangeShowReplyTarget(v) {
|
2018-04-29 03:17:15 -05:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'showReplyTarget',
|
2018-04-17 17:35:56 -05:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-04-20 21:42:38 -05:00
|
|
|
onChangeShowMyRenotes(v) {
|
2018-04-29 03:17:15 -05:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'showMyRenotes',
|
2018-04-20 21:42:38 -05:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
|
|
|
onChangeShowRenotedMyNotes(v) {
|
2018-04-29 03:17:15 -05:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'showRenotedMyNotes',
|
2018-04-20 21:42:38 -05:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-08-16 09:59:22 -05:00
|
|
|
onChangeShowLocalRenotes(v) {
|
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'showLocalRenotes',
|
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-03-05 17:35:25 -06:00
|
|
|
onChangeShowMaps(v) {
|
2018-04-29 03:17:15 -05:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'showMaps',
|
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
|
|
|
onChangeCircleIcons(v) {
|
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'circleIcons',
|
2018-03-05 17:35:25 -06:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-09-06 15:45:13 -05:00
|
|
|
onChangeContrastedAcct(v) {
|
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'contrastedAcct',
|
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-06-18 03:25:20 -05:00
|
|
|
onChangeILikeSushi(v) {
|
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'iLikeSushi',
|
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-06-23 02:55:52 -05:00
|
|
|
onChangeReversiBoardLabels(v) {
|
|
|
|
this.$store.dispatch('settings/set', {
|
2018-08-21 19:10:39 -05:00
|
|
|
key: 'games.reversi.showBoardLabels',
|
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
|
|
|
onChangeUseContrastReversiStones(v) {
|
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'games.reversi.useContrastStones',
|
2018-06-23 02:55:52 -05:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-08-04 08:48:35 -05:00
|
|
|
onChangeDisableAnimatedMfm(v) {
|
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'disableAnimatedMfm',
|
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-03-05 23:33:01 -06:00
|
|
|
onChangeGradientWindowHeader(v) {
|
2018-04-29 03:17:15 -05:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'gradientWindowHeader',
|
2018-03-05 23:33:01 -06:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-03-03 18:39:25 -06:00
|
|
|
onChangeDisableViaMobile(v) {
|
2018-04-29 03:17:15 -05:00
|
|
|
this.$store.dispatch('settings/set', {
|
|
|
|
key: 'disableViaMobile',
|
2018-03-03 18:39:25 -06:00
|
|
|
value: v
|
|
|
|
});
|
|
|
|
},
|
2018-03-02 03:46:08 -06: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 06:26:38 -05:00
|
|
|
title: '%i18n:@no-updates%',
|
|
|
|
text: '%i18n:@no-updates-desc%'
|
2018-03-02 03:46:08 -06:00
|
|
|
});
|
|
|
|
} else {
|
|
|
|
(this as any).apis.dialog({
|
2018-05-20 06:26:38 -05:00
|
|
|
title: '%i18n:@update-available%',
|
|
|
|
text: '%i18n:@update-available-desc%'
|
2018-03-02 03:46:08 -06:00
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
clean() {
|
|
|
|
localStorage.clear();
|
|
|
|
(this as any).apis.dialog({
|
2018-05-20 06:26:38 -05:00
|
|
|
title: '%i18n:@cache-cleared%',
|
2018-07-08 06:15:10 -05:00
|
|
|
text: '%i18n:@cache-cleared-desc%'
|
2018-03-02 03:46:08 -06:00
|
|
|
});
|
2018-03-06 03:06:45 -06:00
|
|
|
},
|
|
|
|
soundTest() {
|
|
|
|
const sound = new Audio(`${url}/assets/message.mp3`);
|
2018-05-20 12:13:39 -05:00
|
|
|
sound.volume = this.$store.state.device.soundVolume;
|
2018-03-06 03:06:45 -06:00
|
|
|
sound.play();
|
2018-02-22 11:06:35 -06:00
|
|
|
}
|
2018-02-12 07:18:13 -06:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
2018-03-02 22:47:55 -06:00
|
|
|
@import '~const.styl'
|
|
|
|
|
2018-04-19 14:51:04 -05:00
|
|
|
root(isDark)
|
2018-02-12 07:18:13 -06:00
|
|
|
display flex
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
|
|
|
|
> .nav
|
|
|
|
flex 0 0 200px
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
padding 16px 0 0 0
|
|
|
|
overflow auto
|
2018-04-19 14:51:04 -05:00
|
|
|
border-right solid 1px isDark ? #1c2023 : #ddd
|
2018-02-12 07:18:13 -06:00
|
|
|
|
|
|
|
> p
|
|
|
|
display block
|
|
|
|
padding 10px 16px
|
|
|
|
margin 0
|
2018-04-19 14:51:04 -05:00
|
|
|
color isDark ? #9aa2a7 : #666
|
2018-02-12 07:18:13 -06:00
|
|
|
cursor pointer
|
|
|
|
user-select none
|
|
|
|
transition margin-left 0.2s ease
|
|
|
|
|
|
|
|
> [data-fa]
|
|
|
|
margin-right 4px
|
|
|
|
|
|
|
|
&:hover
|
2018-04-19 14:51:04 -05:00
|
|
|
color isDark ? #fff : #555
|
2018-02-12 07:18:13 -06:00
|
|
|
|
|
|
|
&.active
|
|
|
|
margin-left 8px
|
|
|
|
color $theme-color !important
|
|
|
|
|
|
|
|
> .pages
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
flex auto
|
|
|
|
overflow auto
|
|
|
|
|
|
|
|
> section
|
|
|
|
margin 32px
|
2018-04-19 14:51:04 -05:00
|
|
|
color isDark ? #c4ccd2 : #4a535a
|
2018-02-12 07:18:13 -06:00
|
|
|
|
|
|
|
> h1
|
|
|
|
margin 0 0 1em 0
|
|
|
|
padding 0 0 8px 0
|
|
|
|
font-size 1em
|
2018-04-19 14:51:04 -05:00
|
|
|
color isDark ? #e3e7ea : #555
|
|
|
|
border-bottom solid 1px isDark ? #1c2023 : #eee
|
2018-02-12 07:18:13 -06:00
|
|
|
|
2018-03-01 15:26:31 -06:00
|
|
|
&, >>> *
|
2018-03-03 23:10:14 -06:00
|
|
|
.ui.button.block
|
|
|
|
margin 16px 0
|
|
|
|
|
2018-03-01 15:26:31 -06:00
|
|
|
> section
|
|
|
|
margin 32px 0
|
|
|
|
|
|
|
|
> h2
|
|
|
|
margin 0 0 1em 0
|
|
|
|
padding 0 0 8px 0
|
|
|
|
font-size 1em
|
2018-04-19 17:45:37 -05:00
|
|
|
color isDark ? #e3e7ea : #555
|
|
|
|
border-bottom solid 1px isDark ? #1c2023 : #eee
|
2018-03-01 15:26:31 -06:00
|
|
|
|
2018-02-22 11:06:35 -06:00
|
|
|
> .web
|
2018-03-02 03:46:08 -06:00
|
|
|
> .div
|
2018-04-19 14:51:04 -05:00
|
|
|
border-bottom solid 1px isDark ? #1c2023 : #eee
|
2018-04-19 13:41:24 -05:00
|
|
|
margin 16px 0
|
2018-02-22 11:06:35 -06:00
|
|
|
|
2018-04-19 14:51:04 -05:00
|
|
|
.mk-settings[data-darkmode]
|
|
|
|
root(true)
|
|
|
|
|
|
|
|
.mk-settings:not([data-darkmode])
|
|
|
|
root(false)
|
|
|
|
|
2018-02-12 07:18:13 -06:00
|
|
|
</style>
|