links tab done (finally)
This commit is contained in:
parent
b7a97b8603
commit
42a5da93ea
10 changed files with 234 additions and 12 deletions
|
|
@ -23,7 +23,10 @@ export default {
|
|||
...Setting.computed,
|
||||
realOptions () {
|
||||
if (this.realSource === 'admin') {
|
||||
if (!(this.backendDescriptionSuggestions?.length !== 0)) {
|
||||
if (
|
||||
!this.backendDescriptionSuggestions?.length ||
|
||||
this.backendDescriptionSuggestions?.length === 0
|
||||
) {
|
||||
return this.options
|
||||
}
|
||||
return this.backendDescriptionSuggestions.map(x => ({
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
<template>
|
||||
<span
|
||||
class="DraftButtons"
|
||||
v-if="$parent.isDirty"
|
||||
>
|
||||
<Popover
|
||||
v-if="$parent.isDirty"
|
||||
|
|
@ -74,10 +75,8 @@ export default {
|
|||
.DraftButtons {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
|
||||
.button-default {
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
display: inline-flex;
|
||||
gap: 0.5em;
|
||||
}
|
||||
|
||||
.draft-tooltip {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@
|
|||
class="NumberSetting"
|
||||
>
|
||||
<label
|
||||
v-if="!hideLabel"
|
||||
:for="path"
|
||||
class="setting-label"
|
||||
:class="{ 'faint': shouldBeDisabled }"
|
||||
>
|
||||
<template v-if="backendDescriptionLabel">
|
||||
|
|
@ -32,7 +34,7 @@
|
|||
:onclick="reset"
|
||||
/>
|
||||
<ProfileSettingIndicator :is-profile="isProfileSetting" />
|
||||
<DraftButtons />
|
||||
<DraftButtons v-if="!hideDraftButtons" />
|
||||
<p
|
||||
v-if="backendDescriptionDescription"
|
||||
class="setting-description"
|
||||
|
|
|
|||
|
|
@ -41,6 +41,12 @@ export default {
|
|||
type: String,
|
||||
default: undefined
|
||||
},
|
||||
hideDraftButtons: { // this is for the weird backend hybrid (Boolean|String or Boolean|Number) settings
|
||||
type: Boolean
|
||||
},
|
||||
hideLabel: {
|
||||
type: Boolean
|
||||
},
|
||||
hideDescription: {
|
||||
type: Boolean
|
||||
},
|
||||
|
|
@ -265,6 +271,7 @@ export default {
|
|||
}
|
||||
},
|
||||
reset () {
|
||||
console.log('RS', this.state, this.draft)
|
||||
if (this.realDraftMode) {
|
||||
this.draft = cloneDeep(this.state)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
class="StringSetting"
|
||||
>
|
||||
<label
|
||||
v-if="!hideLabel"
|
||||
:for="path"
|
||||
class="setting-label"
|
||||
:class="{ 'faint': shouldBeDisabled }"
|
||||
|
|
@ -31,7 +32,7 @@
|
|||
:onclick="reset"
|
||||
/>
|
||||
<ProfileSettingIndicator :is-profile="isProfileSetting" />
|
||||
<DraftButtons />
|
||||
<DraftButtons v-if="!hideDraftButtons" />
|
||||
<p
|
||||
v-if="backendDescriptionDescription"
|
||||
class="setting-description"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue