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