mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 14:07:38 -07:00
Merge pull request #1296 from rinsuki/features/revived-twitter-login-link-on-desktop
デスクトップ版にTwitterでログインするリンクを復活させた
This commit is contained in:
commit
3170a5b75b
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…
Reference in a new issue