aboutsummaryrefslogtreecommitdiff
path: root/src/components/settings_modal/helpers/boolean_setting.vue
blob: aedbf23e0186cadd236eff8866914c6e5426bd8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<template>
  <label
    v-if="matchesExpertLevel"
    class="BooleanSetting"
  >
    <Checkbox
      :model-value="draftMode ? draft :state"
      :disabled="shouldBeDisabled"
      @update:modelValue="update"
    >
      <span
        v-if="!!$slots.default"
        class="label"
      >
        <template v-if="backendDescription">
          {{ backendDescriptionLabel + ' ' }}
        </template>
        <template v-else>
          <slot />
        </template>
      </span>
      {{ ' ' }}
      <ModifiedIndicator
        :changed="isChanged"
        :onclick="reset"
      />
      <ProfileSettingIndicator :is-profile="isProfileSetting" />
      <DraftButtons />
      <p
        v-if="backendDescriptionDescription"
        class="setting-description"
      >
        {{ backendDescriptionDescription + ' ' }}
      </p>
    </Checkbox>
  </label>
</template>

<script src="./boolean_setting.js"></script>