mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-08-10 05:00:43 +02:00
refactor: cleanup
This commit is contained in:
+6
-1
@@ -314,7 +314,12 @@ export default function Home() {
|
||||
}
|
||||
}, [cloudUser]);
|
||||
|
||||
const syncUnlocked = crossOsUnlocked || selfHostedSyncConfigured;
|
||||
// Cloud sync follows `cloudBackup`, NOT `crossOsFingerprints`. They agreed on
|
||||
// every plan until Solo, which buys 20 cloud backups and deliberately has no
|
||||
// fingerprint editing — so deriving sync from the fingerprint capability put a
|
||||
// Pro badge on the one feature a Solo customer is paying for.
|
||||
const cloudBackupUnlocked = getEntitlements(cloudUser).cloudBackup;
|
||||
const syncUnlocked = cloudBackupUnlocked || selfHostedSyncConfigured;
|
||||
|
||||
const [currentPage, setCurrentPage] = useState<AppPage>("profiles");
|
||||
const [accountDialogOpen, setAccountDialogOpen] = useState(false);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,9 +11,11 @@ import {
|
||||
TooltipContent,
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
import { parseBackendError, translateBackendError } from "@/lib/backend-errors";
|
||||
import type {
|
||||
CookieBotRun,
|
||||
CookieBotSchedule,
|
||||
CookieBotSlot,
|
||||
RemoteHoursQuota,
|
||||
} from "@/lib/cookie-bot";
|
||||
import { MOTION_EASE_OUT } from "@/lib/motion";
|
||||
@@ -66,6 +68,84 @@ export function nightsPerWeek(mask: number): number {
|
||||
return count;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Slots */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* Every time-of-day an enrolment fires, from whichever shape the server sent.
|
||||
*
|
||||
* ALWAYS at least one slot. A server that predates multi-slot scheduling sends
|
||||
* only the mirrored `run_at_minute` / `days_mask` pair, and a renderer that read
|
||||
* `slots` directly would show an enrolment as firing at no time at all. Reading
|
||||
* the wire through here is what keeps that fallback in one place.
|
||||
*/
|
||||
export function scheduleSlots(schedule: {
|
||||
slots?: CookieBotSlot[];
|
||||
run_at_minute: number;
|
||||
days_mask: number;
|
||||
}): CookieBotSlot[] {
|
||||
const slots = schedule.slots ?? [];
|
||||
if (slots.length > 0) return slots;
|
||||
return [
|
||||
{ days_mask: schedule.days_mask, run_at_minute: schedule.run_at_minute },
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* How many times a week a whole calendar fires.
|
||||
*
|
||||
* Counted across slots, not read off the first one: an enrolment with three
|
||||
* slots costs three times the hours, and the budget estimate beside it is the
|
||||
* only place a user sees that before committing.
|
||||
*
|
||||
* DISTINCT (weekday, minute) pairs rather than a sum of night counts, because
|
||||
* two slots landing on the same weekday at the same minute are the same
|
||||
* instant and the server dispatches them as ONE run — `upcomingSlotsMulti`
|
||||
* collapses coincident fires. Summing quoted a Mon+Tue and a Tue+Wed slot at
|
||||
* 02:00 as four nights when it is three, and that inflated figure is what the
|
||||
* over-budget warning is compared against.
|
||||
*/
|
||||
export function weeklyRuns(
|
||||
slots: { days_mask: number; run_at_minute: number }[],
|
||||
): number {
|
||||
const fires = new Set<number>();
|
||||
for (const slot of slots) {
|
||||
for (let bit = 0; bit < 7; bit += 1) {
|
||||
if ((slot.days_mask & (1 << bit)) !== 0) {
|
||||
fires.add(bit * 1440 + slot.run_at_minute);
|
||||
}
|
||||
}
|
||||
}
|
||||
return fires.size;
|
||||
}
|
||||
|
||||
/**
|
||||
* Monday-first weekday names, from the viewer's own locale.
|
||||
*
|
||||
* Derived rather than translated into ten locale files: `narrow` already gives
|
||||
* each language its own single-letter convention, and a hand-written table
|
||||
* would be ten more places for Monday-first to be got wrong. The reference week
|
||||
* is formatted in UTC so a user east of Greenwich does not see it shift by a
|
||||
* day.
|
||||
*/
|
||||
export function weekdayNames(): { narrow: string; long: string }[] {
|
||||
// 2024-01-01 was a Monday, which is bit 0 of the server's mask.
|
||||
const monday = Date.UTC(2024, 0, 1);
|
||||
const narrow = new Intl.DateTimeFormat(undefined, {
|
||||
weekday: "narrow",
|
||||
timeZone: "UTC",
|
||||
});
|
||||
const long = new Intl.DateTimeFormat(undefined, {
|
||||
weekday: "long",
|
||||
timeZone: "UTC",
|
||||
});
|
||||
return Array.from({ length: 7 }, (_, index) => {
|
||||
const day = new Date(monday + index * 24 * 60 * 60 * 1000);
|
||||
return { narrow: narrow.format(day), long: long.format(day) };
|
||||
});
|
||||
}
|
||||
|
||||
/** A human cadence label. Unknown masks fall back to the night count. */
|
||||
export function describeCadence(t: TFunction, mask: number): string {
|
||||
const id = cadenceForMask(mask);
|
||||
@@ -409,6 +489,36 @@ export function outcomeLabel(
|
||||
return key ? t(key) : t("cookieBot.outcome.unknown", { code });
|
||||
}
|
||||
|
||||
/**
|
||||
* The three refusals only the saved-list routes can raise.
|
||||
*
|
||||
* They are absent from the shared `backendErrors` table, so
|
||||
* `translateBackendError` renders them through its unknown-code fallback: a
|
||||
* user who reuses a name would be told "Something went wrong:
|
||||
* COOKIE_BOT_TEMPLATE_NAME_TAKEN" instead of that the name is taken, in the one
|
||||
* dialog where the fix is a single keystroke. Everything else — a signed-out
|
||||
* desktop, an unreachable cloud — still goes through the shared translator.
|
||||
*/
|
||||
const TEMPLATE_ERROR_KEYS: Record<string, string> = {
|
||||
COOKIE_BOT_TEMPLATE_NAME_TAKEN: "cookieBot.enrol.templateNameTaken",
|
||||
COOKIE_BOT_INVALID_TEMPLATE_NAME: "cookieBot.enrol.templateNameInvalid",
|
||||
COOKIE_BOT_TEMPLATE_NOT_FOUND: "cookieBot.enrol.templateMissing",
|
||||
};
|
||||
|
||||
export function templateErrorMessage(t: TFunction, error: unknown): string {
|
||||
const parsed = parseBackendError(error);
|
||||
const key = parsed ? TEMPLATE_ERROR_KEYS[parsed.code] : undefined;
|
||||
if (!key) return translateBackendError(t, error);
|
||||
const max = parsed?.params?.max;
|
||||
// The server does not always send a limit. Interpolating an empty string
|
||||
// rendered "a name of characters or fewer", so fall back to wording that
|
||||
// does not need the number.
|
||||
if (key === "cookieBot.enrol.templateNameInvalid" && !max) {
|
||||
return t("cookieBot.enrol.templateNameInvalidNoMax");
|
||||
}
|
||||
return t(key, { max });
|
||||
}
|
||||
|
||||
/**
|
||||
* The session state machine, named honestly. `provisioning -> ready -> live ->
|
||||
* closed`, with `error` reachable from any of the first three, is what the
|
||||
|
||||
@@ -5,6 +5,7 @@ import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { GoPlus } from "react-icons/go";
|
||||
import { LuChevronLeft, LuChevronRight, LuSearch, LuX } from "react-icons/lu";
|
||||
import { useWindowDecorations } from "@/hooks/use-window-decorations";
|
||||
import { getCurrentOS } from "@/lib/browser-utils";
|
||||
import { cn } from "@/lib/utils";
|
||||
import type { GroupWithCount } from "@/types";
|
||||
@@ -59,8 +60,14 @@ const HomeHeader = ({
|
||||
}, []);
|
||||
|
||||
const isMacOS = platform === "macos";
|
||||
const isLinux = platform === "linux";
|
||||
const showProfileToolbar = !pageTitle;
|
||||
|
||||
// Same hook the controls use, so the reserved space can never disagree with
|
||||
// what is actually drawn.
|
||||
const decorations = useWindowDecorations();
|
||||
const linuxLayout = decorations.clientSide ? decorations.layout : null;
|
||||
|
||||
// Press-and-hold drag: any pixel of the sys-bar becomes a drag handle after
|
||||
// HOLD_MS, but quick clicks still reach buttons/inputs underneath.
|
||||
const holdTimeoutRef = useRef<number | null>(null);
|
||||
@@ -179,14 +186,29 @@ const HomeHeader = ({
|
||||
onPointerCancel={handlePointerEnd}
|
||||
onDoubleClick={handleDoubleClick}
|
||||
className={cn(
|
||||
"flex h-11 items-center gap-2 border-b border-border bg-card pl-3 select-none",
|
||||
"flex h-11 items-center gap-2 border-b border-border bg-card select-none",
|
||||
// Windows: WindowDragArea renders three 44px native-style controls
|
||||
// (minimize + maximize/restore + close) fixed at top-right with
|
||||
// z-50, total 132px wide. Reserve 144px on the right edge so the
|
||||
// "+ New" button and search input clear them with a few pixels of
|
||||
// breathing room and never sit underneath the controls.
|
||||
isWindows ? "pr-[144px]" : "pr-3",
|
||||
isWindows ? "pl-3 pr-[144px]" : null,
|
||||
// Linux reserves its space through the inline style below, because the
|
||||
// desktop chooses which side the controls sit on and how many there
|
||||
// are. Everything else keeps the plain symmetric padding.
|
||||
!isWindows && !isLinux ? "pl-3 pr-3" : null,
|
||||
)}
|
||||
style={
|
||||
isLinux
|
||||
? {
|
||||
// Each control is 44px wide; add the usual 12px gutter. Before
|
||||
// the layout resolves, fall back to the gutter alone rather than
|
||||
// to no padding, which would visibly shift the content.
|
||||
paddingLeft: (linuxLayout?.left.length ?? 0) * 44 + 12,
|
||||
paddingRight: (linuxLayout?.right.length ?? 0) * 44 + 12,
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
{isMacOS && (
|
||||
<div
|
||||
|
||||
@@ -89,6 +89,12 @@ export function ProxyFormDialog({
|
||||
const { t } = useTranslation();
|
||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||
const [form, setForm] = useState<ProxyFormData>(DEFAULT_FORM);
|
||||
// The local parse only covers scheme/host/port. Whether Donut can actually
|
||||
// use the server — REALITY, XTLS Vision, plain TCP — is decided by the Rust
|
||||
// parser, so ask it (below) and show the specific reason while the user is
|
||||
// still editing rather than after they save. Declared here because
|
||||
// `handleSubmit` guards on it.
|
||||
const [vlessUnsupported, setVlessUnsupported] = useState<string | null>(null);
|
||||
|
||||
const resetForm = useCallback(() => {
|
||||
setForm(DEFAULT_FORM);
|
||||
@@ -134,6 +140,11 @@ export function ProxyFormDialog({
|
||||
return;
|
||||
}
|
||||
|
||||
if (isVless && vlessUnsupported) {
|
||||
toast.error(vlessUnsupported);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isVless && (!form.host.trim() || !form.port)) {
|
||||
toast.error(t("proxies.form.hostPortRequired"));
|
||||
return;
|
||||
@@ -183,7 +194,7 @@ export function ProxyFormDialog({
|
||||
} finally {
|
||||
setIsSubmitting(false);
|
||||
}
|
||||
}, [editingProxy, form, onClose, t]);
|
||||
}, [editingProxy, form, onClose, t, vlessUnsupported]);
|
||||
|
||||
const handleClose = useCallback(() => {
|
||||
if (!isSubmitting) {
|
||||
@@ -193,12 +204,37 @@ export function ProxyFormDialog({
|
||||
|
||||
const isVless = form.proxy_type === "vless";
|
||||
const vlessEndpoint = isVless ? parseVlessEndpoint(form.vless_uri) : null;
|
||||
|
||||
const trimmedVlessUri = form.vless_uri.trim();
|
||||
useEffect(() => {
|
||||
if (!isVless || trimmedVlessUri.length === 0) {
|
||||
setVlessUnsupported(null);
|
||||
return;
|
||||
}
|
||||
let cancelled = false;
|
||||
const timer = window.setTimeout(() => {
|
||||
void invoke("validate_vless_uri", { uri: trimmedVlessUri })
|
||||
.then(() => {
|
||||
if (!cancelled) setVlessUnsupported(null);
|
||||
})
|
||||
.catch((error: unknown) => {
|
||||
if (!cancelled) setVlessUnsupported(translateBackendError(t, error));
|
||||
});
|
||||
}, 300);
|
||||
return () => {
|
||||
cancelled = true;
|
||||
window.clearTimeout(timer);
|
||||
};
|
||||
}, [isVless, trimmedVlessUri, t]);
|
||||
|
||||
const hasInvalidVlessUri =
|
||||
isVless && form.vless_uri.trim().length > 0 && !vlessEndpoint;
|
||||
isVless &&
|
||||
trimmedVlessUri.length > 0 &&
|
||||
(!vlessEndpoint || vlessUnsupported !== null);
|
||||
const isFormValid =
|
||||
form.name.trim() &&
|
||||
(isVless
|
||||
? vlessEndpoint !== null
|
||||
? vlessEndpoint !== null && vlessUnsupported === null
|
||||
: form.host.trim() &&
|
||||
form.port > 0 &&
|
||||
form.port <= 65535 &&
|
||||
@@ -286,7 +322,7 @@ export function ProxyFormDialog({
|
||||
role={hasInvalidVlessUri ? "alert" : undefined}
|
||||
>
|
||||
{hasInvalidVlessUri
|
||||
? t("proxies.form.vlessUriInvalid")
|
||||
? (vlessUnsupported ?? t("proxies.form.vlessUriInvalid"))
|
||||
: t("proxies.form.vlessUriHint")}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
+165
-118
@@ -3,19 +3,23 @@
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useWindowDecorations } from "@/hooks/use-window-decorations";
|
||||
import { getCurrentOS, type OperatingSystem } from "@/lib/platform";
|
||||
import type { WindowControl } from "@/lib/window-decorations";
|
||||
import { WindowResizeHandles } from "./window-resize-handles";
|
||||
|
||||
export function WindowDragArea() {
|
||||
const { t } = useTranslation();
|
||||
const [platform, setPlatform] = useState<OperatingSystem | null>(null);
|
||||
const [isMaximized, setIsMaximized] = useState(false);
|
||||
const decorations = useWindowDecorations();
|
||||
|
||||
useEffect(() => {
|
||||
setPlatform(getCurrentOS());
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (platform !== "windows") return;
|
||||
if (platform !== "windows" && platform !== "linux") return;
|
||||
const win = getCurrentWindow();
|
||||
let cancelled = false;
|
||||
const sync = async () => {
|
||||
@@ -38,42 +42,6 @@ export function WindowDragArea() {
|
||||
};
|
||||
}, [platform]);
|
||||
|
||||
const handlePointerDown = (e: React.PointerEvent) => {
|
||||
if (e.button !== 0) return;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
const startDrag = async () => {
|
||||
try {
|
||||
const window = getCurrentWindow();
|
||||
await window.startDragging();
|
||||
} catch (error) {
|
||||
console.error("Failed to start window dragging:", error);
|
||||
}
|
||||
};
|
||||
|
||||
void startDrag();
|
||||
};
|
||||
|
||||
// Linux: system decorations handle everything
|
||||
if (!platform || platform === "linux" || platform === "unknown") {
|
||||
return null;
|
||||
}
|
||||
|
||||
// macOS: nothing to render here. The transparent native titlebar (set via
|
||||
// `set_transparent_titlebar(true)` in src-tauri/src/lib.rs) lets the OS
|
||||
// handle dragging directly, and the sys-bar inside `home-header.tsx`
|
||||
// declares its own `data-tauri-drag-region` overlay for the WebView area.
|
||||
// The previous full-width fixed z-[999999] button was stealing every
|
||||
// click in the top 40px of the window.
|
||||
if (platform === "macos") {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Windows: minimize/maximize/close controls anchored at the top-right
|
||||
// corner of the sys-bar. The HomeHeader's own drag-region overlay handles window
|
||||
// dragging via Tauri 2, so we don't need a separate draggable spacer
|
||||
// covering the whole width.
|
||||
const handleMinimize = async () => {
|
||||
try {
|
||||
await getCurrentWindow().minimize();
|
||||
@@ -97,93 +65,172 @@ export function WindowDragArea() {
|
||||
console.error("Failed to close window:", error);
|
||||
}
|
||||
};
|
||||
void handlePointerDown; // kept for backwards-compat; not used on Windows now
|
||||
|
||||
const renderControl = (control: WindowControl) => {
|
||||
switch (control) {
|
||||
case "minimize":
|
||||
return (
|
||||
<button
|
||||
key="minimize"
|
||||
type="button"
|
||||
onClick={() => {
|
||||
void handleMinimize();
|
||||
}}
|
||||
className="flex h-full w-11 items-center justify-center text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground"
|
||||
aria-label={t("common.window.minimize")}
|
||||
>
|
||||
<svg
|
||||
width="10"
|
||||
height="1"
|
||||
viewBox="0 0 10 1"
|
||||
fill="currentColor"
|
||||
role="img"
|
||||
aria-label={t("common.window.minimize")}
|
||||
>
|
||||
<rect width="10" height="1" />
|
||||
</svg>
|
||||
</button>
|
||||
);
|
||||
case "maximize":
|
||||
return (
|
||||
<button
|
||||
key="maximize"
|
||||
type="button"
|
||||
onClick={() => {
|
||||
void handleToggleMaximize();
|
||||
}}
|
||||
className="flex h-full w-11 items-center justify-center text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground"
|
||||
aria-label={
|
||||
isMaximized
|
||||
? t("common.window.restore")
|
||||
: t("common.window.maximize")
|
||||
}
|
||||
>
|
||||
{isMaximized ? (
|
||||
<svg
|
||||
width="10"
|
||||
height="10"
|
||||
viewBox="0 0 10 10"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="1.2"
|
||||
role="img"
|
||||
aria-label={t("common.window.restore")}
|
||||
>
|
||||
<rect x="1" y="3" width="6" height="6" />
|
||||
<path d="M3 3 V1 H9 V7 H7" />
|
||||
</svg>
|
||||
) : (
|
||||
<svg
|
||||
width="10"
|
||||
height="10"
|
||||
viewBox="0 0 10 10"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="1.2"
|
||||
role="img"
|
||||
aria-label={t("common.window.maximize")}
|
||||
>
|
||||
<rect x="1" y="1" width="8" height="8" />
|
||||
</svg>
|
||||
)}
|
||||
</button>
|
||||
);
|
||||
case "close":
|
||||
return (
|
||||
<button
|
||||
key="close"
|
||||
type="button"
|
||||
onClick={() => {
|
||||
void handleClose();
|
||||
}}
|
||||
className="flex h-full w-11 items-center justify-center text-muted-foreground transition-colors hover:bg-destructive hover:text-destructive-foreground"
|
||||
aria-label={t("common.window.close")}
|
||||
>
|
||||
<svg
|
||||
width="10"
|
||||
height="10"
|
||||
viewBox="0 0 10 10"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="1.2"
|
||||
role="img"
|
||||
aria-label={t("common.window.close")}
|
||||
>
|
||||
<line x1="1" y1="1" x2="9" y2="9" />
|
||||
<line x1="9" y1="1" x2="1" y2="9" />
|
||||
</svg>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
if (!platform || platform === "unknown") {
|
||||
return null;
|
||||
}
|
||||
|
||||
// macOS: nothing to render here. The transparent native titlebar (set via
|
||||
// `set_transparent_titlebar(true)` in src-tauri/src/lib.rs) lets the OS
|
||||
// handle dragging directly, and the sys-bar inside `home-header.tsx`
|
||||
// declares its own `data-tauri-drag-region` overlay for the WebView area.
|
||||
// The previous full-width fixed z-[999999] button was stealing every
|
||||
// click in the top 40px of the window.
|
||||
if (platform === "macos") {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Linux: the window has no server-side decorations, so the app owns both the
|
||||
// controls and the resize edges. Which buttons appear and on which side is a
|
||||
// desktop-wide preference (GNOME's `button-layout`, KWin's decoration
|
||||
// settings), read through GTK so both environments are honored.
|
||||
if (platform === "linux") {
|
||||
// Not resolved yet, or the session keeps server-side decorations (KDE on
|
||||
// Wayland — see `use_client_side_decorations` in the backend). Either way
|
||||
// there is a real titlebar and nothing for the app to draw.
|
||||
if (!decorations.resolved || !decorations.clientSide) {
|
||||
return null;
|
||||
}
|
||||
const { layout } = decorations;
|
||||
return (
|
||||
<>
|
||||
{/* Dropping decorations also drops the compositor's drop shadow, and
|
||||
neither Tauri nor tao exposes a Linux shadow API. Without some edge
|
||||
the window is invisible against a similarly coloured desktop, so
|
||||
draw a hairline. Not rounded: that needs a transparent window, which
|
||||
would conflict with the WebView and the resize strips. */}
|
||||
{!isMaximized && (
|
||||
<div
|
||||
aria-hidden="true"
|
||||
className="pointer-events-none fixed inset-0 z-[99999] border border-border"
|
||||
/>
|
||||
)}
|
||||
<WindowResizeHandles isMaximized={isMaximized} />
|
||||
{layout.left.length > 0 && (
|
||||
<div className="fixed top-0 left-0 z-[100000] flex h-11 items-center select-none pointer-events-auto">
|
||||
{layout.left.map(renderControl)}
|
||||
</div>
|
||||
)}
|
||||
{layout.right.length > 0 && (
|
||||
<div className="fixed top-0 right-0 z-[100000] flex h-11 items-center select-none pointer-events-auto">
|
||||
{layout.right.map(renderControl)}
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
// Windows: minimize/maximize/close controls anchored at the top-right
|
||||
// corner of the sys-bar. The HomeHeader's own drag-region overlay handles
|
||||
// window dragging via Tauri 2, so we don't need a separate draggable spacer
|
||||
// covering the whole width.
|
||||
return (
|
||||
<div
|
||||
className="fixed top-0 right-0 z-50 flex h-11 items-center select-none"
|
||||
aria-hidden="false"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
void handleMinimize();
|
||||
}}
|
||||
className="flex h-full w-11 items-center justify-center text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground"
|
||||
aria-label={t("common.window.minimize")}
|
||||
>
|
||||
<svg
|
||||
width="10"
|
||||
height="1"
|
||||
viewBox="0 0 10 1"
|
||||
fill="currentColor"
|
||||
role="img"
|
||||
aria-label={t("common.window.minimize")}
|
||||
>
|
||||
<rect width="10" height="1" />
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
void handleToggleMaximize();
|
||||
}}
|
||||
className="flex h-full w-11 items-center justify-center text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground"
|
||||
aria-label={
|
||||
isMaximized ? t("common.window.restore") : t("common.window.maximize")
|
||||
}
|
||||
>
|
||||
{isMaximized ? (
|
||||
<svg
|
||||
width="10"
|
||||
height="10"
|
||||
viewBox="0 0 10 10"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="1.2"
|
||||
role="img"
|
||||
aria-label={t("common.window.restore")}
|
||||
>
|
||||
<rect x="1" y="3" width="6" height="6" />
|
||||
<path d="M3 3 V1 H9 V7 H7" />
|
||||
</svg>
|
||||
) : (
|
||||
<svg
|
||||
width="10"
|
||||
height="10"
|
||||
viewBox="0 0 10 10"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="1.2"
|
||||
role="img"
|
||||
aria-label={t("common.window.maximize")}
|
||||
>
|
||||
<rect x="1" y="1" width="8" height="8" />
|
||||
</svg>
|
||||
)}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
void handleClose();
|
||||
}}
|
||||
className="flex h-full w-11 items-center justify-center text-muted-foreground transition-colors hover:bg-destructive hover:text-destructive-foreground"
|
||||
aria-label={t("common.buttons.close")}
|
||||
>
|
||||
<svg
|
||||
width="10"
|
||||
height="10"
|
||||
viewBox="0 0 10 10"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="1.2"
|
||||
role="img"
|
||||
aria-label={t("common.buttons.close")}
|
||||
>
|
||||
<line x1="1" y1="1" x2="9" y2="9" />
|
||||
<line x1="9" y1="1" x2="1" y2="9" />
|
||||
</svg>
|
||||
</button>
|
||||
{(["minimize", "maximize", "close"] as WindowControl[]).map(
|
||||
renderControl,
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
"use client";
|
||||
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
|
||||
/**
|
||||
* Mirrors the API's own `ResizeDirection`, which it declares but does not
|
||||
* export. Structurally identical, so a drift would fail the call below.
|
||||
*/
|
||||
type ResizeDirection =
|
||||
| "East"
|
||||
| "North"
|
||||
| "NorthEast"
|
||||
| "NorthWest"
|
||||
| "South"
|
||||
| "SouthEast"
|
||||
| "SouthWest"
|
||||
| "West";
|
||||
|
||||
/**
|
||||
* Mouse resize areas for a window with no server-side decorations.
|
||||
*
|
||||
* `gtk_window_set_decorated(false)` removes GTK's own invisible resize border
|
||||
* along with the frame, so without these the window can only be resized through
|
||||
* window-manager shortcuts (Super+right-drag and friends). Each handle hands the
|
||||
* pointer to the compositor via `begin_resize_drag`, which is the same call
|
||||
* GTK's client-side decorations make, so edge snapping and the resize cursor
|
||||
* come from the WM exactly as they do for a native window.
|
||||
*
|
||||
* Rendered only where the app owns the frame; on macOS the native titlebar is
|
||||
* still in place and the system draws its own resize edges.
|
||||
*/
|
||||
|
||||
/**
|
||||
* GTK's own grab area is far wider, but all of it sits *outside* the window in
|
||||
* the shadow margin. Ours is inside, so every pixel is taken from real content.
|
||||
*/
|
||||
/** Top edge only — it overlaps the 44px-tall window controls. */
|
||||
const TOP_EDGE = "6px";
|
||||
/** Sides and bottom overlap nothing, so they can be comfortably grabbable. */
|
||||
const EDGE = "8px";
|
||||
/** Corners need to win over the edges that overlap them. */
|
||||
const CORNER = "16px";
|
||||
|
||||
interface Handle {
|
||||
direction: ResizeDirection;
|
||||
style: React.CSSProperties;
|
||||
cursor: string;
|
||||
}
|
||||
|
||||
const HANDLES: Handle[] = [
|
||||
// Edges.
|
||||
{
|
||||
direction: "North",
|
||||
cursor: "ns-resize",
|
||||
style: { top: 0, left: CORNER, right: CORNER, height: TOP_EDGE },
|
||||
},
|
||||
{
|
||||
direction: "South",
|
||||
cursor: "ns-resize",
|
||||
style: { bottom: 0, left: CORNER, right: CORNER, height: EDGE },
|
||||
},
|
||||
{
|
||||
direction: "West",
|
||||
cursor: "ew-resize",
|
||||
style: { left: 0, top: CORNER, bottom: CORNER, width: EDGE },
|
||||
},
|
||||
{
|
||||
direction: "East",
|
||||
cursor: "ew-resize",
|
||||
style: { right: 0, top: CORNER, bottom: CORNER, width: EDGE },
|
||||
},
|
||||
// Corners, drawn after the edges so they sit on top of the overlap.
|
||||
{
|
||||
direction: "NorthWest",
|
||||
cursor: "nwse-resize",
|
||||
style: { top: 0, left: 0, width: CORNER, height: TOP_EDGE },
|
||||
},
|
||||
{
|
||||
direction: "NorthEast",
|
||||
cursor: "nesw-resize",
|
||||
style: { top: 0, right: 0, width: CORNER, height: TOP_EDGE },
|
||||
},
|
||||
{
|
||||
direction: "SouthWest",
|
||||
cursor: "nesw-resize",
|
||||
style: { bottom: 0, left: 0, width: CORNER, height: CORNER },
|
||||
},
|
||||
{
|
||||
direction: "SouthEast",
|
||||
cursor: "nwse-resize",
|
||||
style: { bottom: 0, right: 0, width: CORNER, height: CORNER },
|
||||
},
|
||||
];
|
||||
|
||||
export function WindowResizeHandles({ isMaximized }: { isMaximized: boolean }) {
|
||||
// A maximized window has no resizable edge, and leaving the strips live would
|
||||
// put invisible hit areas over real content. Tauri's own built-in undecorated
|
||||
// resizing disables itself while maximized for the same reason.
|
||||
if (isMaximized) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const startResize =
|
||||
(direction: ResizeDirection) => (e: React.PointerEvent) => {
|
||||
// Left button only: right-click belongs to the WM/window menu, and a
|
||||
// middle-click drag should not resize.
|
||||
if (e.button !== 0) {
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
void getCurrentWindow()
|
||||
.startResizeDragging(direction)
|
||||
.catch((error: unknown) => {
|
||||
console.error("Failed to start window resize:", error);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
{HANDLES.map((handle) => (
|
||||
<div
|
||||
key={handle.direction}
|
||||
// Deliberately BELOW the window controls (z-100000) rather than
|
||||
// above: a real CSD window keeps its resize border outside the
|
||||
// buttons, but ours is inside the window, so layering it on top
|
||||
// would steal the corner of whichever control sits in that corner.
|
||||
// Edges still win over ordinary content, which is all they need.
|
||||
className="fixed z-[99998] pointer-events-auto"
|
||||
style={{ ...handle.style, cursor: handle.cursor }}
|
||||
onPointerDown={startResize(handle.direction)}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
"use client";
|
||||
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { listen } from "@tauri-apps/api/event";
|
||||
import { useEffect, useState } from "react";
|
||||
import {
|
||||
type DecorationLayout,
|
||||
parseDecorationLayout,
|
||||
type WindowDecorationsInfo,
|
||||
} from "@/lib/window-decorations";
|
||||
|
||||
export interface WindowDecorationsState {
|
||||
/** True when the app owns the titlebar and must draw controls and edges. */
|
||||
clientSide: boolean;
|
||||
/** Which controls go on which side. Meaningless unless `clientSide`. */
|
||||
layout: DecorationLayout;
|
||||
/** False until the backend has answered. */
|
||||
resolved: boolean;
|
||||
}
|
||||
|
||||
const PENDING: WindowDecorationsState = {
|
||||
clientSide: false,
|
||||
layout: { left: [], right: [] },
|
||||
resolved: false,
|
||||
};
|
||||
|
||||
/**
|
||||
* The window's decoration state, shared by everything that has to agree about
|
||||
* it.
|
||||
*
|
||||
* The controls and the header padding that clears them are rendered by two
|
||||
* different components. Fetching this separately in each let them disagree for
|
||||
* a frame — or indefinitely, if one missed the change event — and the visible
|
||||
* result is window controls sitting on top of the search box. One subscription
|
||||
* per consumer, one shared derivation.
|
||||
*/
|
||||
export function useWindowDecorations(): WindowDecorationsState {
|
||||
const [state, setState] = useState<WindowDecorationsState>(PENDING);
|
||||
|
||||
useEffect(() => {
|
||||
let cancelled = false;
|
||||
const read = async () => {
|
||||
try {
|
||||
const value = await invoke<WindowDecorationsInfo>(
|
||||
"get_window_decoration_layout",
|
||||
);
|
||||
if (cancelled) return;
|
||||
setState({
|
||||
clientSide: value.client_side,
|
||||
layout: parseDecorationLayout(value.layout),
|
||||
resolved: true,
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("Failed to read window decoration layout:", error);
|
||||
// Assume the platform still draws the titlebar: drawing a second one
|
||||
// over a real one is worse than drawing none.
|
||||
if (!cancelled) {
|
||||
setState({ ...PENDING, resolved: true });
|
||||
}
|
||||
}
|
||||
};
|
||||
void read();
|
||||
// The user can rearrange titlebar buttons while the app is running.
|
||||
const unlisten = listen("window-decoration-layout-changed", () => {
|
||||
void read();
|
||||
});
|
||||
return () => {
|
||||
cancelled = true;
|
||||
void unlisten.then((fn) => {
|
||||
fn();
|
||||
});
|
||||
};
|
||||
}, []);
|
||||
|
||||
return state;
|
||||
}
|
||||
@@ -92,7 +92,8 @@
|
||||
"window": {
|
||||
"minimize": "Minimize",
|
||||
"maximize": "Maximize",
|
||||
"restore": "Restore"
|
||||
"restore": "Restore",
|
||||
"close": "Close window"
|
||||
},
|
||||
"commandPalette": {
|
||||
"title": "Command Palette",
|
||||
@@ -467,7 +468,7 @@
|
||||
"ssCipherRequired": "Cipher and password are required for Shadowsocks",
|
||||
"selectType": "Select proxy type",
|
||||
"saveFailed": "Failed to save proxy: {{error}}",
|
||||
"vlessType": "VLESS · Vision · REALITY",
|
||||
"vlessType": "VLESS",
|
||||
"vlessUri": "VLESS URI",
|
||||
"vlessUriPlaceholder": "vless://…",
|
||||
"vlessUriHint": "Requires XTLS Vision and REALITY.",
|
||||
@@ -1866,6 +1867,7 @@
|
||||
"remoteNoCapacity": "No remote host is free right now. Try again in a few minutes.",
|
||||
"remoteNotEntitled": "Your plan does not include remote execution.",
|
||||
"remoteInteractiveNotEntitled": "Your plan includes remote hours for the Cookie Bot only, not for hands-on remote sessions.",
|
||||
"remoteRequiresRemoteExitNode": "This profile's proxy only works on this computer (for example 127.0.0.1 or a home network address). A remote session runs on our hosts, so it needs a proxy with a public address.",
|
||||
"remoteSessionRefused": "The remote host refused this session.",
|
||||
"remoteSessionNotFound": "That remote session no longer exists.",
|
||||
"remoteSessionConflict": "This profile is already open somewhere else.",
|
||||
@@ -1886,6 +1888,7 @@
|
||||
"cookieBotUnknownPlatform": "This profile has no recorded operating system, so it cannot be matched to a host.",
|
||||
"cookieBotUnsupportedPlatform": "The cookie bot cannot run {{platform}} profiles. Only Windows and macOS profiles are supported.",
|
||||
"cookieBotRequiresExitNode": "Attach a proxy or VPN first. Without one the run would come from a datacenter address, which damages the profile's identity.",
|
||||
"cookieBotRequiresRemoteExitNode": "This profile's proxy only works on this computer (for example 127.0.0.1 or a home network address). Cookie Bot runs on our hosts, so it needs a proxy with a public address.",
|
||||
"unknownCode": "Something went wrong: {{code}}",
|
||||
"cookieBotTouchFingerprintUnsupported": "This profile claims a touch device, which the bot cannot drive. Use a desktop fingerprint.",
|
||||
"profileRunningRemotely": "This profile is running on a remote machine. Stop the remote session first.",
|
||||
@@ -1896,7 +1899,22 @@
|
||||
"fingerprintExitMismatch": "The proxy exit node doesn't match this profile's fingerprint.",
|
||||
"launchConsentExpired": "That confirmation is no longer valid. Try launching again.",
|
||||
"vpnWorkerStartFailed": "Couldn't start the VPN connection: {{detail}}",
|
||||
"exitProbeFailed": "Couldn't reach the proxy exit node to check its location."
|
||||
"exitProbeFailed": "Couldn't reach the proxy exit node to check its location.",
|
||||
"vlessUnsupported": {
|
||||
"security": "This VLESS server does not use REALITY. Donut supports VLESS with REALITY only.",
|
||||
"flow": "This VLESS server does not use XTLS Vision flow, which Donut requires.",
|
||||
"transport": "Donut supports VLESS over plain TCP only — this server uses a different transport (such as WebSocket or gRPC).",
|
||||
"encryption": "This VLESS server uses an encryption setting Donut does not support.",
|
||||
"headerType": "This VLESS server uses a header obfuscation Donut does not support.",
|
||||
"fingerprint": "This VLESS URI requests a TLS fingerprint Donut does not support.",
|
||||
"sni": "The VLESS URI is missing the SNI (sni) needed for REALITY.",
|
||||
"publicKey": "The VLESS URI is missing the REALITY public key (pbk).",
|
||||
"scheme": "That is not a VLESS link. It must start with vless://.",
|
||||
"parameter": "The VLESS URI contains an option Donut does not support.",
|
||||
"malformed": "The VLESS URI is invalid."
|
||||
},
|
||||
"camoufoxRemoved": "Camoufox is no longer supported. Recreate this profile with Wayfern.",
|
||||
"noE2ePasswordSet": "No end-to-end encryption password is set. Set one before syncing encrypted data."
|
||||
},
|
||||
"rail": {
|
||||
"profiles": "Profiles",
|
||||
@@ -2342,13 +2360,48 @@
|
||||
"confirmBulkButton_other": "Continue with {{count}} profiles",
|
||||
"sitesRequired": "Add at least one site.",
|
||||
"addSitesFirst": "Add a site first",
|
||||
"presetsMissing": "Depth presets unavailable"
|
||||
"presetsMissing": "Depth presets unavailable",
|
||||
"sourceOwn": "My own list",
|
||||
"sourceCurated": "Curated",
|
||||
"sourceSaved": "Saved",
|
||||
"curatedEmpty": "No curated lists are available right now.",
|
||||
"curatedNote": "A curated list we keep up to date. Every profile draws its own sample from it, so no two profiles browse the same set — which is what stops the list itself becoming a signature. The addresses stay on our side.",
|
||||
"savedEmpty": "Nothing saved yet. Type a list under My own list, then save it from there.",
|
||||
"savedNote": "The sites are copied onto the schedule when you save it, so editing a list later leaves existing schedules alone.",
|
||||
"savedUnavailable": "Could not load your saved lists.",
|
||||
"saveAsList": "Save as a list",
|
||||
"listNamePlaceholder": "Name this list",
|
||||
"listSaved": "List saved",
|
||||
"listRenamed": "List renamed",
|
||||
"listDeleted": "List deleted",
|
||||
"listRename": "Rename",
|
||||
"listDeleteConfirm": "Delete?",
|
||||
"templateMissing": "That saved list no longer exists. Pick another one.",
|
||||
"templateNameTaken": "You already have a list with that name.",
|
||||
"templateNameInvalid": "Give the list a name of {{max}} characters or fewer.",
|
||||
"calendarLabel": "When it runs",
|
||||
"daysLabel": "Days of the week",
|
||||
"addSlot": "Add a time",
|
||||
"slotsFull": "At most {{max}} start times.",
|
||||
"removeSlot": "Remove this time",
|
||||
"pickListFirst": "Pick a list first",
|
||||
"finishCalendarFirst": "Finish the schedule first",
|
||||
"duplicateSlot": "Two rows have the same days and time",
|
||||
"listSites_one": "{{count}} site",
|
||||
"listSites_other": "{{count}} sites",
|
||||
"summarySlots_one": "Runs {{count}} time a week, up to {{minutes}} min each.",
|
||||
"summarySlots_other": "Runs {{count}} times a week, up to {{minutes}} min each.",
|
||||
"templateNameInvalidNoMax": "That name can't be used for a saved list."
|
||||
},
|
||||
"preset": {
|
||||
"light": "Light",
|
||||
"balanced": "Standard",
|
||||
"deep": "Deep"
|
||||
},
|
||||
"template": {
|
||||
"lowIntentPurchaser": "Low-intent purchaser",
|
||||
"lowIntentPurchaserHint": "Positions the profile as a price-sensitive buyer: comparison, coupon, cashback and resale sites, reaching retailers through aggregators rather than directly."
|
||||
},
|
||||
"preflight": {
|
||||
"ineligible_one": "{{count}} profile can't run remotely",
|
||||
"ineligible_other": "{{count}} profiles can't run remotely",
|
||||
|
||||
@@ -92,7 +92,8 @@
|
||||
"window": {
|
||||
"minimize": "Minimizar",
|
||||
"maximize": "Maximizar",
|
||||
"restore": "Restaurar"
|
||||
"restore": "Restaurar",
|
||||
"close": "Cerrar ventana"
|
||||
},
|
||||
"commandPalette": {
|
||||
"title": "Paleta de comandos",
|
||||
@@ -468,7 +469,7 @@
|
||||
"ssCipherRequired": "Para Shadowsocks se requieren cifrado y contraseña",
|
||||
"selectType": "Selecciona el tipo de proxy",
|
||||
"saveFailed": "Error al guardar el proxy: {{error}}",
|
||||
"vlessType": "VLESS · Vision · REALITY",
|
||||
"vlessType": "VLESS",
|
||||
"vlessUri": "URI de VLESS",
|
||||
"vlessUriPlaceholder": "vless://…",
|
||||
"vlessUriHint": "Requiere XTLS Vision y REALITY.",
|
||||
@@ -1873,6 +1874,7 @@
|
||||
"remoteNoCapacity": "Ahora mismo no hay ninguna máquina remota libre. Inténtalo de nuevo en unos minutos.",
|
||||
"remoteNotEntitled": "Tu plan no incluye la ejecución remota.",
|
||||
"remoteInteractiveNotEntitled": "Tu plan incluye horas remotas solo para el Cookie Bot, no para sesiones remotas interactivas.",
|
||||
"remoteRequiresRemoteExitNode": "El proxy de este perfil solo funciona en este ordenador (por ejemplo 127.0.0.1 o una dirección de red local). Las sesiones remotas se ejecutan en nuestros servidores, así que necesitan un proxy con dirección pública.",
|
||||
"remoteSessionRefused": "La máquina remota rechazó esta sesión.",
|
||||
"remoteSessionNotFound": "Esa sesión remota ya no existe.",
|
||||
"remoteSessionConflict": "Este perfil ya está abierto en otro sitio.",
|
||||
@@ -1893,6 +1895,7 @@
|
||||
"cookieBotUnknownPlatform": "Este perfil no tiene un sistema operativo registrado, así que no se puede asignar a ninguna máquina.",
|
||||
"cookieBotUnsupportedPlatform": "Cookie Bot no puede ejecutar perfiles de {{platform}}. Solo se admiten perfiles de Windows y macOS.",
|
||||
"cookieBotRequiresExitNode": "Asigna primero un proxy o una VPN. Sin ninguno, la ejecución saldría desde una dirección de centro de datos, lo que daña la identidad del perfil.",
|
||||
"cookieBotRequiresRemoteExitNode": "El proxy de este perfil solo funciona en este ordenador (por ejemplo 127.0.0.1 o una dirección de red local). Cookie Bot se ejecuta en nuestros servidores, así que necesita un proxy con dirección pública.",
|
||||
"unknownCode": "Algo salió mal: {{code}}",
|
||||
"cookieBotTouchFingerprintUnsupported": "Este perfil declara un dispositivo táctil, que el bot no puede controlar. Usa una huella de escritorio.",
|
||||
"profileRunningRemotely": "Este perfil se está ejecutando en una máquina remota. Detén primero la sesión remota.",
|
||||
@@ -1903,7 +1906,22 @@
|
||||
"fingerprintExitMismatch": "El nodo de salida del proxy no coincide con la huella digital de este perfil.",
|
||||
"launchConsentExpired": "Esa confirmación ya no es válida. Vuelve a iniciar.",
|
||||
"vpnWorkerStartFailed": "No se pudo iniciar la conexión VPN: {{detail}}",
|
||||
"exitProbeFailed": "No se pudo contactar con el nodo de salida del proxy para comprobar su ubicación."
|
||||
"exitProbeFailed": "No se pudo contactar con el nodo de salida del proxy para comprobar su ubicación.",
|
||||
"vlessUnsupported": {
|
||||
"security": "Este servidor VLESS no usa REALITY. Donut solo admite VLESS con REALITY.",
|
||||
"flow": "Este servidor VLESS no usa el flujo XTLS Vision, que Donut requiere.",
|
||||
"transport": "Donut solo admite VLESS sobre TCP simple: este servidor usa otro transporte (como WebSocket o gRPC).",
|
||||
"encryption": "Este servidor VLESS usa un cifrado que Donut no admite.",
|
||||
"headerType": "Este servidor VLESS usa una ofuscación de cabecera que Donut no admite.",
|
||||
"fingerprint": "Esta URI VLESS solicita una huella TLS que Donut no admite.",
|
||||
"sni": "A la URI VLESS le falta el SNI (sni) necesario para REALITY.",
|
||||
"publicKey": "A la URI VLESS le falta la clave pública de REALITY (pbk).",
|
||||
"scheme": "Eso no es un enlace VLESS. Debe empezar por vless://.",
|
||||
"parameter": "La URI VLESS contiene una opción que Donut no admite.",
|
||||
"malformed": "La URI VLESS no es válida."
|
||||
},
|
||||
"camoufoxRemoved": "Camoufox ya no es compatible. Vuelve a crear este perfil con Wayfern.",
|
||||
"noE2ePasswordSet": "No hay contraseña de cifrado de extremo a extremo. Establece una antes de sincronizar datos cifrados."
|
||||
},
|
||||
"rail": {
|
||||
"profiles": "Perfiles",
|
||||
@@ -2367,13 +2385,50 @@
|
||||
"confirmBulkButton_many": "Continuar con {{count}} perfiles",
|
||||
"sitesRequired": "Añade al menos un sitio.",
|
||||
"addSitesFirst": "Añade un sitio primero",
|
||||
"presetsMissing": "Ajustes de profundidad no disponibles"
|
||||
"presetsMissing": "Ajustes de profundidad no disponibles",
|
||||
"sourceOwn": "Mi propia lista",
|
||||
"sourceCurated": "Seleccionadas",
|
||||
"sourceSaved": "Guardadas",
|
||||
"curatedEmpty": "Ahora mismo no hay listas seleccionadas disponibles.",
|
||||
"curatedNote": "Una lista seleccionada que mantenemos al día. Cada perfil toma su propia muestra de ella, así que no hay dos perfiles que naveguen el mismo conjunto, y por eso la lista no llega a convertirse en una firma. Las direcciones se quedan de nuestro lado.",
|
||||
"savedEmpty": "Todavía no has guardado nada. Escribe una lista en Mi propia lista y guárdala desde allí.",
|
||||
"savedNote": "Los sitios se copian en la programación al guardarla, así que editar una lista más tarde no afecta a las programaciones existentes.",
|
||||
"savedUnavailable": "No se pudieron cargar tus listas guardadas.",
|
||||
"saveAsList": "Guardar como lista",
|
||||
"listNamePlaceholder": "Nombra esta lista",
|
||||
"listSaved": "Lista guardada",
|
||||
"listRenamed": "Lista renombrada",
|
||||
"listDeleted": "Lista eliminada",
|
||||
"listRename": "Renombrar",
|
||||
"listDeleteConfirm": "¿Eliminar?",
|
||||
"templateMissing": "Esa lista guardada ya no existe. Elige otra.",
|
||||
"templateNameTaken": "Ya tienes una lista con ese nombre.",
|
||||
"templateNameInvalid": "Ponle a la lista un nombre de {{max}} caracteres o menos.",
|
||||
"calendarLabel": "Cuándo se ejecuta",
|
||||
"daysLabel": "Días de la semana",
|
||||
"addSlot": "Añadir una hora",
|
||||
"slotsFull": "Como máximo {{max}} horas de inicio.",
|
||||
"removeSlot": "Quitar esta hora",
|
||||
"pickListFirst": "Elige una lista primero",
|
||||
"finishCalendarFirst": "Termina la programación primero",
|
||||
"duplicateSlot": "Dos filas tienen los mismos días y la misma hora",
|
||||
"listSites_one": "{{count}} sitio",
|
||||
"listSites_other": "{{count}} sitios",
|
||||
"listSites_many": "{{count}} sitios",
|
||||
"summarySlots_one": "Se ejecuta {{count}} vez a la semana, hasta {{minutes}} min cada vez.",
|
||||
"summarySlots_other": "Se ejecuta {{count}} veces a la semana, hasta {{minutes}} min cada vez.",
|
||||
"summarySlots_many": "Se ejecuta {{count}} veces a la semana, hasta {{minutes}} min cada vez.",
|
||||
"templateNameInvalidNoMax": "Ese nombre no se puede usar para una lista guardada."
|
||||
},
|
||||
"preset": {
|
||||
"light": "Ligera",
|
||||
"balanced": "Estándar",
|
||||
"deep": "Profunda"
|
||||
},
|
||||
"template": {
|
||||
"lowIntentPurchaser": "Comprador de baja intención",
|
||||
"lowIntentPurchaserHint": "Posiciona el perfil como un comprador sensible al precio: sitios de comparación, cupones, reembolsos y reventa, llegando a las tiendas a través de agregadores en lugar de directamente."
|
||||
},
|
||||
"preflight": {
|
||||
"ineligible_one": "{{count}} perfil no puede ejecutarse en remoto",
|
||||
"ineligible_other": "{{count}} perfiles no pueden ejecutarse en remoto",
|
||||
|
||||
@@ -92,7 +92,8 @@
|
||||
"window": {
|
||||
"minimize": "Réduire",
|
||||
"maximize": "Agrandir",
|
||||
"restore": "Restaurer"
|
||||
"restore": "Restaurer",
|
||||
"close": "Fermer la fenêtre"
|
||||
},
|
||||
"commandPalette": {
|
||||
"title": "Palette de commandes",
|
||||
@@ -468,7 +469,7 @@
|
||||
"ssCipherRequired": "Le chiffrement et le mot de passe sont requis pour Shadowsocks",
|
||||
"selectType": "Sélectionnez le type de proxy",
|
||||
"saveFailed": "Échec de la sauvegarde du proxy : {{error}}",
|
||||
"vlessType": "VLESS · Vision · REALITY",
|
||||
"vlessType": "VLESS",
|
||||
"vlessUri": "URI VLESS",
|
||||
"vlessUriPlaceholder": "vless://…",
|
||||
"vlessUriHint": "Nécessite XTLS Vision et REALITY.",
|
||||
@@ -1873,6 +1874,7 @@
|
||||
"remoteNoCapacity": "Aucune machine distante n'est libre pour le moment. Réessayez dans quelques minutes.",
|
||||
"remoteNotEntitled": "Votre forfait n'inclut pas l'exécution à distance.",
|
||||
"remoteInteractiveNotEntitled": "Votre forfait inclut des heures distantes uniquement pour le Cookie Bot, pas pour les sessions distantes interactives.",
|
||||
"remoteRequiresRemoteExitNode": "Le proxy de ce profil ne fonctionne que sur cet ordinateur (par exemple 127.0.0.1 ou une adresse de réseau local). Les sessions distantes s'exécutent sur nos hôtes et ont donc besoin d'un proxy avec une adresse publique.",
|
||||
"remoteSessionRefused": "La machine distante a refusé cette session.",
|
||||
"remoteSessionNotFound": "Cette session distante n'existe plus.",
|
||||
"remoteSessionConflict": "Ce profil est déjà ouvert ailleurs.",
|
||||
@@ -1893,6 +1895,7 @@
|
||||
"cookieBotUnknownPlatform": "Ce profil n'a aucun système d'exploitation enregistré, il ne peut donc pas être associé à une machine.",
|
||||
"cookieBotUnsupportedPlatform": "Cookie Bot ne peut pas exécuter de profils {{platform}}. Seuls les profils Windows et macOS sont pris en charge.",
|
||||
"cookieBotRequiresExitNode": "Associez d'abord un proxy ou un VPN. Sans cela, l'exécution proviendrait d'une adresse de centre de données, ce qui abîme l'identité du profil.",
|
||||
"cookieBotRequiresRemoteExitNode": "Le proxy de ce profil ne fonctionne que sur cet ordinateur (par exemple 127.0.0.1 ou une adresse de réseau local). Cookie Bot s'exécute sur nos hôtes et a donc besoin d'un proxy avec une adresse publique.",
|
||||
"unknownCode": "Une erreur est survenue : {{code}}",
|
||||
"cookieBotTouchFingerprintUnsupported": "Ce profil déclare un appareil tactile, que le bot ne peut pas piloter. Utilisez une empreinte de bureau.",
|
||||
"profileRunningRemotely": "Ce profil s'exécute sur une machine distante. Arrêtez d'abord la session distante.",
|
||||
@@ -1903,7 +1906,22 @@
|
||||
"fingerprintExitMismatch": "Le nœud de sortie du proxy ne correspond pas à l'empreinte de ce profil.",
|
||||
"launchConsentExpired": "Cette confirmation n'est plus valide. Relancez le profil.",
|
||||
"vpnWorkerStartFailed": "Impossible de démarrer la connexion VPN : {{detail}}",
|
||||
"exitProbeFailed": "Impossible de joindre le nœud de sortie du proxy pour vérifier sa localisation."
|
||||
"exitProbeFailed": "Impossible de joindre le nœud de sortie du proxy pour vérifier sa localisation.",
|
||||
"vlessUnsupported": {
|
||||
"security": "Ce serveur VLESS n'utilise pas REALITY. Donut ne prend en charge que VLESS avec REALITY.",
|
||||
"flow": "Ce serveur VLESS n'utilise pas le flux XTLS Vision, requis par Donut.",
|
||||
"transport": "Donut ne prend en charge que VLESS sur TCP simple — ce serveur utilise un autre transport (WebSocket ou gRPC, par exemple).",
|
||||
"encryption": "Ce serveur VLESS utilise un chiffrement non pris en charge par Donut.",
|
||||
"headerType": "Ce serveur VLESS utilise une obfuscation d'en-tête non prise en charge par Donut.",
|
||||
"fingerprint": "Cette URI VLESS demande une empreinte TLS non prise en charge par Donut.",
|
||||
"sni": "Il manque le SNI (sni) nécessaire à REALITY dans l'URI VLESS.",
|
||||
"publicKey": "Il manque la clé publique REALITY (pbk) dans l'URI VLESS.",
|
||||
"scheme": "Ce n'est pas un lien VLESS. Il doit commencer par vless://.",
|
||||
"parameter": "L'URI VLESS contient une option non prise en charge par Donut.",
|
||||
"malformed": "L'URI VLESS n'est pas valide."
|
||||
},
|
||||
"camoufoxRemoved": "Camoufox n'est plus pris en charge. Recréez ce profil avec Wayfern.",
|
||||
"noE2ePasswordSet": "Aucun mot de passe de chiffrement de bout en bout n'est défini. Définissez-en un avant de synchroniser des données chiffrées."
|
||||
},
|
||||
"rail": {
|
||||
"profiles": "Profils",
|
||||
@@ -2367,13 +2385,50 @@
|
||||
"confirmBulkButton_many": "Continuer avec {{count}} profils",
|
||||
"sitesRequired": "Ajoutez au moins un site.",
|
||||
"addSitesFirst": "Ajoutez d'abord un site",
|
||||
"presetsMissing": "Préréglages de profondeur indisponibles"
|
||||
"presetsMissing": "Préréglages de profondeur indisponibles",
|
||||
"sourceOwn": "Ma propre liste",
|
||||
"sourceCurated": "Sélection",
|
||||
"sourceSaved": "Enregistrées",
|
||||
"curatedEmpty": "Aucune liste de la sélection n'est disponible pour le moment.",
|
||||
"curatedNote": "Une liste que nous tenons à jour. Chaque profil en tire son propre échantillon : deux profils ne parcourent donc jamais le même ensemble, ce qui empêche la liste elle-même de devenir une signature. Les adresses restent de notre côté.",
|
||||
"savedEmpty": "Rien d'enregistré pour l'instant. Saisissez une liste dans Ma propre liste, puis enregistrez-la depuis là.",
|
||||
"savedNote": "Les sites sont copiés dans la planification au moment de l'enregistrement : modifier une liste plus tard ne touche pas aux planifications existantes.",
|
||||
"savedUnavailable": "Impossible de charger vos listes enregistrées.",
|
||||
"saveAsList": "Enregistrer comme liste",
|
||||
"listNamePlaceholder": "Nommez cette liste",
|
||||
"listSaved": "Liste enregistrée",
|
||||
"listRenamed": "Liste renommée",
|
||||
"listDeleted": "Liste supprimée",
|
||||
"listRename": "Renommer",
|
||||
"listDeleteConfirm": "Supprimer ?",
|
||||
"templateMissing": "Cette liste enregistrée n'existe plus. Choisissez-en une autre.",
|
||||
"templateNameTaken": "Vous avez déjà une liste portant ce nom.",
|
||||
"templateNameInvalid": "Donnez à la liste un nom de {{max}} caractères maximum.",
|
||||
"calendarLabel": "Quand il s'exécute",
|
||||
"daysLabel": "Jours de la semaine",
|
||||
"addSlot": "Ajouter une heure",
|
||||
"slotsFull": "{{max}} heures de départ au maximum.",
|
||||
"removeSlot": "Retirer cette heure",
|
||||
"pickListFirst": "Choisissez d'abord une liste",
|
||||
"finishCalendarFirst": "Terminez d'abord la planification",
|
||||
"duplicateSlot": "Deux lignes ont les mêmes jours et la même heure",
|
||||
"listSites_one": "{{count}} site",
|
||||
"listSites_other": "{{count}} sites",
|
||||
"listSites_many": "{{count}} sites",
|
||||
"summarySlots_one": "S'exécute {{count}} fois par semaine, jusqu'à {{minutes}} min à chaque fois.",
|
||||
"summarySlots_other": "S'exécute {{count}} fois par semaine, jusqu'à {{minutes}} min à chaque fois.",
|
||||
"summarySlots_many": "S'exécute {{count}} fois par semaine, jusqu'à {{minutes}} min à chaque fois.",
|
||||
"templateNameInvalidNoMax": "Ce nom ne peut pas être utilisé pour une liste enregistrée."
|
||||
},
|
||||
"preset": {
|
||||
"light": "Légère",
|
||||
"balanced": "Standard",
|
||||
"deep": "Approfondie"
|
||||
},
|
||||
"template": {
|
||||
"lowIntentPurchaser": "Acheteur à faible intention",
|
||||
"lowIntentPurchaserHint": "Positionne le profil comme un acheteur sensible au prix : comparateurs, coupons, cashback et revente, en arrivant chez les marchands via des agrégateurs plutôt qu'en direct."
|
||||
},
|
||||
"preflight": {
|
||||
"ineligible_one": "{{count}} profil ne peut pas s'exécuter à distance",
|
||||
"ineligible_other": "{{count}} profils ne peuvent pas s'exécuter à distance",
|
||||
|
||||
@@ -92,7 +92,8 @@
|
||||
"window": {
|
||||
"minimize": "最小化",
|
||||
"maximize": "最大化",
|
||||
"restore": "元に戻す"
|
||||
"restore": "元に戻す",
|
||||
"close": "ウィンドウを閉じる"
|
||||
},
|
||||
"commandPalette": {
|
||||
"title": "コマンドパレット",
|
||||
@@ -467,7 +468,7 @@
|
||||
"ssCipherRequired": "Shadowsocks には暗号とパスワードが必要です",
|
||||
"selectType": "プロキシの種類を選択",
|
||||
"saveFailed": "プロキシの保存に失敗しました: {{error}}",
|
||||
"vlessType": "VLESS · Vision · REALITY",
|
||||
"vlessType": "VLESS",
|
||||
"vlessUri": "VLESS URI",
|
||||
"vlessUriPlaceholder": "vless://…",
|
||||
"vlessUriHint": "XTLS Vision と REALITY が必要です。",
|
||||
@@ -1866,6 +1867,7 @@
|
||||
"remoteNoCapacity": "現在空いているリモートマシンがありません。数分後にもう一度お試しください。",
|
||||
"remoteNotEntitled": "ご利用のプランにはリモート実行が含まれていません。",
|
||||
"remoteInteractiveNotEntitled": "ご利用のプランのリモート時間は Cookie Bot 専用で、手動のリモートセッションには使えません。",
|
||||
"remoteRequiresRemoteExitNode": "このプロファイルのプロキシはこのコンピューター上でのみ有効です(127.0.0.1 やローカルネットワークのアドレスなど)。リモートセッションは当社のホスト上で実行されるため、公開アドレスを持つプロキシが必要です。",
|
||||
"remoteSessionRefused": "リモートマシンがこのセッションを拒否しました。",
|
||||
"remoteSessionNotFound": "そのリモートセッションはすでに存在しません。",
|
||||
"remoteSessionConflict": "このプロファイルはすでに別の場所で開かれています。",
|
||||
@@ -1886,6 +1888,7 @@
|
||||
"cookieBotUnknownPlatform": "このプロファイルには OS が記録されていないため、マシンを割り当てられません。",
|
||||
"cookieBotUnsupportedPlatform": "Cookie Bot は {{platform}} のプロファイルを実行できません。対応しているのは Windows と macOS のプロファイルのみです。",
|
||||
"cookieBotRequiresExitNode": "先にプロキシまたは VPN を設定してください。設定しないと通信がデータセンターのアドレスから出て、プロファイルの信頼性を損ないます。",
|
||||
"cookieBotRequiresRemoteExitNode": "このプロファイルのプロキシはこのコンピューター上でのみ有効です(127.0.0.1 やローカルネットワークのアドレスなど)。Cookie Bot は当社のホスト上で実行されるため、公開アドレスを持つプロキシが必要です。",
|
||||
"unknownCode": "エラーが発生しました: {{code}}",
|
||||
"cookieBotTouchFingerprintUnsupported": "このプロファイルはタッチ端末を名乗っており、ボットは操作できません。デスクトップのフィンガープリントをお使いください。",
|
||||
"profileRunningRemotely": "このプロファイルはリモートマシンで実行中です。先にリモートセッションを停止してください。",
|
||||
@@ -1896,7 +1899,22 @@
|
||||
"fingerprintExitMismatch": "プロキシの出口ノードがこのプロファイルのフィンガープリントと一致しません。",
|
||||
"launchConsentExpired": "この確認は無効になりました。もう一度起動してください。",
|
||||
"vpnWorkerStartFailed": "VPN接続を開始できませんでした: {{detail}}",
|
||||
"exitProbeFailed": "プロキシの出口ノードに接続できず、所在地を確認できませんでした。"
|
||||
"exitProbeFailed": "プロキシの出口ノードに接続できず、所在地を確認できませんでした。",
|
||||
"vlessUnsupported": {
|
||||
"security": "このVLESSサーバーはREALITYを使用していません。DonutはREALITY付きのVLESSのみに対応しています。",
|
||||
"flow": "このVLESSサーバーは、Donutが必要とするXTLS Visionフローを使用していません。",
|
||||
"transport": "Donutは素のTCP上のVLESSのみに対応しています。このサーバーは別のトランスポート(WebSocketやgRPCなど)を使用しています。",
|
||||
"encryption": "このVLESSサーバーは、Donutが対応していない暗号化設定を使用しています。",
|
||||
"headerType": "このVLESSサーバーは、Donutが対応していないヘッダー難読化を使用しています。",
|
||||
"fingerprint": "このVLESS URIは、Donutが対応していないTLSフィンガープリントを要求しています。",
|
||||
"sni": "VLESS URIに、REALITYに必要なSNI(sni)がありません。",
|
||||
"publicKey": "VLESS URIに、REALITYの公開鍵(pbk)がありません。",
|
||||
"scheme": "これはVLESSリンクではありません。vless:// で始まる必要があります。",
|
||||
"parameter": "VLESS URIに、Donutが対応していないオプションが含まれています。",
|
||||
"malformed": "VLESS URIが無効です。"
|
||||
},
|
||||
"camoufoxRemoved": "Camoufoxはサポートされなくなりました。Wayfernでこのプロファイルを作り直してください。",
|
||||
"noE2ePasswordSet": "エンドツーエンド暗号化のパスワードが設定されていません。暗号化データを同期する前に設定してください。"
|
||||
},
|
||||
"rail": {
|
||||
"profiles": "プロファイル",
|
||||
@@ -2342,13 +2360,48 @@
|
||||
"confirmBulkButton_other": "{{count}} 件のプロファイルで続行",
|
||||
"sitesRequired": "サイトを 1 件以上追加してください。",
|
||||
"addSitesFirst": "先にサイトを追加してください",
|
||||
"presetsMissing": "深さのプリセットを利用できません"
|
||||
"presetsMissing": "深さのプリセットを利用できません",
|
||||
"sourceOwn": "自分のリスト",
|
||||
"sourceCurated": "厳選リスト",
|
||||
"sourceSaved": "保存済み",
|
||||
"curatedEmpty": "現在利用できる厳選リストはありません。",
|
||||
"curatedNote": "こちらで最新に保っている厳選リストです。プロファイルごとに異なるサンプルを抽出するため、同じ組み合わせを閲覧するプロファイルは 2 つとありません。これがリスト自体を特徴にさせない仕組みです。アドレスはサーバー側に留まります。",
|
||||
"savedEmpty": "まだ保存されていません。「自分のリスト」でリストを入力し、そこから保存してください。",
|
||||
"savedNote": "サイトは保存時にスケジュールへコピーされます。後からリストを編集しても既存のスケジュールは変わりません。",
|
||||
"savedUnavailable": "保存済みのリストを読み込めませんでした。",
|
||||
"saveAsList": "リストとして保存",
|
||||
"listNamePlaceholder": "リスト名を入力",
|
||||
"listSaved": "リストを保存しました",
|
||||
"listRenamed": "リスト名を変更しました",
|
||||
"listDeleted": "リストを削除しました",
|
||||
"listRename": "名前を変更",
|
||||
"listDeleteConfirm": "削除しますか?",
|
||||
"templateMissing": "その保存済みリストは存在しません。別のものを選んでください。",
|
||||
"templateNameTaken": "同じ名前のリストがすでにあります。",
|
||||
"templateNameInvalid": "リスト名は {{max}} 文字以内にしてください。",
|
||||
"calendarLabel": "実行するタイミング",
|
||||
"daysLabel": "曜日",
|
||||
"addSlot": "時刻を追加",
|
||||
"slotsFull": "開始時刻は最大 {{max}} 件です。",
|
||||
"removeSlot": "この時刻を削除",
|
||||
"pickListFirst": "先にリストを選択",
|
||||
"finishCalendarFirst": "先にスケジュールを完成させてください",
|
||||
"duplicateSlot": "2 つの行の曜日と時刻が同じです",
|
||||
"listSites_one": "{{count}} サイト",
|
||||
"listSites_other": "{{count}} サイト",
|
||||
"summarySlots_one": "週 {{count}} 回、1 回あたり最大 {{minutes}} 分実行します。",
|
||||
"summarySlots_other": "週 {{count}} 回、1 回あたり最大 {{minutes}} 分実行します。",
|
||||
"templateNameInvalidNoMax": "その名前は保存済みリストには使用できません。"
|
||||
},
|
||||
"preset": {
|
||||
"light": "軽め",
|
||||
"balanced": "標準",
|
||||
"deep": "深め"
|
||||
},
|
||||
"template": {
|
||||
"lowIntentPurchaser": "低購買意欲の買い物客",
|
||||
"lowIntentPurchaserHint": "価格に敏感な買い手としてプロファイルを位置づけます。比較・クーポン・キャッシュバック・リセールのサイトを巡り、直接ではなく集約サイト経由で小売サイトに到達します。"
|
||||
},
|
||||
"preflight": {
|
||||
"ineligible_one": "{{count}} 件のプロファイルはリモートで実行できません",
|
||||
"ineligible_other": "{{count}} 件のプロファイルはリモートで実行できません",
|
||||
|
||||
@@ -92,7 +92,8 @@
|
||||
"window": {
|
||||
"minimize": "최소화",
|
||||
"maximize": "최대화",
|
||||
"restore": "이전 크기로 복원"
|
||||
"restore": "이전 크기로 복원",
|
||||
"close": "창 닫기"
|
||||
},
|
||||
"commandPalette": {
|
||||
"title": "명령 팔레트",
|
||||
@@ -467,7 +468,7 @@
|
||||
"ssCipherRequired": "Shadowsocks에는 암호화와 비밀번호가 필요합니다",
|
||||
"selectType": "프록시 유형 선택",
|
||||
"saveFailed": "프록시 저장 실패: {{error}}",
|
||||
"vlessType": "VLESS · Vision · REALITY",
|
||||
"vlessType": "VLESS",
|
||||
"vlessUri": "VLESS URI",
|
||||
"vlessUriPlaceholder": "vless://…",
|
||||
"vlessUriHint": "XTLS Vision 및 REALITY가 필요합니다.",
|
||||
@@ -1866,6 +1867,7 @@
|
||||
"remoteNoCapacity": "지금은 사용 가능한 원격 머신이 없습니다. 몇 분 후에 다시 시도하세요.",
|
||||
"remoteNotEntitled": "현재 요금제에는 원격 실행이 포함되어 있지 않습니다.",
|
||||
"remoteInteractiveNotEntitled": "현재 플랜의 원격 시간은 Cookie Bot 전용이며, 직접 조작하는 원격 세션에는 사용할 수 없습니다.",
|
||||
"remoteRequiresRemoteExitNode": "이 프로필의 프록시는 이 컴퓨터에서만 작동합니다(예: 127.0.0.1 또는 사설망 주소). 원격 세션은 당사 호스트에서 실행되므로 공용 주소를 가진 프록시가 필요합니다.",
|
||||
"remoteSessionRefused": "원격 머신이 이 세션을 거부했습니다.",
|
||||
"remoteSessionNotFound": "해당 원격 세션은 더 이상 존재하지 않습니다.",
|
||||
"remoteSessionConflict": "이 프로필은 이미 다른 곳에서 열려 있습니다.",
|
||||
@@ -1886,6 +1888,7 @@
|
||||
"cookieBotUnknownPlatform": "이 프로필에는 기록된 운영체제가 없어 머신을 배정할 수 없습니다.",
|
||||
"cookieBotUnsupportedPlatform": "Cookie Bot은 {{platform}} 프로필을 실행할 수 없습니다. Windows와 macOS 프로필만 지원합니다.",
|
||||
"cookieBotRequiresExitNode": "먼저 프록시나 VPN을 연결하세요. 없으면 실행 트래픽이 데이터센터 주소에서 나가 프로필 신뢰도를 해칩니다.",
|
||||
"cookieBotRequiresRemoteExitNode": "이 프로필의 프록시는 이 컴퓨터에서만 작동합니다(예: 127.0.0.1 또는 사설망 주소). Cookie Bot은 당사 호스트에서 실행되므로 공용 주소를 가진 프록시가 필요합니다.",
|
||||
"unknownCode": "문제가 발생했습니다: {{code}}",
|
||||
"cookieBotTouchFingerprintUnsupported": "이 프로필은 터치 기기를 표방하며, 봇이 조작할 수 없습니다. 데스크톱 지문을 사용하세요.",
|
||||
"profileRunningRemotely": "이 프로필은 원격 머신에서 실행 중입니다. 먼저 원격 세션을 중지하세요.",
|
||||
@@ -1896,7 +1899,22 @@
|
||||
"fingerprintExitMismatch": "프록시 출구 노드가 이 프로필의 핑거프린트와 일치하지 않습니다.",
|
||||
"launchConsentExpired": "해당 확인이 더 이상 유효하지 않습니다. 다시 실행해 보세요.",
|
||||
"vpnWorkerStartFailed": "VPN 연결을 시작하지 못했습니다: {{detail}}",
|
||||
"exitProbeFailed": "프록시 출구 노드에 연결할 수 없어 위치를 확인하지 못했습니다."
|
||||
"exitProbeFailed": "프록시 출구 노드에 연결할 수 없어 위치를 확인하지 못했습니다.",
|
||||
"vlessUnsupported": {
|
||||
"security": "이 VLESS 서버는 REALITY를 사용하지 않습니다. Donut은 REALITY를 사용하는 VLESS만 지원합니다.",
|
||||
"flow": "이 VLESS 서버는 Donut이 요구하는 XTLS Vision 플로우를 사용하지 않습니다.",
|
||||
"transport": "Donut은 일반 TCP 기반 VLESS만 지원합니다. 이 서버는 다른 전송 방식(WebSocket, gRPC 등)을 사용합니다.",
|
||||
"encryption": "이 VLESS 서버는 Donut이 지원하지 않는 암호화 설정을 사용합니다.",
|
||||
"headerType": "이 VLESS 서버는 Donut이 지원하지 않는 헤더 난독화를 사용합니다.",
|
||||
"fingerprint": "이 VLESS URI는 Donut이 지원하지 않는 TLS 지문을 요청합니다.",
|
||||
"sni": "VLESS URI에 REALITY에 필요한 SNI(sni)가 없습니다.",
|
||||
"publicKey": "VLESS URI에 REALITY 공개 키(pbk)가 없습니다.",
|
||||
"scheme": "VLESS 링크가 아닙니다. vless:// 로 시작해야 합니다.",
|
||||
"parameter": "VLESS URI에 Donut이 지원하지 않는 옵션이 있습니다.",
|
||||
"malformed": "VLESS URI가 올바르지 않습니다."
|
||||
},
|
||||
"camoufoxRemoved": "Camoufox는 더 이상 지원되지 않습니다. Wayfern으로 이 프로필을 다시 만드세요.",
|
||||
"noE2ePasswordSet": "종단 간 암호화 비밀번호가 설정되지 않았습니다. 암호화된 데이터를 동기화하기 전에 설정하세요."
|
||||
},
|
||||
"rail": {
|
||||
"profiles": "프로필",
|
||||
@@ -2342,13 +2360,48 @@
|
||||
"confirmBulkButton_other": "프로필 {{count}}개로 계속",
|
||||
"sitesRequired": "사이트를 하나 이상 추가하세요.",
|
||||
"addSitesFirst": "사이트를 먼저 추가하세요",
|
||||
"presetsMissing": "깊이 프리셋을 사용할 수 없습니다"
|
||||
"presetsMissing": "깊이 프리셋을 사용할 수 없습니다",
|
||||
"sourceOwn": "내 목록",
|
||||
"sourceCurated": "큐레이션",
|
||||
"sourceSaved": "저장됨",
|
||||
"curatedEmpty": "지금은 사용할 수 있는 큐레이션 목록이 없습니다.",
|
||||
"curatedNote": "저희가 최신 상태로 관리하는 큐레이션 목록입니다. 프로필마다 서로 다른 표본을 뽑기 때문에 같은 조합을 방문하는 프로필은 없습니다. 그래서 목록 자체가 특징이 되지 않습니다. 주소는 서버에만 남습니다.",
|
||||
"savedEmpty": "아직 저장한 것이 없습니다. 내 목록에서 목록을 입력한 뒤 거기서 저장하세요.",
|
||||
"savedNote": "사이트는 일정을 저장할 때 복사됩니다. 나중에 목록을 수정해도 기존 일정은 그대로 유지됩니다.",
|
||||
"savedUnavailable": "저장된 목록을 불러오지 못했습니다.",
|
||||
"saveAsList": "목록으로 저장",
|
||||
"listNamePlaceholder": "목록 이름",
|
||||
"listSaved": "목록을 저장했습니다",
|
||||
"listRenamed": "목록 이름을 변경했습니다",
|
||||
"listDeleted": "목록을 삭제했습니다",
|
||||
"listRename": "이름 변경",
|
||||
"listDeleteConfirm": "삭제할까요?",
|
||||
"templateMissing": "그 저장된 목록은 더 이상 없습니다. 다른 목록을 선택하세요.",
|
||||
"templateNameTaken": "같은 이름의 목록이 이미 있습니다.",
|
||||
"templateNameInvalid": "목록 이름은 {{max}}자 이하로 지어 주세요.",
|
||||
"calendarLabel": "실행 시점",
|
||||
"daysLabel": "요일",
|
||||
"addSlot": "시간 추가",
|
||||
"slotsFull": "시작 시간은 최대 {{max}}개입니다.",
|
||||
"removeSlot": "이 시간 제거",
|
||||
"pickListFirst": "먼저 목록을 선택하세요",
|
||||
"finishCalendarFirst": "먼저 일정을 완성하세요",
|
||||
"duplicateSlot": "두 행의 요일과 시간이 같습니다",
|
||||
"listSites_one": "사이트 {{count}}개",
|
||||
"listSites_other": "사이트 {{count}}개",
|
||||
"summarySlots_one": "주 {{count}}회, 회당 최대 {{minutes}}분 실행합니다.",
|
||||
"summarySlots_other": "주 {{count}}회, 회당 최대 {{minutes}}분 실행합니다.",
|
||||
"templateNameInvalidNoMax": "저장된 목록에 그 이름은 사용할 수 없습니다."
|
||||
},
|
||||
"preset": {
|
||||
"light": "가볍게",
|
||||
"balanced": "표준",
|
||||
"deep": "깊게"
|
||||
},
|
||||
"template": {
|
||||
"lowIntentPurchaser": "구매 의향이 낮은 쇼핑객",
|
||||
"lowIntentPurchaserHint": "가격에 민감한 구매자로 프로필을 자리매김합니다. 비교·쿠폰·캐시백·중고 거래 사이트를 이용하고, 판매점에는 직접이 아니라 집계 사이트를 거쳐 도달합니다."
|
||||
},
|
||||
"preflight": {
|
||||
"ineligible_one": "프로필 {{count}}개는 원격으로 실행할 수 없습니다",
|
||||
"ineligible_other": "프로필 {{count}}개는 원격으로 실행할 수 없습니다",
|
||||
|
||||
@@ -92,7 +92,8 @@
|
||||
"window": {
|
||||
"minimize": "Minimizar",
|
||||
"maximize": "Maximizar",
|
||||
"restore": "Restaurar"
|
||||
"restore": "Restaurar",
|
||||
"close": "Fechar janela"
|
||||
},
|
||||
"commandPalette": {
|
||||
"title": "Paleta de comandos",
|
||||
@@ -468,7 +469,7 @@
|
||||
"ssCipherRequired": "Cifra e senha são obrigatórias para Shadowsocks",
|
||||
"selectType": "Selecione o tipo de proxy",
|
||||
"saveFailed": "Falha ao salvar o proxy: {{error}}",
|
||||
"vlessType": "VLESS · Vision · REALITY",
|
||||
"vlessType": "VLESS",
|
||||
"vlessUri": "URI VLESS",
|
||||
"vlessUriPlaceholder": "vless://…",
|
||||
"vlessUriHint": "Requer XTLS Vision e REALITY.",
|
||||
@@ -1873,6 +1874,7 @@
|
||||
"remoteNoCapacity": "Nenhuma máquina remota está livre agora. Tente novamente em alguns minutos.",
|
||||
"remoteNotEntitled": "Seu plano não inclui execução remota.",
|
||||
"remoteInteractiveNotEntitled": "Seu plano inclui horas remotas apenas para o Cookie Bot, não para sessões remotas interativas.",
|
||||
"remoteRequiresRemoteExitNode": "O proxy deste perfil só funciona neste computador (por exemplo 127.0.0.1 ou um endereço de rede local). As sessões remotas são executadas nos nossos servidores, por isso precisam de um proxy com endereço público.",
|
||||
"remoteSessionRefused": "A máquina remota recusou esta sessão.",
|
||||
"remoteSessionNotFound": "Essa sessão remota não existe mais.",
|
||||
"remoteSessionConflict": "Este perfil já está aberto em outro lugar.",
|
||||
@@ -1893,6 +1895,7 @@
|
||||
"cookieBotUnknownPlatform": "Este perfil não tem sistema operacional registrado, então não é possível associá-lo a uma máquina.",
|
||||
"cookieBotUnsupportedPlatform": "O Cookie Bot não pode executar perfis de {{platform}}. Somente perfis Windows e macOS são suportados.",
|
||||
"cookieBotRequiresExitNode": "Anexe primeiro um proxy ou VPN. Sem isso, a execução sairia de um endereço de data center, o que prejudica a identidade do perfil.",
|
||||
"cookieBotRequiresRemoteExitNode": "O proxy deste perfil só funciona neste computador (por exemplo 127.0.0.1 ou um endereço de rede local). O Cookie Bot é executado nos nossos servidores, por isso precisa de um proxy com endereço público.",
|
||||
"unknownCode": "Algo deu errado: {{code}}",
|
||||
"cookieBotTouchFingerprintUnsupported": "Este perfil declara um dispositivo de toque, que o bot não consegue controlar. Use uma impressão digital de computador.",
|
||||
"profileRunningRemotely": "Este perfil está em execução numa máquina remota. Pare primeiro a sessão remota.",
|
||||
@@ -1903,7 +1906,22 @@
|
||||
"fingerprintExitMismatch": "O nó de saída do proxy não corresponde à impressão digital deste perfil.",
|
||||
"launchConsentExpired": "Essa confirmação não é mais válida. Tente iniciar novamente.",
|
||||
"vpnWorkerStartFailed": "Não foi possível iniciar a conexão VPN: {{detail}}",
|
||||
"exitProbeFailed": "Não foi possível alcançar o nó de saída do proxy para verificar sua localização."
|
||||
"exitProbeFailed": "Não foi possível alcançar o nó de saída do proxy para verificar sua localização.",
|
||||
"vlessUnsupported": {
|
||||
"security": "Este servidor VLESS não usa REALITY. O Donut só oferece suporte a VLESS com REALITY.",
|
||||
"flow": "Este servidor VLESS não usa o fluxo XTLS Vision, exigido pelo Donut.",
|
||||
"transport": "O Donut só oferece suporte a VLESS sobre TCP simples — este servidor usa outro transporte (como WebSocket ou gRPC).",
|
||||
"encryption": "Este servidor VLESS usa uma criptografia sem suporte no Donut.",
|
||||
"headerType": "Este servidor VLESS usa uma ofuscação de cabeçalho sem suporte no Donut.",
|
||||
"fingerprint": "Esta URI VLESS solicita uma impressão digital TLS sem suporte no Donut.",
|
||||
"sni": "Falta na URI VLESS o SNI (sni) necessário para o REALITY.",
|
||||
"publicKey": "Falta na URI VLESS a chave pública do REALITY (pbk).",
|
||||
"scheme": "Isso não é um link VLESS. Ele precisa começar com vless://.",
|
||||
"parameter": "A URI VLESS contém uma opção sem suporte no Donut.",
|
||||
"malformed": "A URI VLESS é inválida."
|
||||
},
|
||||
"camoufoxRemoved": "O Camoufox não é mais compatível. Recrie este perfil com o Wayfern.",
|
||||
"noE2ePasswordSet": "Nenhuma senha de criptografia de ponta a ponta foi definida. Defina uma antes de sincronizar dados criptografados."
|
||||
},
|
||||
"rail": {
|
||||
"profiles": "Perfis",
|
||||
@@ -2367,13 +2385,50 @@
|
||||
"confirmBulkButton_many": "Continuar com {{count}} perfis",
|
||||
"sitesRequired": "Adicione pelo menos um site.",
|
||||
"addSitesFirst": "Adicione um site primeiro",
|
||||
"presetsMissing": "Predefinições de profundidade indisponíveis"
|
||||
"presetsMissing": "Predefinições de profundidade indisponíveis",
|
||||
"sourceOwn": "Minha própria lista",
|
||||
"sourceCurated": "Selecionadas",
|
||||
"sourceSaved": "Salvas",
|
||||
"curatedEmpty": "Nenhuma lista selecionada está disponível no momento.",
|
||||
"curatedNote": "Uma lista selecionada que mantemos atualizada. Cada perfil retira sua própria amostra dela, então não há dois perfis navegando pelo mesmo conjunto — é isso que impede a lista de virar uma assinatura. Os endereços ficam do nosso lado.",
|
||||
"savedEmpty": "Nada salvo ainda. Digite uma lista em Minha própria lista e salve por lá.",
|
||||
"savedNote": "Os sites são copiados para a programação quando você a salva, então editar uma lista depois não altera as programações existentes.",
|
||||
"savedUnavailable": "Não foi possível carregar suas listas salvas.",
|
||||
"saveAsList": "Salvar como lista",
|
||||
"listNamePlaceholder": "Dê um nome a esta lista",
|
||||
"listSaved": "Lista salva",
|
||||
"listRenamed": "Lista renomeada",
|
||||
"listDeleted": "Lista excluída",
|
||||
"listRename": "Renomear",
|
||||
"listDeleteConfirm": "Excluir?",
|
||||
"templateMissing": "Essa lista salva não existe mais. Escolha outra.",
|
||||
"templateNameTaken": "Você já tem uma lista com esse nome.",
|
||||
"templateNameInvalid": "Dê à lista um nome de até {{max}} caracteres.",
|
||||
"calendarLabel": "Quando executa",
|
||||
"daysLabel": "Dias da semana",
|
||||
"addSlot": "Adicionar um horário",
|
||||
"slotsFull": "No máximo {{max}} horários de início.",
|
||||
"removeSlot": "Remover este horário",
|
||||
"pickListFirst": "Escolha uma lista primeiro",
|
||||
"finishCalendarFirst": "Termine a programação primeiro",
|
||||
"duplicateSlot": "Duas linhas têm os mesmos dias e o mesmo horário",
|
||||
"listSites_one": "{{count}} site",
|
||||
"listSites_other": "{{count}} sites",
|
||||
"listSites_many": "{{count}} sites",
|
||||
"summarySlots_one": "Executa {{count}} vez por semana, até {{minutes}} min por vez.",
|
||||
"summarySlots_other": "Executa {{count}} vezes por semana, até {{minutes}} min por vez.",
|
||||
"summarySlots_many": "Executa {{count}} vezes por semana, até {{minutes}} min por vez.",
|
||||
"templateNameInvalidNoMax": "Esse nome não pode ser usado para uma lista salva."
|
||||
},
|
||||
"preset": {
|
||||
"light": "Leve",
|
||||
"balanced": "Padrão",
|
||||
"deep": "Profunda"
|
||||
},
|
||||
"template": {
|
||||
"lowIntentPurchaser": "Comprador de baixa intenção",
|
||||
"lowIntentPurchaserHint": "Posiciona o perfil como um comprador sensível a preço: sites de comparação, cupons, cashback e revenda, chegando às lojas por agregadores em vez de diretamente."
|
||||
},
|
||||
"preflight": {
|
||||
"ineligible_one": "{{count}} perfil não pode ser executado remotamente",
|
||||
"ineligible_other": "{{count}} perfis não podem ser executados remotamente",
|
||||
|
||||
@@ -92,7 +92,8 @@
|
||||
"window": {
|
||||
"minimize": "Свернуть",
|
||||
"maximize": "Развернуть",
|
||||
"restore": "Восстановить"
|
||||
"restore": "Восстановить",
|
||||
"close": "Закрыть окно"
|
||||
},
|
||||
"commandPalette": {
|
||||
"title": "Палитра команд",
|
||||
@@ -469,7 +470,7 @@
|
||||
"ssCipherRequired": "Для Shadowsocks требуется шифр и пароль",
|
||||
"selectType": "Выберите тип прокси",
|
||||
"saveFailed": "Не удалось сохранить прокси: {{error}}",
|
||||
"vlessType": "VLESS · Vision · REALITY",
|
||||
"vlessType": "VLESS",
|
||||
"vlessUri": "URI VLESS",
|
||||
"vlessUriPlaceholder": "vless://…",
|
||||
"vlessUriHint": "Требуются XTLS Vision и REALITY.",
|
||||
@@ -1880,6 +1881,7 @@
|
||||
"remoteNoCapacity": "Сейчас нет свободных удалённых машин. Попробуйте через несколько минут.",
|
||||
"remoteNotEntitled": "Ваш тариф не включает удалённый запуск.",
|
||||
"remoteInteractiveNotEntitled": "В вашем тарифе удалённые часы доступны только для Cookie Bot, но не для интерактивных удалённых сессий.",
|
||||
"remoteRequiresRemoteExitNode": "Прокси этого профиля работает только на этом компьютере (например, 127.0.0.1 или адрес локальной сети). Удалённые сессии выполняются на наших хостах, поэтому нужен прокси с публичным адресом.",
|
||||
"remoteSessionRefused": "Удалённая машина отклонила эту сессию.",
|
||||
"remoteSessionNotFound": "Этой удалённой сессии больше не существует.",
|
||||
"remoteSessionConflict": "Этот профиль уже открыт в другом месте.",
|
||||
@@ -1900,6 +1902,7 @@
|
||||
"cookieBotUnknownPlatform": "Для этого профиля не записана операционная система, поэтому подобрать машину невозможно.",
|
||||
"cookieBotUnsupportedPlatform": "Cookie Bot не может запускать профили {{platform}}. Поддерживаются только профили Windows и macOS.",
|
||||
"cookieBotRequiresExitNode": "Сначала назначьте прокси или VPN. Без них трафик пойдёт с адреса дата-центра, а это вредит репутации профиля.",
|
||||
"cookieBotRequiresRemoteExitNode": "Прокси этого профиля работает только на этом компьютере (например, 127.0.0.1 или адрес локальной сети). Cookie Bot выполняется на наших хостах, поэтому нужен прокси с публичным адресом.",
|
||||
"unknownCode": "Что-то пошло не так: {{code}}",
|
||||
"cookieBotTouchFingerprintUnsupported": "Этот профиль выдаёт себя за сенсорное устройство, которым бот управлять не может. Используйте настольный отпечаток.",
|
||||
"profileRunningRemotely": "Этот профиль запущен на удалённой машине. Сначала остановите удалённый сеанс.",
|
||||
@@ -1910,7 +1913,22 @@
|
||||
"fingerprintExitMismatch": "Выходной узел прокси не совпадает с отпечатком этого профиля.",
|
||||
"launchConsentExpired": "Это подтверждение больше не действует. Запустите профиль ещё раз.",
|
||||
"vpnWorkerStartFailed": "Не удалось запустить VPN-подключение: {{detail}}",
|
||||
"exitProbeFailed": "Не удалось связаться с выходным узлом прокси, чтобы определить его местоположение."
|
||||
"exitProbeFailed": "Не удалось связаться с выходным узлом прокси, чтобы определить его местоположение.",
|
||||
"vlessUnsupported": {
|
||||
"security": "Этот сервер VLESS не использует REALITY. Donut поддерживает только VLESS с REALITY.",
|
||||
"flow": "Этот сервер VLESS не использует поток XTLS Vision, который требуется Donut.",
|
||||
"transport": "Donut поддерживает VLESS только поверх обычного TCP — этот сервер использует другой транспорт (например, WebSocket или gRPC).",
|
||||
"encryption": "Этот сервер VLESS использует шифрование, которое Donut не поддерживает.",
|
||||
"headerType": "Этот сервер VLESS использует обфускацию заголовков, которую Donut не поддерживает.",
|
||||
"fingerprint": "Этот VLESS URI запрашивает отпечаток TLS, который Donut не поддерживает.",
|
||||
"sni": "В VLESS URI отсутствует SNI (sni), необходимый для REALITY.",
|
||||
"publicKey": "В VLESS URI отсутствует открытый ключ REALITY (pbk).",
|
||||
"scheme": "Это не ссылка VLESS. Она должна начинаться с vless://.",
|
||||
"parameter": "VLESS URI содержит параметр, который Donut не поддерживает.",
|
||||
"malformed": "VLESS URI недействителен."
|
||||
},
|
||||
"camoufoxRemoved": "Camoufox больше не поддерживается. Создайте этот профиль заново с Wayfern.",
|
||||
"noE2ePasswordSet": "Пароль сквозного шифрования не задан. Задайте его перед синхронизацией зашифрованных данных."
|
||||
},
|
||||
"rail": {
|
||||
"profiles": "Профили",
|
||||
@@ -2392,13 +2410,52 @@
|
||||
"confirmBulkButton_many": "Продолжить с {{count}} профилями",
|
||||
"sitesRequired": "Добавьте хотя бы один сайт.",
|
||||
"addSitesFirst": "Сначала добавьте сайт",
|
||||
"presetsMissing": "Пресеты глубины недоступны"
|
||||
"presetsMissing": "Пресеты глубины недоступны",
|
||||
"sourceOwn": "Свой список",
|
||||
"sourceCurated": "Подборки",
|
||||
"sourceSaved": "Сохранённые",
|
||||
"curatedEmpty": "Сейчас нет доступных подборок.",
|
||||
"curatedNote": "Подборка, которую мы поддерживаем в актуальном состоянии. Каждый профиль берёт из неё свою выборку, поэтому два профиля не обходят один и тот же набор — именно это не даёт списку стать приметой. Адреса остаются на нашей стороне.",
|
||||
"savedEmpty": "Пока ничего не сохранено. Введите список в разделе «Свой список» и сохраните его оттуда.",
|
||||
"savedNote": "Сайты копируются в расписание при сохранении, поэтому правка списка позже не меняет уже созданные расписания.",
|
||||
"savedUnavailable": "Не удалось загрузить сохранённые списки.",
|
||||
"saveAsList": "Сохранить как список",
|
||||
"listNamePlaceholder": "Название списка",
|
||||
"listSaved": "Список сохранён",
|
||||
"listRenamed": "Список переименован",
|
||||
"listDeleted": "Список удалён",
|
||||
"listRename": "Переименовать",
|
||||
"listDeleteConfirm": "Удалить?",
|
||||
"templateMissing": "Этого сохранённого списка больше нет. Выберите другой.",
|
||||
"templateNameTaken": "Список с таким названием уже есть.",
|
||||
"templateNameInvalid": "Название списка — не длиннее {{max}} символов.",
|
||||
"calendarLabel": "Когда запускать",
|
||||
"daysLabel": "Дни недели",
|
||||
"addSlot": "Добавить время",
|
||||
"slotsFull": "Не больше {{max}} времён запуска.",
|
||||
"removeSlot": "Убрать это время",
|
||||
"pickListFirst": "Сначала выберите список",
|
||||
"finishCalendarFirst": "Сначала заполните расписание",
|
||||
"duplicateSlot": "Две строки повторяют одни и те же дни и время",
|
||||
"listSites_one": "{{count}} сайт",
|
||||
"listSites_few": "{{count}} сайта",
|
||||
"listSites_other": "{{count}} сайтов",
|
||||
"listSites_many": "{{count}} сайтов",
|
||||
"summarySlots_one": "Запускается {{count}} раз в неделю, не дольше {{minutes}} мин за раз.",
|
||||
"summarySlots_few": "Запускается {{count}} раза в неделю, не дольше {{minutes}} мин за раз.",
|
||||
"summarySlots_other": "Запускается {{count}} раз в неделю, не дольше {{minutes}} мин за раз.",
|
||||
"summarySlots_many": "Запускается {{count}} раз в неделю, не дольше {{minutes}} мин за раз.",
|
||||
"templateNameInvalidNoMax": "Это имя нельзя использовать для сохранённого списка."
|
||||
},
|
||||
"preset": {
|
||||
"light": "Лёгкая",
|
||||
"balanced": "Стандартная",
|
||||
"deep": "Глубокая"
|
||||
},
|
||||
"template": {
|
||||
"lowIntentPurchaser": "Покупатель с низким намерением",
|
||||
"lowIntentPurchaserHint": "Позиционирует профиль как чувствительного к цене покупателя: сравнение цен, купоны, кэшбэк и перепродажа, а к магазинам — через агрегаторы, а не напрямую."
|
||||
},
|
||||
"preflight": {
|
||||
"ineligible_one": "{{count}} профиль нельзя запустить удалённо",
|
||||
"ineligible_few": "{{count}} профиля нельзя запустить удалённо",
|
||||
|
||||
@@ -92,7 +92,8 @@
|
||||
"window": {
|
||||
"minimize": "Küçült",
|
||||
"maximize": "Büyüt",
|
||||
"restore": "Geri Yükle"
|
||||
"restore": "Geri Yükle",
|
||||
"close": "Pencereyi kapat"
|
||||
},
|
||||
"commandPalette": {
|
||||
"title": "Komut Paleti",
|
||||
@@ -467,7 +468,7 @@
|
||||
"ssCipherRequired": "Shadowsocks için şifreleme algoritması ve parola zorunludur",
|
||||
"selectType": "Proxy türünü seçin",
|
||||
"saveFailed": "Proxy kaydedilemedi: {{error}}",
|
||||
"vlessType": "VLESS · Vision · REALITY",
|
||||
"vlessType": "VLESS",
|
||||
"vlessUri": "VLESS URI'si",
|
||||
"vlessUriPlaceholder": "vless://…",
|
||||
"vlessUriHint": "XTLS Vision ve REALITY gerektirir.",
|
||||
@@ -1866,6 +1867,7 @@
|
||||
"remoteNoCapacity": "Şu anda boş uzak makine yok. Birkaç dakika sonra tekrar deneyin.",
|
||||
"remoteNotEntitled": "Planınız uzaktan çalıştırmayı içermiyor.",
|
||||
"remoteInteractiveNotEntitled": "Planınızdaki uzak saatler yalnızca Cookie Bot için geçerlidir, elle kullanılan uzak oturumlar için değil.",
|
||||
"remoteRequiresRemoteExitNode": "Bu profilin proxy'si yalnızca bu bilgisayarda çalışır (örneğin 127.0.0.1 veya yerel ağ adresi). Uzak oturumlar bizim sunucularımızda çalıştığı için genel bir adrese sahip bir proxy gerekir.",
|
||||
"remoteSessionRefused": "Uzak makine bu oturumu reddetti.",
|
||||
"remoteSessionNotFound": "Bu uzak oturum artık mevcut değil.",
|
||||
"remoteSessionConflict": "Bu profil başka bir yerde zaten açık.",
|
||||
@@ -1886,6 +1888,7 @@
|
||||
"cookieBotUnknownPlatform": "Bu profilde kayıtlı bir işletim sistemi yok, bu yüzden bir makineyle eşleştirilemiyor.",
|
||||
"cookieBotUnsupportedPlatform": "Cookie Bot, {{platform}} profillerini çalıştıramaz. Yalnızca Windows ve macOS profilleri desteklenir.",
|
||||
"cookieBotRequiresExitNode": "Önce bir proxy veya VPN ekleyin. Aksi hâlde çalışma bir veri merkezi adresinden çıkar ve bu, profilin kimliğine zarar verir.",
|
||||
"cookieBotRequiresRemoteExitNode": "Bu profilin proxy'si yalnızca bu bilgisayarda çalışır (örneğin 127.0.0.1 veya yerel ağ adresi). Cookie Bot bizim sunucularımızda çalıştığı için genel bir adrese sahip bir proxy gerekir.",
|
||||
"unknownCode": "Bir sorun oluştu: {{code}}",
|
||||
"cookieBotTouchFingerprintUnsupported": "Bu profil dokunmatik bir cihaz olduğunu bildiriyor ve bot bunu süremez. Masaüstü parmak izi kullanın.",
|
||||
"profileRunningRemotely": "Bu profil uzak bir makinede çalışıyor. Önce uzak oturumu durdurun.",
|
||||
@@ -1896,7 +1899,22 @@
|
||||
"fingerprintExitMismatch": "Proxy çıkış düğümü bu profilin parmak iziyle eşleşmiyor.",
|
||||
"launchConsentExpired": "Bu onay artık geçerli değil. Yeniden başlatmayı deneyin.",
|
||||
"vpnWorkerStartFailed": "VPN bağlantısı başlatılamadı: {{detail}}",
|
||||
"exitProbeFailed": "Konumunu denetlemek için proxy çıkış düğümüne ulaşılamadı."
|
||||
"exitProbeFailed": "Konumunu denetlemek için proxy çıkış düğümüne ulaşılamadı.",
|
||||
"vlessUnsupported": {
|
||||
"security": "Bu VLESS sunucusu REALITY kullanmıyor. Donut yalnızca REALITY ile VLESS'i destekler.",
|
||||
"flow": "Bu VLESS sunucusu, Donut'ın gerektirdiği XTLS Vision akışını kullanmıyor.",
|
||||
"transport": "Donut yalnızca düz TCP üzerinden VLESS'i destekler — bu sunucu farklı bir taşıma (WebSocket veya gRPC gibi) kullanıyor.",
|
||||
"encryption": "Bu VLESS sunucusu, Donut'ın desteklemediği bir şifreleme kullanıyor.",
|
||||
"headerType": "Bu VLESS sunucusu, Donut'ın desteklemediği bir başlık gizlemesi kullanıyor.",
|
||||
"fingerprint": "Bu VLESS URI'si, Donut'ın desteklemediği bir TLS parmak izi istiyor.",
|
||||
"sni": "VLESS URI'sinde REALITY için gereken SNI (sni) eksik.",
|
||||
"publicKey": "VLESS URI'sinde REALITY genel anahtarı (pbk) eksik.",
|
||||
"scheme": "Bu bir VLESS bağlantısı değil. vless:// ile başlamalı.",
|
||||
"parameter": "VLESS URI'si, Donut'ın desteklemediği bir seçenek içeriyor.",
|
||||
"malformed": "VLESS URI'si geçersiz."
|
||||
},
|
||||
"camoufoxRemoved": "Camoufox artık desteklenmiyor. Bu profili Wayfern ile yeniden oluşturun.",
|
||||
"noE2ePasswordSet": "Uçtan uca şifreleme parolası ayarlanmamış. Şifreli veriyi eşitlemeden önce bir parola belirleyin."
|
||||
},
|
||||
"rail": {
|
||||
"profiles": "Profiller",
|
||||
@@ -2342,13 +2360,48 @@
|
||||
"confirmBulkButton_other": "{{count}} profille devam et",
|
||||
"sitesRequired": "En az bir site ekleyin.",
|
||||
"addSitesFirst": "Önce bir site ekleyin",
|
||||
"presetsMissing": "Derinlik ön ayarları kullanılamıyor"
|
||||
"presetsMissing": "Derinlik ön ayarları kullanılamıyor",
|
||||
"sourceOwn": "Kendi listem",
|
||||
"sourceCurated": "Seçilmiş",
|
||||
"sourceSaved": "Kayıtlı",
|
||||
"curatedEmpty": "Şu anda kullanılabilir seçilmiş liste yok.",
|
||||
"curatedNote": "Güncel tuttuğumuz seçilmiş bir liste. Her profil kendi örneklemini alır, bu yüzden iki profil aynı kümeyi gezmez — listenin kendisinin bir imzaya dönüşmesini engelleyen şey budur. Adresler bizim tarafımızda kalır.",
|
||||
"savedEmpty": "Henüz kaydedilmiş bir şey yok. Kendi listem sekmesinde bir liste yazıp oradan kaydedin.",
|
||||
"savedNote": "Siteler programı kaydettiğinizde programa kopyalanır; listeyi sonradan düzenlemeniz mevcut programları etkilemez.",
|
||||
"savedUnavailable": "Kayıtlı listeleriniz yüklenemedi.",
|
||||
"saveAsList": "Liste olarak kaydet",
|
||||
"listNamePlaceholder": "Bu listeye bir ad verin",
|
||||
"listSaved": "Liste kaydedildi",
|
||||
"listRenamed": "Liste yeniden adlandırıldı",
|
||||
"listDeleted": "Liste silindi",
|
||||
"listRename": "Yeniden adlandır",
|
||||
"listDeleteConfirm": "Silinsin mi?",
|
||||
"templateMissing": "O kayıtlı liste artık yok. Başka birini seçin.",
|
||||
"templateNameTaken": "Bu ada sahip bir listeniz zaten var.",
|
||||
"templateNameInvalid": "Listeye en fazla {{max}} karakterlik bir ad verin.",
|
||||
"calendarLabel": "Ne zaman çalışır",
|
||||
"daysLabel": "Haftanın günleri",
|
||||
"addSlot": "Saat ekle",
|
||||
"slotsFull": "En fazla {{max}} başlangıç saati.",
|
||||
"removeSlot": "Bu saati kaldır",
|
||||
"pickListFirst": "Önce bir liste seçin",
|
||||
"finishCalendarFirst": "Önce programı tamamlayın",
|
||||
"duplicateSlot": "İki satırın günleri ve saati aynı",
|
||||
"listSites_one": "{{count}} site",
|
||||
"listSites_other": "{{count}} site",
|
||||
"summarySlots_one": "Haftada {{count}} kez, her seferinde en fazla {{minutes}} dk çalışır.",
|
||||
"summarySlots_other": "Haftada {{count}} kez, her seferinde en fazla {{minutes}} dk çalışır.",
|
||||
"templateNameInvalidNoMax": "Bu ad kayıtlı bir liste için kullanılamaz."
|
||||
},
|
||||
"preset": {
|
||||
"light": "Hafif",
|
||||
"balanced": "Standart",
|
||||
"deep": "Derin"
|
||||
},
|
||||
"template": {
|
||||
"lowIntentPurchaser": "Düşük niyetli alıcı",
|
||||
"lowIntentPurchaserHint": "Profili fiyata duyarlı bir alıcı olarak konumlar: karşılaştırma, kupon, nakit iade ve ikinci el siteleri; mağazalara doğrudan değil toplayıcılar üzerinden ulaşır."
|
||||
},
|
||||
"preflight": {
|
||||
"ineligible_one": "{{count}} profil uzaktan çalıştırılamıyor",
|
||||
"ineligible_other": "{{count}} profil uzaktan çalıştırılamıyor",
|
||||
|
||||
@@ -92,7 +92,8 @@
|
||||
"window": {
|
||||
"minimize": "Thu nhỏ",
|
||||
"maximize": "Phóng to",
|
||||
"restore": "Khôi phục"
|
||||
"restore": "Khôi phục",
|
||||
"close": "Đóng cửa sổ"
|
||||
},
|
||||
"commandPalette": {
|
||||
"title": "Bảng lệnh",
|
||||
@@ -467,7 +468,7 @@
|
||||
"ssCipherRequired": "Cipher và mật khẩu là bắt buộc cho Shadowsocks",
|
||||
"selectType": "Chọn loại proxy",
|
||||
"saveFailed": "Lưu proxy thất bại: {{error}}",
|
||||
"vlessType": "VLESS · Vision · REALITY",
|
||||
"vlessType": "VLESS",
|
||||
"vlessUri": "URI VLESS",
|
||||
"vlessUriPlaceholder": "vless://…",
|
||||
"vlessUriHint": "Yêu cầu XTLS Vision và REALITY.",
|
||||
@@ -1866,6 +1867,7 @@
|
||||
"remoteNoCapacity": "Hiện không có máy từ xa nào rảnh. Hãy thử lại sau vài phút.",
|
||||
"remoteNotEntitled": "Gói của bạn không bao gồm chạy từ xa.",
|
||||
"remoteInteractiveNotEntitled": "Gói của bạn chỉ bao gồm giờ từ xa cho Cookie Bot, không dùng cho phiên từ xa thao tác trực tiếp.",
|
||||
"remoteRequiresRemoteExitNode": "Proxy của hồ sơ này chỉ hoạt động trên máy tính này (ví dụ 127.0.0.1 hoặc địa chỉ mạng nội bộ). Phiên từ xa chạy trên máy chủ của chúng tôi nên cần proxy có địa chỉ công khai.",
|
||||
"remoteSessionRefused": "Máy từ xa đã từ chối phiên này.",
|
||||
"remoteSessionNotFound": "Phiên từ xa đó không còn tồn tại.",
|
||||
"remoteSessionConflict": "Hồ sơ này đang được mở ở nơi khác.",
|
||||
@@ -1886,6 +1888,7 @@
|
||||
"cookieBotUnknownPlatform": "Hồ sơ này chưa ghi nhận hệ điều hành nên không thể ghép với máy nào.",
|
||||
"cookieBotUnsupportedPlatform": "Cookie Bot không chạy được hồ sơ {{platform}}. Chỉ hỗ trợ hồ sơ Windows và macOS.",
|
||||
"cookieBotRequiresExitNode": "Hãy gán proxy hoặc VPN trước. Nếu không, lần chạy sẽ đi ra từ địa chỉ trung tâm dữ liệu, gây hại cho danh tính hồ sơ.",
|
||||
"cookieBotRequiresRemoteExitNode": "Proxy của hồ sơ này chỉ hoạt động trên máy tính này (ví dụ 127.0.0.1 hoặc địa chỉ mạng nội bộ). Cookie Bot chạy trên máy chủ của chúng tôi nên cần proxy có địa chỉ công khai.",
|
||||
"unknownCode": "Đã xảy ra lỗi: {{code}}",
|
||||
"cookieBotTouchFingerprintUnsupported": "Hồ sơ này khai báo là thiết bị cảm ứng, bot không điều khiển được. Hãy dùng vân tay máy tính để bàn.",
|
||||
"profileRunningRemotely": "Hồ sơ này đang chạy trên máy từ xa. Hãy dừng phiên từ xa trước.",
|
||||
@@ -1896,7 +1899,22 @@
|
||||
"fingerprintExitMismatch": "Nút thoát của proxy không khớp với dấu vân tay của hồ sơ này.",
|
||||
"launchConsentExpired": "Xác nhận đó không còn hiệu lực. Hãy thử khởi chạy lại.",
|
||||
"vpnWorkerStartFailed": "Không thể khởi động kết nối VPN: {{detail}}",
|
||||
"exitProbeFailed": "Không thể kết nối tới nút thoát của proxy để kiểm tra vị trí."
|
||||
"exitProbeFailed": "Không thể kết nối tới nút thoát của proxy để kiểm tra vị trí.",
|
||||
"vlessUnsupported": {
|
||||
"security": "Máy chủ VLESS này không dùng REALITY. Donut chỉ hỗ trợ VLESS kèm REALITY.",
|
||||
"flow": "Máy chủ VLESS này không dùng luồng XTLS Vision mà Donut yêu cầu.",
|
||||
"transport": "Donut chỉ hỗ trợ VLESS trên TCP thuần — máy chủ này dùng phương thức truyền khác (như WebSocket hoặc gRPC).",
|
||||
"encryption": "Máy chủ VLESS này dùng thiết lập mã hóa mà Donut không hỗ trợ.",
|
||||
"headerType": "Máy chủ VLESS này dùng cách che giấu tiêu đề mà Donut không hỗ trợ.",
|
||||
"fingerprint": "URI VLESS này yêu cầu một dấu vân tay TLS mà Donut không hỗ trợ.",
|
||||
"sni": "URI VLESS thiếu SNI (sni) cần cho REALITY.",
|
||||
"publicKey": "URI VLESS thiếu khóa công khai REALITY (pbk).",
|
||||
"scheme": "Đây không phải liên kết VLESS. Nó phải bắt đầu bằng vless://.",
|
||||
"parameter": "URI VLESS chứa một tùy chọn mà Donut không hỗ trợ.",
|
||||
"malformed": "URI VLESS không hợp lệ."
|
||||
},
|
||||
"camoufoxRemoved": "Camoufox không còn được hỗ trợ. Hãy tạo lại hồ sơ này bằng Wayfern.",
|
||||
"noE2ePasswordSet": "Chưa đặt mật khẩu mã hóa đầu cuối. Hãy đặt trước khi đồng bộ dữ liệu đã mã hóa."
|
||||
},
|
||||
"rail": {
|
||||
"profiles": "Profile",
|
||||
@@ -2342,13 +2360,48 @@
|
||||
"confirmBulkButton_other": "Tiếp tục với {{count}} hồ sơ",
|
||||
"sitesRequired": "Hãy thêm ít nhất một trang.",
|
||||
"addSitesFirst": "Hãy thêm một trang trước",
|
||||
"presetsMissing": "Không có cài đặt sẵn về độ sâu"
|
||||
"presetsMissing": "Không có cài đặt sẵn về độ sâu",
|
||||
"sourceOwn": "Danh sách của tôi",
|
||||
"sourceCurated": "Tuyển chọn",
|
||||
"sourceSaved": "Đã lưu",
|
||||
"curatedEmpty": "Hiện không có danh sách tuyển chọn nào.",
|
||||
"curatedNote": "Danh sách tuyển chọn do chúng tôi cập nhật. Mỗi hồ sơ lấy một mẫu riêng từ đó, nên không hồ sơ nào duyệt cùng một tập trang — chính điều này khiến danh sách không trở thành dấu hiệu nhận dạng. Các địa chỉ vẫn nằm ở phía chúng tôi.",
|
||||
"savedEmpty": "Chưa lưu gì cả. Hãy nhập danh sách ở mục Danh sách của tôi rồi lưu từ đó.",
|
||||
"savedNote": "Các trang được sao chép vào lịch khi bạn lưu, nên sửa danh sách sau này không ảnh hưởng tới các lịch đã có.",
|
||||
"savedUnavailable": "Không tải được các danh sách đã lưu của bạn.",
|
||||
"saveAsList": "Lưu thành danh sách",
|
||||
"listNamePlaceholder": "Đặt tên cho danh sách",
|
||||
"listSaved": "Đã lưu danh sách",
|
||||
"listRenamed": "Đã đổi tên danh sách",
|
||||
"listDeleted": "Đã xóa danh sách",
|
||||
"listRename": "Đổi tên",
|
||||
"listDeleteConfirm": "Xóa?",
|
||||
"templateMissing": "Danh sách đã lưu đó không còn nữa. Hãy chọn danh sách khác.",
|
||||
"templateNameTaken": "Bạn đã có một danh sách trùng tên.",
|
||||
"templateNameInvalid": "Đặt tên danh sách tối đa {{max}} ký tự.",
|
||||
"calendarLabel": "Thời điểm chạy",
|
||||
"daysLabel": "Các ngày trong tuần",
|
||||
"addSlot": "Thêm một giờ",
|
||||
"slotsFull": "Tối đa {{max}} giờ bắt đầu.",
|
||||
"removeSlot": "Bỏ giờ này",
|
||||
"pickListFirst": "Chọn một danh sách trước",
|
||||
"finishCalendarFirst": "Hoàn tất lịch trước",
|
||||
"duplicateSlot": "Hai hàng có cùng ngày và giờ",
|
||||
"listSites_one": "{{count}} trang",
|
||||
"listSites_other": "{{count}} trang",
|
||||
"summarySlots_one": "Chạy {{count}} lần mỗi tuần, tối đa {{minutes}} phút mỗi lần.",
|
||||
"summarySlots_other": "Chạy {{count}} lần mỗi tuần, tối đa {{minutes}} phút mỗi lần.",
|
||||
"templateNameInvalidNoMax": "Không thể dùng tên đó cho danh sách đã lưu."
|
||||
},
|
||||
"preset": {
|
||||
"light": "Nhẹ",
|
||||
"balanced": "Tiêu chuẩn",
|
||||
"deep": "Sâu"
|
||||
},
|
||||
"template": {
|
||||
"lowIntentPurchaser": "Người mua ít ý định",
|
||||
"lowIntentPurchaserHint": "Định vị hồ sơ như một người mua nhạy cảm về giá: các trang so sánh, mã giảm giá, hoàn tiền và mua bán lại, đến với người bán qua trang tổng hợp thay vì trực tiếp."
|
||||
},
|
||||
"preflight": {
|
||||
"ineligible_one": "{{count}} hồ sơ không chạy từ xa được",
|
||||
"ineligible_other": "{{count}} hồ sơ không chạy từ xa được",
|
||||
|
||||
@@ -92,7 +92,8 @@
|
||||
"window": {
|
||||
"minimize": "最小化",
|
||||
"maximize": "最大化",
|
||||
"restore": "还原"
|
||||
"restore": "还原",
|
||||
"close": "关闭窗口"
|
||||
},
|
||||
"commandPalette": {
|
||||
"title": "命令面板",
|
||||
@@ -467,7 +468,7 @@
|
||||
"ssCipherRequired": "Shadowsocks 需要密码学和密码",
|
||||
"selectType": "选择代理类型",
|
||||
"saveFailed": "保存代理失败: {{error}}",
|
||||
"vlessType": "VLESS · Vision · REALITY",
|
||||
"vlessType": "VLESS",
|
||||
"vlessUri": "VLESS URI",
|
||||
"vlessUriPlaceholder": "vless://…",
|
||||
"vlessUriHint": "需要 XTLS Vision 和 REALITY。",
|
||||
@@ -1866,6 +1867,7 @@
|
||||
"remoteNoCapacity": "当前没有空闲的远程机器。请几分钟后再试。",
|
||||
"remoteNotEntitled": "你的套餐不包含远程运行。",
|
||||
"remoteInteractiveNotEntitled": "您的套餐中的远程时长仅供 Cookie Bot 使用,不能用于手动远程会话。",
|
||||
"remoteRequiresRemoteExitNode": "此配置文件的代理仅在本机可用(例如 127.0.0.1 或局域网地址)。远程会话在我们的主机上运行,因此需要具有公网地址的代理。",
|
||||
"remoteSessionRefused": "远程机器拒绝了此会话。",
|
||||
"remoteSessionNotFound": "该远程会话已不存在。",
|
||||
"remoteSessionConflict": "此配置文件已在别处打开。",
|
||||
@@ -1886,6 +1888,7 @@
|
||||
"cookieBotUnknownPlatform": "此配置文件没有记录操作系统,无法匹配到机器。",
|
||||
"cookieBotUnsupportedPlatform": "Cookie Bot 无法运行 {{platform}} 配置文件。仅支持 Windows 和 macOS 配置文件。",
|
||||
"cookieBotRequiresExitNode": "请先绑定代理或 VPN。否则运行会从数据中心地址发出,损害配置文件的身份。",
|
||||
"cookieBotRequiresRemoteExitNode": "此配置文件的代理仅在本机可用(例如 127.0.0.1 或局域网地址)。Cookie Bot 在我们的主机上运行,因此需要具有公网地址的代理。",
|
||||
"unknownCode": "出现问题: {{code}}",
|
||||
"cookieBotTouchFingerprintUnsupported": "该配置文件声称是触摸设备,机器人无法操作。请使用桌面端指纹。",
|
||||
"profileRunningRemotely": "该配置文件正在远程计算机上运行。请先停止远程会话。",
|
||||
@@ -1896,7 +1899,22 @@
|
||||
"fingerprintExitMismatch": "代理出口节点与此配置文件的指纹不匹配。",
|
||||
"launchConsentExpired": "该确认已失效。请重新启动。",
|
||||
"vpnWorkerStartFailed": "无法启动 VPN 连接:{{detail}}",
|
||||
"exitProbeFailed": "无法连接代理出口节点以检查其位置。"
|
||||
"exitProbeFailed": "无法连接代理出口节点以检查其位置。",
|
||||
"vlessUnsupported": {
|
||||
"security": "此 VLESS 服务器未使用 REALITY。Donut 仅支持搭配 REALITY 的 VLESS。",
|
||||
"flow": "此 VLESS 服务器未使用 Donut 所需的 XTLS Vision 流控。",
|
||||
"transport": "Donut 仅支持基于普通 TCP 的 VLESS —— 此服务器使用了其他传输方式(如 WebSocket 或 gRPC)。",
|
||||
"encryption": "此 VLESS 服务器使用了 Donut 不支持的加密设置。",
|
||||
"headerType": "此 VLESS 服务器使用了 Donut 不支持的头部混淆。",
|
||||
"fingerprint": "此 VLESS URI 请求了 Donut 不支持的 TLS 指纹。",
|
||||
"sni": "VLESS URI 缺少 REALITY 所需的 SNI(sni)。",
|
||||
"publicKey": "VLESS URI 缺少 REALITY 公钥(pbk)。",
|
||||
"scheme": "这不是 VLESS 链接,必须以 vless:// 开头。",
|
||||
"parameter": "VLESS URI 含有 Donut 不支持的选项。",
|
||||
"malformed": "VLESS URI 无效。"
|
||||
},
|
||||
"camoufoxRemoved": "Camoufox 已不再受支持。请使用 Wayfern 重新创建此配置文件。",
|
||||
"noE2ePasswordSet": "尚未设置端到端加密密码。请先设置后再同步加密数据。"
|
||||
},
|
||||
"rail": {
|
||||
"profiles": "配置文件",
|
||||
@@ -2342,13 +2360,48 @@
|
||||
"confirmBulkButton_other": "继续({{count}} 个配置文件)",
|
||||
"sitesRequired": "请至少添加一个网站。",
|
||||
"addSitesFirst": "请先添加网站",
|
||||
"presetsMissing": "深度预设不可用"
|
||||
"presetsMissing": "深度预设不可用",
|
||||
"sourceOwn": "我的列表",
|
||||
"sourceCurated": "精选",
|
||||
"sourceSaved": "已保存",
|
||||
"curatedEmpty": "目前没有可用的精选列表。",
|
||||
"curatedNote": "由我们持续维护的精选列表。每个配置文件都会从中抽取各自的样本,因此不会有两个配置文件浏览同一组网站——这正是让列表本身不会变成特征的原因。地址只保留在我们这边。",
|
||||
"savedEmpty": "还没有保存任何内容。请在“我的列表”中输入列表,然后从那里保存。",
|
||||
"savedNote": "保存计划时会把网站复制到计划中,因此以后编辑列表不会影响已有的计划。",
|
||||
"savedUnavailable": "无法加载你保存的列表。",
|
||||
"saveAsList": "保存为列表",
|
||||
"listNamePlaceholder": "为该列表命名",
|
||||
"listSaved": "已保存列表",
|
||||
"listRenamed": "已重命名列表",
|
||||
"listDeleted": "已删除列表",
|
||||
"listRename": "重命名",
|
||||
"listDeleteConfirm": "删除?",
|
||||
"templateMissing": "该保存的列表已不存在。请另选一个。",
|
||||
"templateNameTaken": "你已经有同名的列表。",
|
||||
"templateNameInvalid": "列表名称不超过 {{max}} 个字符。",
|
||||
"calendarLabel": "运行时间",
|
||||
"daysLabel": "星期",
|
||||
"addSlot": "添加时间",
|
||||
"slotsFull": "最多 {{max}} 个开始时间。",
|
||||
"removeSlot": "移除此时间",
|
||||
"pickListFirst": "请先选择列表",
|
||||
"finishCalendarFirst": "请先完成计划",
|
||||
"duplicateSlot": "有两行的星期和时间相同",
|
||||
"listSites_one": "{{count}} 个网站",
|
||||
"listSites_other": "{{count}} 个网站",
|
||||
"summarySlots_one": "每周运行 {{count}} 次,每次最多 {{minutes}} 分钟。",
|
||||
"summarySlots_other": "每周运行 {{count}} 次,每次最多 {{minutes}} 分钟。",
|
||||
"templateNameInvalidNoMax": "该名称不能用于已保存的列表。"
|
||||
},
|
||||
"preset": {
|
||||
"light": "轻度",
|
||||
"balanced": "标准",
|
||||
"deep": "深度"
|
||||
},
|
||||
"template": {
|
||||
"lowIntentPurchaser": "低购买意向买家",
|
||||
"lowIntentPurchaserHint": "把配置文件定位为对价格敏感的买家:比价、优惠券、返现和二手转卖网站,并通过聚合站点而非直接访问零售商。"
|
||||
},
|
||||
"preflight": {
|
||||
"ineligible_one": "{{count}} 个配置文件无法远程运行",
|
||||
"ineligible_other": "{{count}} 个配置文件无法远程运行",
|
||||
|
||||
@@ -74,6 +74,11 @@ export type BackendErrorCode =
|
||||
| "REMOTE_NO_CAPACITY"
|
||||
| "REMOTE_NOT_ENTITLED"
|
||||
| "REMOTE_INTERACTIVE_NOT_ENTITLED"
|
||||
// The profile's exit only resolves on this computer, so a leased host cannot
|
||||
// use it. Its own code rather than the Cookie Bot's twin: the two refusals
|
||||
// name different features, and a user told their "Cookie Bot" needs a public
|
||||
// proxy while they were opening a browser by hand cannot act on that.
|
||||
| "REMOTE_REQUIRES_REMOTE_EXIT_NODE"
|
||||
| "REMOTE_SESSION_REFUSED"
|
||||
| "REMOTE_SESSION_NOT_FOUND"
|
||||
| "REMOTE_SESSION_CONFLICT"
|
||||
@@ -99,6 +104,11 @@ export type BackendErrorCode =
|
||||
| "COOKIE_BOT_UNKNOWN_PLATFORM"
|
||||
| "COOKIE_BOT_UNSUPPORTED_PLATFORM"
|
||||
| "COOKIE_BOT_REQUIRES_EXIT_NODE"
|
||||
// The profile HAS an exit, but only this machine can reach it (127.0.0.1, a
|
||||
// LAN address, a `.local` name). Its own code because the fix is different:
|
||||
// "attach a proxy" is unactionable advice for someone whose proxy is plainly
|
||||
// attached.
|
||||
| "COOKIE_BOT_REQUIRES_REMOTE_EXIT_NODE"
|
||||
// The server's own names for two refusals it throws from `putSchedule`,
|
||||
// `updateProfileState` and `runNow`. `COOKIE_BOT_REQUIRES_PROXY` is the
|
||||
// server-side twin of the local `COOKIE_BOT_REQUIRES_EXIT_NODE` precondition;
|
||||
@@ -110,6 +120,8 @@ export type BackendErrorCode =
|
||||
| "LAUNCH_CONSENT_EXPIRED"
|
||||
| "VPN_WORKER_START_FAILED"
|
||||
| "EXIT_PROBE_FAILED"
|
||||
| "CAMOUFOX_REMOVED"
|
||||
| "NO_E2E_PASSWORD_SET"
|
||||
| "INTERNAL_ERROR";
|
||||
|
||||
export interface BackendError {
|
||||
@@ -289,8 +301,29 @@ export function translateBackendError(t: TFunction, err: unknown): string {
|
||||
return t("backendErrors.mcpAgentRemoveFailed", {
|
||||
detail: parsed.params?.detail ?? "",
|
||||
});
|
||||
case "VLESS_CONFIG_INVALID":
|
||||
// Donut supports exactly one VLESS shape (REALITY + XTLS Vision over TCP),
|
||||
// so most rejections mean "your server is a kind we do not support", not
|
||||
// "you mistyped". Name the unsupported part instead of implying a typo.
|
||||
case "VLESS_CONFIG_INVALID": {
|
||||
const reason = parsed.params?.reason;
|
||||
const known = [
|
||||
"security",
|
||||
"flow",
|
||||
"transport",
|
||||
"encryption",
|
||||
"headerType",
|
||||
"fingerprint",
|
||||
"sni",
|
||||
"publicKey",
|
||||
"scheme",
|
||||
"parameter",
|
||||
"malformed",
|
||||
];
|
||||
if (reason && known.includes(reason)) {
|
||||
return t(`backendErrors.vlessUnsupported.${reason}`);
|
||||
}
|
||||
return t("backendErrors.vlessConfigInvalid");
|
||||
}
|
||||
case "XRAY_UNAVAILABLE":
|
||||
return t("backendErrors.xrayUnavailable");
|
||||
case "XRAY_UNSUPPORTED_OS":
|
||||
@@ -317,6 +350,8 @@ export function translateBackendError(t: TFunction, err: unknown): string {
|
||||
// runs every night is the confusing case this code exists to avoid.
|
||||
case "REMOTE_INTERACTIVE_NOT_ENTITLED":
|
||||
return t("backendErrors.remoteInteractiveNotEntitled");
|
||||
case "REMOTE_REQUIRES_REMOTE_EXIT_NODE":
|
||||
return t("backendErrors.remoteRequiresRemoteExitNode");
|
||||
case "REMOTE_SESSION_REFUSED":
|
||||
return t("backendErrors.remoteSessionRefused");
|
||||
case "REMOTE_SESSION_NOT_FOUND":
|
||||
@@ -389,6 +424,8 @@ export function translateBackendError(t: TFunction, err: unknown): string {
|
||||
// resolve to the one sentence a user can act on.
|
||||
case "COOKIE_BOT_REQUIRES_PROXY":
|
||||
return t("backendErrors.cookieBotRequiresExitNode");
|
||||
case "COOKIE_BOT_REQUIRES_REMOTE_EXIT_NODE":
|
||||
return t("backendErrors.cookieBotRequiresRemoteExitNode");
|
||||
case "COOKIE_BOT_TOUCH_FINGERPRINT_UNSUPPORTED":
|
||||
return t("backendErrors.cookieBotTouchFingerprintUnsupported");
|
||||
// The launch gate's block. The dialog renders the mismatch detail from
|
||||
@@ -404,6 +441,10 @@ export function translateBackendError(t: TFunction, err: unknown): string {
|
||||
});
|
||||
case "EXIT_PROBE_FAILED":
|
||||
return t("backendErrors.exitProbeFailed");
|
||||
case "CAMOUFOX_REMOVED":
|
||||
return t("backendErrors.camoufoxRemoved");
|
||||
case "NO_E2E_PASSWORD_SET":
|
||||
return t("backendErrors.noE2ePasswordSet");
|
||||
case "INTERNAL_ERROR":
|
||||
return t("backendErrors.internal", {
|
||||
detail: parsed.params?.detail ?? "",
|
||||
|
||||
+163
-2
@@ -13,24 +13,70 @@ import { invoke } from "@tauri-apps/api/core";
|
||||
/** Bit 0 = Monday, bit 6 = Sunday. */
|
||||
export const COOKIE_BOT_DAY_BITS = [1, 2, 4, 8, 16, 32, 64] as const;
|
||||
|
||||
/**
|
||||
* What marks a `template_id` as one of the USER's own rather than a curated one.
|
||||
*
|
||||
* The two kinds share one field and behave in opposite ways — a curated
|
||||
* template's URLs are server-owned and expanded per profile at dispatch, a
|
||||
* user's are copied onto the enrolment when it is saved. An id read as the wrong
|
||||
* kind is a schedule that browses the wrong list, so every question about which
|
||||
* kind an id is goes through the helper below rather than a `startsWith` at the
|
||||
* call site.
|
||||
*/
|
||||
export const COOKIE_BOT_USER_TEMPLATE_PREFIX = "user:";
|
||||
|
||||
export function isUserTemplateId(id: string | null | undefined): boolean {
|
||||
return (
|
||||
typeof id === "string" && id.startsWith(COOKIE_BOT_USER_TEMPLATE_PREFIX)
|
||||
);
|
||||
}
|
||||
|
||||
/** Hosts the fleet can lease. Linux is refused at enrolment. */
|
||||
export type CookieBotPlatform = "windows" | "macos";
|
||||
|
||||
/** `mine` shows the caller's enrolments, `team` the whole team's. */
|
||||
export type CookieBotScope = "mine" | "team";
|
||||
|
||||
/** One time-of-day an enrolment fires, on a set of local weekdays. */
|
||||
export interface CookieBotSlot {
|
||||
/** Bitmask of local weekdays, bit 0 = Monday. At least one bit set. */
|
||||
days_mask: number;
|
||||
/** Minutes past local midnight, in the schedule's timezone. */
|
||||
run_at_minute: number;
|
||||
}
|
||||
|
||||
export interface CookieBotSchedule {
|
||||
profile_id: string;
|
||||
profile_name: string;
|
||||
platform: string;
|
||||
enabled: boolean;
|
||||
/** Minutes past local midnight the run is anchored to. */
|
||||
/**
|
||||
* Minutes past local midnight the FIRST slot is anchored to. The server
|
||||
* mirrors `slots[0]` onto this pair on every write.
|
||||
*/
|
||||
run_at_minute: number;
|
||||
/** Bitmask of local weekdays, bit 0 = Monday. */
|
||||
/** The first slot's weekdays, bit 0 = Monday. See `run_at_minute`. */
|
||||
days_mask: number;
|
||||
/**
|
||||
* Every time-of-day this enrolment fires.
|
||||
*
|
||||
* Optional because a server that predates multi-slot scheduling sends only
|
||||
* the mirrored pair above. Read it through `scheduleSlots()` rather than
|
||||
* directly, so the fallback happens in one place instead of at each renderer
|
||||
* — an empty list here means "this server did not say", never "never fires".
|
||||
*/
|
||||
slots?: CookieBotSlot[];
|
||||
timezone: string;
|
||||
/** Opaque server-issued preset id. */
|
||||
preset: string;
|
||||
/**
|
||||
* The template the site list came from, or null for the user's own list.
|
||||
*
|
||||
* A built-in id means `sites` is EMPTY on purpose: those URLs are curated
|
||||
* server-side and deliberately never sent to a client. A `user:<uuid>` id is
|
||||
* provenance — the sites were copied onto the enrolment and are present.
|
||||
*/
|
||||
template_id?: string | null;
|
||||
max_minutes: number;
|
||||
sites: string[];
|
||||
jitter_seconds: number;
|
||||
@@ -70,10 +116,23 @@ export interface CookieBotScheduleInput {
|
||||
profile_name: string;
|
||||
platform: CookieBotPlatform;
|
||||
enabled: boolean;
|
||||
/** Mirror of `slots[0]`, for a server that predates multi-slot scheduling. */
|
||||
run_at_minute: number;
|
||||
/** Mirror of `slots[0]`. See `run_at_minute`. */
|
||||
days_mask: number;
|
||||
/**
|
||||
* The whole calendar. Omit it — never send an empty array — for "one slot,
|
||||
* from the pair above": the server refuses an empty list, because a schedule
|
||||
* that fires at no time is a mistake rather than a way to pause one.
|
||||
*/
|
||||
slots?: CookieBotSlot[];
|
||||
timezone: string;
|
||||
preset: string;
|
||||
/**
|
||||
* A browsing template instead of a typed site list. Mutually exclusive with a
|
||||
* non-empty `sites`: the server refuses a write carrying both.
|
||||
*/
|
||||
template_id?: string;
|
||||
max_minutes: number;
|
||||
sites: string[];
|
||||
jitter_seconds?: number;
|
||||
@@ -162,9 +221,70 @@ export interface CookieBotPreset {
|
||||
description?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A curated browsing template: a named answer to "what is this profile for",
|
||||
* picked INSTEAD of typing a site list.
|
||||
*
|
||||
* Carries a count and never the URLs. That is the product working as designed —
|
||||
* the pool is curated server-side and each profile draws its own sample from it,
|
||||
* so the template never becomes one recognisable fleet-wide set of visits. Any
|
||||
* copy describing this must say so as the feature it is.
|
||||
*/
|
||||
export interface CookieBotTemplate {
|
||||
id: string;
|
||||
/** How many sites this template browses. Not which. */
|
||||
site_count: number;
|
||||
/** Server-supplied English fallbacks, for a template newer than this build. */
|
||||
name?: string | null;
|
||||
description?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The server's own form bounds, when it publishes them.
|
||||
*
|
||||
* Every field is optional: a deployment that predates this object sends none of
|
||||
* them, and treating a missing bound as `0` would refuse every value the form
|
||||
* can produce. `SCHEDULE_BOUNDS` in `cookie-bot-limits.ts` is the fallback.
|
||||
*/
|
||||
export interface CookieBotLimits {
|
||||
min_minutes?: number | null;
|
||||
max_minutes?: number | null;
|
||||
min_sites?: number | null;
|
||||
max_sites?: number | null;
|
||||
/** Most entries a calendar may carry. */
|
||||
max_slots?: number | null;
|
||||
/** Longest name a saved site list may be given. */
|
||||
max_template_name_length?: number | null;
|
||||
}
|
||||
|
||||
export interface CookieBotPresetList {
|
||||
presets: CookieBotPreset[];
|
||||
default_preset?: string | null;
|
||||
/**
|
||||
* The curated templates on offer. Served with the presets so one added
|
||||
* server-side becomes selectable without a desktop release.
|
||||
*/
|
||||
templates?: CookieBotTemplate[];
|
||||
limits?: CookieBotLimits | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* One of the caller's OWN saved site lists.
|
||||
*
|
||||
* Carries its URLs, unlike {@link CookieBotTemplate}: they are the user's own
|
||||
* and there is nothing to withhold. Applying one COPIES the sites onto the
|
||||
* enrolment, so editing a list later does not silently change what an existing
|
||||
* schedule browses.
|
||||
*/
|
||||
export interface CookieBotUserTemplate {
|
||||
/**
|
||||
* Already prefixed `user:<uuid>` — the value `template_id` takes verbatim.
|
||||
* Nothing on this side assembles that convention.
|
||||
*/
|
||||
id: string;
|
||||
name: string;
|
||||
sites: string[];
|
||||
updated_at?: string | null;
|
||||
}
|
||||
|
||||
export interface RemoteHoursBreakdown {
|
||||
@@ -327,6 +447,47 @@ export function getCookieBotPresets(): Promise<CookieBotPresetList> {
|
||||
return invoke<CookieBotPresetList>("get_cookie_bot_presets");
|
||||
}
|
||||
|
||||
/** Every site list this user has saved, most recently edited first. */
|
||||
export function getCookieBotUserTemplates(): Promise<CookieBotUserTemplate[]> {
|
||||
return invoke<CookieBotUserTemplate[]>("get_cookie_bot_user_templates");
|
||||
}
|
||||
|
||||
/** Save the current site list under a name. */
|
||||
export function createCookieBotUserTemplate(
|
||||
name: string,
|
||||
sites: string[],
|
||||
): Promise<CookieBotUserTemplate> {
|
||||
return invoke<CookieBotUserTemplate>("create_cookie_bot_user_template", {
|
||||
name,
|
||||
sites,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Rename a saved list, replace its sites, or both.
|
||||
*
|
||||
* Send only what changed. A rename that also carried the site list would
|
||||
* silently revert an edit made to it from another device in between.
|
||||
*/
|
||||
export function updateCookieBotUserTemplate(
|
||||
id: string,
|
||||
changes: { name?: string; sites?: string[] },
|
||||
): Promise<CookieBotUserTemplate> {
|
||||
return invoke<CookieBotUserTemplate>("update_cookie_bot_user_template", {
|
||||
id,
|
||||
name: changes.name,
|
||||
sites: changes.sites,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a saved list. `false` means there was nothing left to delete, which is
|
||||
* a success — enrolments that used it keep the sites they copied either way.
|
||||
*/
|
||||
export function deleteCookieBotUserTemplate(id: string): Promise<boolean> {
|
||||
return invoke<boolean>("delete_cookie_bot_user_template", { id });
|
||||
}
|
||||
|
||||
export function getRemoteHoursQuota(): Promise<RemoteHoursQuota> {
|
||||
return invoke<RemoteHoursQuota>("get_remote_hours_quota");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
import {
|
||||
DEFAULT_DECORATION_LAYOUT,
|
||||
parseDecorationLayout,
|
||||
} from "./window-decorations.ts";
|
||||
|
||||
/**
|
||||
* The app draws its own titlebar on Linux, so it owns the window controls —
|
||||
* and where they go is a desktop-wide user preference. This parser is the only
|
||||
* thing standing between that preference and the buttons we render, and only
|
||||
* GNOME can be exercised on the machine this was written on, so KDE's real
|
||||
* layout strings are pinned here instead.
|
||||
*/
|
||||
|
||||
test("GNOME's default puts every control on the right", () => {
|
||||
assert.deepEqual(parseDecorationLayout(":minimize,maximize,close"), {
|
||||
left: [],
|
||||
right: ["minimize", "maximize", "close"],
|
||||
});
|
||||
});
|
||||
|
||||
test("a left-hand layout is honored", () => {
|
||||
// GNOME users who prefer macOS ordering set exactly this.
|
||||
assert.deepEqual(parseDecorationLayout("close,minimize,maximize:"), {
|
||||
left: ["close", "minimize", "maximize"],
|
||||
right: [],
|
||||
});
|
||||
});
|
||||
|
||||
test("controls can be split across both sides", () => {
|
||||
assert.deepEqual(parseDecorationLayout("close:minimize,maximize"), {
|
||||
left: ["close"],
|
||||
right: ["minimize", "maximize"],
|
||||
});
|
||||
});
|
||||
|
||||
test("GTK's own default drops the appmenu it cannot draw", () => {
|
||||
assert.deepEqual(parseDecorationLayout("appmenu:close"), {
|
||||
left: [],
|
||||
right: ["close"],
|
||||
});
|
||||
});
|
||||
|
||||
test("non-button tokens are ignored rather than rendered", () => {
|
||||
// `icon`, `menu`, `appmenu` and `spacer` are all legal GTK tokens for things
|
||||
// this titlebar does not draw.
|
||||
assert.deepEqual(parseDecorationLayout("icon,menu:spacer,close"), {
|
||||
left: [],
|
||||
right: ["close"],
|
||||
});
|
||||
});
|
||||
|
||||
test("KDE's extra decoration buttons are ignored", () => {
|
||||
// KWin offers buttons GTK has no concept of. kde-gtk-config maps what it can
|
||||
// and may pass these through; rendering an unknown box would be worse than
|
||||
// dropping it, which is what GTK itself does.
|
||||
assert.deepEqual(
|
||||
parseDecorationLayout(
|
||||
"menu,applicationmenu:shade,keepabove,keepbelow,help,minimize,maximize,close",
|
||||
),
|
||||
{ left: [], right: ["minimize", "maximize", "close"] },
|
||||
);
|
||||
});
|
||||
|
||||
test("a duplicated control is rendered once", () => {
|
||||
assert.deepEqual(parseDecorationLayout("close:close,minimize"), {
|
||||
left: ["close"],
|
||||
right: ["minimize"],
|
||||
});
|
||||
});
|
||||
|
||||
test("whitespace and capitalization are tolerated", () => {
|
||||
assert.deepEqual(parseDecorationLayout(" : Minimize , CLOSE "), {
|
||||
left: [],
|
||||
right: ["minimize", "close"],
|
||||
});
|
||||
});
|
||||
|
||||
test("a string with no colon is entirely the left side, as GTK reads it", () => {
|
||||
// `g_strsplit(layout, ":", 2)` leaves the right-hand token NULL, so GTK puts
|
||||
// every button on the left. No mainstream desktop emits this, but matching
|
||||
// GTK is the only defensible reading.
|
||||
assert.deepEqual(parseDecorationLayout("minimize,close"), {
|
||||
left: ["minimize", "close"],
|
||||
right: [],
|
||||
});
|
||||
});
|
||||
|
||||
test("only the first colon splits the sides", () => {
|
||||
// GTK's split has a limit of 2, so the second colon is not a separator: the
|
||||
// right side becomes the single token "minimize:maximize", which matches no
|
||||
// button name and is dropped — exactly as GTK drops it.
|
||||
assert.deepEqual(parseDecorationLayout("close:minimize:maximize"), {
|
||||
left: ["close"],
|
||||
right: [],
|
||||
});
|
||||
});
|
||||
|
||||
test("missing, empty and unusable layouts fall back to the default", () => {
|
||||
const fallback = { left: [], right: ["minimize", "maximize", "close"] };
|
||||
for (const input of [null, undefined, "", " "]) {
|
||||
assert.deepEqual(parseDecorationLayout(input), fallback, `input: ${input}`);
|
||||
}
|
||||
// A layout naming only buttons we cannot draw would otherwise leave the user
|
||||
// with no way to close the window.
|
||||
assert.deepEqual(parseDecorationLayout("appmenu:spacer"), fallback);
|
||||
assert.deepEqual(parseDecorationLayout(":"), fallback);
|
||||
});
|
||||
|
||||
test("the documented default parses to the default", () => {
|
||||
assert.deepEqual(parseDecorationLayout(DEFAULT_DECORATION_LAYOUT), {
|
||||
left: [],
|
||||
right: ["minimize", "maximize", "close"],
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,86 @@
|
||||
/**
|
||||
* Parsing for the desktop's titlebar button layout on Linux.
|
||||
*
|
||||
* The backend reads `GtkSettings::gtk-decoration-layout`, which GNOME populates
|
||||
* from `org.gnome.desktop.wm.preferences button-layout` and KDE populates via
|
||||
* `kde-gtk-config` from KWin's decoration settings. The grammar is the one GTK
|
||||
* itself parses: a comma-separated list of button names for the left side, a
|
||||
* `:`, then the list for the right side. Either side may be empty.
|
||||
*
|
||||
* ":minimize,maximize,close" GNOME default — everything on the right
|
||||
* "close,minimize,maximize:" macOS-like — everything on the left
|
||||
* "appmenu:close" upstream GTK default
|
||||
*/
|
||||
|
||||
/** What the backend reports about this window's decorations. */
|
||||
export interface WindowDecorationsInfo {
|
||||
/** True when the app owns the titlebar and must draw controls and edges. */
|
||||
client_side: boolean;
|
||||
/** The desktop's button layout; only meaningful when `client_side`. */
|
||||
layout: string | null;
|
||||
}
|
||||
|
||||
/** Controls this app can actually draw. */
|
||||
export type WindowControl = "minimize" | "maximize" | "close";
|
||||
|
||||
export interface DecorationLayout {
|
||||
left: WindowControl[];
|
||||
right: WindowControl[];
|
||||
}
|
||||
|
||||
/** What an unconfigured GNOME or KDE session shows. */
|
||||
export const DEFAULT_DECORATION_LAYOUT = ":minimize,maximize,close";
|
||||
|
||||
const CONTROLS: WindowControl[] = ["minimize", "maximize", "close"];
|
||||
|
||||
function parseSide(side: string, seen: Set<WindowControl>): WindowControl[] {
|
||||
const out: WindowControl[] = [];
|
||||
for (const raw of side.split(",")) {
|
||||
const name = raw.trim().toLowerCase();
|
||||
// Everything else a desktop can put here is deliberately dropped rather
|
||||
// than rendered as an unknown box: `icon`, `menu`, `appmenu` and `spacer`
|
||||
// from GTK, plus KDE's extras (`shade`, `above`/`keepabove`,
|
||||
// `below`/`keepbelow`, `help`, `applicationmenu`, `ontop`). Silently
|
||||
// ignoring an unrecognized token is also what GTK does.
|
||||
if (!CONTROLS.includes(name as WindowControl)) {
|
||||
continue;
|
||||
}
|
||||
const control = name as WindowControl;
|
||||
// A desktop could list the same button on both sides; the shared `seen` set
|
||||
// means the first occurrence wins and it is never drawn twice.
|
||||
if (seen.has(control)) {
|
||||
continue;
|
||||
}
|
||||
seen.add(control);
|
||||
out.push(control);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Split a layout string into the buttons to draw on each side.
|
||||
*
|
||||
* Falls back to the GNOME/KDE default whenever the string is missing, empty, or
|
||||
* names no button this app can draw — a titlebar with no way to close the
|
||||
* window would be far worse than one that ignores an exotic preference.
|
||||
*/
|
||||
export function parseDecorationLayout(
|
||||
layout: string | null | undefined,
|
||||
): DecorationLayout {
|
||||
const source = layout?.trim() ? layout : DEFAULT_DECORATION_LAYOUT;
|
||||
// GTK splits on the FIRST colon only, and a string with no colon at all is
|
||||
// entirely the left side (`g_strsplit(layout, ":", 2)` leaves the right
|
||||
// token NULL). Matching that exactly beats inventing a friendlier rule.
|
||||
const split = source.indexOf(":");
|
||||
const leftRaw = split === -1 ? source : source.slice(0, split);
|
||||
const rightRaw = split === -1 ? "" : source.slice(split + 1);
|
||||
|
||||
const seen = new Set<WindowControl>();
|
||||
const left = parseSide(leftRaw, seen);
|
||||
const right = parseSide(rightRaw, seen);
|
||||
|
||||
if (left.length === 0 && right.length === 0) {
|
||||
return { left: [], right: [...CONTROLS] };
|
||||
}
|
||||
return { left, right };
|
||||
}
|
||||
Reference in New Issue
Block a user