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

40 lines
937 B
Vue
Raw Normal View History

2023-03-14 19:50:43 +00:00
<template>
<label
v-if="matchesExpertLevel"
class="StringSetting"
>
<label :for="path" :class="{ 'faint': shouldBeDisabled }">
2023-03-19 19:27:07 +00:00
<template v-if="backendDescription">
{{ backendDescriptionLabel + ' ' }}
</template>
<template v-else>
<slot />
</template>
2023-03-14 19:50:43 +00:00
</label>
<input
:id="path"
class="string-input"
step="1"
:disabled="shouldBeDisabled"
2023-03-21 20:46:40 +00:00
:value="realDraftMode ? draft : state"
2023-03-14 19:50:43 +00:00
@change="update"
>
{{ ' ' }}
<ModifiedIndicator
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<DraftButtons />
2023-03-19 19:27:07 +00:00
<p
v-if="backendDescriptionDescription"
class="setting-description"
:class="{ 'faint': shouldBeDisabled }"
2023-03-19 19:27:07 +00:00
>
{{ backendDescriptionDescription + ' ' }}
</p>
2023-03-14 19:50:43 +00:00
</label>
</template>
<script src="./string_setting.js"></script>