F11 funkar i webbläsaren
This commit is contained in:
parent
b23f0e299a
commit
7de2df6ad0
@ -1,4 +1,5 @@
|
||||
import { goto } from '$app/navigation';
|
||||
import { PUBLIC_TAURI } from '$env/static/public';
|
||||
import type { ExpanderType } from "./index.d.ts";
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
import { incTextSize, decTextSize, selectNextColor, toggleMenuOpen, appState } from "$lib/stores.svelte"
|
||||
@ -136,19 +137,22 @@ hotkeys.set("F2", {
|
||||
|
||||
hotkeys.set("F11", {
|
||||
action: (e) => {
|
||||
e.preventDefault()
|
||||
console.log("Toggle fullscreen")
|
||||
if (fullscreen) {
|
||||
getCurrentWindow().setFullscreen(false).then(() => {
|
||||
fullscreen = false
|
||||
console.log(PUBLIC_TAURI)
|
||||
if(PUBLIC_TAURI == true) {
|
||||
e.preventDefault()
|
||||
if (fullscreen) {
|
||||
getCurrentWindow().setFullscreen(false).then(() => {
|
||||
fullscreen = false
|
||||
|
||||
|
||||
});
|
||||
} else {
|
||||
getCurrentWindow().setFullscreen(true).then(() => {
|
||||
fullscreen = true
|
||||
});
|
||||
} else {
|
||||
getCurrentWindow().setFullscreen(true).then(() => {
|
||||
fullscreen = true
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user