forked from mirror/misskey
Merge pull request #1296 from rinsuki/features/revived-twitter-login-link-on-desktop
デスクトップ版にTwitterでログインするリンクを復活させた
This commit is contained in:
commit
d230503913
@ -10,11 +10,13 @@
|
|||||||
<input v-model="token" type="number" placeholder="%i18n:common.tags.mk-signin.token%" required/>%fa:lock%
|
<input v-model="token" type="number" placeholder="%i18n:common.tags.mk-signin.token%" required/>%fa:lock%
|
||||||
</label>
|
</label>
|
||||||
<button type="submit" :disabled="signing">{{ signing ? '%i18n:common.tags.mk-signin.signing-in%' : '%i18n:common.tags.mk-signin.signin%' }}</button>
|
<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>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
import { apiUrl } from '../../../config';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
@ -23,7 +25,8 @@ export default Vue.extend({
|
|||||||
user: null,
|
user: null,
|
||||||
username: '',
|
username: '',
|
||||||
password: '',
|
password: '',
|
||||||
token: ''
|
token: '',
|
||||||
|
apiUrl,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -40,7 +43,7 @@ export default Vue.extend({
|
|||||||
(this as any).api('signin', {
|
(this as any).api('signin', {
|
||||||
username: this.username,
|
username: this.username,
|
||||||
password: this.password,
|
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(() => {
|
}).then(() => {
|
||||||
location.reload();
|
location.reload();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user