This commit is contained in:
syuilo 2018-02-11 12:42:02 +09:00
parent 92826c406a
commit dab2a5dd1c
6 changed files with 61 additions and 27 deletions

View File

@ -1,10 +0,0 @@
<mk-nav-links>
<a href={ aboutUrl }>%i18n:common.tags.mk-nav-links.about%</a><i></i><a href={ _STATS_URL_ }>%i18n:common.tags.mk-nav-links.stats%</a><i></i><a href={ _STATUS_URL_ }>%i18n:common.tags.mk-nav-links.status%</a><i></i><a href="http://zawazawa.jp/misskey/">%i18n:common.tags.mk-nav-links.wiki%</a><i></i><a href="https://github.com/syuilo/misskey/blob/master/DONORS.md">%i18n:common.tags.mk-nav-links.donors%</a><i></i><a href="https://github.com/syuilo/misskey">%i18n:common.tags.mk-nav-links.repository%</a><i></i><a href={ _DEV_URL_ }>%i18n:common.tags.mk-nav-links.develop%</a><i></i><a href="https://twitter.com/misskey_xyz" target="_blank">Follow us on %fa:B twitter%</a>
<style lang="stylus" scoped>
:scope
display inline
</style>
<script lang="typescript">
this.aboutUrl = `${_DOCS_URL_}/${_LANG_}/about`;
</script>
</mk-nav-links>

View File

@ -3,7 +3,9 @@ import Vue from 'vue';
import signin from './signin.vue';
import signup from './signup.vue';
import forkit from './forkit.vue';
import nav from './nav.vue';
Vue.component('mk-signin', signin);
Vue.component('mk-signup', signup);
Vue.component('mk-forkit', forkit);
Vue.component('mk-nav', nav);

View File

@ -0,0 +1,35 @@
<template>
<span>
<a :href="aboutUrl">%i18n:common.tags.mk-nav-links.about%</a>
<i></i>
<a :href="statsUrl">%i18n:common.tags.mk-nav-links.stats%</a>
<i></i>
<a :href="statusUrl">%i18n:common.tags.mk-nav-links.status%</a>
<i></i>
<a href="http://zawazawa.jp/misskey/">%i18n:common.tags.mk-nav-links.wiki%</a>
<i></i>
<a href="https://github.com/syuilo/misskey/blob/master/DONORS.md">%i18n:common.tags.mk-nav-links.donors%</a>
<i></i>
<a href="https://github.com/syuilo/misskey">%i18n:common.tags.mk-nav-links.repository%</a>
<i></i>
<a :href="devUrl">%i18n:common.tags.mk-nav-links.develop%</a>
<i></i>
<a href="https://twitter.com/misskey_xyz" target="_blank">Follow us on %fa:B twitter%</a>
</span>
</template>
<script lang="ts">
import Vue from 'vue';
import { docsUrl, statsUrl, statusUrl, devUrl, lang } from '../../../config';
export default Vue.extend({
data() {
return {
aboutUrl: `${docsUrl}/${lang}/about`,
statsUrl,
statusUrl,
devUrl
}
}
});
</script>

View File

@ -1,5 +1,5 @@
<template>
<form class="form" :class="{ signing: signing }" @submit.prevent="onSubmit">
<form class="mk-signin" :class="{ signing }" @submit.prevent="onSubmit">
<label class="user-name">
<input v-model="username" type="text" pattern="^[a-zA-Z0-9-]+$" placeholder="%i18n:common.tags.mk-signin.username%" autofocus required @change="onUsernameChange"/>%fa:at%
</label>
@ -9,7 +9,7 @@
<label class="token" v-if="user && user.two_factor_enabled">
<input v-model="token" type="number" placeholder="%i18n:common.tags.mk-signin.token%" required/>%fa:lock%
</label>
<button type="submit" disabled={ signing }>{ signing ? '%i18n:common.tags.mk-signin.signing-in%' : '%i18n:common.tags.mk-signin.signin%' }</button>
<button type="submit" :disabled="signing">{{ signing ? '%i18n:common.tags.mk-signin.signing-in%' : '%i18n:common.tags.mk-signin.signin%' }}</button>
</form>
</template>
@ -53,10 +53,7 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
.form
display block
z-index 2
.mk-signin
&.signing
&, *
cursor wait !important

View File

@ -2,6 +2,9 @@ declare const _HOST_: string;
declare const _URL_: string;
declare const _API_URL_: string;
declare const _DOCS_URL_: string;
declare const _STATS_URL_: string;
declare const _STATUS_URL_: string;
declare const _DEV_URL_: string;
declare const _LANG_: string;
declare const _RECAPTCHA_SITEKEY_: string;
declare const _SW_PUBLICKEY_: string;
@ -13,6 +16,9 @@ export const host = _HOST_;
export const url = _URL_;
export const apiUrl = _API_URL_;
export const docsUrl = _DOCS_URL_;
export const statsUrl = _STATS_URL_;
export const statusUrl = _STATUS_URL_;
export const devUrl = _DEV_URL_;
export const lang = _LANG_;
export const recaptchaSitekey = _RECAPTCHA_SITEKEY_;
export const swPublickey = _SW_PUBLICKEY_;

View File

@ -13,8 +13,8 @@
<mk-forkit/>
<footer>
<div>
<mk-nav-links/>
<p class="c">{ _COPYRIGHT_ }</p>
<mk-nav :class="$style.nav"/>
<p class="c">{{ copyright }}</p>
</div>
</footer>
<modal name="signup" width="500px" height="auto" scrollable>
@ -30,8 +30,14 @@
<script lang="ts">
import Vue from 'vue';
import { copyright } from '../../../config';
export default Vue.extend({
data() {
return {
copyright
};
},
methods: {
signup() {
this.$modal.show('signup');
@ -115,23 +121,17 @@ export default Vue.extend({
margin 0 0 0 auto
> footer
color #666
background #fff
*
color #fff !important
text-shadow 0 0 8px #000
font-weight bold
> div
max-width $width
margin 0 auto
padding 16px 0
padding 42px 0
text-align center
border-top solid 1px #fff
> .c
margin 0
line-height 64px
margin 16px 0 0 0
font-size 10px
</style>
@ -156,4 +156,8 @@ export default Vue.extend({
font-size 1.5em
color #777
border-bottom solid 1px #eee
.nav
a
color #666
</style>