1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-13 06:08:58 +09:00

メールサーバーの設定がオフの場合はメール設定を表示しないように

This commit is contained in:
syuilo 2018-11-29 20:33:31 +09:00
parent 22e30b44b9
commit cf9f85eb2a
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
2 changed files with 9 additions and 7 deletions

View File

@ -67,7 +67,7 @@
</div> </div>
</section> </section>
<section> <section v-if="enableEmail">
<header>{{ $t('email') }}</header> <header>{{ $t('email') }}</header>
<div> <div>
@ -94,6 +94,7 @@ export default Vue.extend({
data() { data() {
return { return {
host: toUnicode(host), host: toUnicode(host),
enableEmail: false,
email: null, email: null,
name: null, name: null,
username: null, username: null,
@ -128,6 +129,9 @@ export default Vue.extend({
}, },
created() { created() {
this.$root.getMeta().then(meta => {
this.enableEmail = meta.enableEmail;
});
this.email = this.$store.state.i.email; this.email = this.$store.state.i.email;
this.name = this.$store.state.i.name; this.name = this.$store.state.i.name;
this.username = this.$store.state.i.username; this.username = this.$store.state.i.username;

View File

@ -66,16 +66,12 @@ export default define(meta, (ps, me) => new Promise(async (res, rej) => {
swPublickey: config.sw ? config.sw.public_key : null, swPublickey: config.sw ? config.sw.public_key : null,
bannerUrl: instance.bannerUrl, bannerUrl: instance.bannerUrl,
maxNoteTextLength: instance.maxNoteTextLength, maxNoteTextLength: instance.maxNoteTextLength,
emojis: emojis, emojis: emojis,
enableEmail: instance.enableEmail,
enableTwitterIntegration: instance.enableTwitterIntegration, enableTwitterIntegration: instance.enableTwitterIntegration,
enableGithubIntegration: instance.enableGithubIntegration, enableGithubIntegration: instance.enableGithubIntegration,
enableDiscordIntegration: instance.enableDiscordIntegration, enableDiscordIntegration: instance.enableDiscordIntegration,
enableExternalUserRecommendation: instance.enableExternalUserRecommendation,
externalUserRecommendationEngine: instance.externalUserRecommendationEngine,
externalUserRecommendationTimeout: instance.externalUserRecommendationTimeout
}; };
if (ps.detail) { if (ps.detail) {
@ -107,8 +103,10 @@ export default define(meta, (ps, me) => new Promise(async (res, rej) => {
response.githubClientSecret = instance.githubClientSecret; response.githubClientSecret = instance.githubClientSecret;
response.discordClientId = instance.discordClientId; response.discordClientId = instance.discordClientId;
response.discordClientSecret = instance.discordClientSecret; response.discordClientSecret = instance.discordClientSecret;
response.enableExternalUserRecommendation = instance.enableExternalUserRecommendation;
response.externalUserRecommendationEngine = instance.externalUserRecommendationEngine;
response.externalUserRecommendationTimeout = instance.externalUserRecommendationTimeout;
response.summalyProxy = instance.summalyProxy; response.summalyProxy = instance.summalyProxy;
response.enableEmail = instance.enableEmail;
response.email = instance.email; response.email = instance.email;
response.smtpSecure = instance.smtpSecure; response.smtpSecure = instance.smtpSecure;
response.smtpHost = instance.smtpHost; response.smtpHost = instance.smtpHost;