Add paste button

This commit is contained in:
James Rowe 2019-12-05 23:36:53 -07:00
parent 6af46ec703
commit 128c1b1f41
2 changed files with 28 additions and 10 deletions

View file

@ -124,7 +124,7 @@ pre {
}
/* Dark mode */
body.has-background-black-ter .subtitle, body.has-background-black-ter .column > div {
body.has-background-black-ter .subtitle, body.has-background-black-ter .column > div, body.has-background-black-ter section {
color: hsl(0, 0%, 96%);
}

View file

@ -1,5 +1,6 @@
<template>
<div class="column has-padding">
<section>
<b-message type="is-info" :active.sync="browser_opened">
Page opened! Check your default browser for the page, and follow the instructions there to link your patreon account.
When you are done, enter the token below.
@ -10,19 +11,28 @@
To be an Early Access member, you must be a Patreon Early Access Subscriber.
</b-message>
<div>
If you are a subscriber, <a v-on:click="launch_browser('https://profile.yuzu-emu.org/')">click here to link your yuzu-emu.org account</a>
<br>
If you are not already a subscriber, <a v-on:click="launch_browser('https://www.patreon.com/join/yuzuteam/checkout?rid=2822069')">click here to become one</a>
</div>
<br>
<div class="control">
<label for="token">Token</label>
<input class="input" type="text" v-model="combined_token" placeholder="Token" id="token">
If you are a subscriber, <a v-on:click="launch_browser('https://profile.yuzu-emu.org/')">click here to link your yuzu-emu.org account</a>
<br>
If you are not already a subscriber, <a v-on:click="launch_browser('https://www.patreon.com/join/yuzuteam/checkout?rid=2822069')">click here to become one</a>
</div>
</section>
<br>
<section>
<p>Token</p>
<b-field>
<b-input type="text" v-model="combined_token" placeholder="Token" id="token" style='width: 50em;'></b-input>
<p class="control">
<button class="button is-info" v-on:click="paste">Paste</button>
</p>
</b-field>
</section>
<br>
<section>
<b-message type="is-danger" :active.sync="invalid_token">
Login failed!
Double check that your token is correct and try again
@ -47,6 +57,7 @@
Your patreon is linked, and you are supporting the project, but you must first join the Early Access reward tier!
<a v-on:click="launch_browser('https://www.patreon.com/join/yuzuteam/checkout?rid=2822069')">Log into your patreon account</a> and choose to back the Early Access reward tier.
</b-message>
</section>
<div class="is-left-floating is-bottom-floating">
<p class="control">
@ -63,6 +74,8 @@
</template>
<script>
export default {
name: 'AuthenticationView',
created: function() {
@ -120,6 +133,11 @@ export default {
go_back: function () {
this.$router.go(-1)
},
paste: function () {
document.getElementById("token").focus();
document.execCommand("paste");
},
launch_browser: function(url) {
const that = this;
let app = this.$root;