pleroma-fe/src/components/settings_modal/helpers/tuple_setting.vue

58 lines
1.6 KiB
Vue
Raw Normal View History

2025-12-03 23:05:46 +02:00
<template>
2025-12-10 18:34:19 +02:00
<span
class="setting-item"
2025-12-03 23:05:46 +02:00
v-if="matchesExpertLevel"
>
<label
v-if="!hideLabel"
:for="path"
class="setting-label"
:class="{ 'faint': shouldBeDisabled }"
>
2025-12-10 18:34:19 +02:00
<ModifiedIndicator
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
{{ ' ' }}
2025-12-03 23:05:46 +02:00
<template v-if="backendDescriptionLabel">
{{ backendDescriptionLabel + ' ' }}
</template>
<template v-else-if="source === 'admin'">
MISSING LABEL FOR {{ path }}
</template>
<slot v-else />
</label>
2025-12-10 18:34:19 +02:00
<span class="setting-control">
<input
:id="path"
class="input string-input"
:class="{ disabled: shouldBeDisabled }"
:disabled="shouldBeDisabled"
:placeholder="backendDescriptionSuggestions?.[0]?.[0]"
:value="visibleState?.tuple?.[0]"
@change="e => update({ e, side: 0 })"
>
{{ ' ' }}
<input
:id="path"
class="input string-input"
:class="{ disabled: shouldBeDisabled }"
:disabled="shouldBeDisabled"
:placeholder="backendDescriptionSuggestions?.[0]?.[1]"
:value="visibleState?.tuple?.[1]"
@change="e => update({ e, side: 1 })"
>
</span>
2025-12-03 23:05:46 +02:00
<DraftButtons v-if="!hideDraftButtons" />
<p
v-if="backendDescriptionDescription"
class="setting-description"
:class="{ 'faint': shouldBeDisabled }"
>
{{ backendDescriptionDescription + ' ' }}
</p>
2025-12-10 18:34:19 +02:00
</span>
2025-12-03 23:05:46 +02:00
</template>
<script src="./tuple_setting.js"></script>