Add ToSUrl, repositoryUrl, feedbackUrl (#4921)

* Add ToSUrl, repositoryUrl, feedbackUrl

* modify nodeinfo
This commit is contained in:
tamaina
2019-05-14 02:57:04 +09:00
committed by syuilo
parent b128b593c2
commit 7c03d37caa
10 changed files with 131 additions and 4 deletions

View File

@@ -1,12 +1,16 @@
<template>
<span class="mk-nav">
<a :href="aboutUrl">{{ $t('about') }}</a>
<template v-if="ToSUrl !== null">
<i></i>
<a :href="ToSUrl" target="_blank">{{ $t('tos') }}</a>
</template>
<i></i>
<a :href="repositoryUrl" rel="noopener" target="_blank">{{ $t('repository') }}</a>
<i></i>
<a :href="feedbackUrl" rel="noopener" target="_blank">{{ $t('feedback') }}</a>
<i></i>
<a href="/dev">{{ $t('develop') }}</a>
<a href="/dev" target="_blank">{{ $t('develop') }}</a>
</span>
</template>
@@ -21,8 +25,17 @@ export default Vue.extend({
return {
aboutUrl: `/docs/${lang}/about`,
repositoryUrl: 'https://github.com/syuilo/misskey',
feedbackUrl: 'https://github.com/syuilo/misskey/issues/new'
feedbackUrl: 'https://github.com/syuilo/misskey/issues/new',
ToSUrl: null
}
},
mounted() {
this.$root.getMeta(true).then(meta => {
this.repositoryUrl = meta.repositoryUrl;
this.feedbackUrl = meta.feedbackUrl;
this.ToSUrl = meta.ToSUrl;
})
}
});
</script>

View File

@@ -37,8 +37,13 @@
<p v-if="passwordRetypeState == 'not-match'" style="color:#FF1161"><fa icon="exclamation-triangle" fixed-width/> {{ $t('password-not-matched') }}</p>
</template>
</ui-input>
<ui-switch v-model="ToSAgreement" v-if="meta.ToSUrl">
<i18n path="agree-to">
<a :href="meta.ToSUrl" target="_blank">{{ $t('tos') }}</a>
</i18n>
</ui-switch>
<div v-if="meta.enableRecaptcha" class="g-recaptcha" :data-sitekey="meta.recaptchaSiteKey" style="margin: 16px 0;"></div>
<ui-button type="submit">{{ $t('create') }}</ui-button>
<ui-button type="submit" :disabled="!(meta.ToSUrl ? ToSAgreement : true)">{{ $t('create') }}</ui-button>
</template>
</form>
</template>
@@ -64,7 +69,8 @@ export default Vue.extend({
usernameState: null,
passwordStrength: '',
passwordRetypeState: null,
meta: null
meta: {},
ToSAgreement: false
}
},