update branch with recent develop changes (FA, added settings)

This commit is contained in:
Henry Jameson 2021-02-01 20:08:36 +02:00
parent 8958f386be
commit 66f3e72b54
5 changed files with 22 additions and 20 deletions

View file

@ -13,7 +13,7 @@
> >
<slot /> <slot />
</span> </span>
<ModifiedIcon :changed="isChanged" /> <ModifiedIndicator :changed="isChanged" />
</Checkbox> </Checkbox>
</label> </label>
</template> </template>
@ -21,7 +21,7 @@
<script> <script>
import { get, set } from 'lodash' import { get, set } from 'lodash'
import Checkbox from 'src/components/checkbox/checkbox.vue' import Checkbox from 'src/components/checkbox/checkbox.vue'
import ModifiedIcon from './modified_icon.vue' import ModifiedIndicator from './modified_indicator.vue'
export default { export default {
props: [ props: [
'path', 'path',
@ -29,7 +29,7 @@ export default {
], ],
components: { components: {
Checkbox, Checkbox,
ModifiedIcon ModifiedIndicator
}, },
computed: { computed: {
pathDefault () { pathDefault () {

View file

@ -1,15 +1,17 @@
<template> <template>
<span <span
v-if="changed" v-if="changed"
class="ModifiedIcon" class="ModifiedIndicator"
> >
<Popover <Popover
trigger="hover" trigger="hover"
> >
<i <span slot="trigger">
slot="trigger" &nbsp;
class="icon icon-wrench" <FAIcon
icon="wrench"
/> />
</span>
<div <div
class="modified-tooltip" class="modified-tooltip"
slot="content" slot="content"
@ -22,6 +24,13 @@
<script> <script>
import Popover from 'src/components/popover/popover.vue' import Popover from 'src/components/popover/popover.vue'
import { library } from '@fortawesome/fontawesome-svg-core'
import { faWrench } from '@fortawesome/free-solid-svg-icons'
library.add(
faWrench
)
export default { export default {
props: ['changed'], props: ['changed'],
components: { Popover } components: { Popover }
@ -29,14 +38,10 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.ModifiedIcon { .ModifiedIndicator {
display: inline-block; display: inline-block;
position: relative; position: relative;
.icon {
display: inline-block;
}
.modified-tooltip { .modified-tooltip {
margin: 0.5em 1em; margin: 0.5em 1em;
min-width: 10em; min-width: 10em;

View file

@ -9,7 +9,6 @@ const SharedComputedObject = () => ({
.map(key => [ .map(key => [
key + 'DefaultValue', key + 'DefaultValue',
function () { function () {
console.log(this.$store.getters.defaultConfig)
return this.$store.getters.defaultConfig[key] return this.$store.getters.defaultConfig[key]
} }
]) ])

View file

@ -12,9 +12,9 @@
</BooleanSetting> </BooleanSetting>
</li> </li>
<li v-if="instanceWallpaperUsed"> <li v-if="instanceWallpaperUsed">
<Checkbox v-model="hideInstanceWallpaper"> <BooleanSetting path="hideInstanceWallpaper">
{{ $t('settings.hide_wallpaper') }} {{ $t('settings.hide_wallpaper') }}
</Checkbox> </BooleanSetting>
</li> </li>
</ul> </ul>
</div> </div>
@ -64,9 +64,9 @@
</BooleanSetting> </BooleanSetting>
</li> </li>
<li> <li>
<Checkbox v-model="virtualScrolling"> <BooleanSetting path="virtualScrolling">
{{ $t('settings.virtual_scrolling') }} {{ $t('settings.virtual_scrolling') }}
</Checkbox> </BooleanSetting>
</li> </li>
</ul> </ul>
</div> </div>

View file

@ -80,7 +80,6 @@ const config = {
getters: { getters: {
defaultConfig (state, getters, rootState, rootGetters) { defaultConfig (state, getters, rootState, rootGetters) {
const { instance } = rootState const { instance } = rootState
console.log('DC', instance.minimalScopesMode)
return { return {
...defaultState, ...defaultState,
...Object.fromEntries( ...Object.fromEntries(
@ -90,7 +89,6 @@ const config = {
}, },
mergedConfig (state, getters, rootState, rootGetters) { mergedConfig (state, getters, rootState, rootGetters) {
const { defaultConfig } = rootGetters const { defaultConfig } = rootGetters
console.log('DC2', defaultConfig.hideISP)
return { return {
...defaultConfig, ...defaultConfig,
...state ...state