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

85 lines
1.7 KiB
Vue
Raw Normal View History

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