2020-10-17 13:12:00 +02:00
|
|
|
<template>
|
2020-12-30 05:07:16 +01:00
|
|
|
<div class="rsqzvsbo" v-if="meta">
|
|
|
|
<div class="top">
|
2020-12-30 11:24:01 +01:00
|
|
|
<div class="shape"></div>
|
|
|
|
<img src="/assets/misskey.svg" class="misskey"/>
|
2020-12-30 05:07:16 +01:00
|
|
|
<div class="main _panel">
|
2020-12-30 11:26:47 +01:00
|
|
|
<div class="bg">
|
2020-12-30 05:07:16 +01:00
|
|
|
<div class="fade"></div>
|
|
|
|
</div>
|
|
|
|
<div class="fg">
|
|
|
|
<h1>
|
|
|
|
<img class="logo" v-if="meta.logoImageUrl" :src="meta.logoImageUrl"><span v-else class="text">{{ instanceName }}</span>
|
|
|
|
</h1>
|
|
|
|
<div class="about">
|
|
|
|
<div class="desc" v-html="meta.description || $ts.introMisskey"></div>
|
|
|
|
</div>
|
|
|
|
<div class="action">
|
|
|
|
<MkButton @click="signup()" inline primary>{{ $ts.signup }}</MkButton>
|
|
|
|
<MkButton @click="signin()" inline>{{ $ts.login }}</MkButton>
|
|
|
|
</div>
|
|
|
|
<div class="status" v-if="onlineUsersCount">
|
|
|
|
<I18n :src="$ts.onlineUsersCount" text-tag="span" class="online">
|
|
|
|
<template #n><b>{{ onlineUsersCount }}</b></template>
|
|
|
|
</I18n>
|
|
|
|
</div>
|
|
|
|
<button class="_button _acrylic menu" @click="showMenu"><Fa :icon="faEllipsisH"/></button>
|
|
|
|
</div>
|
2020-12-05 10:18:37 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-10-17 13:12:00 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
2020-12-30 05:07:16 +01:00
|
|
|
import { faEllipsisH, faInfoCircle, faQuestionCircle } from '@fortawesome/free-solid-svg-icons';
|
2020-10-17 13:12:00 +02:00
|
|
|
import { toUnicode } from 'punycode';
|
|
|
|
import XSigninDialog from '@/components/signin-dialog.vue';
|
|
|
|
import XSignupDialog from '@/components/signup-dialog.vue';
|
|
|
|
import MkButton from '@/components/ui/button.vue';
|
2020-12-05 08:05:40 +01:00
|
|
|
import XNote from '@/components/note.vue';
|
|
|
|
import MkPagination from '@/components/ui/pagination.vue';
|
2020-11-17 06:59:15 +01:00
|
|
|
import { host, instanceName } from '@/config';
|
2020-10-17 13:12:00 +02:00
|
|
|
import * as os from '@/os';
|
2020-12-05 10:18:37 +01:00
|
|
|
import number from '@/filters/number';
|
2020-10-17 13:12:00 +02:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
|
|
|
MkButton,
|
2020-12-05 08:05:40 +01:00
|
|
|
XNote,
|
|
|
|
MkPagination,
|
2020-10-17 13:12:00 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
host: toUnicode(host),
|
2020-11-17 06:59:15 +01:00
|
|
|
instanceName,
|
|
|
|
meta: null,
|
2020-12-05 10:18:37 +01:00
|
|
|
stats: null,
|
|
|
|
tags: [],
|
2020-12-30 05:07:16 +01:00
|
|
|
onlineUsersCount: null,
|
2020-12-05 10:18:37 +01:00
|
|
|
clipPagination: {
|
2020-12-05 08:05:40 +01:00
|
|
|
endpoint: 'clips/notes',
|
|
|
|
limit: 10,
|
|
|
|
params: () => ({
|
|
|
|
clipId: this.meta.pinnedClipId,
|
|
|
|
})
|
|
|
|
},
|
2020-12-05 10:18:37 +01:00
|
|
|
featuredPagination: {
|
|
|
|
endpoint: 'notes/featured',
|
|
|
|
limit: 10,
|
|
|
|
offsetMode: true
|
|
|
|
},
|
2020-12-30 05:07:16 +01:00
|
|
|
faEllipsisH
|
2020-10-17 13:12:00 +02:00
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
2020-11-17 06:59:15 +01:00
|
|
|
os.api('meta', { detail: true }).then(meta => {
|
|
|
|
this.meta = meta;
|
|
|
|
});
|
|
|
|
|
2020-10-17 13:12:00 +02:00
|
|
|
os.api('stats').then(stats => {
|
|
|
|
this.stats = stats;
|
|
|
|
});
|
2020-12-05 10:18:37 +01:00
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
os.api('get-online-users-count').then(res => {
|
|
|
|
this.onlineUsersCount = res.count;
|
|
|
|
});
|
|
|
|
|
2020-12-05 10:18:37 +01:00
|
|
|
os.api('hashtags/list', {
|
|
|
|
sort: '+mentionedLocalUsers',
|
|
|
|
limit: 8
|
|
|
|
}).then(tags => {
|
|
|
|
this.tags = tags;
|
|
|
|
});
|
2020-10-17 13:12:00 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
signin() {
|
|
|
|
os.popup(XSigninDialog, {
|
|
|
|
autoSet: true
|
|
|
|
}, {}, 'closed');
|
|
|
|
},
|
|
|
|
|
|
|
|
signup() {
|
|
|
|
os.popup(XSignupDialog, {
|
|
|
|
autoSet: true
|
|
|
|
}, {}, 'closed');
|
2020-12-05 10:18:37 +01:00
|
|
|
},
|
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
showMenu(ev) {
|
|
|
|
os.modalMenu([{
|
|
|
|
text: this.$t('aboutX', { x: instanceName }),
|
|
|
|
icon: faInfoCircle,
|
|
|
|
action: () => {
|
|
|
|
os.pageWindow('/about');
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
text: this.$ts.aboutMisskey,
|
|
|
|
icon: faInfoCircle,
|
|
|
|
action: () => {
|
|
|
|
os.pageWindow('/about-misskey');
|
|
|
|
}
|
|
|
|
}, null, {
|
|
|
|
text: this.$ts.help,
|
|
|
|
icon: faQuestionCircle,
|
|
|
|
action: () => {
|
|
|
|
os.pageWindow('/docs');
|
|
|
|
}
|
|
|
|
}], ev.currentTarget || ev.target);
|
|
|
|
},
|
|
|
|
|
2020-12-05 10:18:37 +01:00
|
|
|
number
|
2020-10-17 13:12:00 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.rsqzvsbo {
|
2020-12-30 05:07:16 +01:00
|
|
|
> .top {
|
|
|
|
display: flex;
|
|
|
|
text-align: center;
|
|
|
|
min-height: 100vh;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 16px;
|
|
|
|
|
2020-12-30 11:24:01 +01:00
|
|
|
> .shape {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background: var(--accent);
|
|
|
|
clip-path: polygon(0% 0%, 50% 0%, 15% 100%, 0% 100%);
|
|
|
|
}
|
|
|
|
|
|
|
|
> .misskey {
|
|
|
|
position: absolute;
|
|
|
|
top: 24px;
|
|
|
|
left: 24px;
|
|
|
|
width: 160px;
|
|
|
|
}
|
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
> .main {
|
|
|
|
position: relative;
|
|
|
|
width: min(490px, 100%);
|
2020-12-30 11:24:01 +01:00
|
|
|
margin: auto auto auto 128px;
|
2020-12-30 05:07:16 +01:00
|
|
|
box-shadow: 0 12px 32px rgb(0 0 0 / 25%);
|
|
|
|
|
2020-12-30 11:24:01 +01:00
|
|
|
@media (max-width: 1200px) {
|
|
|
|
margin: auto;
|
|
|
|
}
|
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
> .bg {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2020-12-05 10:18:37 +01:00
|
|
|
width: 100%;
|
2020-12-30 05:07:16 +01:00
|
|
|
height: 128px;
|
|
|
|
background-position: center;
|
|
|
|
background-size: cover;
|
|
|
|
opacity: 0.75;
|
|
|
|
|
|
|
|
> .fade {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 128px;
|
|
|
|
background: linear-gradient(0deg, var(--panel), var(--X15));
|
|
|
|
}
|
2020-12-05 10:18:37 +01:00
|
|
|
}
|
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
> .fg {
|
|
|
|
position: relative;
|
|
|
|
z-index: 1;
|
2020-12-05 10:18:37 +01:00
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
> h1 {
|
|
|
|
display: block;
|
|
|
|
margin: 0;
|
|
|
|
padding: 32px 32px 24px 32px;
|
2020-12-05 10:18:37 +01:00
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
> .logo {
|
|
|
|
vertical-align: bottom;
|
|
|
|
max-height: 120px;
|
|
|
|
}
|
2020-12-05 10:18:37 +01:00
|
|
|
}
|
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
> .about {
|
|
|
|
padding: 0 32px;
|
2020-12-05 10:18:37 +01:00
|
|
|
}
|
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
> .action {
|
|
|
|
padding: 32px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .status {
|
|
|
|
border-top: solid 1px var(--divider);
|
|
|
|
padding: 32px;
|
|
|
|
|
|
|
|
> .online {
|
|
|
|
::v-deep(b) {
|
|
|
|
color: #41b781;
|
|
|
|
}
|
2020-12-05 10:18:37 +01:00
|
|
|
|
2020-12-30 05:07:16 +01:00
|
|
|
::v-deep(span) {
|
|
|
|
opacity: 0.7;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .menu {
|
|
|
|
position: absolute;
|
|
|
|
top: 16px;
|
|
|
|
right: 16px;
|
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
border-radius: 8px;
|
|
|
|
}
|
2020-12-05 10:18:37 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-12-05 08:05:40 +01:00
|
|
|
}
|
2020-10-17 13:12:00 +02:00
|
|
|
</style>
|