2020-12-31 02:43:24 +09:00
|
|
|
<template>
|
2021-11-19 19:36:12 +09:00
|
|
|
<div v-if="meta" class="rsqzvsbo">
|
2020-12-31 02:43:24 +09:00
|
|
|
<div class="top">
|
|
|
|
<MkFeaturedPhotos class="bg"/>
|
|
|
|
<div class="fade"></div>
|
|
|
|
<div class="emojis">
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="👍"/>
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="❤"/>
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="😆"/>
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="🎉"/>
|
|
|
|
<MkEmoji :normal="true" :no-style="true" emoji="🍮"/>
|
|
|
|
</div>
|
|
|
|
<div class="main">
|
2021-11-12 02:02:25 +09:00
|
|
|
<img src="/client-assets/misskey.svg" class="misskey"/>
|
2020-12-31 02:43:24 +09:00
|
|
|
<div class="form _panel">
|
|
|
|
<div class="bg">
|
|
|
|
<div class="fade"></div>
|
|
|
|
</div>
|
|
|
|
<div class="fg">
|
|
|
|
<h1>
|
2021-11-19 19:36:12 +09:00
|
|
|
<img v-if="meta.logoImageUrl" class="logo" :src="meta.logoImageUrl"><span v-else class="text">{{ instanceName }}</span>
|
2020-12-31 02:43:24 +09:00
|
|
|
</h1>
|
|
|
|
<div class="about">
|
2022-07-05 11:21:59 +09:00
|
|
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
2023-04-01 14:01:57 +09:00
|
|
|
<div class="desc" v-html="meta.description || i18n.ts.headlineMisskey"></div>
|
2020-12-31 02:43:24 +09:00
|
|
|
</div>
|
|
|
|
<div class="action">
|
2023-04-01 14:01:57 +09:00
|
|
|
<MkButton inline gradate @click="signup()">{{ i18n.ts.signup }}</MkButton>
|
|
|
|
<MkButton inline @click="signin()">{{ i18n.ts.login }}</MkButton>
|
2020-12-31 02:43:24 +09:00
|
|
|
</div>
|
2021-11-19 19:36:12 +09:00
|
|
|
<div v-if="onlineUsersCount && stats" class="status">
|
2020-12-31 02:43:24 +09:00
|
|
|
<div>
|
2023-04-01 14:01:57 +09:00
|
|
|
<I18n :src="i18n.ts.nUsers" text-tag="span" class="users">
|
2020-12-31 02:43:24 +09:00
|
|
|
<template #n><b>{{ number(stats.originalUsersCount) }}</b></template>
|
|
|
|
</I18n>
|
2023-04-01 14:01:57 +09:00
|
|
|
<I18n :src="i18n.ts.nNotes" text-tag="span" class="notes">
|
2020-12-31 02:43:24 +09:00
|
|
|
<template #n><b>{{ number(stats.originalNotesCount) }}</b></template>
|
|
|
|
</I18n>
|
|
|
|
</div>
|
2023-04-01 14:01:57 +09:00
|
|
|
<I18n :src="i18n.ts.onlineUsersCount" text-tag="span" class="online">
|
2020-12-31 02:43:24 +09:00
|
|
|
<template #n><b>{{ onlineUsersCount }}</b></template>
|
|
|
|
</I18n>
|
|
|
|
</div>
|
2022-12-19 19:01:30 +09:00
|
|
|
<button class="_button _acrylic menu" @click="showMenu"><i class="ti ti-dots"></i></button>
|
2020-12-31 02:43:24 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<nav class="nav">
|
2023-04-01 14:01:57 +09:00
|
|
|
<MkA to="/announcements">{{ i18n.ts.announcements }}</MkA>
|
|
|
|
<MkA to="/explore">{{ i18n.ts.explore }}</MkA>
|
|
|
|
<MkA to="/channels">{{ i18n.ts.channel }}</MkA>
|
|
|
|
<MkA to="/featured">{{ i18n.ts.featured }}</MkA>
|
2020-12-31 02:43:24 +09:00
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
2021-04-04 13:00:39 +09:00
|
|
|
import { toUnicode } from 'punycode/';
|
2023-04-01 14:01:57 +09:00
|
|
|
import XTimeline from './welcome.timeline.vue';
|
2022-08-31 00:24:33 +09:00
|
|
|
import XSigninDialog from '@/components/MkSigninDialog.vue';
|
|
|
|
import XSignupDialog from '@/components/MkSignupDialog.vue';
|
2022-09-06 18:21:49 +09:00
|
|
|
import MkButton from '@/components/MkButton.vue';
|
2023-03-31 14:14:30 +09:00
|
|
|
import MkNote from '@/components/MkNote.vue';
|
2022-08-31 00:24:33 +09:00
|
|
|
import MkFeaturedPhotos from '@/components/MkFeaturedPhotos.vue';
|
2021-11-12 02:02:25 +09:00
|
|
|
import { host, instanceName } from '@/config';
|
|
|
|
import * as os from '@/os';
|
|
|
|
import number from '@/filters/number';
|
2023-04-01 14:01:57 +09:00
|
|
|
import { i18n } from '@/i18n';
|
2020-12-31 02:43:24 +09:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
|
|
|
MkButton,
|
2023-03-31 14:14:30 +09:00
|
|
|
MkNote,
|
2020-12-31 02:43:24 +09:00
|
|
|
MkFeaturedPhotos,
|
|
|
|
XTimeline,
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
host: toUnicode(host),
|
|
|
|
instanceName,
|
|
|
|
meta: null,
|
|
|
|
stats: null,
|
|
|
|
tags: [],
|
|
|
|
onlineUsersCount: null,
|
2023-04-01 14:01:57 +09:00
|
|
|
i18n,
|
2020-12-31 02:43:24 +09:00
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
|
|
|
os.api('meta', { detail: true }).then(meta => {
|
|
|
|
this.meta = meta;
|
|
|
|
});
|
|
|
|
|
|
|
|
os.api('stats').then(stats => {
|
|
|
|
this.stats = stats;
|
|
|
|
});
|
|
|
|
|
|
|
|
os.api('get-online-users-count').then(res => {
|
|
|
|
this.onlineUsersCount = res.count;
|
|
|
|
});
|
|
|
|
|
|
|
|
os.api('hashtags/list', {
|
|
|
|
sort: '+mentionedLocalUsers',
|
2022-12-22 16:01:59 +09:00
|
|
|
limit: 8,
|
2020-12-31 02:43:24 +09:00
|
|
|
}).then(tags => {
|
|
|
|
this.tags = tags;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
signin() {
|
|
|
|
os.popup(XSigninDialog, {
|
2022-12-22 16:01:59 +09:00
|
|
|
autoSet: true,
|
2020-12-31 02:43:24 +09:00
|
|
|
}, {}, 'closed');
|
|
|
|
},
|
|
|
|
|
|
|
|
signup() {
|
|
|
|
os.popup(XSignupDialog, {
|
2022-12-22 16:01:59 +09:00
|
|
|
autoSet: true,
|
2020-12-31 02:43:24 +09:00
|
|
|
}, {}, 'closed');
|
|
|
|
},
|
|
|
|
|
|
|
|
showMenu(ev) {
|
2021-08-08 12:19:10 +09:00
|
|
|
os.popupMenu([{
|
2023-04-01 14:01:57 +09:00
|
|
|
text: i18n.t('aboutX', { x: instanceName }),
|
2022-12-19 19:01:30 +09:00
|
|
|
icon: 'ti ti-info-circle',
|
2020-12-31 02:43:24 +09:00
|
|
|
action: () => {
|
|
|
|
os.pageWindow('/about');
|
2022-12-22 16:01:59 +09:00
|
|
|
},
|
2020-12-31 02:43:24 +09:00
|
|
|
}, {
|
2023-04-01 14:01:57 +09:00
|
|
|
text: i18n.ts.aboutMisskey,
|
2022-12-19 19:01:30 +09:00
|
|
|
icon: 'ti ti-info-circle',
|
2020-12-31 02:43:24 +09:00
|
|
|
action: () => {
|
|
|
|
os.pageWindow('/about-misskey');
|
2022-12-22 16:01:59 +09:00
|
|
|
},
|
2020-12-31 02:43:24 +09:00
|
|
|
}, null, {
|
2023-04-01 14:01:57 +09:00
|
|
|
text: i18n.ts.help,
|
2022-12-19 19:01:30 +09:00
|
|
|
icon: 'ti ti-question-circle',
|
2020-12-31 02:43:24 +09:00
|
|
|
action: () => {
|
2023-04-01 14:01:57 +09:00
|
|
|
window.open('https://misskey-hub.net/help.md', '_blank');
|
2022-12-22 16:01:59 +09:00
|
|
|
},
|
2022-01-28 11:53:12 +09:00
|
|
|
}], ev.currentTarget ?? ev.target);
|
2020-12-31 02:43:24 +09:00
|
|
|
},
|
|
|
|
|
2022-12-22 16:01:59 +09:00
|
|
|
number,
|
|
|
|
},
|
2020-12-31 02:43:24 +09:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2022-12-27 18:29:39 +09:00
|
|
|
<style lang="scss" scoped>
|
2020-12-31 02:43:24 +09:00
|
|
|
.rsqzvsbo {
|
|
|
|
> .top {
|
|
|
|
display: flex;
|
|
|
|
text-align: center;
|
|
|
|
min-height: 100vh;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 16px;
|
|
|
|
|
|
|
|
> .bg {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .fade {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background: rgba(0, 0, 0, 0.25);
|
|
|
|
}
|
|
|
|
|
|
|
|
> .emojis {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 32px;
|
|
|
|
left: 35px;
|
|
|
|
|
|
|
|
> * {
|
|
|
|
margin-right: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: 1200px) {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .main {
|
|
|
|
position: relative;
|
|
|
|
width: min(460px, 100%);
|
|
|
|
margin: auto;
|
|
|
|
|
|
|
|
> .misskey {
|
|
|
|
width: 150px;
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
|
|
@media (max-width: 450px) {
|
|
|
|
width: 130px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .form {
|
|
|
|
position: relative;
|
|
|
|
box-shadow: 0 12px 32px rgb(0 0 0 / 25%);
|
|
|
|
|
|
|
|
> .bg {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
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));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .fg {
|
|
|
|
position: relative;
|
|
|
|
z-index: 1;
|
|
|
|
|
|
|
|
> h1 {
|
|
|
|
display: block;
|
|
|
|
margin: 0;
|
|
|
|
padding: 32px 32px 24px 32px;
|
|
|
|
|
|
|
|
> .logo {
|
|
|
|
vertical-align: bottom;
|
|
|
|
max-height: 120px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .about {
|
|
|
|
padding: 0 32px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .action {
|
|
|
|
padding: 32px;
|
|
|
|
|
|
|
|
> * {
|
|
|
|
line-height: 28px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .status {
|
2021-04-10 12:40:50 +09:00
|
|
|
border-top: solid 0.5px var(--divider);
|
2020-12-31 02:43:24 +09:00
|
|
|
padding: 32px;
|
|
|
|
font-size: 90%;
|
|
|
|
|
|
|
|
> div {
|
|
|
|
> span:not(:last-child) {
|
|
|
|
padding-right: 1em;
|
|
|
|
margin-right: 1em;
|
2021-04-10 12:40:50 +09:00
|
|
|
border-right: solid 0.5px var(--divider);
|
2020-12-31 02:43:24 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .online {
|
|
|
|
::v-deep(b) {
|
|
|
|
color: #41b781;
|
|
|
|
}
|
|
|
|
|
|
|
|
::v-deep(span) {
|
|
|
|
opacity: 0.7;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .menu {
|
|
|
|
position: absolute;
|
|
|
|
top: 16px;
|
|
|
|
right: 16px;
|
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
border-radius: 8px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> .nav {
|
|
|
|
position: relative;
|
|
|
|
z-index: 2;
|
|
|
|
margin-top: 20px;
|
|
|
|
color: #fff;
|
|
|
|
text-shadow: 0 0 8px black;
|
2020-12-31 11:46:07 +09:00
|
|
|
font-size: 0.9em;
|
2020-12-31 02:43:24 +09:00
|
|
|
|
|
|
|
> *:not(:last-child) {
|
2020-12-31 11:46:07 +09:00
|
|
|
margin-right: 1.5em;
|
2020-12-31 02:43:24 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|