Add ToSUrl, repositoryUrl, feedbackUrl (#4921)
* Add ToSUrl, repositoryUrl, feedbackUrl * modify nodeinfo
This commit is contained in:
@@ -10,6 +10,9 @@
|
||||
<ui-input v-model="mascotImageUrl"><template #icon><fa icon="link"/></template>{{ $t('logo-url') }}</ui-input>
|
||||
<ui-input v-model="bannerUrl"><template #icon><fa icon="link"/></template>{{ $t('banner-url') }}</ui-input>
|
||||
<ui-input v-model="errorImageUrl"><template #icon><fa icon="link"/></template>{{ $t('error-image-url') }}</ui-input>
|
||||
<ui-input v-model="ToSUrl"><template #icon><fa icon="link"/></template>{{ $t('tos-url') }}</ui-input>
|
||||
<ui-input v-model="repositoryUrl"><template #icon><fa icon="link"/></template>{{ $t('repository-url') }}</ui-input>
|
||||
<ui-input v-model="feedbackUrl"><template #icon><fa icon="link"/></template>{{ $t('feedback-url') }}</ui-input>
|
||||
<ui-input v-model="languages"><template #icon><fa icon="language"/></template>{{ $t('languages') }}<template #desc>{{ $t('languages-desc') }}</template></ui-input>
|
||||
</section>
|
||||
<section class="fit-bottom">
|
||||
@@ -156,6 +159,9 @@ export default Vue.extend({
|
||||
host: toUnicode(host),
|
||||
maintainerName: null,
|
||||
maintainerEmail: null,
|
||||
ToSUrl: null,
|
||||
repositoryUrl: "https://github.com/syuilo/misskey",
|
||||
feedbackUrl: null,
|
||||
disableRegistration: false,
|
||||
disableLocalTimeline: false,
|
||||
disableGlobalTimeline: false,
|
||||
@@ -207,6 +213,9 @@ export default Vue.extend({
|
||||
this.$root.getMeta(true).then(meta => {
|
||||
this.maintainerName = meta.maintainerName;
|
||||
this.maintainerEmail = meta.maintainerEmail;
|
||||
this.ToSUrl = meta.ToSUrl;
|
||||
this.repositoryUrl = meta.repositoryUrl;
|
||||
this.feedbackUrl = meta.feedbackUrl;
|
||||
this.disableRegistration = meta.disableRegistration;
|
||||
this.disableLocalTimeline = meta.disableLocalTimeline;
|
||||
this.disableGlobalTimeline = meta.disableGlobalTimeline;
|
||||
@@ -268,6 +277,9 @@ export default Vue.extend({
|
||||
this.$root.api('admin/update-meta', {
|
||||
maintainerName: this.maintainerName,
|
||||
maintainerEmail: this.maintainerEmail,
|
||||
ToSUrl: this.ToSUrl,
|
||||
repositoryUrl: this.repositoryUrl,
|
||||
feedbackUrl: this.feedbackUrl,
|
||||
disableRegistration: this.disableRegistration,
|
||||
disableLocalTimeline: this.disableLocalTimeline,
|
||||
disableGlobalTimeline: this.disableGlobalTimeline,
|
||||
|
@@ -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>
|
||||
|
@@ -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
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user