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

41 lines
985 B
Vue

<template>
<span
v-if="matchesExpertLevel"
class="NumberSetting"
>
<label :for="path" :class="{ 'faint': shouldBeDisabled }">
<template v-if="backendDescription">
{{ backendDescriptionLabel + ' ' }}
</template>
<template v-else>
<slot />
</template>
</label>
<input
:id="path"
class="number-input"
type="number"
:step="step || 1"
:disabled="shouldBeDisabled"
:min="min || 0"
:value="realDraftMode ? draft :state"
@change="update"
>
{{ ' ' }}
<ModifiedIndicator
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<DraftButtons />
<p
v-if="backendDescriptionDescription"
class="setting-description"
:class="{ 'faint': shouldBeDisabled }"
>
{{ backendDescriptionDescription + ' ' }}
</p>
</span>
</template>
<script src="./number_setting.js"></script>