Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

feat(app): add opening modes and URL format help (#7196)

DooSys4be65fc7eb58
diff --git a/apps/docs/docs/widgets/app/index.mdx b/apps/docs/docs/widgets/app/index.mdx
index e1fd68c72..e81720906 100644
--- a/apps/docs/docs/widgets/app/index.mdx
+++ b/apps/docs/docs/widgets/app/index.mdx
@@ -21,3 +21,7 @@ check from the tile's edit actions. In view mode, right-click uses the browser's
### Configuration
<WidgetConfig configuration={appWidget.configuration} />
+
+In **New window** mode, only HTTP(S) and relative links request a separate browser window. Other protocols, such as
+`microsoft-edge:`, `vscode:`, or `ftp:`, are handled from the current tab without requesting an intermediate window.
+The browser may still ask for confirmation before opening an associated application.
diff --git a/apps/docs/docs/widgets/app/index.ts b/apps/docs/docs/widgets/app/index.ts
index 773121733..5dbfaee02 100644
--- a/apps/docs/docs/widgets/app/index.ts
+++ b/apps/docs/docs/widgets/app/index.ts
@@ -15,10 +15,10 @@ export const appWidget: WidgetDefinition = {
defaultValue: "-",
},
{
- name: "Open in new tab",
- description: "Whether to open the link in a new tab.",
- values: { type: "boolean" },
- defaultValue: "yes",
+ name: "Open app in",
+ description: "Choose where the app opens. Browser settings may override requests for a separate window.",
+ values: { type: "select", options: ["Current tab", "New tab", "New window"] },
+ defaultValue: "New tab",
},
{
name: "Show app name",
diff --git a/apps/nextjs/src/components/board/board-apps-spotlight-registrar.tsx b/apps/nextjs/src/components/board/board-apps-spotlight-registrar.tsx
index 7d1431fed..2a04b9687 100644
--- a/apps/nextjs/src/components/board/board-apps-spotlight-registrar.tsx
+++ b/apps/nextjs/src/components/board/board-apps-spotlight-registrar.tsx
@@ -30,7 +30,9 @@ export const BoardAppsSpotlightRegistrar = () => {
if (item.kind !== "app" || typeof item.options.appId !== "string" || item.options.appId.length === 0) continue;
const existingOpenInNewTab = result.get(item.options.appId) ?? false;
- result.set(item.options.appId, existingOpenInNewTab || item.options.openInNewTab === true);
+ const openInNewTab =
+ item.options.openIn === undefined ? item.options.openInNewTab === true : item.options.openIn !== "currentTab";
+ result.set(item.options.appId, existingOpenInNewTab || openInNewTab);
}
return result;
diff --git a/packages/api/src/router/board.ts b/packages/api/src/router/board.ts
index ccac49803..861deb3b5 100644
--- a/packages/api/src/router/board.ts
+++ b/packages/api/src/router/board.ts
@@ -52,6 +52,7 @@ import {
widgetDefaultSizes,
widgetKinds,
} from "@homarr/definitions";
+import { normalizeAppWidgetOptions } from "@homarr/validation/app";
import {
addItemToBoardSchema,
boardByNameSchema,
@@ -1731,6 +1732,7 @@ export const boardRouter = createTRPCRouter({
});
for (const item of input.items) {
+ if (item.kind === "app") item.options = normalizeAppWidgetOptions(item.options);
if (item.kind !== "timetable") continue;
const previousItem = dbBoard.items.find((dbItem) => dbItem.id === item.id);
let previousOptions: Record<string, unknown> | undefined;
@@ -2308,6 +2310,8 @@ export const boardRouter = createTRPCRouter({
.mutation(async ({ ctx, input }) => {
await throwIfActionForbiddenAsync(ctx, eq(boards.id, input.boardId), "modify");
+ if (input.kind === "app") input.options = normalizeAppWidgetOptions(input.options);
+
await validateWidgetConfigurationsAsync(ctx, [
{ id: "", kind: input.kind, integrationIds: input.integrationIds },
]);
diff --git a/packages/api/src/router/onboard/onboard-router.ts b/packages/api/src/router/onboard/onboard-router.ts
index 4894fb4bd..c9c90351e 100644
--- a/packages/api/src/router/onboard/onboard-router.ts
+++ b/packages/api/src/router/onboard/onboard-router.ts
@@ -843,13 +843,13 @@ export const onboardRouter = createTRPCRouter({
);
for (const app of selectedApps.filter((app) => !dockerSourceByAppId.has(app.id))) {
if (existingAppIds.has(app.id)) continue;
- placeNewItem("app", SuperJSON.stringify({ appId: app.id, openInNewTab: true, showTitle: true }), 1, 1);
+ placeNewItem("app", SuperJSON.stringify({ appId: app.id, openIn: "newTab", showTitle: true }), 1, 1);
}
for (const service of ungroupedDockerSources) {
const app = selectedApps.find((candidate) => candidate.id === stableOnboardingId("app", service.sourceId));
if (app && !existingAppIds.has(app.id)) {
- placeNewItem("app", SuperJSON.stringify({ appId: app.id, openInNewTab: true, showTitle: true }), 1, 1);
+ placeNewItem("app", SuperJSON.stringify({ appId: app.id, openIn: "newTab", showTitle: true }), 1, 1);
}
const plan = getDockerWidgetPlan(service);
if (!plan || linkExistingDockerWidget(plan.widgetKind, plan.integration)) continue;
@@ -889,7 +889,7 @@ export const onboardRouter = createTRPCRouter({
if (app && !existingAppIds.has(app.id)) {
groupedItemPlans.push({
kind: "app",
- options: SuperJSON.stringify({ appId: app.id, openInNewTab: true, showTitle: true }),
+ options: SuperJSON.stringify({ appId: app.id, openIn: "newTab", showTitle: true }),
width: 1,
height: 1,
});
diff --git a/packages/db/migrations/custom/0006_app_widget_open_in.ts b/packages/db/migrations/custom/0006_app_widget_open_in.ts
new file mode 100644
index 000000000..f973e9c86
--- /dev/null
+++ b/packages/db/migrations/custom/0006_app_widget_open_in.ts
@@ -0,0 +1,33 @@
+import SuperJSON from "superjson";
+
+import { normalizeAppWidgetOptions } from "@homarr/validation/app";
+
+import { eq } from "../..";
+import type { Database } from "../..";
+import { items } from "../../schema";
+
+export async function migrateAppWidgetOpenInAsync(db: Database) {
+ const existingAppItems = await db.query.items.findMany({
+ where: (table, { eq: equals }) => equals(table.kind, "app"),
+ });
+
+ const itemsToUpdate = existingAppItems
+ .map((item) => ({
+ id: item.id,
+ options: SuperJSON.parse<Record<string, unknown>>(item.options),
+ }))
+ .filter(
+ (item) =>
+ item.options.openIn === undefined &&
+ (item.options.openInNewTab !== undefined || item.options.openInNewWindow !== undefined),
+ );
+
+ await Promise.all(
+ itemsToUpdate.map(async (item) => {
+ await db
+ .update(items)
+ .set({ options: SuperJSON.stringify(normalizeAppWidgetOptions(item.options)) })
+ .where(eq(items.id, item.id));
+ }),
+ );
+}
diff --git a/packages/db/migrations/custom/index.ts b/packages/db/migrations/custom/index.ts
index 99bf17a65..24c9f5620 100644
--- a/packages/db/migrations/custom/index.ts
+++ b/packages/db/migrations/custom/index.ts
@@ -5,6 +5,7 @@ import { migrateAppWidgetShowDescriptionTooltipToDisplayModeAsync } from "./0002
import { migrateWidgetOnlyIntegrationsToOptionsAsync } from "./0003_remove_widget_only_integrations";
import { migrateLegacySectionsToContainersAsync } from "./0004_unify_sections_and_gutters";
import { migrateReleasesWidgetOptionsAsync } from "./0005_releases_widget_options";
+import { migrateAppWidgetOpenInAsync } from "./0006_app_widget_open_in";
export const applyCustomMigrationsAsync = async (db: Database) => {
await migrateReleaseWidgetProviderToOptionsAsync(db);
@@ -13,4 +14,5 @@ export const applyCustomMigrationsAsync = async (db: Database) => {
await migrateWidgetOnlyIntegrationsToOptionsAsync(db);
await migrateLegacySectionsToContainersAsync(db);
await migrateReleasesWidgetOptionsAsync(db);
+ await migrateAppWidgetOpenInAsync(db);
};
diff --git a/packages/db/migrations/seed.ts b/packages/db/migrations/seed.ts
index 2576f7027..2bf823c9a 100644
--- a/packages/db/migrations/seed.ts
+++ b/packages/db/migrations/seed.ts
@@ -930,7 +930,7 @@ const buildDemoWidgets = (
width: 1,
height: 1,
needsIntegration: false,
- options: { appId, openInNewTab: true, showTitle: true, pingEnabled: false },
+ options: { appId, openIn: "newTab", showTitle: true, pingEnabled: false },
}),
),
];
diff --git a/packages/db/queries/widget-placement.ts b/packages/db/queries/widget-placement.ts
index 443de045c..ea19b5a0e 100644
--- a/packages/db/queries/widget-placement.ts
+++ b/packages/db/queries/widget-placement.ts
@@ -145,7 +145,7 @@ export const placeAllWidgetsAsync = async (
contexts,
"app",
[],
- superjson.stringify({ appId: app.id, openInNewTab: true, showTitle: true }),
+ superjson.stringify({ appId: app.id, openIn: "newTab", showTitle: true }),
{ width: 1, height: 1 },
);
}
diff --git a/packages/db/test/app-widget-open-in-migration.spec.ts b/packages/db/test/app-widget-open-in-migration.spec.ts
new file mode 100644
index 000000000..f889c28f5
--- /dev/null
+++ b/packages/db/test/app-widget-open-in-migration.spec.ts
@@ -0,0 +1,65 @@
+import { parse, stringify } from "superjson";
+import { describe, expect, test } from "vitest";
+
+import type { Database } from "..";
+import { migrateAppWidgetOpenInAsync } from "../migrations/custom/0006_app_widget_open_in";
+import { boards, items, users } from "../schema";
+import { createDb } from "./db-mock";
+
+describe("App widget opening mode migration", () => {
+ test("migrates legacy modes, preserves other settings and explicit modes, and is idempotent", async () => {
+ const database = createDb();
+ try {
+ await database.insert(users).values({ id: "migration-user" });
+ await database.insert(boards).values({ id: "migration-board", name: "Migration", creatorId: "migration-user" });
+
+ const cases = [
+ {
+ id: "current",
+ before: { openInNewTab: false, appId: "existing-app", showTitle: false },
+ after: { openIn: "currentTab", appId: "existing-app", showTitle: false },
+ },
+ { id: "tab", before: { openInNewTab: true }, after: { openIn: "newTab" } },
+ {
+ id: "window",
+ before: { openInNewTab: false, openInNewWindow: true },
+ after: { openIn: "newWindow" },
+ },
+ { id: "window-disabled", before: { openInNewWindow: false }, after: { openIn: "newTab" } },
+ {
+ id: "explicit",
+ before: { openIn: "currentTab", openInNewTab: true, openInNewWindow: true },
+ after: { openIn: "currentTab", openInNewTab: true, openInNewWindow: true },
+ },
+ { id: "default", before: { showTitle: false }, after: { showTitle: false } },
+ ];
+ await database.insert(items).values(
+ cases.map(({ id, before }) => ({
+ id,
+ kind: "app" as const,
+ boardId: "migration-board",
+ options: stringify(before),
+ })),
+ );
+ await database.insert(items).values({
+ id: "clock",
+ kind: "clock",
+ boardId: "migration-board",
+ options: stringify({ openInNewTab: false }),
+ });
+
+ await migrateAppWidgetOpenInAsync(database as unknown as Database);
+ const migrated = await database.query.items.findMany({ orderBy: (table, { asc }) => asc(table.id) });
+ const migratedOptions = Object.fromEntries(migrated.map((item) => [item.id, parse(item.options)]));
+ for (const entry of cases) {
+ expect(migratedOptions[entry.id]).toEqual(entry.after);
+ }
+ expect(migratedOptions.clock).toEqual({ openInNewTab: false });
+
+ await migrateAppWidgetOpenInAsync(database as unknown as Database);
+ expect(await database.query.items.findMany({ orderBy: (table, { asc }) => asc(table.id) })).toEqual(migrated);
+ } finally {
+ database.$client.close();
+ }
+ });
+});
diff --git a/packages/forms-collection/src/new-app/_form.tsx b/packages/forms-collection/src/new-app/_form.tsx
index 452679396..71bfca490 100644
--- a/packages/forms-collection/src/new-app/_form.tsx
+++ b/packages/forms-collection/src/new-app/_form.tsx
@@ -13,6 +13,7 @@ import { Link } from "@homarr/ui";
import { appManageSchema } from "@homarr/validation/app";
import { IconPicker } from "../icon-picker/icon-picker";
+import { AppUrlLabel } from "./_url-label";
type FormType = z.infer<typeof appManageSchema>;
@@ -147,7 +148,7 @@ export const AppForm = ({
minRows={2}
resize="vertical"
/>
- <TextInput {...form.getInputProps("href")} label={invariantTechnicalLabels.url} />
+ <TextInput {...form.getInputProps("href")} label={<AppUrlLabel />} aria-label={invariantTechnicalLabels.url} />
<Checkbox
checked={opened}
diff --git a/packages/forms-collection/src/new-app/_url-label.tsx b/packages/forms-collection/src/new-app/_url-label.tsx
new file mode 100644
index 000000000..8c35fb715
--- /dev/null
+++ b/packages/forms-collection/src/new-app/_url-label.tsx
@@ -0,0 +1,47 @@
+"use client";
+
+import { ActionIcon, Group, Stack, Text, Tooltip } from "@mantine/core";
+import { IconInfoCircle } from "@tabler/icons-react";
+
+import { invariantTechnicalLabels } from "@homarr/definitions";
+import { useI18n } from "@homarr/translation/client";
+
+export const AppUrlLabel = () => {
+ const tApp = useI18n("app");
+
+ return (
+ <Group component="span" gap={4} wrap="nowrap">
+ {invariantTechnicalLabels.url}
+ <Tooltip
+ interactive
+ withArrow
+ multiline
+ w={300}
+ events={{ hover: true, focus: true, touch: true }}
+ label={
+ <Stack gap={4}>
+ <Text inherit fw={600}>
+ {tApp("field.url.examples")}
+ </Text>
+ {[
+ "https://example.com",
+ "http://server:8080",
+ "microsoft-edge:https://example.com",
+ "mailto:[email protected]",
+ "vscode://file/path",
+ ].map((example) => (
+ <Text key={example} component="code" size="xs" dir="ltr">
+ {example}
+ </Text>
+ ))}
+ <Text inherit>{tApp("field.url.requiresHandler")}</Text>
+ </Stack>
+ }
+ >
+ <ActionIcon type="button" variant="subtle" color="gray" size="sm" aria-label={tApp("field.url.helpLabel")}>
+ <IconInfoCircle size={16} />
+ </ActionIcon>
+ </Tooltip>
+ </Group>
+ );
+};
diff --git a/packages/translation/src/lang/ca.json b/packages/translation/src/lang/ca.json
index 674964eaa..bb0dd8a7f 100644
--- a/packages/translation/src/lang/ca.json
+++ b/packages/translation/src/lang/ca.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Exemples de formats d'URL",
+ "examples": "Exemples d'enllaços admesos",
+ "requiresHandler": "Els protocols personalitzats requereixen una aplicació associada al vostre dispositiu."
+ },
"description": {
"label": "Descripció"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Trieu l'aplicació"
},
+ "openIn": {
+ "label": "Obre l'aplicació a",
+ "description": "Trieu on s'obre aquesta aplicació. La configuració del navegador pot modificar l'obertura en una finestra separada.",
+ "option": {
+ "currentTab": "La pestanya actual",
+ "newTab": "Una pestanya nova",
+ "newWindow": "Una finestra nova"
+ }
+ },
"showTitle": {
"label": "Mostra el nom de l'aplicació"
},
diff --git a/packages/translation/src/lang/cn.json b/packages/translation/src/lang/cn.json
index 023b7de8d..c6547cacb 100644
--- a/packages/translation/src/lang/cn.json
+++ b/packages/translation/src/lang/cn.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "URL 格式示例",
+ "examples": "支持的链接示例",
+ "requiresHandler": "自定义协议需要在您的设备上关联相应的应用程序。"
+ },
"description": {
"label": "描述"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "选择应用"
},
+ "openIn": {
+ "label": "打开应用的位置",
+ "description": "选择此应用的打开位置。浏览器设置可能会更改在独立窗口中打开的行为。",
+ "option": {
+ "currentTab": "当前标签页",
+ "newTab": "新标签页",
+ "newWindow": "新窗口"
+ }
+ },
"showTitle": {
"label": "显示应用名称"
},
diff --git a/packages/translation/src/lang/cs.json b/packages/translation/src/lang/cs.json
index 3d93e0b99..97f35d5df 100644
--- a/packages/translation/src/lang/cs.json
+++ b/packages/translation/src/lang/cs.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Příklady formátů URL",
+ "examples": "Příklady podporovaných odkazů",
+ "requiresHandler": "Vlastní protokoly vyžadují přidruženou aplikaci ve vašem zařízení."
+ },
"description": {
"label": "Popis"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Vyberte aplikaci"
},
+ "openIn": {
+ "label": "Otevřít aplikaci v",
+ "description": "Vyberte, kde se tato aplikace otevře. Nastavení prohlížeče může změnit otevírání v samostatném okně.",
+ "option": {
+ "currentTab": "Aktuální kartě",
+ "newTab": "Nové kartě",
+ "newWindow": "Novém okně"
+ }
+ },
"showTitle": {
"label": "Zobrazit název aplikace"
},
diff --git a/packages/translation/src/lang/da.json b/packages/translation/src/lang/da.json
index f9e98a1ba..fddc8a96a 100644
--- a/packages/translation/src/lang/da.json
+++ b/packages/translation/src/lang/da.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Eksempler på URL-formater",
+ "examples": "Eksempler på understøttede links",
+ "requiresHandler": "Brugerdefinerede protokoller kræver en tilknyttet app på din enhed."
+ },
"description": {
"label": "Beskriveslse"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Vælg app"
},
+ "openIn": {
+ "label": "Åbn app i",
+ "description": "Vælg, hvor denne app skal åbnes. Dine browserindstillinger kan tilsidesætte åbning i et separat vindue.",
+ "option": {
+ "currentTab": "Aktuel fane",
+ "newTab": "Ny fane",
+ "newWindow": "Nyt vindue"
+ }
+ },
"showTitle": {
"label": "Vis app-navn"
},
diff --git a/packages/translation/src/lang/de-CH.json b/packages/translation/src/lang/de-CH.json
index 4f28001ca..716fa5d27 100644
--- a/packages/translation/src/lang/de-CH.json
+++ b/packages/translation/src/lang/de-CH.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Beispiele für URL-Formate",
+ "examples": "Beispiele für unterstützte Links",
+ "requiresHandler": "Benutzerdefinierte Protokolle erfordern eine zugeordnete Anwendung auf deinem Gerät."
+ },
"description": {
"label": "Beschreibung"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "App auswählen"
},
+ "openIn": {
+ "label": "App öffnen in",
+ "description": "Wähle, wo diese App geöffnet wird. Die Browsereinstellungen können das Öffnen in einem separaten Fenster beeinflussen.",
+ "option": {
+ "currentTab": "Aktuellem Tab",
+ "newTab": "Neuem Tab",
+ "newWindow": "Neuem Fenster"
+ }
+ },
"showTitle": {
"label": "App Namen anzeigen"
},
diff --git a/packages/translation/src/lang/de.json b/packages/translation/src/lang/de.json
index f124346d1..52d4b0fe5 100644
--- a/packages/translation/src/lang/de.json
+++ b/packages/translation/src/lang/de.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Beispiele für URL-Formate",
+ "examples": "Beispiele für unterstützte Links",
+ "requiresHandler": "Benutzerdefinierte Protokolle erfordern eine zugeordnete Anwendung auf deinem Gerät."
+ },
"description": {
"label": "Beschreibung"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "App auswählen"
},
+ "openIn": {
+ "label": "App öffnen in",
+ "description": "Wähle, wo diese App geöffnet wird. Die Browsereinstellungen können das Öffnen in einem separaten Fenster beeinflussen.",
+ "option": {
+ "currentTab": "Aktuellem Tab",
+ "newTab": "Neuem Tab",
+ "newWindow": "Neuem Fenster"
+ }
+ },
"showTitle": {
"label": "App Namen anzeigen"
},
diff --git a/packages/translation/src/lang/el.json b/packages/translation/src/lang/el.json
index d9316b548..43f732927 100644
--- a/packages/translation/src/lang/el.json
+++ b/packages/translation/src/lang/el.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Παραδείγματα μορφών URL",
+ "examples": "Παραδείγματα αποδεκτών συνδέσμων",
+ "requiresHandler": "Τα προσαρμοσμένα πρωτόκολλα απαιτούν μια συσχετισμένη εφαρμογή στη συσκευή σας."
+ },
"description": {
"label": "Περιγραφή"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Επιλέξτε εφαρμογή"
},
+ "openIn": {
+ "label": "Άνοιγμα εφαρμογής σε",
+ "description": "Επιλέξτε πού ανοίγει αυτή η εφαρμογή. Οι ρυθμίσεις του προγράμματος περιήγησης ενδέχεται να αλλάξουν το άνοιγμα σε ξεχωριστό παράθυρο.",
+ "option": {
+ "currentTab": "Τρέχουσα καρτέλα",
+ "newTab": "Νέα καρτέλα",
+ "newWindow": "Νέο παράθυρο"
+ }
+ },
"showTitle": {
"label": "Εμφάνιση ονόματος"
},
diff --git a/packages/translation/src/lang/en-gb.json b/packages/translation/src/lang/en-gb.json
index 345fd5942..d282b4f18 100644
--- a/packages/translation/src/lang/en-gb.json
+++ b/packages/translation/src/lang/en-gb.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "URL format examples",
+ "examples": "Examples of accepted links",
+ "requiresHandler": "Custom protocols require an associated application on your device."
+ },
"description": {
"label": "Description"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Choose app"
},
+ "openIn": {
+ "label": "Open app in",
+ "description": "Choose where this app opens. Your browser settings may override requests for a separate window.",
+ "option": {
+ "currentTab": "Current tab",
+ "newTab": "New tab",
+ "newWindow": "New window"
+ }
+ },
"showTitle": {
"label": "Show app name"
},
diff --git a/packages/translation/src/lang/en.json b/packages/translation/src/lang/en.json
index 481f63b48..916b709e9 100644
--- a/packages/translation/src/lang/en.json
+++ b/packages/translation/src/lang/en.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "URL format examples",
+ "examples": "Examples of accepted links",
+ "requiresHandler": "Custom protocols require an associated application on your device."
+ },
"description": {
"label": "Description"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Choose app"
},
+ "openIn": {
+ "label": "Open app in",
+ "description": "Choose where this app opens. Your browser settings may override requests for a separate window.",
+ "option": {
+ "currentTab": "Current tab",
+ "newTab": "New tab",
+ "newWindow": "New window"
+ }
+ },
"showTitle": {
"label": "Show app name"
},
diff --git a/packages/translation/src/lang/es.json b/packages/translation/src/lang/es.json
index f89ec94a2..6dd2cb1cf 100644
--- a/packages/translation/src/lang/es.json
+++ b/packages/translation/src/lang/es.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Ejemplos de formatos de URL",
+ "examples": "Ejemplos de enlaces admitidos",
+ "requiresHandler": "Los protocolos personalizados requieren una aplicación asociada en tu dispositivo."
+ },
"description": {
"label": "Descripción"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Elegir aplicación"
},
+ "openIn": {
+ "label": "Abrir la aplicación en",
+ "description": "Elige dónde se abre esta aplicación. La configuración del navegador puede modificar la apertura en una ventana independiente.",
+ "option": {
+ "currentTab": "La pestaña actual",
+ "newTab": "Una pestaña nueva",
+ "newWindow": "Una ventana nueva"
+ }
+ },
"showTitle": {
"label": "Mostrar el nombre de la aplicación"
},
diff --git a/packages/translation/src/lang/et.json b/packages/translation/src/lang/et.json
index 638544caa..759ddb5c9 100644
--- a/packages/translation/src/lang/et.json
+++ b/packages/translation/src/lang/et.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "URL-vormingute näited",
+ "examples": "Toetatud linkide näited",
+ "requiresHandler": "Kohandatud protokollid nõuavad sinu seadmes nendega seotud rakendust."
+ },
"description": {
"label": "Kirjeldus"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Vali rakendus"
},
+ "openIn": {
+ "label": "Rakenduse avamiskoht",
+ "description": "Vali, kus see rakendus avaneb. Brauseri seaded võivad eraldi aknas avamise soovi eirata.",
+ "option": {
+ "currentTab": "Praegune vahekaart",
+ "newTab": "Uus vahekaart",
+ "newWindow": "Uus aken"
+ }
+ },
"showTitle": {
"label": "Näita rakenduse nime"
},
diff --git a/packages/translation/src/lang/fi.json b/packages/translation/src/lang/fi.json
index 6fcd74bf4..406389640 100644
--- a/packages/translation/src/lang/fi.json
+++ b/packages/translation/src/lang/fi.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Esimerkkejä URL-osoitteiden muodoista",
+ "examples": "Esimerkkejä tuetuista linkeistä",
+ "requiresHandler": "Mukautetut protokollat edellyttävät niihin liitettyä sovellusta laitteellasi."
+ },
"description": {
"label": "Kuvaus"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Valitse sovellus"
},
+ "openIn": {
+ "label": "Avaa sovellus",
+ "description": "Valitse, missä tämä sovellus avautuu. Selaimen asetukset voivat ohittaa pyynnön avata erillinen ikkuna.",
+ "option": {
+ "currentTab": "Nykyisessä välilehdessä",
+ "newTab": "Uudessa välilehdessä",
+ "newWindow": "Uudessa ikkunassa"
+ }
+ },
"showTitle": {
"label": "Näytä sovelluksen nimi"
},
diff --git a/packages/translation/src/lang/fr.json b/packages/translation/src/lang/fr.json
index 707da95b0..fc6925395 100644
--- a/packages/translation/src/lang/fr.json
+++ b/packages/translation/src/lang/fr.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Exemples de formats d’URL",
+ "examples": "Exemples de liens acceptés",
+ "requiresHandler": "Les protocoles personnalisés nécessitent une application associée sur votre appareil."
+ },
"description": {
"label": "Description"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Choisir une application"
},
+ "openIn": {
+ "label": "Ouvrir l'application dans",
+ "description": "Choisissez où ouvrir cette application. Les réglages du navigateur peuvent modifier l'ouverture dans une fenêtre séparée.",
+ "option": {
+ "currentTab": "L'onglet actuel",
+ "newTab": "Un nouvel onglet",
+ "newWindow": "Une nouvelle fenêtre"
+ }
+ },
"showTitle": {
"label": "Afficher le nom de l'application"
},
diff --git a/packages/translation/src/lang/he.json b/packages/translation/src/lang/he.json
index 9ac910ca8..a30a19ff8 100644
--- a/packages/translation/src/lang/he.json
+++ b/packages/translation/src/lang/he.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "דוגמאות לפורמטים של כתובות URL",
+ "examples": "דוגמאות לקישורים נתמכים",
+ "requiresHandler": "פרוטוקולים מותאמים אישית דורשים אפליקציה משויכת במכשיר שלכם."
+ },
"description": {
"label": "תיאור"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "בחר אפליקציה"
},
+ "openIn": {
+ "label": "מיקום פתיחת האפליקציה",
+ "description": "בחרו היכן האפליקציה תיפתח. הגדרות הדפדפן עשויות לשנות את הפתיחה בחלון נפרד.",
+ "option": {
+ "currentTab": "הכרטיסייה הנוכחית",
+ "newTab": "כרטיסייה חדשה",
+ "newWindow": "חלון חדש"
+ }
+ },
"showTitle": {
"label": "הצג את שם האפליקציה"
},
diff --git a/packages/translation/src/lang/hr.json b/packages/translation/src/lang/hr.json
index 05fdd6ed4..dcc3fe953 100644
--- a/packages/translation/src/lang/hr.json
+++ b/packages/translation/src/lang/hr.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Primjeri formata URL-a",
+ "examples": "Primjeri podržanih poveznica",
+ "requiresHandler": "Prilagođeni protokoli zahtijevaju povezanu aplikaciju na vašem uređaju."
+ },
"description": {
"label": "Opis"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Odaberi aplikaciju"
},
+ "openIn": {
+ "label": "Otvori aplikaciju u",
+ "description": "Odaberite gdje se ova aplikacija otvara. Postavke preglednika mogu promijeniti otvaranje u zasebnom prozoru.",
+ "option": {
+ "currentTab": "Trenutačnoj kartici",
+ "newTab": "Novoj kartici",
+ "newWindow": "Novom prozoru"
+ }
+ },
"showTitle": {
"label": "Prikaži naziv aplikacije"
},
diff --git a/packages/translation/src/lang/hu.json b/packages/translation/src/lang/hu.json
index b0792ca23..11c09b777 100644
--- a/packages/translation/src/lang/hu.json
+++ b/packages/translation/src/lang/hu.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Példák URL-formátumokra",
+ "examples": "Példák támogatott hivatkozásokra",
+ "requiresHandler": "Az egyéni protokollokhoz társított alkalmazás szükséges az eszközön."
+ },
"description": {
"label": "Leírás"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Alkalmazás"
},
+ "openIn": {
+ "label": "Alkalmazás megnyitása",
+ "description": "Válassza ki, hol nyíljon meg az alkalmazás. A böngésző beállításai felülbírálhatják a külön ablakban való megnyitást.",
+ "option": {
+ "currentTab": "Az aktuális lapon",
+ "newTab": "Új lapon",
+ "newWindow": "Új ablakban"
+ }
+ },
"showTitle": {
"label": "Alkalmazás nevének megjelenítése"
},
diff --git a/packages/translation/src/lang/it.json b/packages/translation/src/lang/it.json
index ac150f920..cebd40532 100644
--- a/packages/translation/src/lang/it.json
+++ b/packages/translation/src/lang/it.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Esempi di formati URL",
+ "examples": "Esempi di link supportati",
+ "requiresHandler": "I protocolli personalizzati richiedono un'applicazione associata sul dispositivo."
+ },
"description": {
"label": "Descrizione"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Scegli app"
},
+ "openIn": {
+ "label": "Apri l'app in",
+ "description": "Scegli dove aprire questa app. Le impostazioni del browser possono modificare l'apertura in una finestra separata.",
+ "option": {
+ "currentTab": "Scheda attuale",
+ "newTab": "Nuova scheda",
+ "newWindow": "Nuova finestra"
+ }
+ },
"showTitle": {
"label": "Mostra nome app"
},
diff --git a/packages/translation/src/lang/ja.json b/packages/translation/src/lang/ja.json
index 4e0fba644..345fe456f 100644
--- a/packages/translation/src/lang/ja.json
+++ b/packages/translation/src/lang/ja.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "URL 形式の例",
+ "examples": "使用できるリンクの例",
+ "requiresHandler": "カスタムプロトコルを使用するには、端末に対応するアプリを関連付ける必要があります。"
+ },
"description": {
"label": "説明"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "アプリを選択"
},
+ "openIn": {
+ "label": "アプリを開く場所",
+ "description": "このアプリを開く場所を選択します。ブラウザーの設定によっては、別ウィンドウで開く指定が反映されない場合があります。",
+ "option": {
+ "currentTab": "現在のタブ",
+ "newTab": "新しいタブ",
+ "newWindow": "新しいウィンドウ"
+ }
+ },
"showTitle": {
"label": "アプリ名を表示"
},
diff --git a/packages/translation/src/lang/ko.json b/packages/translation/src/lang/ko.json
index 823c20618..5fb4bdcbe 100644
--- a/packages/translation/src/lang/ko.json
+++ b/packages/translation/src/lang/ko.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "URL 형식 예시",
+ "examples": "지원되는 링크 예시",
+ "requiresHandler": "사용자 지정 프로토콜을 사용하려면 기기에 연결된 앱이 필요합니다."
+ },
"description": {
"label": "설명"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "앱 선택"
},
+ "openIn": {
+ "label": "앱을 열 위치",
+ "description": "이 앱을 열 위치를 선택하세요. 브라우저 설정에 따라 별도 창으로 열리지 않을 수 있습니다.",
+ "option": {
+ "currentTab": "현재 탭",
+ "newTab": "새 탭",
+ "newWindow": "새 창"
+ }
+ },
"showTitle": {
"label": "앱 이름 표시"
},
diff --git a/packages/translation/src/lang/lt.json b/packages/translation/src/lang/lt.json
index 7d17d3f3c..df242cb00 100644
--- a/packages/translation/src/lang/lt.json
+++ b/packages/translation/src/lang/lt.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "URL formatų pavyzdžiai",
+ "examples": "Palaikomų nuorodų pavyzdžiai",
+ "requiresHandler": "Pasirinktiniams protokolams reikia susietos programos jūsų įrenginyje."
+ },
"description": {
"label": "Aprašymas"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Pasirinkite programėlę"
},
+ "openIn": {
+ "label": "Atverti programėlę",
+ "description": "Pasirinkite, kur atverti šią programėlę. Naršyklės nuostatos gali pakeisti atvėrimą atskirame lange.",
+ "option": {
+ "currentTab": "Dabartinėje kortelėje",
+ "newTab": "Naujoje kortelėje",
+ "newWindow": "Naujame lange"
+ }
+ },
"showTitle": {
"label": "Rodyti programėlės pavadinimą"
},
diff --git a/packages/translation/src/lang/lv.json b/packages/translation/src/lang/lv.json
index a0231c944..4ec86db9a 100644
--- a/packages/translation/src/lang/lv.json
+++ b/packages/translation/src/lang/lv.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "URL formātu piemēri",
+ "examples": "Atbalstīto saišu piemēri",
+ "requiresHandler": "Pielāgotiem protokoliem ir nepieciešama saistīta lietotne jūsu ierīcē."
+ },
"description": {
"label": "Apraksts"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Izvēlēties lietotni"
},
+ "openIn": {
+ "label": "Atvērt lietotni",
+ "description": "Izvēlieties, kur atvērt šo lietotni. Pārlūkprogrammas iestatījumi var mainīt atvēršanu atsevišķā logā.",
+ "option": {
+ "currentTab": "Pašreizējā cilnē",
+ "newTab": "Jaunā cilnē",
+ "newWindow": "Jaunā logā"
+ }
+ },
"showTitle": {
"label": "Rādīt lietotnes nosaukumu"
},
diff --git a/packages/translation/src/lang/nl.json b/packages/translation/src/lang/nl.json
index 98b6ab1d4..c83669647 100644
--- a/packages/translation/src/lang/nl.json
+++ b/packages/translation/src/lang/nl.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Voorbeelden van URL-indelingen",
+ "examples": "Voorbeelden van ondersteunde links",
+ "requiresHandler": "Aangepaste protocollen vereisen een gekoppelde toepassing op je apparaat."
+ },
"description": {
"label": "Beschrijving"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "App kiezen"
},
+ "openIn": {
+ "label": "App openen in",
+ "description": "Kies waar deze app wordt geopend. Je browserinstellingen kunnen het openen in een apart venster beïnvloeden.",
+ "option": {
+ "currentTab": "Huidig tabblad",
+ "newTab": "Nieuw tabblad",
+ "newWindow": "Nieuw venster"
+ }
+ },
"showTitle": {
"label": "App naam weergeven"
},
diff --git a/packages/translation/src/lang/no.json b/packages/translation/src/lang/no.json
index af9aa2337..7cfcf1e91 100644
--- a/packages/translation/src/lang/no.json
+++ b/packages/translation/src/lang/no.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Eksempler på URL-formater",
+ "examples": "Eksempler på støttede lenker",
+ "requiresHandler": "Egendefinerte protokoller krever en tilknyttet app på enheten din."
+ },
"description": {
"label": "Beskrivelse"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Velg app"
},
+ "openIn": {
+ "label": "Åpne app i",
+ "description": "Velg hvor denne appen skal åpnes. Nettleserinnstillingene dine kan overstyre åpning i et eget vindu.",
+ "option": {
+ "currentTab": "Gjeldende fane",
+ "newTab": "Ny fane",
+ "newWindow": "Nytt vindu"
+ }
+ },
"showTitle": {
"label": "Vis app navn"
},
diff --git a/packages/translation/src/lang/pl.json b/packages/translation/src/lang/pl.json
index 6b0f3d615..b2229b714 100644
--- a/packages/translation/src/lang/pl.json
+++ b/packages/translation/src/lang/pl.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Przykłady formatów URL",
+ "examples": "Przykłady obsługiwanych linków",
+ "requiresHandler": "Niestandardowe protokoły wymagają powiązanej aplikacji na urządzeniu."
+ },
"description": {
"label": "Opis"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Wybierz aplikację"
},
+ "openIn": {
+ "label": "Otwórz aplikację w",
+ "description": "Wybierz, gdzie otworzyć tę aplikację. Ustawienia przeglądarki mogą zmienić otwieranie w osobnym oknie.",
+ "option": {
+ "currentTab": "Bieżącej karcie",
+ "newTab": "Nowej karcie",
+ "newWindow": "Nowym oknie"
+ }
+ },
"showTitle": {
"label": "Pokaż nazwę aplikacji"
},
diff --git a/packages/translation/src/lang/pt-br.json b/packages/translation/src/lang/pt-br.json
index 4985bb5f8..5ae992365 100644
--- a/packages/translation/src/lang/pt-br.json
+++ b/packages/translation/src/lang/pt-br.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Exemplos de formatos de URL",
+ "examples": "Exemplos de links aceitos",
+ "requiresHandler": "Protocolos personalizados exigem um aplicativo associado no seu dispositivo."
+ },
"description": {
"label": "Descrição"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Escolher aplicativo"
},
+ "openIn": {
+ "label": "Abrir o aplicativo em",
+ "description": "Escolha onde abrir este aplicativo. As configurações do navegador podem alterar a abertura em uma janela separada.",
+ "option": {
+ "currentTab": "Aba atual",
+ "newTab": "Nova aba",
+ "newWindow": "Nova janela"
+ }
+ },
"showTitle": {
"label": "Exibir o nome do aplicativo"
},
diff --git a/packages/translation/src/lang/pt.json b/packages/translation/src/lang/pt.json
index 5efbeb4ef..e68d7c9d0 100644
--- a/packages/translation/src/lang/pt.json
+++ b/packages/translation/src/lang/pt.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Exemplos de formatos de URL",
+ "examples": "Exemplos de ligações suportadas",
+ "requiresHandler": "Os protocolos personalizados requerem uma aplicação associada no seu dispositivo."
+ },
"description": {
"label": "Descrição"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Escolher aplicativo"
},
+ "openIn": {
+ "label": "Abrir a aplicação em",
+ "description": "Escolha onde abrir esta aplicação. As definições do navegador podem alterar a abertura numa janela separada.",
+ "option": {
+ "currentTab": "Separador atual",
+ "newTab": "Novo separador",
+ "newWindow": "Nova janela"
+ }
+ },
"showTitle": {
"label": "Exibir o nome do aplicativo"
},
diff --git a/packages/translation/src/lang/ro.json b/packages/translation/src/lang/ro.json
index f692d972f..5ba189b94 100644
--- a/packages/translation/src/lang/ro.json
+++ b/packages/translation/src/lang/ro.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Exemple de formate URL",
+ "examples": "Exemple de linkuri acceptate",
+ "requiresHandler": "Protocoalele personalizate necesită o aplicație asociată pe dispozitivul tău."
+ },
"description": {
"label": "Descriere"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Alegeți aplicația"
},
+ "openIn": {
+ "label": "Deschide aplicația în",
+ "description": "Alege unde se deschide această aplicație. Setările browserului pot modifica deschiderea într-o fereastră separată.",
+ "option": {
+ "currentTab": "Fila curentă",
+ "newTab": "O filă nouă",
+ "newWindow": "O fereastră nouă"
+ }
+ },
"showTitle": {
"label": "Arată numele aplicației"
},
diff --git a/packages/translation/src/lang/ru.json b/packages/translation/src/lang/ru.json
index 515d7b572..7fcd40e5c 100644
--- a/packages/translation/src/lang/ru.json
+++ b/packages/translation/src/lang/ru.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Примеры форматов URL",
+ "examples": "Примеры поддерживаемых ссылок",
+ "requiresHandler": "Для пользовательских протоколов на вашем устройстве должно быть установлено связанное приложение."
+ },
"description": {
"label": "Описание"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Приложение"
},
+ "openIn": {
+ "label": "Открывать приложение в",
+ "description": "Выберите, где открывать это приложение. Настройки браузера могут изменить открытие в отдельном окне.",
+ "option": {
+ "currentTab": "Текущей вкладке",
+ "newTab": "Новой вкладке",
+ "newWindow": "Новом окне"
+ }
+ },
"showTitle": {
"label": "Показывать название"
},
diff --git a/packages/translation/src/lang/sk.json b/packages/translation/src/lang/sk.json
index 1be6deefb..e992f4fb6 100644
--- a/packages/translation/src/lang/sk.json
+++ b/packages/translation/src/lang/sk.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Príklady formátov URL",
+ "examples": "Príklady podporovaných odkazov",
+ "requiresHandler": "Vlastné protokoly vyžadujú priradenú aplikáciu vo vašom zariadení."
+ },
"description": {
"label": "Popis"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Vybrať aplikáciu"
},
+ "openIn": {
+ "label": "Otvoriť aplikáciu v",
+ "description": "Vyberte, kde sa má táto aplikácia otvoriť. Nastavenia prehliadača môžu zmeniť otváranie v samostatnom okne.",
+ "option": {
+ "currentTab": "Aktuálnej karte",
+ "newTab": "Novej karte",
+ "newWindow": "Novom okne"
+ }
+ },
"showTitle": {
"label": "Zobraziť názov aplikácie"
},
diff --git a/packages/translation/src/lang/sl.json b/packages/translation/src/lang/sl.json
index 35dd59c02..60e686a87 100644
--- a/packages/translation/src/lang/sl.json
+++ b/packages/translation/src/lang/sl.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Primeri oblik URL",
+ "examples": "Primeri podprtih povezav",
+ "requiresHandler": "Protokoli po meri zahtevajo povezano aplikacijo v vaši napravi."
+ },
"description": {
"label": "Opis"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Izberi aplikacijo"
},
+ "openIn": {
+ "label": "Odpri aplikacijo v",
+ "description": "Izberite, kje naj se ta aplikacija odpre. Nastavitve brskalnika lahko spremenijo odpiranje v ločenem oknu.",
+ "option": {
+ "currentTab": "Trenutnem zavihku",
+ "newTab": "Novem zavihku",
+ "newWindow": "Novem oknu"
+ }
+ },
"showTitle": {
"label": "Pokaži ime aplikacije"
},
diff --git a/packages/translation/src/lang/sv.json b/packages/translation/src/lang/sv.json
index 7712a61d0..a131a1cff 100644
--- a/packages/translation/src/lang/sv.json
+++ b/packages/translation/src/lang/sv.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Exempel på URL-format",
+ "examples": "Exempel på länkar som stöds",
+ "requiresHandler": "Anpassade protokoll kräver en associerad app på din enhet."
+ },
"description": {
"label": "Beskrivning"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Välj applikation"
},
+ "openIn": {
+ "label": "Öppna app i",
+ "description": "Välj var den här appen ska öppnas. Dina webbläsarinställningar kan åsidosätta öppning i ett separat fönster.",
+ "option": {
+ "currentTab": "Aktuell flik",
+ "newTab": "Ny flik",
+ "newWindow": "Nytt fönster"
+ }
+ },
"showTitle": {
"label": "Visa applikationsnamn"
},
diff --git a/packages/translation/src/lang/tr.json b/packages/translation/src/lang/tr.json
index 80af0a933..9be49c16e 100644
--- a/packages/translation/src/lang/tr.json
+++ b/packages/translation/src/lang/tr.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "URL biçimi örnekleri",
+ "examples": "Desteklenen bağlantı örnekleri",
+ "requiresHandler": "Özel protokoller, cihazınızda ilişkilendirilmiş bir uygulama gerektirir."
+ },
"description": {
"label": "Tanım"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Uygulama seç"
},
+ "openIn": {
+ "label": "Uygulamayı şurada aç",
+ "description": "Bu uygulamanın nerede açılacağını seçin. Tarayıcı ayarlarınız ayrı bir pencerede açılmasını değiştirebilir.",
+ "option": {
+ "currentTab": "Geçerli sekme",
+ "newTab": "Yeni sekme",
+ "newWindow": "Yeni pencere"
+ }
+ },
"showTitle": {
"label": "Uygulama adını göster"
},
diff --git a/packages/translation/src/lang/uk.json b/packages/translation/src/lang/uk.json
index f1316fcd3..e5d6336dd 100644
--- a/packages/translation/src/lang/uk.json
+++ b/packages/translation/src/lang/uk.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Приклади форматів URL",
+ "examples": "Приклади підтримуваних посилань",
+ "requiresHandler": "Для власних протоколів на вашому пристрої має бути встановлений пов’язаний застосунок."
+ },
"description": {
"label": "Опис"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Виберіть додаток"
},
+ "openIn": {
+ "label": "Відкривати застосунок у",
+ "description": "Виберіть, де відкривати цей застосунок. Налаштування браузера можуть змінити відкриття в окремому вікні.",
+ "option": {
+ "currentTab": "Поточній вкладці",
+ "newTab": "Новій вкладці",
+ "newWindow": "Новому вікні"
+ }
+ },
"showTitle": {
"label": "Показувати назву додатка"
},
diff --git a/packages/translation/src/lang/vi.json b/packages/translation/src/lang/vi.json
index eee32c463..7ed32db9d 100644
--- a/packages/translation/src/lang/vi.json
+++ b/packages/translation/src/lang/vi.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "Ví dụ về định dạng URL",
+ "examples": "Ví dụ về liên kết được hỗ trợ",
+ "requiresHandler": "Giao thức tùy chỉnh yêu cầu một ứng dụng được liên kết trên thiết bị của bạn."
+ },
"description": {
"label": "Mô tả"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "Chọn ứng dụng"
},
+ "openIn": {
+ "label": "Mở ứng dụng trong",
+ "description": "Chọn nơi mở ứng dụng này. Cài đặt trình duyệt có thể thay đổi việc mở trong cửa sổ riêng.",
+ "option": {
+ "currentTab": "Thẻ hiện tại",
+ "newTab": "Thẻ mới",
+ "newWindow": "Cửa sổ mới"
+ }
+ },
"showTitle": {
"label": "Hiện tên ứng dụng"
},
diff --git a/packages/translation/src/lang/zh.json b/packages/translation/src/lang/zh.json
index db9c6ada8..6d45b535f 100644
--- a/packages/translation/src/lang/zh.json
+++ b/packages/translation/src/lang/zh.json
@@ -799,6 +799,11 @@
}
},
"field": {
+ "url": {
+ "helpLabel": "URL 格式範例",
+ "examples": "支援的連結範例",
+ "requiresHandler": "自訂通訊協定需要在您的裝置上關聯相應的應用程式。"
+ },
"description": {
"label": "描述"
},
@@ -2313,6 +2318,15 @@
"appId": {
"label": "選擇應用程式"
},
+ "openIn": {
+ "label": "開啟應用程式的位置",
+ "description": "選擇此應用程式的開啟位置。瀏覽器設定可能會變更在獨立視窗中開啟的行為。",
+ "option": {
+ "currentTab": "目前分頁",
+ "newTab": "新分頁",
+ "newWindow": "新視窗"
+ }
+ },
"showTitle": {
"label": "顯示應用程式名稱"
},
diff --git a/packages/validation/src/app.ts b/packages/validation/src/app.ts
index fba3bd481..28d802bec 100644
--- a/packages/validation/src/app.ts
+++ b/packages/validation/src/app.ts
@@ -30,3 +30,15 @@ export const appCreateManySchema = z
.min(1);
export const appEditSchema = appManageSchema.and(z.object({ id: z.string() }));
+
+export const normalizeAppWidgetOptions = (options: Record<string, unknown>): Record<string, unknown> => {
+ if (options.openIn !== undefined) return options;
+ if (options.openInNewTab === undefined && options.openInNewWindow === undefined) return options;
+
+ const { openInNewTab, openInNewWindow, ...remainingOptions } = options;
+ let openIn = "newTab";
+ if (openInNewWindow === true) openIn = "newWindow";
+ else if (openInNewTab === false) openIn = "currentTab";
+
+ return { ...remainingOptions, openIn };
+};
diff --git a/packages/widgets/src/_inputs/widget-select-input.tsx b/packages/widgets/src/_inputs/widget-select-input.tsx
index 6de7a36a1..74a3cc41a 100644
--- a/packages/widgets/src/_inputs/widget-select-input.tsx
+++ b/packages/widgets/src/_inputs/widget-select-input.tsx
@@ -74,6 +74,7 @@ export const WidgetSelectInput = ({ property, kind, options }: CommonWidgetInput
description={options.withDescription ? tWidget("description") : undefined}
placeholder={options.withPlaceholder ? tWidget("placeholder") : undefined}
searchable={options.searchable}
+ allowDeselect={options.allowDeselect}
{...inputProps}
/>
);
diff --git a/packages/widgets/src/app/_app-link.spec.tsx b/packages/widgets/src/app/_app-link.spec.tsx
new file mode 100644
index 000000000..f0253340f
--- /dev/null
+++ b/packages/widgets/src/app/_app-link.spec.tsx
@@ -0,0 +1,177 @@
+/// <reference types="vitest/jsdom" />
+// @vitest-environment jsdom
+
+import { act } from "react";
+import { createRoot } from "react-dom/client";
+import type { Root } from "react-dom/client";
+import { MantineProvider } from "@mantine/core";
+import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
+
+import { AppLink } from "./_app-link";
+
+const protocolLinks = [
+ "microsoft-edge:https://example.com",
+ "MICROSOFT-EDGE:http://example.com",
+ "ssh://server.example.com",
+ "sftp://server.example.com/path",
+ "ftp://server.example.com/path",
+ "ftps://server.example.com/path",
+ "winscp-ftp://server.example.com/path",
+ "vscode://file/example.ts",
+ "mailto:[email protected]",
+ "brave://settings",
+ "web+homarr:launch",
+];
+
+let root: Root;
+let host: HTMLDivElement;
+
+beforeEach(() => {
+ // MouseEvent.view requires jsdom's Window rather than Vitest's global proxy.
+ vi.stubGlobal("window", jsdom.window);
+ window.matchMedia = vi.fn().mockImplementation(() => ({
+ matches: false,
+ media: "",
+ onchange: null,
+ addListener: vi.fn(),
+ removeListener: vi.fn(),
+ addEventListener: vi.fn(),
+ removeEventListener: vi.fn(),
+ dispatchEvent: vi.fn(),
+ }));
+ host = document.createElement("div");
+ document.body.append(host);
+ root = createRoot(host);
+});
+
+afterEach(async () => {
+ await act(() => root.unmount());
+ host.remove();
+ vi.unstubAllGlobals();
+});
+
+async function renderLink(openIn: "currentTab" | "newTab" | "newWindow", href = "https://example.com") {
+ await act(async () =>
+ root.render(
+ <MantineProvider>
+ <AppLink href={href} openIn={openIn} enabled>
+ Open app
+ </AppLink>
+ </MantineProvider>,
+ ),
+ );
+ const link = host.querySelector("a");
+ if (!link) throw new Error("Expected an app link");
+ return link;
+}
+
+// Observe events after React handles them, then prevent jsdom navigation.
+async function clickLink(link: HTMLAnchorElement, init: MouseEventInit = {}) {
+ const events: { shiftKey: boolean; defaultPrevented: boolean }[] = [];
+ const observe = (event: MouseEvent) => {
+ events.push({ shiftKey: event.shiftKey, defaultPrevented: event.defaultPrevented });
+ event.preventDefault();
+ };
+ document.addEventListener("click", observe);
+ try {
+ await act(async () => link.dispatchEvent(new MouseEvent("click", { bubbles: true, cancelable: true, ...init })));
+ } finally {
+ document.removeEventListener("click", observe);
+ }
+ return events;
+}
+
+describe("AppLink opening modes", () => {
+ test.each(["currentTab", "newTab", "newWindow"] as const)("preserves safe anchor semantics for %s", async (mode) => {
+ const link = await renderLink(mode);
+ expect(link.getAttribute("href")).toBe("https://example.com");
+ expect(link.getAttribute("target")).toBe(mode === "currentTab" ? null : "_blank");
+ expect(link.getAttribute("rel")).toBe(mode === "currentTab" ? null : "noopener noreferrer");
+ });
+
+ test("requests one Shift-click and cancels the original click for a new window", async () => {
+ const link = await renderLink("newWindow");
+ expect(await clickLink(link)).toEqual([
+ { shiftKey: true, defaultPrevented: false },
+ { shiftKey: false, defaultPrevented: true },
+ ]);
+ });
+
+ test.each(protocolLinks)("handles %s natively without an intermediate window in window mode", async (href) => {
+ const link = await renderLink("newWindow", href);
+ expect(link.getAttribute("href")).toBe(href);
+ expect(link.getAttribute("target")).toBeNull();
+ expect(link.getAttribute("rel")).toBe("noopener noreferrer");
+ expect(await clickLink(link)).toEqual([{ shiftKey: false, defaultPrevented: false }]);
+ });
+
+ test.each(["currentTab", "newTab"] as const)("preserves %s behavior for all protocols", async (mode) => {
+ for (const href of protocolLinks) {
+ const link = await renderLink(mode, href);
+ expect(link.getAttribute("href")).toBe(href);
+ expect(link.getAttribute("target")).toBe(mode === "currentTab" ? null : "_blank");
+ expect(link.getAttribute("rel")).toBe(mode === "currentTab" ? null : "noopener noreferrer");
+ expect(await clickLink(link)).toEqual([{ shiftKey: false, defaultPrevented: false }]);
+ }
+ });
+
+ test.each([
+ "http://example.com",
+ "HTTPS://example.com",
+ "/boards/home",
+ "./relative",
+ "../relative",
+ "#section",
+ "?next=microsoft-edge:https://example.com",
+ ])("keeps separate-window behavior for web navigation %s", async (href) => {
+ const link = await renderLink("newWindow", href);
+ expect(link.getAttribute("target")).toBe("_blank");
+ expect(await clickLink(link)).toEqual([
+ { shiftKey: true, defaultPrevented: false },
+ { shiftKey: false, defaultPrevented: true },
+ ]);
+ });
+
+ test.each([{ ctrlKey: true }, { metaKey: true }, { shiftKey: true }, { altKey: true }, { button: 1 }])(
+ "preserves modified clicks %j for protocol links in window mode",
+ async (init) => {
+ for (const href of protocolLinks) {
+ const link = await renderLink("newWindow", href);
+ expect(await clickLink(link, init)).toEqual([{ shiftKey: "shiftKey" in init, defaultPrevented: false }]);
+ }
+ },
+ );
+
+ test.each(["currentTab", "newTab"] as const)("leaves native navigation intact for %s", async (mode) => {
+ expect(await clickLink(await renderLink(mode))).toEqual([{ shiftKey: false, defaultPrevented: false }]);
+ });
+
+ test.each([{ ctrlKey: true }, { metaKey: true }, { shiftKey: true }, { altKey: true }, { button: 1 }])(
+ "preserves a modified click %j in window mode",
+ async (init) => {
+ expect(await clickLink(await renderLink("newWindow"), init)).toEqual([
+ { shiftKey: "shiftKey" in init, defaultPrevented: false },
+ ]);
+ },
+ );
+
+ test("does not reopen a link whose click was already cancelled", async () => {
+ const link = await renderLink("newWindow");
+ link.addEventListener("click", (event) => event.preventDefault());
+ expect(await clickLink(link)).toEqual([{ shiftKey: false, defaultPrevented: true }]);
+ });
+
+ test("does not render a navigable link when disabled in edit mode", async () => {
+ await act(async () =>
+ root.render(
+ <MantineProvider>
+ <AppLink href="https://example.com" openIn="newWindow" enabled={false}>
+ Open app
+ </AppLink>
+ </MantineProvider>,
+ ),
+ );
+ expect(host.querySelector("a")).toBeNull();
+ expect(host.textContent).toContain("Open app");
+ });
+});
diff --git a/packages/widgets/src/app/_app-link.tsx b/packages/widgets/src/app/_app-link.tsx
new file mode 100644
index 000000000..65745699e
--- /dev/null
+++ b/packages/widgets/src/app/_app-link.tsx
@@ -0,0 +1,59 @@
+"use client";
+
+import type { PropsWithChildren } from "react";
+import { UnstyledButton } from "@mantine/core";
+
+import { SAFE_NEW_TAB_REL } from "../common/application-url";
+import type { WidgetComponentProps } from "../definition";
+
+interface AppLinkProps {
+ href: string | undefined;
+ openIn: WidgetComponentProps<"app">["options"]["openIn"];
+ enabled: boolean;
+}
+
+export const AppLink = ({ href, openIn, enabled, children }: PropsWithChildren<AppLinkProps>) => {
+ const protocol = href?.match(/^([a-z][a-z\d+.-]*):/i)?.[1]?.toLowerCase();
+ const isWebLink = protocol === undefined || protocol === "http" || protocol === "https";
+ const openInNewWindow = openIn === "newWindow" && isWebLink;
+
+ return enabled ? (
+ <UnstyledButton
+ component="a"
+ href={href}
+ target={openIn === "newTab" || openInNewWindow ? "_blank" : undefined}
+ rel={openIn !== "currentTab" ? SAFE_NEW_TAB_REL : undefined}
+ onClick={(event) => {
+ if (
+ !openInNewWindow ||
+ !href ||
+ event.defaultPrevented ||
+ event.button !== 0 ||
+ event.ctrlKey ||
+ event.metaKey ||
+ event.shiftKey ||
+ event.altKey
+ ) {
+ return;
+ }
+
+ event.preventDefault();
+ // Use the link's Shift-click behavior instead of requesting a popup.
+ event.currentTarget.dispatchEvent(
+ new MouseEvent("click", {
+ bubbles: true,
+ cancelable: true,
+ view: window,
+ shiftKey: true,
+ }),
+ );
+ }}
+ h="100%"
+ w="100%"
+ >
+ {children}
+ </UnstyledButton>
+ ) : (
+ children
+ );
+};
diff --git a/packages/widgets/src/app/component.tsx b/packages/widgets/src/app/component.tsx
index 2d83b4319..9a4b80899 100644
--- a/packages/widgets/src/app/component.tsx
+++ b/packages/widgets/src/app/component.tsx
@@ -2,7 +2,7 @@
import type { PropsWithChildren } from "react";
import { Fragment, Suspense } from "react";
-import { Box, Flex, rem, Stack, Text, Tooltip, UnstyledButton } from "@mantine/core";
+import { Box, Flex, rem, Stack, Text, Tooltip } from "@mantine/core";
import { IconMinus } from "@tabler/icons-react";
import combineClasses from "clsx";
@@ -13,10 +13,10 @@ import { useI18n } from "@homarr/translation/client";
import { MaskedOrNormalImage } from "@homarr/ui";
import { WidgetEmptyState } from "../common/empty-state";
-import { SAFE_NEW_TAB_REL } from "../common/application-url";
import { getUsableWidgetQueryData, isInitialWidgetQueryPending } from "../common/query-state";
import { WidgetQueryLoadingState } from "../common/query-state-indicator";
import type { WidgetComponentProps } from "../definition";
+import { AppLink } from "./_app-link";
import classes from "./app.module.css";
import { PingDot } from "./ping/ping-dot";
import { PingIndicator } from "./ping/ping-indicator";
@@ -60,7 +60,7 @@ export default function AppWidget({
return (
<Box h="100%" w="100%" pos="relative" style={{ "--mantine-scale": 1 / layoutScale }}>
- <AppLink href={href} openInNewTab={options.openInNewTab} enabled={Boolean(href) && !isEditMode}>
+ <AppLink href={href} openIn={options.openIn} enabled={Boolean(href) && !isEditMode}>
<AppDescriptionTooltip
description={app.description}
enabled={options.descriptionDisplayMode === "tooltip" && Boolean(app.description) && !isEditMode}
@@ -136,12 +136,6 @@ export default function AppWidget({
);
}
-interface AppLinkProps {
- href: string | undefined;
- openInNewTab: boolean;
- enabled: boolean;
-}
-
const AppDescriptionTooltip = ({
description,
enabled,
@@ -164,19 +158,3 @@ const AppDescriptionTooltip = ({
) : (
children
);
-
-const AppLink = ({ href, openInNewTab, enabled, children }: PropsWithChildren<AppLinkProps>) =>
- enabled ? (
- <UnstyledButton
- component="a"
- href={href}
- target={openInNewTab ? "_blank" : undefined}
- rel={openInNewTab ? SAFE_NEW_TAB_REL : undefined}
- h="100%"
- w="100%"
- >
- {children}
- </UnstyledButton>
- ) : (
- children
- );
diff --git a/packages/widgets/src/app/index.ts b/packages/widgets/src/app/index.ts
index ea99e0c24..5107e135a 100644
--- a/packages/widgets/src/app/index.ts
+++ b/packages/widgets/src/app/index.ts
@@ -21,7 +21,25 @@ export const { definition, componentLoader } = createWidgetDefinition("app", {
return optionsBuilder.from(
(factory) => ({
appId: factory.app(),
- openInNewTab: factory.switch({ defaultValue: true }),
+ openIn: factory.select({
+ options: [
+ {
+ value: "currentTab",
+ label: (t) => t("widget.app.option.openIn.option.currentTab"),
+ },
+ {
+ value: "newTab",
+ label: (t) => t("widget.app.option.openIn.option.newTab"),
+ },
+ {
+ value: "newWindow",
+ label: (t) => t("widget.app.option.openIn.option.newWindow"),
+ },
+ ],
+ defaultValue: "newTab",
+ allowDeselect: false,
+ withDescription: true,
+ }),
showTitle: factory.switch({ defaultValue: true }),
descriptionDisplayMode: factory.select({
options: [
diff --git a/packages/widgets/src/manifest.ts b/packages/widgets/src/manifest.ts
index f7e3f44a4..1e7961f1c 100644
--- a/packages/widgets/src/manifest.ts
+++ b/packages/widgets/src/manifest.ts
@@ -4,6 +4,7 @@ import { objectEntries } from "@homarr/common";
import type { WidgetKind } from "@homarr/definitions";
import { widgetKinds as declaredWidgetKinds } from "@homarr/definitions";
import type { SettingsContextProps } from "@homarr/settings/creator";
+import { normalizeAppWidgetOptions } from "@homarr/validation/app";
import type { WidgetComponentProps, WidgetDefinition } from "./definition";
import type { WidgetOptionDefinition } from "./options";
@@ -146,6 +147,9 @@ export const reduceWidgetOptionsWithDefinition = (
settings: Pick<SettingsContextProps, "enableStatusByDefault" | "forceDisableStatus">,
currentValue: Record<string, unknown> = {},
) => {
+ if ("kind" in definition && definition.kind === "app") {
+ currentValue = normalizeAppWidgetOptions(currentValue);
+ }
const options: Record<string, WidgetOptionDefinition> = definition.createOptions(settings);
const result: Record<string, unknown> = {};
for (const [key, value] of objectEntries(options)) {
diff --git a/packages/widgets/src/option-translation.ts b/packages/widgets/src/option-translation.ts
index f2e5296ea..d49024590 100644
--- a/packages/widgets/src/option-translation.ts
+++ b/packages/widgets/src/option-translation.ts
@@ -77,7 +77,6 @@ const getSharedOptionNamespace = (kind: WidgetKind, property: string): string |
(kind === "bookmarks" && property === "title") ||
(kind === "clock" && property === "customTitle") ||
(kind === "minecraftServerStatus" && property === "title") ||
- (kind === "app" && property === "openInNewTab") ||
(kind === "bookmarks" && property === "openNewTab") ||
(kind === "wud" && property === "showTitle") ||
(kind === "anchorNote" && property === "showTitle") ||
diff --git a/packages/widgets/src/options.ts b/packages/widgets/src/options.ts
index ea8304880..d7b52b9e4 100644
--- a/packages/widgets/src/options.ts
+++ b/packages/widgets/src/options.ts
@@ -59,6 +59,7 @@ interface SelectInput<TOptions extends readonly SelectOption[]> extends CommonIn
options: TOptions;
searchable?: boolean;
withPlaceholder?: boolean;
+ allowDeselect?: boolean;
}
interface DynamicSelectInput extends CommonInput<DynamicSelectOption | null> {
@@ -200,6 +201,7 @@ const optionsFactory = {
searchable: input.searchable ?? false,
withDescription: input.withDescription ?? false,
withPlaceholder: input.withPlaceholder ?? false,
+ allowDeselect: input.allowDeselect ?? true,
}),
number: (input: NumberInput) => ({
type: "number" as const,