mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
81 lines
1.6 KiB
Vue
81 lines
1.6 KiB
Vue
<template>
|
|
<ul>
|
|
<li><i @click.stop.prevent="about" class="fas fa-question-circle" /></li>
|
|
<li>
|
|
<i
|
|
class="fas fa-shield-alt"
|
|
v-tooltip="{
|
|
content: $t('admin_loggedin'),
|
|
placement: 'right',
|
|
offset: 5,
|
|
boundariesElement: 'body',
|
|
}"
|
|
v-if="admin"
|
|
/>
|
|
</li>
|
|
<li>
|
|
<select v-model="$i18n.locale">
|
|
<option v-for="(lang, i) in langs" :key="`Lang${i}`" :value="lang">
|
|
{{ lang }}
|
|
</option>
|
|
</select>
|
|
</li>
|
|
</ul>
|
|
</template>
|
|
|
|
<style lang="scss" scoped>
|
|
ul {
|
|
li {
|
|
display: inline-block;
|
|
margin-right: 10px;
|
|
|
|
i {
|
|
font-size: 24px;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
}
|
|
|
|
select {
|
|
appearance: none;
|
|
background-color: $background-tertiary;
|
|
border: 1px solid $background-primary;
|
|
color: white;
|
|
cursor: pointer;
|
|
border-radius: 5px;
|
|
height: 24px;
|
|
vertical-align: text-bottom;
|
|
display: inline-block;
|
|
|
|
option {
|
|
font-weight: normal;
|
|
color: $text-normal;
|
|
background-color: $background-tertiary;
|
|
}
|
|
|
|
&:hover {
|
|
border: 1px solid $background-primary;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<script lang="ts">
|
|
import { Component, Ref, Watch, Vue } from 'vue-property-decorator'
|
|
import { messages } from '~/locale'
|
|
|
|
@Component({ name: 'neko-menu' })
|
|
export default class extends Vue {
|
|
get admin() {
|
|
return this.$accessor.user.admin
|
|
}
|
|
|
|
get langs() {
|
|
return Object.keys(messages)
|
|
}
|
|
|
|
about() {
|
|
this.$accessor.client.toggleAbout()
|
|
}
|
|
}
|
|
</script>
|