summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/app/common/views/components/signin.vue7
-rw-r--r--src/client/app/config.ts2
-rw-r--r--webpack.config.ts3
3 files changed, 8 insertions, 4 deletions
diff --git a/src/client/app/common/views/components/signin.vue b/src/client/app/common/views/components/signin.vue
index deaeeca6a7..50c50cbe08 100644
--- a/src/client/app/common/views/components/signin.vue
+++ b/src/client/app/common/views/components/signin.vue
@@ -12,13 +12,13 @@
</ui-input>
<ui-input v-if="user && user.twoFactorEnabled" v-model="token" type="number" required/>
<ui-button type="submit" :disabled="signing">{{ signing ? '%i18n:@signing-in%' : '%i18n:@signin%' }}</ui-button>
- <p style="margin: 8px 0;">%i18n:@or%<a :href="`${apiUrl}/signin/twitter`">%i18n:@signin-with-twitter%</a></p>
+ <p style="margin: 8px 0;" v-if="twitterIntegration">%i18n:@or%<a :href="`${apiUrl}/signin/twitter`">%i18n:@signin-with-twitter%</a></p>
</form>
</template>
<script lang="ts">
import Vue from 'vue';
-import { apiUrl, host } from '../../../config';
+import { apiUrl, host, twitterIntegration } from '../../../config';
export default Vue.extend({
props: {
@@ -36,7 +36,8 @@ export default Vue.extend({
password: '',
token: '',
apiUrl,
- host
+ host,
+ twitterIntegration
};
},
methods: {
diff --git a/src/client/app/config.ts b/src/client/app/config.ts
index ceee0a2d62..04486ea230 100644
--- a/src/client/app/config.ts
+++ b/src/client/app/config.ts
@@ -22,6 +22,7 @@ declare const _CODENAME_: string;
declare const _LICENSE_: string;
declare const _GOOGLE_MAPS_API_KEY_: string;
declare const _WELCOME_BG_URL_: string;
+declare const _TWITTER_INTEGRATION_: boolean;
export const host = _HOST_;
export const hostname = _HOSTNAME_;
@@ -47,3 +48,4 @@ export const codename = _CODENAME_;
export const license = _LICENSE_;
export const googleMapsApiKey = _GOOGLE_MAPS_API_KEY_;
export const welcomeBgUrl = _WELCOME_BG_URL_;
+export const twitterIntegration = _TWITTER_INTEGRATION_;
diff --git a/webpack.config.ts b/webpack.config.ts
index e60eb8347e..8dca4c0ee3 100644
--- a/webpack.config.ts
+++ b/webpack.config.ts
@@ -95,7 +95,8 @@ const consts = {
_URL_: config.url,
_LICENSE_: licenseHtml,
_GOOGLE_MAPS_API_KEY_: config.google_maps_api_key,
- _WELCOME_BG_URL_: config.welcome_bg_url
+ _WELCOME_BG_URL_: config.welcome_bg_url,
+ _TWITTER_INTEGRATION_: config.twitter != null
};
const _consts: { [ key: string ]: any } = {};