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

46 lines
1.1 KiB
Vue
Raw Normal View History

2023-03-14 21:50:43 +02:00
<template>
<label
v-if="matchesExpertLevel"
class="StringSetting"
>
2023-04-24 23:01:29 +03:00
<label
2025-12-03 12:19:20 +02:00
v-if="!hideLabel"
2023-04-24 23:01:29 +03:00
:for="path"
2024-10-08 22:13:15 +03:00
class="setting-label"
2023-04-24 23:01:29 +03:00
:class="{ 'faint': shouldBeDisabled }"
>
<template v-if="backendDescriptionLabel">
2023-03-19 21:27:07 +02:00
{{ backendDescriptionLabel + ' ' }}
</template>
<template v-else-if="source === 'admin'">
MISSING LABEL FOR {{ path }}
2023-03-19 21:27:07 +02:00
</template>
<slot v-else />
2023-03-14 21:50:43 +02:00
</label>
2024-09-24 03:07:27 +03:00
{{ ' ' }}
2023-03-14 21:50:43 +02:00
<input
:id="path"
2024-02-07 15:53:49 +02:00
class="input string-input"
2025-11-28 15:44:03 +02:00
:class="{ disabled: shouldBeDisabled }"
:disabled="shouldBeDisabled"
2023-03-21 22:46:40 +02:00
:value="realDraftMode ? draft : state"
2023-03-14 21:50:43 +02:00
@change="update"
>
{{ ' ' }}
<ModifiedIndicator
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
2025-12-03 12:19:20 +02:00
<DraftButtons v-if="!hideDraftButtons" />
2023-03-19 21:27:07 +02:00
<p
v-if="backendDescriptionDescription"
class="setting-description"
:class="{ 'faint': shouldBeDisabled }"
2023-03-19 21:27:07 +02:00
>
{{ backendDescriptionDescription + ' ' }}
</p>
2023-03-14 21:50:43 +02:00
</label>
</template>
<script src="./string_setting.js"></script>