2018-02-12 15:18:13 +02:00
|
|
|
<template>
|
|
|
|
<div class="mk-settings">
|
2018-12-27 13:45:23 +02:00
|
|
|
<div class="nav" :class="{ inWindow }">
|
2018-11-08 20:44:35 +02:00
|
|
|
<p :class="{ active: page == 'profile' }" @mousedown="page = 'profile'"><fa icon="user" fixed-width/>{{ $t('profile') }}</p>
|
|
|
|
<p :class="{ active: page == 'theme' }" @mousedown="page = 'theme'"><fa icon="palette" fixed-width/>{{ $t('theme') }}</p>
|
2018-11-05 18:40:11 +02:00
|
|
|
<p :class="{ active: page == 'web' }" @mousedown="page = 'web'"><fa icon="desktop" fixed-width/>Web</p>
|
2018-11-08 20:44:35 +02:00
|
|
|
<p :class="{ active: page == 'notification' }" @mousedown="page = 'notification'"><fa :icon="['far', 'bell']" fixed-width/>{{ $t('notification') }}</p>
|
|
|
|
<p :class="{ active: page == 'drive' }" @mousedown="page = 'drive'"><fa icon="cloud" fixed-width/>{{ $t('@.drive') }}</p>
|
|
|
|
<p :class="{ active: page == 'hashtags' }" @mousedown="page = 'hashtags'"><fa icon="hashtag" fixed-width/>{{ $t('tags') }}</p>
|
|
|
|
<p :class="{ active: page == 'muteAndBlock' }" @mousedown="page = 'muteAndBlock'"><fa icon="ban" fixed-width/>{{ $t('mute-and-block') }}</p>
|
|
|
|
<p :class="{ active: page == 'apps' }" @mousedown="page = 'apps'"><fa icon="puzzle-piece" fixed-width/>{{ $t('apps') }}</p>
|
|
|
|
<p :class="{ active: page == 'security' }" @mousedown="page = 'security'"><fa icon="unlock-alt" fixed-width/>{{ $t('security') }}</p>
|
2018-11-05 18:40:11 +02:00
|
|
|
<p :class="{ active: page == 'api' }" @mousedown="page = 'api'"><fa icon="key" fixed-width/>API</p>
|
2018-11-08 20:44:35 +02:00
|
|
|
<p :class="{ active: page == 'other' }" @mousedown="page = 'other'"><fa icon="cogs" fixed-width/>{{ $t('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'">
|
2018-11-13 16:33:30 +02:00
|
|
|
<x-profile-editor/>
|
2018-12-03 12:44:03 +02:00
|
|
|
<x-integration-settings/>
|
2018-10-19 00:18:33 +03:00
|
|
|
</div>
|
|
|
|
|
2018-12-30 06:02:06 +02:00
|
|
|
<x-theme class="theme" v-show="page == 'theme'"/>
|
2018-10-19 00:18:33 +03:00
|
|
|
|
|
|
|
<ui-card class="web" v-show="page == 'web'">
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #title><fa icon="sliders-h"/> {{ $t('behaviour') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
|
|
|
|
<section>
|
2018-11-08 20:44:35 +02:00
|
|
|
<ui-switch v-model="fetchOnScroll">{{ $t('fetch-on-scroll') }}
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #desc>{{ $t('fetch-on-scroll-desc') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
</ui-switch>
|
2018-11-08 20:44:35 +02:00
|
|
|
<ui-switch v-model="autoPopout">{{ $t('auto-popout') }}
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #desc>{{ $t('auto-popout-desc') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
</ui-switch>
|
2019-01-23 13:43:06 +02:00
|
|
|
<ui-switch v-model="keepCw">{{ $t('keep-cw') }}
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #desc>{{ $t('keep-cw-desc') }}</template>
|
2019-01-23 13:43:06 +02:00
|
|
|
</ui-switch>
|
2018-10-19 00:18:33 +03:00
|
|
|
</section>
|
2018-09-07 15:13:15 +03:00
|
|
|
|
2018-10-19 01:03:29 +03:00
|
|
|
<section>
|
2018-11-08 20:44:35 +02:00
|
|
|
<header>{{ $t('timeline') }}</header>
|
|
|
|
<ui-switch v-model="showMyRenotes">{{ $t('show-my-renotes') }}</ui-switch>
|
|
|
|
<ui-switch v-model="showRenotedMyNotes">{{ $t('show-renoted-my-notes') }}</ui-switch>
|
|
|
|
<ui-switch v-model="showLocalRenotes">{{ $t('show-local-renotes') }}</ui-switch>
|
2018-10-19 01:03:29 +03:00
|
|
|
</section>
|
|
|
|
|
2018-09-07 15:13:15 +03:00
|
|
|
<section>
|
2018-11-08 20:44:35 +02:00
|
|
|
<header>{{ $t('note-visibility') }}</header>
|
|
|
|
<ui-switch v-model="rememberNoteVisibility">{{ $t('remember-note-visibility') }}</ui-switch>
|
2018-09-07 15:13:15 +03:00
|
|
|
<section>
|
2018-11-08 20:44:35 +02:00
|
|
|
<header>{{ $t('default-note-visibility') }}</header>
|
2018-09-07 15:13:15 +03:00
|
|
|
<ui-select v-model="defaultNoteVisibility">
|
2018-11-08 20:44:35 +02:00
|
|
|
<option value="public">{{ $t('@.note-visibility.public') }}</option>
|
|
|
|
<option value="home">{{ $t('@.note-visibility.home') }}</option>
|
|
|
|
<option value="followers">{{ $t('@.note-visibility.followers') }}</option>
|
|
|
|
<option value="specified">{{ $t('@.note-visibility.specified') }}</option>
|
2018-11-17 06:21:40 +02:00
|
|
|
<option value="local-public">{{ $t('@.note-visibility.local-public') }}</option>
|
|
|
|
<option value="local-home">{{ $t('@.note-visibility.local-home') }}</option>
|
|
|
|
<option value="local-followers">{{ $t('@.note-visibility.local-followers') }}</option>
|
2018-09-07 15:13:15 +03:00
|
|
|
</ui-select>
|
|
|
|
</section>
|
|
|
|
</section>
|
2018-11-29 04:05:17 +02:00
|
|
|
|
|
|
|
<section>
|
|
|
|
<header>{{ $t('web-search-engine') }}</header>
|
2019-02-18 04:13:56 +02:00
|
|
|
<ui-input v-model="webSearchEngine">{{ $t('web-search-engine') }}<template #desc>{{ $t('web-search-engine-desc') }}</template></ui-input>
|
2018-11-29 04:05:17 +02:00
|
|
|
</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'">
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #title><fa icon="desktop"/> {{ $t('display') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
|
|
|
|
<section>
|
2018-11-08 20:44:35 +02:00
|
|
|
<ui-switch v-model="showPostFormOnTopOfTl">{{ $t('post-form-on-timeline') }}</ui-switch>
|
|
|
|
<ui-button @click="customizeHome">{{ $t('customize') }}</ui-button>
|
2018-10-19 00:18:33 +03:00
|
|
|
</section>
|
|
|
|
<section>
|
2018-11-08 20:44:35 +02:00
|
|
|
<header>{{ $t('wallpaper') }}</header>
|
2018-12-30 07:08:40 +02:00
|
|
|
<ui-horizon-group class="fit-bottom">
|
|
|
|
<ui-button @click="updateWallpaper">{{ $t('choose-wallpaper') }}</ui-button>
|
|
|
|
<ui-button @click="deleteWallpaper">{{ $t('delete-wallpaper') }}</ui-button>
|
|
|
|
</ui-horizon-group>
|
2018-10-19 00:18:33 +03:00
|
|
|
</section>
|
|
|
|
<section>
|
2018-11-08 20:44:35 +02:00
|
|
|
<header>{{ $t('navbar-position') }}</header>
|
|
|
|
<ui-radio v-model="navbar" value="top">{{ $t('navbar-position-top') }}</ui-radio>
|
|
|
|
<ui-radio v-model="navbar" value="left">{{ $t('navbar-position-left') }}</ui-radio>
|
|
|
|
<ui-radio v-model="navbar" value="right">{{ $t('navbar-position-right') }}</ui-radio>
|
2018-10-19 00:18:33 +03:00
|
|
|
</section>
|
|
|
|
<section>
|
2018-11-08 20:44:35 +02:00
|
|
|
<ui-switch v-model="darkmode">{{ $t('dark-mode') }}</ui-switch>
|
|
|
|
<ui-switch v-model="useShadow">{{ $t('use-shadow') }}</ui-switch>
|
|
|
|
<ui-switch v-model="roundedCorners">{{ $t('rounded-corners') }}</ui-switch>
|
|
|
|
<ui-switch v-model="circleIcons">{{ $t('circle-icons') }}</ui-switch>
|
2018-12-30 07:00:57 +02:00
|
|
|
<section>
|
2018-12-30 07:12:46 +02:00
|
|
|
<header>{{ $t('@.line-width') }}</header>
|
|
|
|
<ui-radio v-model="lineWidth" :value="0.5">{{ $t('@.line-width-thin') }}</ui-radio>
|
|
|
|
<ui-radio v-model="lineWidth" :value="1">{{ $t('@.line-width-normal') }}</ui-radio>
|
|
|
|
<ui-radio v-model="lineWidth" :value="2">{{ $t('@.line-width-thick') }}</ui-radio>
|
2018-12-30 07:00:57 +02:00
|
|
|
</section>
|
2018-11-08 20:44:35 +02:00
|
|
|
<ui-switch v-model="reduceMotion">{{ $t('@.reduce-motion') }}</ui-switch>
|
|
|
|
<ui-switch v-model="contrastedAcct">{{ $t('contrasted-acct') }}</ui-switch>
|
|
|
|
<ui-switch v-model="showFullAcct">{{ $t('@.show-full-acct') }}</ui-switch>
|
2018-11-09 14:10:21 +02:00
|
|
|
<ui-switch v-model="showVia">{{ $t('@.show-via') }}</ui-switch>
|
2018-11-08 20:44:35 +02:00
|
|
|
<ui-switch v-model="useOsDefaultEmojis">{{ $t('@.use-os-default-emojis') }}</ui-switch>
|
|
|
|
<ui-switch v-model="iLikeSushi">{{ $t('@.i-like-sushi') }}</ui-switch>
|
2018-10-19 00:18:33 +03:00
|
|
|
</section>
|
|
|
|
<section>
|
2018-12-05 11:44:57 +02:00
|
|
|
<ui-switch v-model="suggestRecentHashtags">{{ $t('@.suggest-recent-hashtags') }}</ui-switch>
|
2018-11-08 20:44:35 +02:00
|
|
|
<ui-switch v-model="showClockOnHeader">{{ $t('show-clock-on-header') }}</ui-switch>
|
|
|
|
<ui-switch v-model="alwaysShowNsfw">{{ $t('@.always-show-nsfw') }}</ui-switch>
|
|
|
|
<ui-switch v-model="showReplyTarget">{{ $t('show-reply-target') }}</ui-switch>
|
|
|
|
<ui-switch v-model="showMaps">{{ $t('show-maps') }}</ui-switch>
|
|
|
|
<ui-switch v-model="disableAnimatedMfm">{{ $t('@.disable-animated-mfm') }}</ui-switch>
|
2019-02-04 21:09:44 +02:00
|
|
|
<ui-switch v-model="disableShowingAnimatedImages">{{ $t('@.disable-showing-animated-images') }}</ui-switch>
|
2018-11-16 16:13:37 +02:00
|
|
|
<ui-switch v-model="remainDeletedNote">{{ $t('remain-deleted-note') }}</ui-switch>
|
2018-10-19 00:18:33 +03:00
|
|
|
</section>
|
2018-10-19 00:47:55 +03:00
|
|
|
<section>
|
2018-11-08 20:44:35 +02:00
|
|
|
<header>{{ $t('deck-column-align') }}</header>
|
|
|
|
<ui-radio v-model="deckColumnAlign" value="center">{{ $t('deck-column-align-center') }}</ui-radio>
|
|
|
|
<ui-radio v-model="deckColumnAlign" value="left">{{ $t('deck-column-align-left') }}</ui-radio>
|
2018-12-06 04:11:46 +02:00
|
|
|
<ui-radio v-model="deckColumnAlign" value="flexible">{{ $t('deck-column-align-flexible') }}</ui-radio>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
|
|
<header>{{ $t('deck-column-width') }}</header>
|
|
|
|
<ui-radio v-model="deckColumnWidth" value="narrow">{{ $t('deck-column-width-narrow') }}</ui-radio>
|
|
|
|
<ui-radio v-model="deckColumnWidth" value="narrower">{{ $t('deck-column-width-narrower') }}</ui-radio>
|
|
|
|
<ui-radio v-model="deckColumnWidth" value="normal">{{ $t('deck-column-width-normal') }}</ui-radio>
|
|
|
|
<ui-radio v-model="deckColumnWidth" value="wider">{{ $t('deck-column-width-wider') }}</ui-radio>
|
|
|
|
<ui-radio v-model="deckColumnWidth" value="wide">{{ $t('deck-column-width-wide') }}</ui-radio>
|
2018-10-19 00:47:55 +03:00
|
|
|
</section>
|
2018-10-19 01:03:29 +03:00
|
|
|
<section>
|
2018-11-08 20:44:35 +02:00
|
|
|
<ui-switch v-model="games_reversi_showBoardLabels">{{ $t('@.show-reversi-board-labels') }}</ui-switch>
|
2018-12-30 07:05:13 +02:00
|
|
|
<ui-switch v-model="games_reversi_useAvatarStones">{{ $t('@.use-avatar-reversi-stones') }}</ui-switch>
|
2018-10-19 01:03:29 +03:00
|
|
|
</section>
|
2018-10-19 00:18:33 +03:00
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="web" v-show="page == 'web'">
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #title><fa icon="volume-up"/> {{ $t('sound') }}</template>
|
2018-10-14 13:44:30 +03:00
|
|
|
|
|
|
|
<section>
|
2018-11-08 20:44:35 +02:00
|
|
|
<ui-switch v-model="enableSounds">{{ $t('enable-sounds') }}
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #desc>{{ $t('enable-sounds-desc') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
</ui-switch>
|
2018-11-08 20:44:35 +02:00
|
|
|
<label>{{ $t('volume') }}</label>
|
2018-10-19 00:18:33 +03:00
|
|
|
<input type="range"
|
|
|
|
v-model="soundVolume"
|
|
|
|
:disabled="!enableSounds"
|
|
|
|
max="1"
|
|
|
|
step="0.1"
|
|
|
|
/>
|
2018-11-08 20:44:35 +02:00
|
|
|
<ui-button @click="soundTest"><fa icon="volume-up"/> {{ $t('test') }}</ui-button>
|
2018-10-19 00:18:33 +03:00
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
2018-12-03 12:44:03 +02:00
|
|
|
<x-language-settings v-show="page == 'web'"/>
|
2018-10-19 00:18:33 +03:00
|
|
|
|
|
|
|
<ui-card class="web" v-show="page == 'web'">
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #title><fa :icon="['far', 'trash-alt']"/> {{ $t('cache') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
<section>
|
2018-11-08 20:44:35 +02:00
|
|
|
<ui-button @click="clean">{{ $t('clean-cache') }}</ui-button>
|
2018-10-19 00:18:33 +03:00
|
|
|
<div class="none ui info warn">
|
2018-11-08 20:44:35 +02:00
|
|
|
<p><fa icon="exclamation-triangle"/>{{ $t('cache-warn') }}</p>
|
2018-10-19 00:18:33 +03:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
2018-12-27 22:06:25 +02:00
|
|
|
<x-notification-settings v-show="page == 'notification'"/>
|
2018-10-19 00:18:33 +03:00
|
|
|
|
2018-10-25 05:30:30 +03:00
|
|
|
<div class="drive" v-if="page == 'drive'">
|
2018-11-13 16:06:31 +02:00
|
|
|
<x-drive-settings/>
|
2018-10-25 05:30:30 +03:00
|
|
|
</div>
|
2018-10-19 00:18:33 +03:00
|
|
|
|
|
|
|
<ui-card class="hashtags" v-show="page == 'hashtags'">
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #title><fa icon="hashtag"/> {{ $t('tags') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
<section>
|
|
|
|
<x-tags/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
2018-10-31 04:16:13 +02:00
|
|
|
<div class="muteAndBlock" v-show="page == 'muteAndBlock'">
|
2018-11-13 16:33:30 +02:00
|
|
|
<x-mute-and-block/>
|
2018-10-31 04:16:13 +02:00
|
|
|
</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'">
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #title><fa icon="puzzle-piece"/> {{ $t('apps') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
<section>
|
|
|
|
<x-apps/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="password" v-show="page == 'security'">
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #title><fa icon="unlock-alt"/> {{ $t('password') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
<section>
|
2018-11-13 16:33:30 +02:00
|
|
|
<x-password-settings/>
|
2018-10-19 00:18:33 +03:00
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="2fa" v-show="page == 'security'">
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #title><fa icon="mobile-alt"/> {{ $t('@.2fa') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
<section>
|
|
|
|
<x-2fa/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="signin" v-show="page == 'security'">
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #title><fa icon="sign-in-alt"/> {{ $t('signin') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
<section>
|
|
|
|
<x-signins/>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
2018-10-26 02:37:30 +03:00
|
|
|
<div class="api" v-show="page == 'api'">
|
2018-11-13 16:33:30 +02:00
|
|
|
<x-api-settings/>
|
2018-10-26 02:37:30 +03:00
|
|
|
</div>
|
2018-10-19 00:18:33 +03:00
|
|
|
|
|
|
|
<ui-card class="other" v-show="page == 'other'">
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #title><fa icon="info-circle"/> {{ $t('about') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
<section>
|
2018-11-08 20:44:35 +02:00
|
|
|
<p v-if="meta">{{ $t('operator') }}: <i><a :href="'mailto:' + meta.maintainer.email" target="_blank">{{ meta.maintainer.name }}</a></i></p>
|
2018-10-19 00:18:33 +03:00
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="other" v-show="page == 'other'">
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #title><fa icon="sync-alt"/> {{ $t('update') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
<section>
|
|
|
|
<p>
|
2018-11-08 20:44:35 +02:00
|
|
|
<span>{{ $t('version') }} <i>{{ version }}</i></span>
|
2018-10-19 00:18:33 +03:00
|
|
|
<template v-if="latestVersion !== undefined">
|
|
|
|
<br>
|
2018-11-08 20:44:35 +02:00
|
|
|
<span>{{ $t('latest-version') }} <i>{{ latestVersion ? latestVersion : version }}</i></span>
|
2018-10-19 00:18:33 +03:00
|
|
|
</template>
|
|
|
|
</p>
|
|
|
|
<button class="ui button block" @click="checkForUpdate" :disabled="checkingForUpdate">
|
2018-11-08 20:44:35 +02:00
|
|
|
<template v-if="checkingForUpdate">{{ $t('update-checking') }}<mk-ellipsis/></template>
|
|
|
|
<template v-else>{{ $t('do-update') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
</button>
|
|
|
|
<details>
|
2018-11-08 20:44:35 +02:00
|
|
|
<summary>{{ $t('update-settings') }}</summary>
|
2018-10-19 00:18:33 +03:00
|
|
|
<ui-switch v-model="preventUpdate">
|
2019-02-18 04:13:56 +02:00
|
|
|
{{ $t('prevent-update') }}<template #desc>{{ $t('prevent-update-desc') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
</ui-switch>
|
|
|
|
</details>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
|
|
|
|
<ui-card class="other" v-show="page == 'other'">
|
2019-02-18 04:13:56 +02:00
|
|
|
<template #title><fa icon="cogs"/> {{ $t('advanced-settings') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
<section>
|
|
|
|
<ui-switch v-model="debug">
|
2019-02-18 04:13:56 +02:00
|
|
|
{{ $t('debug-mode') }}<template #desc>{{ $t('debug-mode-desc') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
</ui-switch>
|
|
|
|
<ui-switch v-model="enableExperimentalFeatures">
|
2019-02-18 04:13:56 +02:00
|
|
|
{{ $t('experimental') }}<template #desc>{{ $t('experimental-desc') }}</template>
|
2018-10-19 00:18:33 +03:00
|
|
|
</ui-switch>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
2018-02-12 15:18:13 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-11-08 20:44:35 +02:00
|
|
|
import i18n from '../../../i18n';
|
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-12-03 12:44:03 +02:00
|
|
|
import XIntegrationSettings from '../../../common/views/components/integration-settings.vue';
|
2018-11-15 15:04:12 +02:00
|
|
|
import XTheme from '../../../common/views/components/theme.vue';
|
|
|
|
import XDriveSettings from '../../../common/views/components/drive-settings.vue';
|
|
|
|
import XMuteAndBlock from '../../../common/views/components/mute-and-block.vue';
|
|
|
|
import XPasswordSettings from '../../../common/views/components/password-settings.vue';
|
|
|
|
import XProfileEditor from '../../../common/views/components/profile-editor.vue';
|
|
|
|
import XApiSettings from '../../../common/views/components/api-settings.vue';
|
2018-12-03 02:38:43 +02:00
|
|
|
import XLanguageSettings from '../../../common/views/components/language-settings.vue';
|
2018-12-27 22:06:25 +02:00
|
|
|
import XNotificationSettings from '../../../common/views/components/notification-settings.vue';
|
2018-11-15 15:04:12 +02:00
|
|
|
|
2019-02-17 21:52:40 +02:00
|
|
|
import { url, 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-11-08 20:44:35 +02:00
|
|
|
i18n: i18n('desktop/views/components/settings.vue'),
|
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-11-13 16:06:31 +02:00
|
|
|
XTags,
|
2018-12-03 12:44:03 +02:00
|
|
|
XIntegrationSettings,
|
2018-11-15 15:04:12 +02:00
|
|
|
XTheme,
|
|
|
|
XDriveSettings,
|
|
|
|
XMuteAndBlock,
|
|
|
|
XPasswordSettings,
|
|
|
|
XProfileEditor,
|
|
|
|
XApiSettings,
|
2018-12-03 02:38:43 +02:00
|
|
|
XLanguageSettings,
|
2018-12-27 22:06:25 +02:00
|
|
|
XNotificationSettings,
|
2018-09-17 03:00:20 +03:00
|
|
|
},
|
|
|
|
props: {
|
|
|
|
initialPage: {
|
|
|
|
type: String,
|
|
|
|
required: false
|
2018-12-27 13:45:23 +02:00
|
|
|
},
|
|
|
|
inWindow: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: true
|
2018-09-17 03:00:20 +03:00
|
|
|
}
|
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,
|
|
|
|
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
|
|
|
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
|
|
|
|
2019-01-23 13:43:06 +02:00
|
|
|
keepCw: {
|
|
|
|
get() { return this.$store.state.settings.keepCw; },
|
|
|
|
set(value) { this.$store.commit('settings/set', { key: 'keepCw', 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-12-06 04:11:46 +02:00
|
|
|
deckColumnWidth: {
|
|
|
|
get() { return this.$store.state.device.deckColumnWidth; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'deckColumnWidth', 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
|
|
|
|
|
|
|
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-12-30 07:00:57 +02:00
|
|
|
lineWidth: {
|
2018-12-30 17:59:13 +02:00
|
|
|
get() { return this.$store.state.device.lineWidth; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'lineWidth', value }); }
|
2018-12-30 07:00:57 +02:00
|
|
|
},
|
|
|
|
|
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 }); }
|
|
|
|
},
|
|
|
|
|
2018-11-29 04:05:17 +02:00
|
|
|
webSearchEngine: {
|
|
|
|
get() { return this.$store.state.settings.webSearchEngine; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'webSearchEngine', value }); }
|
|
|
|
},
|
|
|
|
|
2018-09-14 09:14:59 +03:00
|
|
|
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-11-09 14:10:21 +02:00
|
|
|
showVia: {
|
|
|
|
get() { return this.$store.state.settings.showVia; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'showVia', 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 }); }
|
|
|
|
},
|
|
|
|
|
2018-12-30 07:05:13 +02:00
|
|
|
games_reversi_useAvatarStones: {
|
|
|
|
get() { return this.$store.state.settings.games.reversi.useAvatarStones; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'games.reversi.useAvatarStones', value }); }
|
2018-12-06 03:21:41 +02:00
|
|
|
},
|
|
|
|
|
2018-09-14 09:14:59 +03:00
|
|
|
disableAnimatedMfm: {
|
|
|
|
get() { return this.$store.state.settings.disableAnimatedMfm; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'disableAnimatedMfm', value }); }
|
2018-11-16 16:13:37 +02:00
|
|
|
},
|
|
|
|
|
2019-02-04 21:09:44 +02:00
|
|
|
disableShowingAnimatedImages: {
|
|
|
|
get() { return this.$store.state.device.disableShowingAnimatedImages; },
|
|
|
|
set(value) { this.$store.commit('device/set', { key: 'disableShowingAnimatedImages', value }); }
|
2019-02-04 20:01:36 +02:00
|
|
|
},
|
|
|
|
|
2018-11-16 16:13:37 +02:00
|
|
|
remainDeletedNote: {
|
|
|
|
get() { return this.$store.state.settings.remainDeletedNote; },
|
|
|
|
set(value) { this.$store.dispatch('settings/set', { key: 'remainDeletedNote', 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-11-09 01:13:34 +02:00
|
|
|
this.$root.getMeta().then(meta => {
|
2018-03-03 02:49:47 +02:00
|
|
|
this.meta = meta;
|
|
|
|
});
|
2018-02-22 19:06:35 +02:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
customizeHome() {
|
2019-02-14 22:08:59 +02:00
|
|
|
location.href = '/?customize';
|
2018-02-22 19:06:35 +02:00
|
|
|
},
|
2018-06-06 23:14:37 +03:00
|
|
|
updateWallpaper() {
|
2018-11-09 09:00:29 +02:00
|
|
|
this.$chooseDriveFile({
|
2018-06-06 23:14:37 +03:00
|
|
|
multiple: false
|
|
|
|
}).then(file => {
|
2018-11-09 01:13:34 +02:00
|
|
|
this.$root.api('i/update', {
|
2018-06-06 23:14:37 +03:00
|
|
|
wallpaperId: file.id
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
2018-06-07 00:15:57 +03:00
|
|
|
deleteWallpaper() {
|
2018-11-09 01:13:34 +02:00
|
|
|
this.$root.api('i/update', {
|
2018-06-07 00:15:57 +03:00
|
|
|
wallpaperId: null
|
|
|
|
});
|
|
|
|
},
|
2018-03-02 11:46:08 +02:00
|
|
|
checkForUpdate() {
|
|
|
|
this.checkingForUpdate = true;
|
2018-11-09 09:00:29 +02:00
|
|
|
checkForUpdate(this.$root, true, true).then(newer => {
|
2018-03-02 11:46:08 +02:00
|
|
|
this.checkingForUpdate = false;
|
|
|
|
this.latestVersion = newer;
|
|
|
|
if (newer == null) {
|
2018-12-02 08:28:52 +02:00
|
|
|
this.$root.dialog({
|
2018-11-08 20:44:35 +02:00
|
|
|
title: this.$t('no-updates'),
|
|
|
|
text: this.$t('no-updates-desc')
|
2018-03-02 11:46:08 +02:00
|
|
|
});
|
|
|
|
} else {
|
2018-12-02 08:28:52 +02:00
|
|
|
this.$root.dialog({
|
2018-11-08 20:44:35 +02:00
|
|
|
title: this.$t('update-available'),
|
|
|
|
text: this.$t('update-available-desc')
|
2018-03-02 11:46:08 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
clean() {
|
|
|
|
localStorage.clear();
|
2018-12-02 08:28:52 +02:00
|
|
|
this.$root.dialog({
|
2018-11-08 20:44:35 +02:00
|
|
|
title: this.$t('cache-cleared'),
|
|
|
|
text: this.$t('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
|
|
|
z-index 1
|
2019-02-06 19:28:08 +02:00
|
|
|
font-size 15px
|
2018-02-12 15:18:13 +02:00
|
|
|
|
2018-12-27 13:45:23 +02:00
|
|
|
&.inWindow
|
|
|
|
box-shadow var(--shadowRight)
|
|
|
|
|
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
|
|
|
|
|
2018-11-05 18:40:11 +02:00
|
|
|
> [data-icon]
|
2018-02-12 15:18:13 +02:00
|
|
|
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>
|