Added user option to hide instance-specific panel, rearranged config screen to

better categorize it / adjustments to language selector
This commit is contained in:
Henry Jameson 2018-12-05 11:37:01 +03:00
parent 9143862707
commit 47b0b385f4
7 changed files with 26 additions and 4 deletions

View file

@ -2,6 +2,9 @@ const InstanceSpecificPanel = {
computed: { computed: {
instanceSpecificPanelContent () { instanceSpecificPanelContent () {
return this.$store.state.instance.instanceSpecificPanelContent return this.$store.state.instance.instanceSpecificPanelContent
},
show () {
return !this.$store.state.config.hideISP
} }
} }
} }

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="instance-specific-panel"> <div v-if="show" class="instance-specific-panel">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
<div v-html="instanceSpecificPanelContent"> <div v-html="instanceSpecificPanelContent">

View file

@ -1,5 +1,8 @@
<template> <template>
<div> <div>
<label for="interface-language-switcher">
{{ $t('settings.interfaceLanguage') }}
</label>
<label for="interface-language-switcher" class='select'> <label for="interface-language-switcher" class='select'>
<select id="interface-language-switcher" v-model="language"> <select id="interface-language-switcher" v-model="language">
<option v-for="(langCode, i) in languageCodes" :value="langCode"> <option v-for="(langCode, i) in languageCodes" :value="langCode">

View file

@ -13,6 +13,7 @@ const settings = {
hideAttachmentsLocal: user.hideAttachments, hideAttachmentsLocal: user.hideAttachments,
hideAttachmentsInConvLocal: user.hideAttachmentsInConv, hideAttachmentsInConvLocal: user.hideAttachmentsInConv,
hideNsfwLocal: user.hideNsfw, hideNsfwLocal: user.hideNsfw,
hideISPLocal: user.hideISP,
hidePostStatsLocal: typeof user.hidePostStats === 'undefined' hidePostStatsLocal: typeof user.hidePostStats === 'undefined'
? instance.hidePostStats ? instance.hidePostStats
: user.hidePostStats, : user.hidePostStats,
@ -83,6 +84,9 @@ const settings = {
hideNsfwLocal (value) { hideNsfwLocal (value) {
this.$store.dispatch('setOption', { name: 'hideNsfw', value }) this.$store.dispatch('setOption', { name: 'hideNsfw', value })
}, },
hideISPLocal (value) {
this.$store.dispatch('setOption', { name: 'hideISP', value })
},
'notificationVisibilityLocal.likes' (value) { 'notificationVisibilityLocal.likes' (value) {
this.$store.dispatch('setOption', { name: 'notificationVisibility', value: this.$store.state.config.notificationVisibility }) this.$store.dispatch('setOption', { name: 'notificationVisibility', value: this.$store.state.config.notificationVisibility })
}, },

View file

@ -14,15 +14,23 @@
<div @click.prevent class="alert transparent" v-if="!currentSaveStateNotice.error"> <div @click.prevent class="alert transparent" v-if="!currentSaveStateNotice.error">
{{ $t('settings.saving_ok') }} {{ $t('settings.saving_ok') }}
</div> </div>
</template> </template>
</transition> </transition>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<tab-switcher> <tab-switcher>
<div :label="$t('settings.general')" > <div :label="$t('settings.general')" >
<div class="setting-item"> <div class="setting-item">
<h2>{{ $t('settings.interfaceLanguage') }}</h2> <h2>{{ $t('settings.interface') }}</h2>
<interface-language-switcher /> <ul class="setting-list">
<li>
<interface-language-switcher />
</li>
<li>
<input type="checkbox" id="hideISP" v-model="hideISPLocal">
<label for="hideISP">{{$t('settings.hide_isp')}}</label>
</li>
</ul>
</div> </div>
<div class="setting-item"> <div class="setting-item">
<h2>{{$t('nav.timeline')}}</h2> <h2>{{$t('nav.timeline')}}</h2>

View file

@ -116,6 +116,7 @@
"general": "General", "general": "General",
"hide_attachments_in_convo": "Hide attachments in conversations", "hide_attachments_in_convo": "Hide attachments in conversations",
"hide_attachments_in_tl": "Hide attachments in timeline", "hide_attachments_in_tl": "Hide attachments in timeline",
"hide_isp": "Hide instance-specific panel",
"hide_post_stats": "Hide post statistics (e.g. the number of favorites)", "hide_post_stats": "Hide post statistics (e.g. the number of favorites)",
"hide_user_stats": "Hide user statistics (e.g. the number of followers)", "hide_user_stats": "Hide user statistics (e.g. the number of followers)",
"import_followers_from_a_csv_file": "Import follows from a csv file", "import_followers_from_a_csv_file": "Import follows from a csv file",
@ -123,6 +124,7 @@
"inputRadius": "Input fields", "inputRadius": "Input fields",
"instance_default": "(default: {value})", "instance_default": "(default: {value})",
"instance_default_simple" : "(default)", "instance_default_simple" : "(default)",
"interface": "Interface",
"interfaceLanguage": "Interface language", "interfaceLanguage": "Interface language",
"invalid_theme_imported": "The selected file is not a supported Pleroma theme. No changes to your theme were made.", "invalid_theme_imported": "The selected file is not a supported Pleroma theme. No changes to your theme were made.",
"limited_availability": "Unavailable in your browser", "limited_availability": "Unavailable in your browser",

View file

@ -97,9 +97,11 @@
"general": "Общие", "general": "Общие",
"hide_attachments_in_convo": "Прятать вложения в разговорах", "hide_attachments_in_convo": "Прятать вложения в разговорах",
"hide_attachments_in_tl": "Прятать вложения в ленте", "hide_attachments_in_tl": "Прятать вложения в ленте",
"hide_isp": "Скрыть серверную панель",
"import_followers_from_a_csv_file": "Импортировать читаемых из файла .csv", "import_followers_from_a_csv_file": "Импортировать читаемых из файла .csv",
"import_theme": "Загрузить Тему", "import_theme": "Загрузить Тему",
"inputRadius": "Поля ввода", "inputRadius": "Поля ввода",
"interface": "Интерфейс",
"interfaceLanguage": "Язык интерфейса", "interfaceLanguage": "Язык интерфейса",
"limited_availability": "Не доступно в вашем браузере", "limited_availability": "Не доступно в вашем браузере",
"links": "Ссылки", "links": "Ссылки",