Skip to content

Commit 588769d

Browse files
committed
Merge branch 'main' into release
2 parents d49909a + 71edaf1 commit 588769d

10 files changed

Lines changed: 65 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CHANGELOG
22

3-
## v7.6.1
3+
## v7.6.3
44

55
- Fixed https://github.com/phenomen/flc/issues/79
66
- Fixed https://github.com/phenomen/flc/issues/82

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flc",
3-
"version": "7.6.2",
3+
"version": "7.6.3",
44
"description": "Foundry Lightweight Client",
55
"type": "module",
66
"scripts": {

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "flc"
3-
version = "7.6.2"
3+
version = "7.6.3"
44
description = "Foundry Lightweight Client"
55
authors = ["phenomen"]
66
license = "MIT"

src-tauri/capabilities/default.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22
"$schema": "../gen/schemas/desktop-schema.json",
33
"identifier": "default",
44
"description": "Capability for the main window",
5-
"windows": ["main", "foundry*"],
6-
"webviews": ["main", "foundry*"],
7-
"remote": {
8-
"urls": ["https://*", "http://*"]
9-
},
5+
"windows": ["main"],
6+
"webviews": ["main"],
107
"platforms": ["macOS", "windows", "linux"],
118
"permissions": [
129
"core:default",
@@ -34,9 +31,9 @@
3431
"global-shortcut:allow-unregister-all",
3532
"global-shortcut:allow-is-registered",
3633
"shell:default",
34+
"shell:allow-open",
3735
"shell:allow-execute",
3836
"shell:allow-kill",
39-
"shell:allow-open",
4037
"shell:allow-spawn",
4138
"updater:default",
4239
"updater:allow-check",
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"$schema": "../gen/schemas/desktop-schema.json",
3+
"identifier": "foundry",
4+
"description": "Capability for the Foundry window",
5+
"windows": ["foundry*"],
6+
"webviews": ["foundry*"],
7+
"remote": {
8+
"urls": [
9+
"https://*",
10+
"http://*",
11+
"https://*:*",
12+
"http://*:*",
13+
"http://localhost:*",
14+
"https://localhost:*"
15+
]
16+
},
17+
"platforms": ["macOS", "windows", "linux"],
18+
"permissions": [
19+
"core:default",
20+
"core:webview:default",
21+
"core:webview:allow-create-webview-window",
22+
"core:webview:allow-create-webview",
23+
"core:webview:allow-set-webview-focus",
24+
"core:webview:allow-set-webview-size",
25+
"core:webview:allow-set-webview-zoom",
26+
"core:webview:allow-set-webview-position",
27+
"core:webview:allow-webview-close",
28+
"core:webview:allow-webview-show",
29+
"core:webview:allow-clear-all-browsing-data",
30+
"core:window:allow-close",
31+
"core:window:allow-create",
32+
"core:window:allow-is-focused",
33+
"core:window:allow-is-fullscreen",
34+
"core:window:allow-set-focus",
35+
"core:window:allow-set-fullscreen",
36+
"core:window:default",
37+
"shell:default",
38+
"shell:allow-open"
39+
]
40+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"default":{"identifier":"default","description":"Capability for the main window","remote":{"urls":["https://*","http://*"]},"local":true,"windows":["main","foundry*"],"webviews":["main","foundry*"],"permissions":["core:default","core:webview:default","core:webview:allow-create-webview-window","core:webview:allow-create-webview","core:webview:allow-set-webview-focus","core:webview:allow-set-webview-size","core:webview:allow-set-webview-zoom","core:webview:allow-set-webview-position","core:webview:allow-webview-close","core:webview:allow-webview-show","core:webview:allow-clear-all-browsing-data","core:window:allow-close","core:window:allow-create","core:window:allow-is-focused","core:window:allow-is-fullscreen","core:window:allow-set-focus","core:window:allow-set-fullscreen","core:window:default","dialog:default","global-shortcut:default","global-shortcut:allow-register","global-shortcut:allow-unregister","global-shortcut:allow-unregister-all","global-shortcut:allow-is-registered","shell:default","shell:allow-execute","shell:allow-kill","shell:allow-open","shell:allow-spawn","updater:default","updater:allow-check","updater:allow-download-and-install","updater:allow-download","updater:allow-install",{"identifier":"shell:allow-spawn","allow":[{"args":true,"cmd":"node","name":"node"}]}],"platforms":["macOS","windows","linux"]}}
1+
{"default":{"identifier":"default","description":"Capability for the main window","local":true,"windows":["main"],"webviews":["main"],"permissions":["core:default","core:webview:default","core:webview:allow-create-webview-window","core:webview:allow-create-webview","core:webview:allow-set-webview-focus","core:webview:allow-set-webview-size","core:webview:allow-set-webview-zoom","core:webview:allow-set-webview-position","core:webview:allow-webview-close","core:webview:allow-webview-show","core:webview:allow-clear-all-browsing-data","core:window:allow-close","core:window:allow-create","core:window:allow-is-focused","core:window:allow-is-fullscreen","core:window:allow-set-focus","core:window:allow-set-fullscreen","core:window:default","dialog:default","global-shortcut:default","global-shortcut:allow-register","global-shortcut:allow-unregister","global-shortcut:allow-unregister-all","global-shortcut:allow-is-registered","shell:default","shell:allow-open","shell:allow-execute","shell:allow-kill","shell:allow-spawn","updater:default","updater:allow-check","updater:allow-download-and-install","updater:allow-download","updater:allow-install",{"identifier":"shell:allow-spawn","allow":[{"args":true,"cmd":"node","name":"node"}]}],"platforms":["macOS","windows","linux"]},"foundry":{"identifier":"foundry","description":"Capability for the Foundry window","remote":{"urls":["https://*","http://*","https://*:*","http://*:*","http://localhost:*","https://localhost:*"]},"local":true,"windows":["foundry*"],"webviews":["foundry*"],"permissions":["core:default","core:webview:default","core:webview:allow-create-webview-window","core:webview:allow-create-webview","core:webview:allow-set-webview-focus","core:webview:allow-set-webview-size","core:webview:allow-set-webview-zoom","core:webview:allow-set-webview-position","core:webview:allow-webview-close","core:webview:allow-webview-show","core:webview:allow-clear-all-browsing-data","core:window:allow-close","core:window:allow-create","core:window:allow-is-focused","core:window:allow-is-fullscreen","core:window:allow-set-focus","core:window:allow-set-fullscreen","core:window:default","shell:default","shell:allow-open"],"platforms":["macOS","windows","linux"]}}

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "FLC",
4-
"version": "7.6.2",
4+
"version": "7.6.3",
55
"identifier": "com.phenomen.flc",
66
"build": {
77
"beforeDevCommand": "bun run dev",

src/lib/components/ServerCard.svelte

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
SmileIcon,
1313
ZapIcon,
1414
DicesIcon,
15-
HexagonIcon
15+
HexagonIcon,
16+
RefreshCcwIcon
1617
} from "@lucide/svelte";
1718
1819
import type { ServerStatus, Server } from "$scripts/servers.svelte.js";
@@ -39,8 +40,12 @@
3940
}
4041
}
4142
42-
onMount(async () => {
43+
async function handleRefreshServer() {
4344
status = await getServerStatus(server.url);
45+
}
46+
47+
onMount(async () => {
48+
await handleRefreshServer();
4449
});
4550
</script>
4651

@@ -92,6 +97,10 @@
9297
<Badge variant="destructive">
9398
<ZapIcon />Offline
9499
</Badge>
100+
<Badge
101+
variant="default"
102+
class="hover:bg-primary/90 hover:cursor-pointer"
103+
onclick={handleRefreshServer}><RefreshCcwIcon /> Check</Badge>
95104
{/if}
96105
</div>
97106
</div>

src/lib/scripts/webview.svelte.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { WebviewWindow } from "@tauri-apps/api/webviewWindow";
2-
import { nanoid } from "nanoid";
32

43
export async function openWebview(url: string, id: string, title: string, incognito: boolean) {
5-
const webview = new WebviewWindow(`foundry-${id}-${nanoid()}`, {
4+
// strip id from not alphanumeric characters
5+
const sanitizedId = id.replace(/[^a-zA-Z0-9]/g, "");
6+
7+
const webview = new WebviewWindow(`foundry${sanitizedId}`, {
68
title: `Foundry VTT - ${title}`,
79
url,
810
width: 1280,
@@ -12,7 +14,7 @@ export async function openWebview(url: string, id: string, title: string, incogn
1214
devtools: true,
1315
dragDropEnabled: false,
1416
zoomHotkeysEnabled: true,
15-
incognito: incognito
17+
incognito
1618
});
1719

1820
webview.once("tauri://created", function () {

0 commit comments

Comments
 (0)