2018-02-12 15:18:13 +02:00
|
|
|
<template>
|
|
|
|
<div class="mk-settings">
|
|
|
|
<div class="nav">
|
2018-04-14 19:04:40 +03:00
|
|
|
<p :class="{ active: page == 'profile' }" @mousedown="page = 'profile'">%fa:user .fw%%i18n:@profile%</p>
|
2018-10-19 00:18:33 +03:00
|
|
|
<p :class="{ active: page == 'theme' }" @mousedown="page = 'theme'">%fa:palette .fw%%i18n:@theme%</p>
|
2018-02-12 15:18:13 +02:00
|
|
|
<p :class="{ active: page == 'web' }" @mousedown="page = 'web'">%fa:desktop .fw%Web</p>
|
2018-04-15 01:51:56 +03:00
|
|
|
<p :class="{ active: page == 'notification' }" @mousedown="page = 'notification'">%fa:R bell .fw%%i18n:@notification%</p>
|
2018-10-25 05:30:30 +03:00
|
|
|
<p :class="{ active: page == 'drive' }" @mousedown="page = 'drive'">%fa:cloud .fw%%i18n:common.drive%</p>
|
2018-09-17 03:00:20 +03:00
|
|
|
<p :class="{ active: page == 'hashtags' }" @mousedown="page = 'hashtags'">%fa:hashtag .fw%%i18n:@tags%</p>
|
2018-10-31 04:16:13 +02:00
|
|
|
<p :class="{ active: page == 'muteAndBlock' }" @mousedown="page = 'muteAndBlock'">%fa:ban .fw%%i18n:@mute-and-block%</p>
|
2018-04-15 01:51:56 +03:00
|
|
|
<p :class="{ active: page == 'apps' }" @mousedown="page = 'apps'">%fa:puzzle-piece .fw%%i18n:@apps%</p>
|
2018-04-14 19:04:40 +03:00
|
|
|
<p :class="{ active: page == 'security' }" @mousedown="page = 'security'">%fa:unlock-alt .fw%%i18n:@security%</p>
|
2018-02-12 15:18:13 +02:00
|
|
|
<p :class="{ active: page == 'api' }" @mousedown="page = 'api'">%fa:key .fw%API</p>
|
2018-04-14 19:04:40 +03:00
|
|
|
<p :class="{ active: page == 'other' }" @mousedown="page = 'other'">%fa:cogs .fw%%i18n:@other%</p>
|
2018-02-12 15:18:13 +02:00
|
|
|
</div>
|
|
|
|
<div class="pages">
|
2018-10-19 00:18:33 +03:00
|
|
|
<div class="profile" v-show="page == 'profile'">
|
|
|
|
<mk-profile-editor/>
|
|
|
|
|
|
|
|
<ui-card>
|
|
|
|
<div slot="title">%fa:B twitter% %i18n:@twitter%</div>
|
|
|
|
<section>
|
|
|
|
<mk-twitter-setting/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
2018-11-04 15:03:55 +02:00
|
|
|
|
|
|
|
<ui-card>
|
|
|
|
<div slot="title">%fa:B github% %i18n:@github%</div>
|
|
|
|
<section>
|
|
|
|
<mk-github-setting/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
2018-10-19 00:18:33 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<ui-card class="theme" v-show="page == 'theme'">
|
|
|
|
<div slot="title">%fa:palette% %i18n:@theme%</div>
|
|
|
|
|
|
|
|
<section>
|
|
|
|
<mk-theme/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="web" v-show="page == 'web'">
|
|
|
|
<div slot="title">%fa:sliders-h% %i18n:@behaviour%</div>
|
|
|
|
|
|
|
|
<section>
|
|
|
|
<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>
|
|
|
|
<ui-switch v-model="deckNav">%i18n:@deck-nav%<span slot="desc">%i18n:@deck-nav-desc%</span></ui-switch>
|
|
|
|
|
|
|
|
<details>
|
|
|
|
<summary>%i18n:@advanced%</summary>
|
|
|
|
<ui-switch v-model="apiViaStream">
|
|
|
|
%i18n:@api-via-stream%
|
|
|
|
<span slot="desc">%i18n:@api-via-stream-desc%</span>
|
|
|
|
</ui-switch>
|
|
|
|
</details>
|
|
|
|
</section>
|
2018-09-07 15:13:15 +03:00
|
|
|
|
2018-10-19 01:03:29 +03:00
|
|
|
<section>
|
|
|
|
<header>%i18n:@timeline%</header>
|
|
|
|
<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>
|
|
|
|
</section>
|
|
|
|
|
2018-09-07 15:13:15 +03:00
|
|
|
<section>
|
|
|
|
<header>%i18n:@note-visibility%</header>
|
2018-09-27 06:55:10 +03:00
|
|
|
<ui-switch v-model="rememberNoteVisibility">%i18n:@remember-note-visibility%</ui-switch>
|
2018-09-07 15:13:15 +03: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-10-19 00:18:33 +03:00
|
|
|
</ui-card>
|
2018-09-07 15:13:15 +03:00
|
|
|
|
2018-10-19 00:18:33 +03:00
|
|
|
<ui-card class="web" v-show="page == 'web'">
|
|
|
|
<div slot="title">%fa:desktop% %i18n:@display%</div>
|
|
|
|
|
|
|
|
<section>
|
2018-10-19 01:03:29 +03:00
|
|
|
<ui-switch v-model="showPostFormOnTopOfTl">%i18n:@post-form-on-timeline%</ui-switch>
|
2018-10-19 00:18:33 +03:00
|
|
|
<ui-button @click="customizeHome">%i18n:@customize%</ui-button>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<header>%i18n:@wallpaper%</header>
|
|
|
|
<ui-button @click="updateWallpaper">%i18n:@choose-wallpaper%</ui-button>
|
|
|
|
<ui-button @click="deleteWallpaper">%i18n:@delete-wallpaper%</ui-button>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<header>%i18n:@navbar-position%</header>
|
|
|
|
<ui-radio v-model="navbar" value="top">%i18n:@navbar-position-top%</ui-radio>
|
|
|
|
<ui-radio v-model="navbar" value="left">%i18n:@navbar-position-left%</ui-radio>
|
|
|
|
<ui-radio v-model="navbar" value="right">%i18n:@navbar-position-right%</ui-radio>
|
|
|
|
</section>
|
2018-10-19 05:10:49 +03:00
|
|
|
<section>
|
|
|
|
<ui-switch v-model="deckDefault">%i18n:@deck-default%</ui-switch>
|
|
|
|
</section>
|
2018-10-19 00:18:33 +03:00
|
|
|
<section>
|
2018-09-27 06:55:10 +03: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>
|
2018-11-05 12:20:35 +02:00
|
|
|
<ui-switch v-model="useOsDefaultEmojis">%i18n:common.use-os-default-emojis%</ui-switch>
|
2018-09-27 06:55:10 +03:00
|
|
|
<ui-switch v-model="iLikeSushi">%i18n:common.i-like-sushi%</ui-switch>
|
2018-10-19 00:18:33 +03:00
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<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="showMaps">%i18n:@show-maps%</ui-switch>
|
|
|
|
<ui-switch v-model="disableAnimatedMfm">%i18n:common.disable-animated-mfm%</ui-switch>
|
|
|
|
</section>
|
2018-10-19 00:47:55 +03:00
|
|
|
<section>
|
|
|
|
<header>%i18n:@deck-column-align%</header>
|
|
|
|
<ui-radio v-model="deckColumnAlign" value="center">%i18n:@deck-column-align-center%</ui-radio>
|
|
|
|
<ui-radio v-model="deckColumnAlign" value="left">%i18n:@deck-column-align-left%</ui-radio>
|
|
|
|
</section>
|
2018-10-19 01:03:29 +03:00
|
|
|
<section>
|
|
|
|
<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>
|
|
|
|
</section>
|
2018-10-19 00:18:33 +03:00
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="web" v-show="page == 'web'">
|
|
|
|
<div slot="title">%fa:volume-up% %i18n:@sound%</div>
|
2018-10-14 13:44:30 +03:00
|
|
|
|
|
|
|
<section>
|
2018-10-19 00:18:33 +03:00
|
|
|
<ui-switch v-model="enableSounds">
|
|
|
|
%i18n:@enable-sounds%
|
|
|
|
<span slot="desc">%i18n:@enable-sounds-desc%</span>
|
|
|
|
</ui-switch>
|
|
|
|
<label>%i18n:@volume%</label>
|
|
|
|
<input type="range"
|
|
|
|
v-model="soundVolume"
|
|
|
|
:disabled="!enableSounds"
|
|
|
|
max="1"
|
|
|
|
step="0.1"
|
|
|
|
/>
|
|
|
|
<ui-button @click="soundTest">%fa:volume-up% %i18n:@test%</ui-button>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="web" v-show="page == 'web'">
|
|
|
|
<div slot="title">%fa:language% %i18n:@language%</div>
|
|
|
|
<section class="fit-top">
|
|
|
|
<ui-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>
|
|
|
|
</ui-select>
|
|
|
|
<div class="none ui info">
|
|
|
|
<p>%fa:info-circle%%i18n:@language-desc%</p>
|
|
|
|
</div>
|
2018-10-14 13:44:30 +03:00
|
|
|
</section>
|
2018-10-19 00:18:33 +03:00
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="web" v-show="page == 'web'">
|
|
|
|
<div slot="title">%fa:trash-alt R% %i18n:@cache%</div>
|
|
|
|
<section>
|
|
|
|
<ui-button @click="clean">%i18n:@clean-cache%</ui-button>
|
|
|
|
<div class="none ui info warn">
|
|
|
|
<p>%fa:exclamation-triangle%%i18n:@cache-warn%</p>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="notification" v-show="page == 'notification'">
|
|
|
|
<div slot="title">%fa:bell R% %i18n:@notification%</div>
|
|
|
|
<section>
|
|
|
|
<ui-switch v-model="$store.state.i.settings.autoWatch" @change="onChangeAutoWatch">
|
|
|
|
%i18n:@auto-watch%
|
|
|
|
<span slot="desc">%i18n:@auto-watch-desc%</span>
|
2018-09-28 15:48:53 +03:00
|
|
|
</ui-switch>
|
2018-10-19 00:36:59 +03:00
|
|
|
<section>
|
|
|
|
<ui-button @click="readAllUnreadNotes">%i18n:@mark-as-read-all-unread-notes%</ui-button>
|
|
|
|
</section>
|
2018-10-19 00:18:33 +03:00
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
2018-10-25 05:30:30 +03:00
|
|
|
<div class="drive" v-if="page == 'drive'">
|
|
|
|
<mk-drive-settings/>
|
|
|
|
</div>
|
2018-10-19 00:18:33 +03:00
|
|
|
|
|
|
|
<ui-card class="hashtags" v-show="page == 'hashtags'">
|
|
|
|
<div slot="title">%fa:hashtag% %i18n:@tags%</div>
|
|
|
|
<section>
|
|
|
|
<x-tags/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
2018-10-31 04:16:13 +02:00
|
|
|
<div class="muteAndBlock" v-show="page == 'muteAndBlock'">
|
|
|
|
<mk-mute-and-block/>
|
|
|
|
</div>
|
2018-10-30 21:59:01 +02:00
|
|
|
|
2018-10-19 00:18:33 +03:00
|
|
|
<ui-card class="apps" v-show="page == 'apps'">
|
|
|
|
<div slot="title">%fa:puzzle-piece% %i18n:@apps%</div>
|
|
|
|
<section>
|
|
|
|
<x-apps/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="password" v-show="page == 'security'">
|
|
|
|
<div slot="title">%fa:unlock-alt% %i18n:@password%</div>
|
|
|
|
<section>
|
2018-11-03 14:53:03 +02:00
|
|
|
<mk-password-settings/>
|
2018-10-19 00:18:33 +03:00
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="2fa" v-show="page == 'security'">
|
|
|
|
<div slot="title">%fa:mobile-alt% %i18n:@2fa%</div>
|
|
|
|
<section>
|
|
|
|
<x-2fa/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="signin" v-show="page == 'security'">
|
|
|
|
<div slot="title">%fa:sign-in-alt% %i18n:@signin%</div>
|
|
|
|
<section>
|
|
|
|
<x-signins/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
2018-10-26 02:37:30 +03:00
|
|
|
<div class="api" v-show="page == 'api'">
|
|
|
|
<mk-api-settings/>
|
|
|
|
</div>
|
2018-10-19 00:18:33 +03:00
|
|
|
|
|
|
|
<ui-card class="other" v-show="page == 'other'">
|
|
|
|
<div slot="title">%fa:info-circle% %i18n:@about%</div>
|
|
|
|
<section>
|
|
|
|
<p v-if="meta">%i18n:@operator%: <i><a :href="meta.maintainer.url" target="_blank">{{ meta.maintainer.name }}</a></i></p>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="other" v-show="page == 'other'">
|
|
|
|
<div slot="title">%fa:sync-alt% %i18n:@update%</div>
|
|
|
|
<section>
|
|
|
|
<p>
|
|
|
|
<span>%i18n:@version% <i>{{ version }}</i></span>
|
|
|
|
<template v-if="latestVersion !== undefined">
|
|
|
|
<br>
|
|
|
|
<span>%i18n:@latest-version% <i>{{ latestVersion ? latestVersion : version }}</i></span>
|
|
|
|
</template>
|
|
|
|
</p>
|
|
|
|
<button class="ui button block" @click="checkForUpdate" :disabled="checkingForUpdate">
|
|
|
|
<template v-if="checkingForUpdate">%i18n:@update-checking%<mk-ellipsis/></template>
|
|
|
|
<template v-else>%i18n:@do-update%</template>
|
|
|
|
</button>
|
|
|
|
<details>
|
|
|
|
<summary>%i18n:@update-settings%</summary>
|
|
|
|
<ui-switch v-model="preventUpdate">
|
|
|
|
%i18n:@prevent-update%
|
|
|
|
<span slot="desc">%i18n:@prevent-update-desc%</span>
|
|
|
|
</ui-switch>
|
|
|
|
</details>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="other" v-show="page == 'other'">
|
|
|
|
<div slot="title">%fa:cogs% %i18n:@advanced-settings%</div>
|
|
|
|
<section>
|
|
|
|
<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>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
2018-02-12 15:18:13 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-02-21 18:25:57 +02:00
|
|
|
import X2fa from './settings.2fa.vue';
|
2018-03-05 11:11:07 +02:00
|
|
|
import XApps from './settings.apps.vue';
|
|
|
|
import XSignins from './settings.signins.vue';
|
2018-09-17 03:00:20 +03:00
|
|
|
import XTags from './settings.tags.vue';
|
2018-11-03 10:04:33 +02:00
|
|
|
import { url, langs, clientVersion as version } from '../../../config';
|
2018-03-02 11:46:08 +02:00
|
|
|
import checkForUpdate from '../../../common/scripts/check-for-update';
|
2018-02-19 09:58:37 +02:00
|
|
|
|
2018-02-12 15:18:13 +02:00
|
|
|
export default Vue.extend({
|
2018-02-19 09:58:37 +02:00
|
|
|
components: {
|
2018-02-22 14:15:24 +02:00
|
|
|
X2fa,
|
2018-03-05 11:11:07 +02:00
|
|
|
XApps,
|
2018-03-05 11:37:12 +02:00
|
|
|
XSignins,
|
2018-09-17 03:00:20 +03:00
|
|
|
XTags
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
initialPage: {
|
|
|
|
type: String,
|
|
|
|
required: false
|
|
|
|
}
|
2018-02-19 09:58:37 +02:00
|
|
|
},
|
2018-02-12 15:18:13 +02:00
|
|
|
data() {
|
|
|
|
return {
|
2018-09-17 03:00:20 +03:00
|
|
|
page: this.initialPage || 'profile',
|
2018-03-03 00:32:18 +02:00
|
|
|
meta: null,
|
2018-03-02 11:46:08 +02:00
|
|
|
version,
|
2018-05-20 20:13:39 +03:00
|
|
|
langs,
|
2018-03-02 11:46:08 +02:00
|
|
|
latestVersion: undefined,
|
2018-05-23 23:28:46 +03:00
|
|
|
checkingForUpdate: false
|
2018-02-12 15:18:13 +02:00
|
|
|
};
|
2018-02-22 19:06:35 +02:00
|
|
|
},
|
2018-03-15 12:53:46 +02:00
|
|
|
computed: {
|
2018-11-05 12:20:35 +02:00
|
|
|
useOsDefaultEmojis: {
|
|
|
|
get() { return this.$store.state.device.useOsDefaultEmojis; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'useOsDefaultEmojis', value }); }
|
|
|
|
},
|
|
|
|
|
2018-09-16 15:40:48 +03:00
|
|
|
reduceMotion: {
|
|
|
|
get() { return this.$store.state.device.reduceMotion; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'reduceMotion', value }); }
|
2018-09-15 21:46:53 +03:00
|
|
|
},
|
|
|
|
|
2018-05-20 20:13:39 +03:00
|
|
|
apiViaStream: {
|
|
|
|
get() { return this.$store.state.device.apiViaStream; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'apiViaStream', value }); }
|
2018-04-22 11:28:21 +03:00
|
|
|
},
|
2018-05-20 20:13:39 +03:00
|
|
|
|
|
|
|
autoPopout: {
|
|
|
|
get() { return this.$store.state.device.autoPopout; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'autoPopout', value }); }
|
2018-03-04 11:50:30 +02:00
|
|
|
},
|
2018-05-20 20:13:39 +03:00
|
|
|
|
2018-10-19 00:18:33 +03:00
|
|
|
deckNav: {
|
|
|
|
get() { return this.$store.state.settings.deckNav; },
|
|
|
|
set(value) { this.$store.commit('settings/set', { key: 'deckNav', value }); }
|
|
|
|
},
|
|
|
|
|
2018-05-23 23:28:46 +03:00
|
|
|
darkmode: {
|
|
|
|
get() { return this.$store.state.device.darkmode; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'darkmode', value }); }
|
|
|
|
},
|
|
|
|
|
2018-10-14 13:44:30 +03:00
|
|
|
navbar: {
|
|
|
|
get() { return this.$store.state.device.navbar; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'navbar', value }); }
|
|
|
|
},
|
|
|
|
|
2018-10-19 00:47:55 +03:00
|
|
|
deckColumnAlign: {
|
|
|
|
get() { return this.$store.state.device.deckColumnAlign; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'deckColumnAlign', value }); }
|
|
|
|
},
|
|
|
|
|
2018-10-19 05:10:49 +03:00
|
|
|
deckDefault: {
|
|
|
|
get() { return this.$store.state.device.deckDefault; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'deckDefault', value }); }
|
|
|
|
},
|
|
|
|
|
2018-05-20 20:13:39 +03:00
|
|
|
enableSounds: {
|
|
|
|
get() { return this.$store.state.device.enableSounds; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'enableSounds', value }); }
|
2018-03-06 11:06:45 +02:00
|
|
|
},
|
2018-05-20 20:13:39 +03:00
|
|
|
|
|
|
|
soundVolume: {
|
|
|
|
get() { return this.$store.state.device.soundVolume; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'soundVolume', value }); }
|
2018-03-03 02:49:47 +02:00
|
|
|
},
|
2018-05-20 20:13:39 +03:00
|
|
|
|
|
|
|
lang: {
|
|
|
|
get() { return this.$store.state.device.lang; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'lang', value }); }
|
2018-03-04 07:10:14 +02:00
|
|
|
},
|
2018-05-20 20:13:39 +03:00
|
|
|
|
|
|
|
preventUpdate: {
|
|
|
|
get() { return this.$store.state.device.preventUpdate; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'preventUpdate', value }); }
|
2018-03-03 00:32:18 +02:00
|
|
|
},
|
2018-05-20 20:13:39 +03:00
|
|
|
|
|
|
|
debug: {
|
|
|
|
get() { return this.$store.state.device.debug; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'debug', value }); }
|
2018-03-15 05:56:50 +02:00
|
|
|
},
|
2018-05-20 20:13:39 +03:00
|
|
|
|
|
|
|
enableExperimentalFeatures: {
|
|
|
|
get() { return this.$store.state.device.enableExperimentalFeatures; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'enableExperimentalFeatures', value }); }
|
2018-09-14 09:14:59 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
alwaysShowNsfw: {
|
|
|
|
get() { return this.$store.state.device.alwaysShowNsfw; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'alwaysShowNsfw', value }); }
|
|
|
|
},
|
|
|
|
|
2018-09-22 14:39:12 +03: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 09:14:59 +03: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 14:33:27 +03:00
|
|
|
showFullAcct: {
|
|
|
|
get() { return this.$store.state.settings.showFullAcct; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showFullAcct', value }); }
|
|
|
|
},
|
|
|
|
|
2018-09-14 09:14:59 +03: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 }); }
|
2018-09-27 08:52:10 +03:00
|
|
|
}
|
2018-05-20 20:13:39 +03:00
|
|
|
},
|
2018-02-22 19:06:35 +02:00
|
|
|
created() {
|
2018-03-03 02:49:47 +02:00
|
|
|
(this as any).os.getMeta().then(meta => {
|
|
|
|
this.meta = meta;
|
|
|
|
});
|
2018-02-22 19:06:35 +02:00
|
|
|
},
|
|
|
|
methods: {
|
2018-10-19 00:36:59 +03:00
|
|
|
readAllUnreadNotes() {
|
|
|
|
(this as any).api('i/read_all_unread_notes');
|
|
|
|
},
|
2018-02-22 19:06:35 +02:00
|
|
|
customizeHome() {
|
|
|
|
this.$router.push('/i/customize-home');
|
|
|
|
this.$emit('done');
|
|
|
|
},
|
2018-06-06 23:14:37 +03:00
|
|
|
updateWallpaper() {
|
|
|
|
(this as any).apis.chooseDriveFile({
|
|
|
|
multiple: false
|
|
|
|
}).then(file => {
|
|
|
|
(this as any).api('i/update', {
|
|
|
|
wallpaperId: file.id
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
2018-06-07 00:15:57 +03:00
|
|
|
deleteWallpaper() {
|
|
|
|
(this as any).api('i/update', {
|
|
|
|
wallpaperId: null
|
|
|
|
});
|
|
|
|
},
|
2018-03-05 01:07:09 +02:00
|
|
|
onChangeAutoWatch(v) {
|
|
|
|
(this as any).api('i/update', {
|
2018-03-29 08:48:47 +03:00
|
|
|
autoWatch: v
|
2018-03-05 01:07:09 +02:00
|
|
|
});
|
|
|
|
},
|
2018-03-02 11:46:08 +02: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 14:26:38 +03:00
|
|
|
title: '%i18n:@no-updates%',
|
|
|
|
text: '%i18n:@no-updates-desc%'
|
2018-03-02 11:46:08 +02:00
|
|
|
});
|
|
|
|
} else {
|
|
|
|
(this as any).apis.dialog({
|
2018-05-20 14:26:38 +03:00
|
|
|
title: '%i18n:@update-available%',
|
|
|
|
text: '%i18n:@update-available-desc%'
|
2018-03-02 11:46:08 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
clean() {
|
|
|
|
localStorage.clear();
|
|
|
|
(this as any).apis.dialog({
|
2018-05-20 14:26:38 +03:00
|
|
|
title: '%i18n:@cache-cleared%',
|
2018-07-08 14:15:10 +03:00
|
|
|
text: '%i18n:@cache-cleared-desc%'
|
2018-03-02 11:46:08 +02:00
|
|
|
});
|
2018-03-06 11:06:45 +02:00
|
|
|
},
|
|
|
|
soundTest() {
|
|
|
|
const sound = new Audio(`${url}/assets/message.mp3`);
|
2018-05-20 20:13:39 +03:00
|
|
|
sound.volume = this.$store.state.device.soundVolume;
|
2018-03-06 11:06:45 +02:00
|
|
|
sound.play();
|
2018-02-22 19:06:35 +02:00
|
|
|
}
|
2018-02-12 15:18:13 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
2018-09-27 16:25:10 +03:00
|
|
|
.mk-settings
|
2018-02-12 15:18:13 +02:00
|
|
|
display flex
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
|
|
|
|
> .nav
|
|
|
|
flex 0 0 200px
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
padding 16px 0 0 0
|
|
|
|
overflow auto
|
2018-10-19 00:57:57 +03:00
|
|
|
box-shadow var(--shadowRight)
|
|
|
|
z-index 1
|
2018-02-12 15:18:13 +02:00
|
|
|
|
|
|
|
> p
|
|
|
|
display block
|
|
|
|
padding 10px 16px
|
|
|
|
margin 0
|
2018-09-27 16:25:10 +03:00
|
|
|
color var(--desktopSettingsNavItem)
|
2018-02-12 15:18:13 +02:00
|
|
|
cursor pointer
|
|
|
|
user-select none
|
|
|
|
transition margin-left 0.2s ease
|
|
|
|
|
|
|
|
> [data-fa]
|
|
|
|
margin-right 4px
|
|
|
|
|
|
|
|
&:hover
|
2018-09-27 16:25:10 +03:00
|
|
|
color var(--desktopSettingsNavItemHover)
|
2018-02-12 15:18:13 +02:00
|
|
|
|
|
|
|
&.active
|
|
|
|
margin-left 8px
|
2018-09-26 14:19:35 +03:00
|
|
|
color var(--primary) !important
|
2018-02-12 15:18:13 +02:00
|
|
|
|
|
|
|
> .pages
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
flex auto
|
|
|
|
overflow auto
|
2018-10-19 00:18:33 +03:00
|
|
|
background var(--bg)
|
2018-02-12 15:18:13 +02:00
|
|
|
|
|
|
|
> section
|
|
|
|
margin 32px
|
2018-09-27 16:25:10 +03:00
|
|
|
color var(--text)
|
2018-02-12 15:18:13 +02:00
|
|
|
|
|
|
|
</style>
|