2020-10-17 05:12:00 -06:00
|
|
|
<template>
|
2021-11-19 03:36:12 -07:00
|
|
|
<div v-if="meta" class="rsqzvsbo">
|
2020-12-29 21:07:16 -07:00
|
|
|
<div class="top">
|
2020-12-30 08:22:20 -07:00
|
|
|
<MkFeaturedPhotos class="bg"/>
|
|
|
|
<XTimeline class="tl"/>
|
2020-12-30 03:24:01 -07:00
|
|
|
<div class="shape"></div>
|
2020-12-30 08:22:20 -07:00
|
|
|
<div class="main">
|
|
|
|
<h1>
|
2021-11-19 03:36:12 -07:00
|
|
|
<img v-if="meta.logoImageUrl" class="logo" :src="meta.logoImageUrl"><span v-else class="text">{{ instanceName }}</span>
|
2020-12-30 08:22:20 -07:00
|
|
|
</h1>
|
|
|
|
<div class="about">
|
2022-07-04 20:21:59 -06:00
|
|
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
2022-11-10 15:12:44 -07:00
|
|
|
<div class="desc" v-html="meta.description || i18n.ts.headlineMisskey"></div>
|
2020-12-30 08:22:20 -07:00
|
|
|
</div>
|
|
|
|
<div class="action">
|
2022-11-10 15:12:44 -07:00
|
|
|
<MkButton class="signup" inline gradate @click="signup()">{{ i18n.ts.signup }}</MkButton>
|
|
|
|
<MkButton class="signin" inline @click="signin()">{{ i18n.ts.login }}</MkButton>
|
2020-12-29 21:07:16 -07:00
|
|
|
</div>
|
2021-11-19 03:36:12 -07:00
|
|
|
<div v-if="onlineUsersCount && stats" class="status">
|
2020-12-30 19:46:07 -07:00
|
|
|
<div>
|
2022-11-10 15:12:44 -07:00
|
|
|
<I18n :src="i18n.ts.nUsers" text-tag="span" class="users">
|
2020-12-30 19:46:07 -07:00
|
|
|
<template #n><b>{{ number(stats.originalUsersCount) }}</b></template>
|
|
|
|
</I18n>
|
2022-11-10 15:12:44 -07:00
|
|
|
<I18n :src="i18n.ts.nNotes" text-tag="span" class="notes">
|
2020-12-30 19:46:07 -07:00
|
|
|
<template #n><b>{{ number(stats.originalNotesCount) }}</b></template>
|
|
|
|
</I18n>
|
|
|
|
</div>
|
2022-11-10 15:12:44 -07:00
|
|
|
<I18n :src="i18n.ts.onlineUsersCount" text-tag="span" class="online">
|
2020-12-30 08:22:20 -07:00
|
|
|
<template #n><b>{{ onlineUsersCount }}</b></template>
|
|
|
|
</I18n>
|
2020-12-29 21:07:16 -07:00
|
|
|
</div>
|
2020-12-05 02:18:37 -07:00
|
|
|
</div>
|
2021-11-11 10:02:25 -07:00
|
|
|
<img src="/client-assets/misskey.svg" class="misskey"/>
|
2020-12-05 02:18:37 -07:00
|
|
|
</div>
|
2020-10-17 05:12:00 -06:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { defineComponent } from 'vue';
|
2021-04-03 22:00:39 -06:00
|
|
|
import { toUnicode } from 'punycode/';
|
2022-08-30 09:24:33 -06:00
|
|
|
import XSigninDialog from '@/components/MkSigninDialog.vue';
|
|
|
|
import XSignupDialog from '@/components/MkSignupDialog.vue';
|
2022-09-06 03:21:49 -06:00
|
|
|
import MkButton from '@/components/MkButton.vue';
|
2022-08-30 09:24:33 -06:00
|
|
|
import XNote from '@/components/MkNote.vue';
|
|
|
|
import MkFeaturedPhotos from '@/components/MkFeaturedPhotos.vue';
|
2020-12-30 08:22:20 -07:00
|
|
|
import XTimeline from './welcome.timeline.vue';
|
2021-11-11 10:02:25 -07:00
|
|
|
import { host, instanceName } from '@/config';
|
|
|
|
import * as os from '@/os';
|
|
|
|
import number from '@/filters/number';
|
2022-11-10 15:12:44 -07:00
|
|
|
import { i18n } from '@/i18n';
|
2020-10-17 05:12:00 -06:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
components: {
|
|
|
|
MkButton,
|
2020-12-05 00:05:40 -07:00
|
|
|
XNote,
|
2020-12-30 08:22:20 -07:00
|
|
|
XTimeline,
|
|
|
|
MkFeaturedPhotos,
|
2020-10-17 05:12:00 -06:00
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
host: toUnicode(host),
|
2020-11-16 22:59:15 -07:00
|
|
|
instanceName,
|
|
|
|
meta: null,
|
2020-12-05 02:18:37 -07:00
|
|
|
stats: null,
|
|
|
|
tags: [],
|
2020-12-29 21:07:16 -07:00
|
|
|
onlineUsersCount: null,
|
2022-11-11 01:41:34 -07:00
|
|
|
i18n,
|
2020-10-17 05:12:00 -06:00
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
2020-11-16 22:59:15 -07:00
|
|
|
os.api('meta', { detail: true }).then(meta => {
|
|
|
|
this.meta = meta;
|
|
|
|
});
|
|
|
|
|
2020-10-17 05:12:00 -06:00
|
|
|
os.api('stats').then(stats => {
|
|
|
|
this.stats = stats;
|
|
|
|
});
|
2020-12-05 02:18:37 -07:00
|
|
|
|
2020-12-29 21:07:16 -07:00
|
|
|
os.api('get-online-users-count').then(res => {
|
|
|
|
this.onlineUsersCount = res.count;
|
|
|
|
});
|
|
|
|
|
2020-12-05 02:18:37 -07:00
|
|
|
os.api('hashtags/list', {
|
|
|
|
sort: '+mentionedLocalUsers',
|
|
|
|
limit: 8
|
|
|
|
}).then(tags => {
|
|
|
|
this.tags = tags;
|
|
|
|
});
|
2020-10-17 05:12:00 -06:00
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
signin() {
|
|
|
|
os.popup(XSigninDialog, {
|
|
|
|
autoSet: true
|
|
|
|
}, {}, 'closed');
|
|
|
|
},
|
|
|
|
|
|
|
|
signup() {
|
|
|
|
os.popup(XSignupDialog, {
|
|
|
|
autoSet: true
|
|
|
|
}, {}, 'closed');
|
2020-12-05 02:18:37 -07:00
|
|
|
},
|
|
|
|
|
2020-12-29 21:07:16 -07:00
|
|
|
showMenu(ev) {
|
2021-08-07 21:19:10 -06:00
|
|
|
os.popupMenu([{
|
2022-11-16 02:29:18 -07:00
|
|
|
text: i18n.t('aboutX', { x: instanceName }),
|
2022-11-06 19:49:47 -07:00
|
|
|
icon: 'ph-info-bold ph-lg',
|
2020-12-29 21:07:16 -07:00
|
|
|
action: () => {
|
|
|
|
os.pageWindow('/about');
|
|
|
|
}
|
|
|
|
}, {
|
2022-11-11 01:22:00 -07:00
|
|
|
text: i18n.ts.aboutMisskey,
|
2022-11-06 19:49:47 -07:00
|
|
|
icon: 'ph-info-bold ph-lg',
|
2020-12-29 21:07:16 -07:00
|
|
|
action: () => {
|
2022-09-10 13:25:22 -06:00
|
|
|
os.pageWindow('/about-calckey');
|
2020-12-29 21:07:16 -07:00
|
|
|
}
|
|
|
|
}, null, {
|
2022-11-11 01:22:00 -07:00
|
|
|
text: i18n.ts.help,
|
2022-11-06 19:49:47 -07:00
|
|
|
icon: 'ph-question-bold ph-lg',
|
2020-12-29 21:07:16 -07:00
|
|
|
action: () => {
|
2021-11-05 01:18:52 -06:00
|
|
|
window.open(`https://misskey-hub.net/help.md`, '_blank');
|
2020-12-29 21:07:16 -07:00
|
|
|
}
|
2022-01-27 19:53:12 -07:00
|
|
|
}], ev.currentTarget ?? ev.target);
|
2020-12-29 21:07:16 -07:00
|
|
|
},
|
|
|
|
|
2020-12-05 02:18:37 -07:00
|
|
|
number
|
2020-10-17 05:12:00 -06:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.rsqzvsbo {
|
2020-12-29 21:07:16 -07:00
|
|
|
> .top {
|
|
|
|
min-height: 100vh;
|
|
|
|
box-sizing: border-box;
|
2020-12-30 08:22:20 -07:00
|
|
|
|
|
|
|
> .bg {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
> .tl {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
right: 64px;
|
|
|
|
margin: auto;
|
|
|
|
width: 500px;
|
|
|
|
height: calc(100% - 128px);
|
2021-03-02 06:57:16 -07:00
|
|
|
overflow: hidden;
|
2020-12-30 08:22:20 -07:00
|
|
|
-webkit-mask-image: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 128px, rgba(0,0,0,1) calc(100% - 128px), rgba(0,0,0,0) 100%);
|
|
|
|
mask-image: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 128px, rgba(0,0,0,1) calc(100% - 128px), rgba(0,0,0,0) 100%);
|
|
|
|
}
|
2020-12-29 21:07:16 -07:00
|
|
|
|
2020-12-30 03:24:01 -07:00
|
|
|
> .shape {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background: var(--accent);
|
2020-12-30 08:22:20 -07:00
|
|
|
clip-path: polygon(0% 0%, 40% 0%, 22% 100%, 0% 100%);
|
2020-12-30 03:24:01 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
> .misskey {
|
|
|
|
position: absolute;
|
2020-12-30 08:22:20 -07:00
|
|
|
bottom: 64px;
|
|
|
|
left: 64px;
|
2020-12-30 03:24:01 -07:00
|
|
|
width: 160px;
|
|
|
|
}
|
|
|
|
|
2020-12-29 21:07:16 -07:00
|
|
|
> .main {
|
|
|
|
position: relative;
|
2020-12-30 19:46:07 -07:00
|
|
|
width: min(450px, 100%);
|
2020-12-30 08:22:20 -07:00
|
|
|
padding: 64px;
|
|
|
|
color: #fff;
|
|
|
|
font-size: 1.1em;
|
2020-12-29 21:07:16 -07:00
|
|
|
|
2020-12-30 03:24:01 -07:00
|
|
|
@media (max-width: 1200px) {
|
|
|
|
margin: auto;
|
|
|
|
}
|
|
|
|
|
2020-12-30 08:22:20 -07:00
|
|
|
> h1 {
|
|
|
|
display: block;
|
2020-12-30 19:46:07 -07:00
|
|
|
margin: 0 0 32px 0;
|
2020-12-30 08:22:20 -07:00
|
|
|
padding: 0;
|
|
|
|
|
|
|
|
> .logo {
|
|
|
|
vertical-align: bottom;
|
|
|
|
max-height: 100px;
|
2020-12-29 21:07:16 -07:00
|
|
|
}
|
2020-12-05 02:18:37 -07:00
|
|
|
}
|
|
|
|
|
2020-12-30 08:22:20 -07:00
|
|
|
> .about {
|
|
|
|
padding: 0;
|
|
|
|
}
|
2020-12-05 02:18:37 -07:00
|
|
|
|
2020-12-30 08:22:20 -07:00
|
|
|
> .action {
|
|
|
|
margin: 32px 0;
|
2020-12-05 02:18:37 -07:00
|
|
|
|
2020-12-30 19:46:07 -07:00
|
|
|
> * {
|
|
|
|
line-height: 32px;
|
|
|
|
}
|
|
|
|
|
2020-12-30 08:22:20 -07:00
|
|
|
> .signup {
|
|
|
|
background: var(--panel);
|
|
|
|
color: var(--fg);
|
2020-12-05 02:18:37 -07:00
|
|
|
}
|
|
|
|
|
2020-12-30 08:22:20 -07:00
|
|
|
> .signin {
|
|
|
|
background: var(--accent);
|
|
|
|
color: inherit;
|
2020-12-29 21:07:16 -07:00
|
|
|
}
|
2020-12-30 08:22:20 -07:00
|
|
|
}
|
2020-12-29 21:07:16 -07:00
|
|
|
|
2020-12-30 08:22:20 -07:00
|
|
|
> .status {
|
|
|
|
margin: 32px 0;
|
2020-12-30 19:46:07 -07:00
|
|
|
border-top: solid 1px rgba(255, 255, 255, 0.5);
|
|
|
|
font-size: 90%;
|
2020-12-05 02:18:37 -07:00
|
|
|
|
2020-12-30 19:46:07 -07:00
|
|
|
> div {
|
|
|
|
padding: 16px 0;
|
2020-12-29 21:07:16 -07:00
|
|
|
|
2020-12-30 19:46:07 -07:00
|
|
|
> span:not(:last-child) {
|
|
|
|
padding-right: 1em;
|
|
|
|
margin-right: 1em;
|
|
|
|
border-right: solid 1px rgba(255, 255, 255, 0.5);
|
|
|
|
}
|
2020-12-29 21:07:16 -07:00
|
|
|
}
|
2020-12-05 02:18:37 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-12-05 00:05:40 -07:00
|
|
|
}
|
2020-10-17 05:12:00 -06:00
|
|
|
</style>
|