Merge branch 'vue3-again' into shigusegubu-vue3

* vue3-again:
  fix optional color inputs
  fix opacity control
  fix font control
  fix (You) spacing
  fix shadow control in theme tab
  fix (roundness) ranges in theme tab
This commit is contained in:
Henry Jameson 2022-03-27 14:21:14 +03:00
commit deee9ab8df
6 changed files with 18 additions and 12 deletions

View file

@ -14,7 +14,7 @@
:modelValue="present" :modelValue="present"
:disabled="disabled" :disabled="disabled"
class="opt" class="opt"
@change="$emit('update:modelValue', typeof value === 'undefined' ? fallback : undefined)" @update:modelValue="$emit('update:modelValue', typeof modelValue === 'undefined' ? fallback : undefined)"
/> />
<div class="input color-input-field"> <div class="input color-input-field">
<input <input
@ -91,6 +91,7 @@ export default {
default: true default: true
} }
}, },
emits: ['update:modelValue'],
computed: { computed: {
present () { present () {
return typeof this.modelValue !== 'undefined' return typeof this.modelValue !== 'undefined'

View file

@ -6,11 +6,12 @@ export default {
Select Select
}, },
props: [ props: [
'name', 'label', 'value', 'fallback', 'options', 'no-inherit' 'name', 'label', 'modelValue', 'fallback', 'options', 'no-inherit'
], ],
emits: ['update:modelValue'],
data () { data () {
return { return {
lValue: this.value, lValue: this.modelValue,
availableOptions: [ availableOptions: [
this.noInherit ? '' : 'inherit', this.noInherit ? '' : 'inherit',
'custom', 'custom',
@ -22,7 +23,7 @@ export default {
} }
}, },
beforeUpdate () { beforeUpdate () {
this.lValue = this.value this.lValue = this.modelValue
}, },
computed: { computed: {
present () { present () {
@ -37,7 +38,7 @@ export default {
}, },
set (v) { set (v) {
set(this.lValue, 'family', v) set(this.lValue, 'family', v)
this.$emit('input', this.lValue) this.$emit('update:modelValue', this.lValue)
} }
}, },
isCustom () { isCustom () {

View file

@ -14,8 +14,8 @@
:id="name + '-o'" :id="name + '-o'"
class="opt exlcude-disabled" class="opt exlcude-disabled"
type="checkbox" type="checkbox"
:modelValue="present" :checked="present"
@input="$emit('update:modelValue', typeof value === 'undefined' ? fallback : undefined)" @change="$emit('update:modelValue', typeof modelValue === 'undefined' ? fallback : undefined)"
> >
<label <label
v-if="typeof fallback !== 'undefined'" v-if="typeof fallback !== 'undefined'"

View file

@ -41,10 +41,12 @@
class="serverName" class="serverName"
:class="{ '-faded': shouldFadeDomain }" :class="{ '-faded': shouldFadeDomain }"
v-html="'@' + serverName" v-html="'@' + serverName"
/></span><span />
</span>
<span
v-if="isYou && shouldShowYous" v-if="isYou && shouldShowYous"
:class="{ '-you': shouldBoldenYou }" :class="{ '-you': shouldBoldenYou }"
> {{ $t('status.you') }}</span> > {{ ' ' + $t('status.you') }}</span>
<!-- eslint-enable vue/no-v-html --> <!-- eslint-enable vue/no-v-html -->
</a><span </a><span
v-if="shouldShowTooltip" v-if="shouldShowTooltip"

View file

@ -14,7 +14,7 @@
:modelValue="present" :modelValue="present"
:disabled="disabled" :disabled="disabled"
class="opt" class="opt"
@change="$emit('update:modelValue', !present ? fallback : undefined)" @update:modelValue="$emit('update:modelValue', !present ? fallback : undefined)"
/> />
<input <input
:id="name" :id="name"
@ -37,11 +37,12 @@ export default {
Checkbox Checkbox
}, },
props: [ props: [
'name', 'value', 'fallback', 'disabled' 'name', 'modelValue', 'fallback', 'disabled'
], ],
emits: ['update:modelValue'],
computed: { computed: {
present () { present () {
return typeof this.value !== 'undefined' return typeof this.modelValue !== 'undefined'
} }
} }
} }

View file

@ -37,6 +37,7 @@ export default {
props: [ props: [
'modelValue', 'fallback', 'ready' 'modelValue', 'fallback', 'ready'
], ],
emits: ['update:modelValue'],
data () { data () {
return { return {
selectedId: 0, selectedId: 0,