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