mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 12:13:48 +01:00
未利用時はTwitterでログインを表示しない (#2156)
This commit is contained in:
parent
a05924e9a3
commit
1092c0b656
@ -12,13 +12,13 @@
|
|||||||
</ui-input>
|
</ui-input>
|
||||||
<ui-input v-if="user && user.twoFactorEnabled" v-model="token" type="number" required/>
|
<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>
|
<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>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { apiUrl, host } from '../../../config';
|
import { apiUrl, host, twitterIntegration } from '../../../config';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: {
|
props: {
|
||||||
@ -36,7 +36,8 @@ export default Vue.extend({
|
|||||||
password: '',
|
password: '',
|
||||||
token: '',
|
token: '',
|
||||||
apiUrl,
|
apiUrl,
|
||||||
host
|
host,
|
||||||
|
twitterIntegration
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -22,6 +22,7 @@ declare const _CODENAME_: string;
|
|||||||
declare const _LICENSE_: string;
|
declare const _LICENSE_: string;
|
||||||
declare const _GOOGLE_MAPS_API_KEY_: string;
|
declare const _GOOGLE_MAPS_API_KEY_: string;
|
||||||
declare const _WELCOME_BG_URL_: string;
|
declare const _WELCOME_BG_URL_: string;
|
||||||
|
declare const _TWITTER_INTEGRATION_: boolean;
|
||||||
|
|
||||||
export const host = _HOST_;
|
export const host = _HOST_;
|
||||||
export const hostname = _HOSTNAME_;
|
export const hostname = _HOSTNAME_;
|
||||||
@ -47,3 +48,4 @@ export const codename = _CODENAME_;
|
|||||||
export const license = _LICENSE_;
|
export const license = _LICENSE_;
|
||||||
export const googleMapsApiKey = _GOOGLE_MAPS_API_KEY_;
|
export const googleMapsApiKey = _GOOGLE_MAPS_API_KEY_;
|
||||||
export const welcomeBgUrl = _WELCOME_BG_URL_;
|
export const welcomeBgUrl = _WELCOME_BG_URL_;
|
||||||
|
export const twitterIntegration = _TWITTER_INTEGRATION_;
|
||||||
|
@ -95,7 +95,8 @@ const consts = {
|
|||||||
_URL_: config.url,
|
_URL_: config.url,
|
||||||
_LICENSE_: licenseHtml,
|
_LICENSE_: licenseHtml,
|
||||||
_GOOGLE_MAPS_API_KEY_: config.google_maps_api_key,
|
_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 } = {};
|
const _consts: { [ key: string ]: any } = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user