aboutsummaryrefslogtreecommitdiff
path: root/src/components/scope_selector/scope_selector.vue
blob: a43af23b68c1c42ea8b68fd64bb034cd78f3c10b (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<template>
  <div
    v-if="!showNothing"
    class="ScopeSelector"
  >
    <span
      v-if="showDirect"
      class="scope"
      :class="css.direct"
      :title="$t('post_status.scope.direct')"
      @click="changeVis('direct')"
    >
      <FAIcon
        icon="envelope"
        class="button-icon"
        size="lg"
      />
    </span>
    <span
      v-if="showPrivate"
      class="scope"
      :class="css.private"
      :title="$t('post_status.scope.private')"
      @click="changeVis('private')"
    >
      <FAIcon
        icon="lock"
        class="button-icon"
        size="lg"
      />
    </span>
    <span
      v-if="showUnlisted"
      class="scope"
      :class="css.unlisted"
      :title="$t('post_status.scope.unlisted')"
      @click="changeVis('unlisted')"
    >
      <FAIcon
        icon="lock-open"
        class="button-icon"
        size="lg"
      />
    </span>
    <span
      v-if="showPublic"
      class="scope"
      :class="css.public"
      :title="$t('post_status.scope.public')"
      @click="changeVis('public')"
    >
      <FAIcon
        icon="globe"
        class="button-icon"
        size="lg"
      />
    </span>
  </div>
</template>

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

<style lang="scss">
@import '../../_variables.scss';

.ScopeSelector {

  .scope {
    display: inline-block;
    cursor: pointer;
    min-width: 1.3em;
    min-height: 1.3em;
    text-align: center;

    &.selected svg {
      color: $fallback--lightText;
      color: var(--lightText, $fallback--lightText);
    }
  }
}
</style>