mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	Merge pull request #1296 from rinsuki/features/revived-twitter-login-link-on-desktop
デスクトップ版にTwitterでログインするリンクを復活させた
This commit is contained in:
		
						commit
						d230503913
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -10,11 +10,13 @@
 | 
			
		|||
		<input v-model="token" type="number" placeholder="%i18n:common.tags.mk-signin.token%" required/>%fa:lock%
 | 
			
		||||
	</label>
 | 
			
		||||
	<button type="submit" :disabled="signing">{{ signing ? '%i18n:common.tags.mk-signin.signing-in%' : '%i18n:common.tags.mk-signin.signin%' }}</button>
 | 
			
		||||
	もしくは <a :href="`${apiUrl}/signin/twitter`">Twitterでログイン</a>
 | 
			
		||||
</form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
import Vue from 'vue';
 | 
			
		||||
import { apiUrl } from '../../../config';
 | 
			
		||||
 | 
			
		||||
export default Vue.extend({
 | 
			
		||||
	data() {
 | 
			
		||||
| 
						 | 
				
			
			@ -23,7 +25,8 @@ export default Vue.extend({
 | 
			
		|||
			user: null,
 | 
			
		||||
			username: '',
 | 
			
		||||
			password: '',
 | 
			
		||||
			token: ''
 | 
			
		||||
			token: '',
 | 
			
		||||
			apiUrl,
 | 
			
		||||
		};
 | 
			
		||||
	},
 | 
			
		||||
	methods: {
 | 
			
		||||
| 
						 | 
				
			
			@ -40,7 +43,7 @@ export default Vue.extend({
 | 
			
		|||
			(this as any).api('signin', {
 | 
			
		||||
				username: this.username,
 | 
			
		||||
				password: this.password,
 | 
			
		||||
				token: this.user && this.user.account.two_factor_enabled ? this.token : undefined
 | 
			
		||||
				token: this.user && this.user.two_factor_enabled ? this.token : undefined
 | 
			
		||||
			}).then(() => {
 | 
			
		||||
				location.reload();
 | 
			
		||||
			}).catch(() => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue