2020-11-17 14:52:07 +01:00
|
|
|
<template>
|
2021-12-16 18:14:40 +01:00
|
|
|
<MkModal ref="modal" :prefer-type="'dialog'" @click="$refs.modal.close()" @closed="$emit('closed')">
|
2020-11-17 14:52:07 +01:00
|
|
|
<div class="szkkfdyq _popup">
|
|
|
|
<div class="main">
|
|
|
|
<template v-for="item in items">
|
2021-11-19 11:36:12 +01:00
|
|
|
<button v-if="item.action" v-click-anime class="_button" @click="$event => { item.action($event); close(); }">
|
2021-04-20 16:22:59 +02:00
|
|
|
<i class="icon" :class="item.icon"></i>
|
2020-11-17 14:52:07 +01:00
|
|
|
<div class="text">{{ item.text }}</div>
|
2021-04-20 16:22:59 +02:00
|
|
|
<span v-if="item.indicate" class="indicator"><i class="fas fa-circle"></i></span>
|
2020-11-17 14:52:07 +01:00
|
|
|
</button>
|
2021-11-19 11:36:12 +01:00
|
|
|
<MkA v-else v-click-anime :to="item.to" @click.passive="close()">
|
2021-04-20 16:22:59 +02:00
|
|
|
<i class="icon" :class="item.icon"></i>
|
2020-11-17 14:52:07 +01:00
|
|
|
<div class="text">{{ item.text }}</div>
|
2021-04-20 16:22:59 +02:00
|
|
|
<span v-if="item.indicate" class="indicator"><i class="fas fa-circle"></i></span>
|
2020-11-17 14:52:07 +01:00
|
|
|
</MkA>
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
<div class="sub">
|
2021-11-19 11:36:12 +01:00
|
|
|
<a v-click-anime href="https://misskey-hub.net/help.html" target="_blank" @click.passive="close()">
|
2021-04-20 16:22:59 +02:00
|
|
|
<i class="fas fa-question-circle icon"></i>
|
2020-12-26 02:47:36 +01:00
|
|
|
<div class="text">{{ $ts.help }}</div>
|
2021-11-05 08:18:52 +01:00
|
|
|
</a>
|
2021-11-19 11:36:12 +01:00
|
|
|
<MkA v-click-anime to="/about" @click.passive="close()">
|
2021-04-20 16:22:59 +02:00
|
|
|
<i class="fas fa-info-circle icon"></i>
|
2020-11-17 14:52:07 +01:00
|
|
|
<div class="text">{{ $t('aboutX', { x: instanceName }) }}</div>
|
|
|
|
</MkA>
|
2021-11-19 11:36:12 +01:00
|
|
|
<MkA v-click-anime to="/about-misskey" @click.passive="close()">
|
2021-04-25 05:31:11 +02:00
|
|
|
<img src="/static-assets/favicon.png" class="icon"/>
|
2020-12-26 02:47:36 +01:00
|
|
|
<div class="text">{{ $ts.aboutMisskey }}</div>
|
2020-11-17 14:52:07 +01:00
|
|
|
</MkA>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MkModal>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
2021-11-11 18:02:25 +01:00
|
|
|
import MkModal from '@/components/ui/modal.vue';
|
|
|
|
import { menuDef } from '@/menu';
|
|
|
|
import { instanceName } from '@/config';
|
2020-11-17 14:52:07 +01:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
|
|
|
MkModal,
|
|
|
|
},
|
|
|
|
|
|
|
|
emits: ['closed'],
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
2021-07-19 04:36:35 +02:00
|
|
|
menuDef: menuDef,
|
2020-11-17 14:52:07 +01:00
|
|
|
items: [],
|
|
|
|
instanceName,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
menu(): string[] {
|
2020-12-19 02:55:52 +01:00
|
|
|
return this.$store.state.menu;
|
2020-11-17 14:52:07 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
|
|
|
this.items = Object.keys(this.menuDef).filter(k => !this.menu.includes(k)).map(k => this.menuDef[k]).filter(def => def.show == null ? true : def.show).map(def => ({
|
|
|
|
type: def.to ? 'link' : 'button',
|
2020-12-26 07:38:51 +01:00
|
|
|
text: this.$ts[def.title],
|
2020-11-17 14:52:07 +01:00
|
|
|
icon: def.icon,
|
|
|
|
to: def.to,
|
|
|
|
action: def.action,
|
|
|
|
indicate: def.indicated,
|
|
|
|
}));
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
close() {
|
|
|
|
this.$refs.modal.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.szkkfdyq {
|
|
|
|
width: 100%;
|
|
|
|
max-height: 100%;
|
|
|
|
max-width: 800px;
|
|
|
|
padding: 32px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
overflow: auto;
|
|
|
|
text-align: center;
|
|
|
|
border-radius: 16px;
|
|
|
|
|
|
|
|
@media (max-width: 500px) {
|
|
|
|
padding: 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .main, > .sub {
|
|
|
|
> * {
|
|
|
|
position: relative;
|
|
|
|
display: inline-flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2021-04-25 05:31:11 +02:00
|
|
|
vertical-align: bottom;
|
2020-11-17 14:52:07 +01:00
|
|
|
width: 128px;
|
|
|
|
height: 128px;
|
|
|
|
border-radius: var(--radius);
|
|
|
|
|
|
|
|
@media (max-width: 500px) {
|
|
|
|
width: 100px;
|
|
|
|
height: 100px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background: rgba(0, 0, 0, 0.05);
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .icon {
|
|
|
|
font-size: 26px;
|
2021-04-25 05:31:11 +02:00
|
|
|
height: 32px;
|
2020-11-17 14:52:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
> .text {
|
|
|
|
margin-top: 8px;
|
|
|
|
font-size: 0.9em;
|
|
|
|
line-height: 1.5em;
|
|
|
|
}
|
|
|
|
|
2021-04-20 16:22:59 +02:00
|
|
|
> .indicator {
|
2020-11-17 14:52:07 +01:00
|
|
|
position: absolute;
|
|
|
|
top: 32px;
|
|
|
|
left: 32px;
|
|
|
|
color: var(--indicator);
|
|
|
|
font-size: 8px;
|
|
|
|
animation: blink 1s infinite;
|
|
|
|
|
|
|
|
@media (max-width: 500px) {
|
|
|
|
top: 16px;
|
|
|
|
left: 16px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .sub {
|
|
|
|
margin-top: 8px;
|
|
|
|
padding-top: 8px;
|
2021-04-10 05:40:50 +02:00
|
|
|
border-top: solid 0.5px var(--divider);
|
2020-11-17 14:52:07 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|