automatic login

This commit is contained in:
Craig 2020-02-11 19:36:06 +00:00
parent b6a5c2cc95
commit 6db53d8c48
5 changed files with 106 additions and 45 deletions

View file

@ -35,6 +35,9 @@
<span />
</label>
</li>
<li v-if="connected">
<button @click.stop.prevent="logout">Logout</button>
</li>
</ul>
</div>
</template>
@ -69,6 +72,22 @@
line-height: 24px;
}
button {
cursor: pointer;
border-radius: 5px;
padding: 4px;
background: $style-primary;
color: $text-normal;
text-align: center;
text-transform: uppercase;
font-weight: bold;
line-height: 30px;
margin: 5px 0;
border: none;
display: block;
width: 100%;
}
.switch {
justify-self: flex-end;
position: relative;
@ -173,6 +192,10 @@
@Component({ name: 'neko-settings' })
export default class extends Vue {
get connected() {
return this.$accessor.connected
}
get scroll() {
return this.$accessor.settings.scroll.toString()
}
@ -212,5 +235,9 @@
set chat_sound(value: boolean) {
this.$accessor.settings.setSound(value)
}
logout() {
this.$accessor.logout()
}
}
</script>