Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f164661ef2 | ||
![]() |
c9d993b838 | ||
![]() |
65f35dc9f4 | ||
![]() |
b600d462c1 | ||
![]() |
fa5a82c9ab |
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "2.41.1",
|
"version": "2.42.0",
|
||||||
"clientVersion": "1.0.6512",
|
"clientVersion": "1.0.6517",
|
||||||
"codename": "nighthike",
|
"codename": "nighthike",
|
||||||
"main": "./built/index.js",
|
"main": "./built/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<form class="mk-signin" :class="{ signing }" @submit.prevent="onSubmit">
|
<form class="mk-signin" :class="{ signing }" @submit.prevent="onSubmit">
|
||||||
<ui-input v-model="username" type="text" pattern="^[a-zA-Z0-9_]+$" autofocus required @change="onUsernameChange">
|
<div class="avatar" :style="{ backgroundImage: user ? `url('${ user.avatarUrl }')` : null }" v-show="withAvatar"></div>
|
||||||
|
<ui-input v-model="username" type="text" pattern="^[a-zA-Z0-9_]+$" spellcheck="false" autofocus required @input="onUsernameChange">
|
||||||
<span>%i18n:@username%</span>
|
<span>%i18n:@username%</span>
|
||||||
<span slot="prefix">@</span>
|
<span slot="prefix">@</span>
|
||||||
<span slot="suffix">@{{ host }}</span>
|
<span slot="suffix">@{{ host }}</span>
|
||||||
@@ -20,6 +21,13 @@ import Vue from 'vue';
|
|||||||
import { apiUrl, host } from '../../../config';
|
import { apiUrl, host } from '../../../config';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
|
props: {
|
||||||
|
withAvatar: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
signing: false,
|
signing: false,
|
||||||
@@ -37,6 +45,8 @@ export default Vue.extend({
|
|||||||
username: this.username
|
username: this.username
|
||||||
}).then(user => {
|
}).then(user => {
|
||||||
this.user = user;
|
this.user = user;
|
||||||
|
}, () => {
|
||||||
|
this.user = null;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
@@ -61,84 +71,19 @@ export default Vue.extend({
|
|||||||
@import '~const.styl'
|
@import '~const.styl'
|
||||||
|
|
||||||
.mk-signin
|
.mk-signin
|
||||||
|
color #555
|
||||||
|
|
||||||
&.signing
|
&.signing
|
||||||
&, *
|
&, *
|
||||||
cursor wait !important
|
cursor wait !important
|
||||||
|
|
||||||
label
|
> .avatar
|
||||||
display block
|
margin 16px auto 0 auto
|
||||||
margin 12px 0
|
width 64px
|
||||||
|
height 64px
|
||||||
[data-fa]
|
background #ddd
|
||||||
display block
|
background-position center
|
||||||
pointer-events none
|
background-size cover
|
||||||
position absolute
|
border-radius 100%
|
||||||
bottom 0
|
|
||||||
top 0
|
|
||||||
left 0
|
|
||||||
z-index 1
|
|
||||||
margin auto
|
|
||||||
padding 0 16px
|
|
||||||
height 1em
|
|
||||||
color #898786
|
|
||||||
|
|
||||||
input[type=text]
|
|
||||||
input[type=password]
|
|
||||||
input[type=number]
|
|
||||||
user-select text
|
|
||||||
display inline-block
|
|
||||||
cursor auto
|
|
||||||
padding 0 0 0 38px
|
|
||||||
margin 0
|
|
||||||
width 100%
|
|
||||||
line-height 44px
|
|
||||||
font-size 1em
|
|
||||||
color rgba(#000, 0.7)
|
|
||||||
background #fff
|
|
||||||
outline none
|
|
||||||
border solid 1px #eee
|
|
||||||
border-radius 4px
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
background rgba(255, 255, 255, 0.7)
|
|
||||||
border-color #ddd
|
|
||||||
|
|
||||||
& + i
|
|
||||||
color #797776
|
|
||||||
|
|
||||||
&:focus
|
|
||||||
background #fff
|
|
||||||
border-color #ccc
|
|
||||||
|
|
||||||
& + i
|
|
||||||
color #797776
|
|
||||||
|
|
||||||
[type=submit]
|
|
||||||
cursor pointer
|
|
||||||
padding 16px
|
|
||||||
margin -6px 0 0 0
|
|
||||||
width 100%
|
|
||||||
font-size 1.2em
|
|
||||||
color rgba(#000, 0.5)
|
|
||||||
outline none
|
|
||||||
border none
|
|
||||||
border-radius 0
|
|
||||||
background transparent
|
|
||||||
transition all .5s ease
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
color $theme-color
|
|
||||||
transition all .2s ease
|
|
||||||
|
|
||||||
&:focus
|
|
||||||
color $theme-color
|
|
||||||
transition all .2s ease
|
|
||||||
|
|
||||||
&:active
|
|
||||||
color darken($theme-color, 30%)
|
|
||||||
transition all .2s ease
|
|
||||||
|
|
||||||
&:disabled
|
|
||||||
opacity 0.7
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="ui-input" :class="[{ focused, filled }, styl]">
|
<div class="ui-input" :class="[{ focused, filled }, styl]">
|
||||||
<div class="icon" ref="icon"><slot name="icon"></slot></div>
|
<div class="icon" ref="icon"><slot name="icon"></slot></div>
|
||||||
<div class="input" @click="focus" @mousedown="focus">
|
<div class="input">
|
||||||
<div class="password-meter" v-if="withPasswordMeter" v-show="passwordStrength != ''" :data-strength="passwordStrength">
|
<div class="password-meter" v-if="withPasswordMeter" v-show="passwordStrength != ''" :data-strength="passwordStrength">
|
||||||
<div class="value" ref="passwordMetar"></div>
|
<div class="value" ref="passwordMetar"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
:value="value"
|
:value="value"
|
||||||
@change="onChangeFile">
|
@change="onChangeFile">
|
||||||
</template>
|
</template>
|
||||||
<div class="suffix"><slot name="suffix"></slot></div>
|
<div class="suffix" ref="suffix"><slot name="suffix"></slot></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text"><slot name="text"></slot></div>
|
<div class="text"><slot name="text"></slot></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -128,6 +128,14 @@ export default Vue.extend({
|
|||||||
mounted() {
|
mounted() {
|
||||||
if (this.$refs.prefix) {
|
if (this.$refs.prefix) {
|
||||||
this.$refs.label.style.left = (this.$refs.prefix.offsetLeft + this.$refs.prefix.offsetWidth) + 'px';
|
this.$refs.label.style.left = (this.$refs.prefix.offsetLeft + this.$refs.prefix.offsetWidth) + 'px';
|
||||||
|
if (this.$refs.prefix.offsetWidth) {
|
||||||
|
this.$refs.input.style.paddingLeft = this.$refs.prefix.offsetWidth + 'px';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.$refs.suffix) {
|
||||||
|
if (this.$refs.suffix.offsetWidth) {
|
||||||
|
this.$refs.input.style.paddingRight = this.$refs.suffix.offsetWidth + 'px';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -165,14 +173,8 @@ root(isDark, fill)
|
|||||||
margin-left 28px
|
margin-left 28px
|
||||||
|
|
||||||
> .input
|
> .input
|
||||||
display flex
|
|
||||||
cursor text
|
|
||||||
|
|
||||||
if fill
|
if !fill
|
||||||
padding 6px 12px
|
|
||||||
background rgba(#000, 0.035)
|
|
||||||
border-radius 6px
|
|
||||||
else
|
|
||||||
&:before
|
&:before
|
||||||
content ''
|
content ''
|
||||||
display block
|
display block
|
||||||
@@ -232,6 +234,7 @@ root(isDark, fill)
|
|||||||
|
|
||||||
> .label
|
> .label
|
||||||
position absolute
|
position absolute
|
||||||
|
z-index 1
|
||||||
top fill ? 6px : 0
|
top fill ? 6px : 0
|
||||||
left 0
|
left 0
|
||||||
pointer-events none
|
pointer-events none
|
||||||
@@ -247,7 +250,6 @@ root(isDark, fill)
|
|||||||
|
|
||||||
> input
|
> input
|
||||||
display block
|
display block
|
||||||
flex 1
|
|
||||||
width 100%
|
width 100%
|
||||||
margin 0
|
margin 0
|
||||||
padding 0
|
padding 0
|
||||||
@@ -262,29 +264,46 @@ root(isDark, fill)
|
|||||||
outline none
|
outline none
|
||||||
box-shadow none
|
box-shadow none
|
||||||
|
|
||||||
|
if fill
|
||||||
|
padding 6px 12px
|
||||||
|
background rgba(#000, 0.035)
|
||||||
|
border-radius 6px
|
||||||
|
|
||||||
&[type='file']
|
&[type='file']
|
||||||
display none
|
display none
|
||||||
|
|
||||||
> .prefix
|
> .prefix
|
||||||
> .suffix
|
> .suffix
|
||||||
display block
|
display block
|
||||||
align-self center
|
position absolute
|
||||||
justify-self center
|
z-index 1
|
||||||
|
top 0
|
||||||
font-size 16px
|
font-size 16px
|
||||||
line-height 32px
|
line-height fill ? 44px : 32px
|
||||||
color isDark ? rgba(#fff, 0.7) : rgba(#000, 0.54)
|
color isDark ? rgba(#fff, 0.7) : rgba(#000, 0.54)
|
||||||
pointer-events none
|
pointer-events none
|
||||||
|
|
||||||
|
&:empty
|
||||||
|
display none
|
||||||
|
|
||||||
> *
|
> *
|
||||||
display block
|
display block
|
||||||
min-width 16px
|
min-width 16px
|
||||||
|
|
||||||
> .prefix
|
> .prefix
|
||||||
|
left 0
|
||||||
padding-right 4px
|
padding-right 4px
|
||||||
|
|
||||||
|
if fill
|
||||||
|
padding-left 12px
|
||||||
|
|
||||||
> .suffix
|
> .suffix
|
||||||
|
right 0
|
||||||
padding-left 4px
|
padding-left 4px
|
||||||
|
|
||||||
|
if fill
|
||||||
|
padding-right 12px
|
||||||
|
|
||||||
> .text
|
> .text
|
||||||
margin 6px 0
|
margin 6px 0
|
||||||
font-size 13px
|
font-size 13px
|
||||||
|
@@ -7,13 +7,6 @@
|
|||||||
</button>
|
</button>
|
||||||
<div class="body" :style="{ backgroundImage: `url('${ welcomeBgUrl }')` }">
|
<div class="body" :style="{ backgroundImage: `url('${ welcomeBgUrl }')` }">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="info">
|
|
||||||
<span>%i18n:common.misskey% <b>{{ host }}</b></span>
|
|
||||||
<span class="stats" v-if="stats">
|
|
||||||
<span>%fa:user% {{ stats.originalUsersCount | number }}</span>
|
|
||||||
<span>%fa:pencil-alt% {{ stats.originalNotesCount | number }}</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<main>
|
<main>
|
||||||
<div class="about">
|
<div class="about">
|
||||||
<h1 v-if="name">{{ name }}</h1>
|
<h1 v-if="name">{{ name }}</h1>
|
||||||
@@ -26,6 +19,13 @@
|
|||||||
<mk-signin/>
|
<mk-signin/>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
<div class="info">
|
||||||
|
<span>%i18n:common.misskey% <b>{{ host }}</b></span>
|
||||||
|
<span class="stats" v-if="stats">
|
||||||
|
<span>%fa:user% {{ stats.originalUsersCount | number }}</span>
|
||||||
|
<span>%fa:pencil-alt% {{ stats.originalNotesCount | number }}</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<mk-nav class="nav"/>
|
<mk-nav class="nav"/>
|
||||||
</div>
|
</div>
|
||||||
<mk-forkit class="forkit"/>
|
<mk-forkit class="forkit"/>
|
||||||
@@ -38,10 +38,6 @@
|
|||||||
<header :class="$style.signupFormHeader">%i18n:@signup%</header>
|
<header :class="$style.signupFormHeader">%i18n:@signup%</header>
|
||||||
<mk-signup :class="$style.signupForm"/>
|
<mk-signup :class="$style.signupForm"/>
|
||||||
</modal>
|
</modal>
|
||||||
<modal name="signin" width="500px" height="auto" scrollable>
|
|
||||||
<header :class="$style.signinFormHeader">%i18n:@signin%</header>
|
|
||||||
<mk-signin :class="$style.signinForm"/>
|
|
||||||
</modal>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -57,7 +53,8 @@ export default Vue.extend({
|
|||||||
welcomeBgUrl,
|
welcomeBgUrl,
|
||||||
host,
|
host,
|
||||||
name,
|
name,
|
||||||
description
|
description,
|
||||||
|
pointerInterval: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -66,11 +63,18 @@ export default Vue.extend({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const x = this.$refs.signup.getBoundingClientRect();
|
this.point();
|
||||||
this.$refs.pointer.style.top = x.top + x.height + 'px';
|
this.pointerInterval = setInterval(this.point, 100);
|
||||||
this.$refs.pointer.style.left = x.left + 'px';
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
clearInterval(this.pointerInterval);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
point() {
|
||||||
|
const x = this.$refs.signup.getBoundingClientRect();
|
||||||
|
this.$refs.pointer.style.top = x.top + x.height + 'px';
|
||||||
|
this.$refs.pointer.style.left = x.left + 'px';
|
||||||
|
},
|
||||||
signup() {
|
signup() {
|
||||||
this.$modal.show('signup');
|
this.$modal.show('signup');
|
||||||
},
|
},
|
||||||
@@ -109,7 +113,7 @@ root(isDark)
|
|||||||
right 0
|
right 0
|
||||||
width 180px
|
width 180px
|
||||||
margin 0 0 0 -180px
|
margin 0 0 0 -180px
|
||||||
transform rotateY(180deg) translateX(-10px) translateY(-25px)
|
transform rotateY(180deg) translateX(-10px) translateY(-48px)
|
||||||
pointer-events none
|
pointer-events none
|
||||||
|
|
||||||
> button
|
> button
|
||||||
@@ -157,23 +161,6 @@ root(isDark)
|
|||||||
$loginWidth = 340px
|
$loginWidth = 340px
|
||||||
$width = $aboutWidth + $loginWidth
|
$width = $aboutWidth + $loginWidth
|
||||||
|
|
||||||
> .info
|
|
||||||
margin 0 auto 16px auto
|
|
||||||
padding 12px
|
|
||||||
width $width
|
|
||||||
font-size 14px
|
|
||||||
color #fff
|
|
||||||
background rgba(#000, 0.2)
|
|
||||||
border-radius 8px
|
|
||||||
|
|
||||||
> .stats
|
|
||||||
margin-left 16px
|
|
||||||
padding-left 16px
|
|
||||||
border-left solid 1px #fff
|
|
||||||
|
|
||||||
> *
|
|
||||||
margin-right 16px
|
|
||||||
|
|
||||||
> main
|
> main
|
||||||
display flex
|
display flex
|
||||||
margin auto
|
margin auto
|
||||||
@@ -214,6 +201,23 @@ root(isDark)
|
|||||||
padding 16px 32px 32px 32px
|
padding 16px 32px 32px 32px
|
||||||
background #f5f5f5
|
background #f5f5f5
|
||||||
|
|
||||||
|
> .info
|
||||||
|
margin 16px auto
|
||||||
|
padding 12px
|
||||||
|
width $width
|
||||||
|
font-size 14px
|
||||||
|
color #fff
|
||||||
|
background rgba(#000, 0.2)
|
||||||
|
border-radius 8px
|
||||||
|
|
||||||
|
> .stats
|
||||||
|
margin-left 16px
|
||||||
|
padding-left 16px
|
||||||
|
border-left solid 1px #fff
|
||||||
|
|
||||||
|
> *
|
||||||
|
margin-right 16px
|
||||||
|
|
||||||
> .nav
|
> .nav
|
||||||
display block
|
display block
|
||||||
margin 16px 0
|
margin 16px 0
|
||||||
|
@@ -9,26 +9,15 @@
|
|||||||
<router-link class="signup" to="/signup">新規登録</router-link>
|
<router-link class="signup" to="/signup">新規登録</router-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="login">
|
<div class="login">
|
||||||
<form @submit.prevent="onSubmit">
|
<mk-signin :with-avatar="false"/>
|
||||||
<ui-input v-model="username" type="text" pattern="^[a-zA-Z0-9_]+$" autofocus required @change="onUsernameChange">
|
|
||||||
<span>ユーザー名</span>
|
|
||||||
<span slot="prefix">@</span>
|
|
||||||
<span slot="suffix">@{{ host }}</span>
|
|
||||||
</ui-input>
|
|
||||||
<ui-input v-model="password" type="password" required>
|
|
||||||
<span>パスワード</span>
|
|
||||||
<span slot="prefix">%fa:lock%</span>
|
|
||||||
</ui-input>
|
|
||||||
<ui-input v-if="user && user.twoFactorEnabled" v-model="token" type="number" required/>
|
|
||||||
<ui-button type="submit" :disabled="signing">{{ signing ? 'ログインしています' : 'ログイン' }}</ui-button>
|
|
||||||
</form>
|
|
||||||
<div style="margin: 8px 0;">
|
|
||||||
<a :href="`${apiUrl}/signin/twitter`">Twitterでログイン</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="tl">
|
<div class="tl">
|
||||||
<mk-welcome-timeline/>
|
<mk-welcome-timeline/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="stats" v-if="stats">
|
||||||
|
<span>%fa:user% {{ stats.originalUsersCount | number }}</span>
|
||||||
|
<span>%fa:pencil-alt% {{ stats.originalNotesCount | number }}</span>
|
||||||
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
<small>{{ copyright }}</small>
|
<small>{{ copyright }}</small>
|
||||||
</footer>
|
</footer>
|
||||||
@@ -43,49 +32,18 @@ import { apiUrl, copyright, host, name, description } from '../../../config';
|
|||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
signing: false,
|
|
||||||
user: null,
|
|
||||||
username: '',
|
|
||||||
password: '',
|
|
||||||
token: '',
|
|
||||||
apiUrl,
|
apiUrl,
|
||||||
copyright,
|
copyright,
|
||||||
users: [],
|
stats: null,
|
||||||
host,
|
host,
|
||||||
name,
|
name,
|
||||||
description
|
description
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
created() {
|
||||||
(this as any).api('users', {
|
(this as any).api('stats').then(stats => {
|
||||||
sort: '+follower',
|
this.stats = stats;
|
||||||
limit: 20
|
|
||||||
}).then(users => {
|
|
||||||
this.users = users;
|
|
||||||
});
|
});
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
onUsernameChange() {
|
|
||||||
(this as any).api('users/show', {
|
|
||||||
username: this.username
|
|
||||||
}).then(user => {
|
|
||||||
this.user = user;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onSubmit() {
|
|
||||||
this.signing = true;
|
|
||||||
|
|
||||||
(this as any).api('signin', {
|
|
||||||
username: this.username,
|
|
||||||
password: this.password,
|
|
||||||
token: this.user && this.user.twoFactorEnabled ? this.token : undefined
|
|
||||||
}).then(() => {
|
|
||||||
location.reload();
|
|
||||||
}).catch(() => {
|
|
||||||
alert('something happened');
|
|
||||||
this.signing = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -164,6 +122,17 @@ export default Vue.extend({
|
|||||||
overflow auto
|
overflow auto
|
||||||
-webkit-overflow-scrolling touch
|
-webkit-overflow-scrolling touch
|
||||||
|
|
||||||
|
> .stats
|
||||||
|
margin 16px 0
|
||||||
|
padding 8px
|
||||||
|
font-size 14px
|
||||||
|
color #444
|
||||||
|
background rgba(#000, 0.1)
|
||||||
|
border-radius 6px
|
||||||
|
|
||||||
|
> *
|
||||||
|
margin 0 8px
|
||||||
|
|
||||||
> footer
|
> footer
|
||||||
text-align center
|
text-align center
|
||||||
color #444
|
color #444
|
||||||
|
Reference in New Issue
Block a user