updated protocols

This commit is contained in:
Andrew Gundersen 2021-07-11 11:54:39 -05:00
commit 531a32a5a5
37 changed files with 682 additions and 650 deletions

View file

@ -1,35 +1,38 @@
<template>
<!-- Settings icon. -->
<button
class="settingsIcon"
v-if="toggleSettings == false"
@click="onActive"
>
<div class="settingsButtonDot"></div>
<div class="settingsButtonDot"></div>
<div class="settingsButtonDot"></div>
</button>
<!-- Settings content -->
<div v-if="toggleSettings" id="settings" >
<!-- Settings div. -->
<div id="settings" v-show="toggleSettings">
</div>
<p class="account">{{ `Hi, ${account}` }}</p>
<button
v-if="toggleSettings"
class="settingsOption"
class="logout"
@click="onLogout"
>
Logout
</button>
<p class="version">{{ `Version ${version}` }}</p>
</div>
<!-- Icon -->
<button
v-else
class="icon"
@click="onActive"
>
<img src="@/render/assets/settingsIcon.svg">
</button>
</template>
<script lang="ts">
import { defineComponent, ref } from "vue";
import { clearProfile } from "@/render/shared/profile"
import { invokeLogout } from "@/render/ipc";
import { version } from "@/render/shared/version";
import { ready, account, setAccount, clearAccount } from "@/render/shared/account";
export default defineComponent({
name: "Settings",
@ -58,7 +61,6 @@
try {
await invokeLogout();
clearProfile();
} catch(e) {
console.log('error')
}
@ -66,6 +68,8 @@
}
return {
account,
version,
onActive,
toggleSettings,
onLogout
@ -79,67 +83,52 @@
#settings {
position: fixed;
width: 100vw;
height: 100vh;
background-color: rgba(235, 235, 235, 0.75);
z-index: 4;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100vw;
height: 100vh;
background-color: #EBEBEB;
opacity: 0.75;
z-index: 4;
animation-name: appear;
animation-duration: 0.5s;
}
@keyframes appear {
from {
opacity: 0
background-color: rgba(235, 235, 235, 0);
}
to {
opacity: 0.75
background-color: rgba(235, 235, 235, 0.75);
}
}
.settingsIcon {
.icon {
position: fixed;
right: 0;
border: none;
outline: none;
display: flex;
flex-direction: row;
padding: 5px;
margin-right: 20px;
margin-top: 19px;
z-index: 2;
background-color: Transparent;
}
.settingsIcon:hover {
.icon:hover {
cursor: pointer;
}
.settingsButtonDot {
width: 5px;
height: 5px;
margin: 2px;
border-radius: 2.5px;
background-color: #9B9B9B;
.account {
font-size: 12px;
font-weight: bold;
margin-bottom: 25px;
}
.settingsOption {
.logout {
font-family: "SF Compact Display";
background-color: #B7B7B7;
padding: 10px 30px;
@ -149,16 +138,21 @@
border: none;
outline: none;
text-decoration: none;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
z-index: 5;
}
.settingsOption:hover {
.logout:hover {
cursor: pointer;
}
.version {
position: absolute;
left: 50%;
top: 75%;
transform: translate(-50%, -50%);
font-size: 12px;
font-weight: bold;
color: #575757;
}
</style>