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

38 lines
870 B
Vue
Raw Normal View History

<template>
<label
v-if="matchesExpertLevel"
2022-02-28 18:23:32 +02:00
class="BooleanSetting"
>
<Checkbox
:model-value="draftMode ? draft :state"
:disabled="shouldBeDisabled"
@update:modelValue="update"
2020-10-17 22:28:49 +03:00
>
<span
v-if="!!$slots.default"
class="label"
2021-02-25 14:32:21 +02:00
>
2023-03-19 21:27:07 +02:00
<template v-if="backendDescription">
2023-03-21 22:26:11 +02:00
{{ backendDescriptionLabel }}
2023-03-19 21:27:07 +02:00
</template>
<template v-else>
<slot />
</template>
</span>
</Checkbox>
2023-03-21 22:26:11 +02:00
<ModifiedIndicator
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<DraftButtons />
<p
v-if="backendDescriptionDescription"
class="setting-description"
>
{{ backendDescriptionDescription + ' ' }}
</p>
</label>
</template>
2021-03-11 17:04:31 +02:00
<script src="./boolean_setting.js"></script>