デッキのカラムを左揃えか中央揃えか選べるように

This commit is contained in:
syuilo 2018-10-19 06:47:55 +09:00
parent e7e321e2b3
commit 6c1f1ffdb1
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
4 changed files with 21 additions and 6 deletions

View file

@ -855,6 +855,9 @@ desktop/views/components/settings.vue:
show-renoted-my-notes: "自分の投稿のRenoteをタイムラインに表示する"
show-local-renotes: "ローカルの投稿のRenoteをタイムラインに表示する"
show-maps: "マップの自動展開"
deck-column-align: "デッキのカラムの位置"
deck-column-align-center: "中央"
deck-column-align-left: "左"
sound: "サウンド"
enable-sounds: "サウンドを有効にする"

View file

@ -113,6 +113,11 @@
<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>
<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>
</ui-card>
<ui-card class="web" v-show="page == 'web'">
@ -350,6 +355,11 @@ export default Vue.extend({
set(value) { this.$store.commit('device/set', { key: 'navbar', value }); }
},
deckColumnAlign: {
get() { return this.$store.state.device.deckColumnAlign; },
set(value) { this.$store.commit('device/set', { key: 'deckColumnAlign', value }); }
},
enableSounds: {
get() { return this.$store.state.device.enableSounds; },
set(value) { this.$store.commit('device/set', { key: 'enableSounds', value }); }

View file

@ -1,6 +1,6 @@
<template>
<mk-ui :class="$style.root">
<div class="qlvquzbjribqcaozciifydkngcwtyzje" :style="style">
<div class="qlvquzbjribqcaozciifydkngcwtyzje" :style="style" :class="{ center: $store.state.device.deckColumnAlign == 'center' }">
<template v-for="ids in layout">
<div v-if="ids.length > 1" class="folder">
<template v-for="id, i in ids">
@ -283,12 +283,13 @@ export default Vue.extend({
> *:not(:last-child)
margin-bottom 8px
> *
&:first-child
margin-left auto
&.center
> *
&:first-child
margin-left auto
&:last-child
margin-right auto
&:last-child
margin-right auto
> button
padding 0 16px

View file

@ -58,6 +58,7 @@ const defaultDeviceSettings = {
alwaysShowNsfw: false,
postStyle: 'standard',
navbar: 'top',
deckColumnAlign: 'center',
mobileNotificationPosition: 'bottom',
deckTemporaryColumn: null
};