style/linting fixes
This commit is contained in:
parent
409252716a
commit
01dabb9552
2 changed files with 8 additions and 39 deletions
|
|
@ -35,19 +35,12 @@
|
|||
name: "Settings",
|
||||
|
||||
setup() {
|
||||
let toggleSettings = ref(false);
|
||||
const toggleSettings = ref(false);
|
||||
|
||||
const { post } = useIpc();
|
||||
const { logout } = useAuth();
|
||||
const router = useRouter();
|
||||
|
||||
|
||||
// When settings is showing.
|
||||
const onActive = () => {
|
||||
toggleSettings.value = true;
|
||||
window.addEventListener("keydown", onEscape);
|
||||
}
|
||||
|
||||
// Listen for escape key to close settings.
|
||||
const onEscape = (e: any) => {
|
||||
if(e.key === "Escape") {
|
||||
|
|
@ -56,6 +49,12 @@
|
|||
window.removeEventListener("keydown", onEscape);
|
||||
}
|
||||
|
||||
// When settings is showing.
|
||||
const onActive = () => {
|
||||
toggleSettings.value = true;
|
||||
window.addEventListener("keydown", onEscape);
|
||||
}
|
||||
|
||||
// When user clicks logout button in settings.
|
||||
const onLogout = () => {
|
||||
logout();
|
||||
|
|
|
|||
Loading…
Reference in a new issue