akkoma-fe/src/components/scope_selector/scope_selector.vue

82 lines
1.5 KiB
Vue
Raw Normal View History

<template>
2019-07-05 07:17:44 +00:00
<div
v-if="!showNothing"
class="ScopeSelector"
2020-10-20 21:31:16 +00:00
>
<span
2019-07-05 07:17:44 +00:00
v-if="showDirect"
class="scope"
2019-07-05 07:17:44 +00:00
:class="css.direct"
:title="$t('post_status.scope.direct')"
@click="changeVis('direct')"
2020-10-20 21:31:16 +00:00
>
<FAIcon
icon="envelope"
class="button-icon"
size="lg"
/>
</span>
<span
2019-07-05 07:17:44 +00:00
v-if="showPrivate"
2020-10-20 21:31:16 +00:00
class="scope"
2019-07-05 07:17:44 +00:00
:class="css.private"
:title="$t('post_status.scope.private')"
@click="changeVis('private')"
2020-10-20 21:31:16 +00:00
>
<FAIcon
icon="lock"
class="button-icon"
size="lg"
/>
</span>
<span
2019-07-05 07:17:44 +00:00
v-if="showUnlisted"
class="scope"
2019-07-05 07:17:44 +00:00
:class="css.unlisted"
:title="$t('post_status.scope.unlisted')"
@click="changeVis('unlisted')"
2020-10-20 21:31:16 +00:00
>
<FAIcon
icon="lock-open"
class="button-icon"
size="lg"
/>
</span>
<span
2019-07-05 07:17:44 +00:00
v-if="showPublic"
class="scope"
2019-07-05 07:17:44 +00:00
:class="css.public"
:title="$t('post_status.scope.public')"
@click="changeVis('public')"
2020-10-20 21:31:16 +00:00
>
<FAIcon
icon="globe"
class="button-icon"
size="lg"
/>
</span>
2019-07-05 07:17:44 +00:00
</div>
</template>
<script src="./scope_selector.js"></script>
2019-05-15 20:51:30 +00:00
<style lang="scss">
@import '../../_variables.scss';
.ScopeSelector {
.scope {
display: inline-block;
2019-05-15 20:51:30 +00:00
cursor: pointer;
min-width: 1.3em;
min-height: 1.3em;
text-align: center;
2019-05-15 20:51:30 +00:00
&.selected svg {
2019-05-15 20:51:30 +00:00
color: $fallback--lightText;
color: var(--lightText, $fallback--lightText);
}
}
}
</style>