From 8b78fcc13bc36d1fb21d2e28a32558e8733ffcf0 Mon Sep 17 00:00:00 2001 From: Maximilian Jakob Maag Date: Mon, 14 Sep 2026 21:54:18 +0200 Subject: [PATCH 1/3] implement drag and drop colours from palette to template section --- .../frontend/wailsjs/runtime/package.json | 24 + .../frontend/wailsjs/runtime/runtime.d.ts | 330 ++++ frontend/frontend/wailsjs/runtime/runtime.js | 298 ++++ frontend/package.json.md5 | 2 +- .../editor/AppColorOverrides.svelte | 30 +- .../components/editor/ColorDragGhost.svelte | 18 + .../lib/components/editor/ColorSwatch.svelte | 51 +- .../lib/components/editor/ThemeEditor.svelte | 2 + frontend/src/lib/stores/ui.svelte.ts | 10 + frontend/wailsjs/go/main/App.d.ts | 156 +- frontend/wailsjs/go/main/App.js | 132 +- frontend/wailsjs/go/models.ts | 1406 +++++++++-------- frontend/wailsjs/runtime/runtime.d.ts | 122 +- frontend/wailsjs/runtime/runtime.js | 58 +- go.mod | 15 +- go.sum | 30 +- 16 files changed, 1759 insertions(+), 925 deletions(-) create mode 100644 frontend/frontend/wailsjs/runtime/package.json create mode 100644 frontend/frontend/wailsjs/runtime/runtime.d.ts create mode 100644 frontend/frontend/wailsjs/runtime/runtime.js create mode 100644 frontend/src/lib/components/editor/ColorDragGhost.svelte diff --git a/frontend/frontend/wailsjs/runtime/package.json b/frontend/frontend/wailsjs/runtime/package.json new file mode 100644 index 00000000..1e7c8a5d --- /dev/null +++ b/frontend/frontend/wailsjs/runtime/package.json @@ -0,0 +1,24 @@ +{ + "name": "@wailsapp/runtime", + "version": "2.0.0", + "description": "Wails Javascript runtime library", + "main": "runtime.js", + "types": "runtime.d.ts", + "scripts": { + }, + "repository": { + "type": "git", + "url": "git+https://github.com/wailsapp/wails.git" + }, + "keywords": [ + "Wails", + "Javascript", + "Go" + ], + "author": "Lea Anthony ", + "license": "MIT", + "bugs": { + "url": "https://github.com/wailsapp/wails/issues" + }, + "homepage": "https://github.com/wailsapp/wails#readme" +} diff --git a/frontend/frontend/wailsjs/runtime/runtime.d.ts b/frontend/frontend/wailsjs/runtime/runtime.d.ts new file mode 100644 index 00000000..3bbea848 --- /dev/null +++ b/frontend/frontend/wailsjs/runtime/runtime.d.ts @@ -0,0 +1,330 @@ +/* + _ __ _ __ +| | / /___ _(_) /____ +| | /| / / __ `/ / / ___/ +| |/ |/ / /_/ / / (__ ) +|__/|__/\__,_/_/_/____/ +The electron alternative for Go +(c) Lea Anthony 2019-present +*/ + +export interface Position { + x: number; + y: number; +} + +export interface Size { + w: number; + h: number; +} + +export interface Screen { + isCurrent: boolean; + isPrimary: boolean; + width : number + height : number +} + +// Environment information such as platform, buildtype, ... +export interface EnvironmentInfo { + buildType: string; + platform: string; + arch: string; +} + +// [EventsEmit](https://wails.io/docs/reference/runtime/events#eventsemit) +// emits the given event. Optional data may be passed with the event. +// This will trigger any event listeners. +export function EventsEmit(eventName: string, ...data: any): void; + +// [EventsOn](https://wails.io/docs/reference/runtime/events#eventson) sets up a listener for the given event name. +export function EventsOn(eventName: string, callback: (...data: any) => void): () => void; + +// [EventsOnMultiple](https://wails.io/docs/reference/runtime/events#eventsonmultiple) +// sets up a listener for the given event name, but will only trigger a given number times. +export function EventsOnMultiple(eventName: string, callback: (...data: any) => void, maxCallbacks: number): () => void; + +// [EventsOnce](https://wails.io/docs/reference/runtime/events#eventsonce) +// sets up a listener for the given event name, but will only trigger once. +export function EventsOnce(eventName: string, callback: (...data: any) => void): () => void; + +// [EventsOff](https://wails.io/docs/reference/runtime/events#eventsoff) +// unregisters the listener for the given event name. +export function EventsOff(eventName: string, ...additionalEventNames: string[]): void; + +// [EventsOffAll](https://wails.io/docs/reference/runtime/events#eventsoffall) +// unregisters all listeners. +export function EventsOffAll(): void; + +// [LogPrint](https://wails.io/docs/reference/runtime/log#logprint) +// logs the given message as a raw message +export function LogPrint(message: string): void; + +// [LogTrace](https://wails.io/docs/reference/runtime/log#logtrace) +// logs the given message at the `trace` log level. +export function LogTrace(message: string): void; + +// [LogDebug](https://wails.io/docs/reference/runtime/log#logdebug) +// logs the given message at the `debug` log level. +export function LogDebug(message: string): void; + +// [LogError](https://wails.io/docs/reference/runtime/log#logerror) +// logs the given message at the `error` log level. +export function LogError(message: string): void; + +// [LogFatal](https://wails.io/docs/reference/runtime/log#logfatal) +// logs the given message at the `fatal` log level. +// The application will quit after calling this method. +export function LogFatal(message: string): void; + +// [LogInfo](https://wails.io/docs/reference/runtime/log#loginfo) +// logs the given message at the `info` log level. +export function LogInfo(message: string): void; + +// [LogWarning](https://wails.io/docs/reference/runtime/log#logwarning) +// logs the given message at the `warning` log level. +export function LogWarning(message: string): void; + +// [WindowReload](https://wails.io/docs/reference/runtime/window#windowreload) +// Forces a reload by the main application as well as connected browsers. +export function WindowReload(): void; + +// [WindowReloadApp](https://wails.io/docs/reference/runtime/window#windowreloadapp) +// Reloads the application frontend. +export function WindowReloadApp(): void; + +// [WindowSetAlwaysOnTop](https://wails.io/docs/reference/runtime/window#windowsetalwaysontop) +// Sets the window AlwaysOnTop or not on top. +export function WindowSetAlwaysOnTop(b: boolean): void; + +// [WindowSetSystemDefaultTheme](https://wails.io/docs/next/reference/runtime/window#windowsetsystemdefaulttheme) +// *Windows only* +// Sets window theme to system default (dark/light). +export function WindowSetSystemDefaultTheme(): void; + +// [WindowSetLightTheme](https://wails.io/docs/next/reference/runtime/window#windowsetlighttheme) +// *Windows only* +// Sets window to light theme. +export function WindowSetLightTheme(): void; + +// [WindowSetDarkTheme](https://wails.io/docs/next/reference/runtime/window#windowsetdarktheme) +// *Windows only* +// Sets window to dark theme. +export function WindowSetDarkTheme(): void; + +// [WindowCenter](https://wails.io/docs/reference/runtime/window#windowcenter) +// Centers the window on the monitor the window is currently on. +export function WindowCenter(): void; + +// [WindowSetTitle](https://wails.io/docs/reference/runtime/window#windowsettitle) +// Sets the text in the window title bar. +export function WindowSetTitle(title: string): void; + +// [WindowFullscreen](https://wails.io/docs/reference/runtime/window#windowfullscreen) +// Makes the window full screen. +export function WindowFullscreen(): void; + +// [WindowUnfullscreen](https://wails.io/docs/reference/runtime/window#windowunfullscreen) +// Restores the previous window dimensions and position prior to full screen. +export function WindowUnfullscreen(): void; + +// [WindowIsFullscreen](https://wails.io/docs/reference/runtime/window#windowisfullscreen) +// Returns the state of the window, i.e. whether the window is in full screen mode or not. +export function WindowIsFullscreen(): Promise; + +// [WindowSetSize](https://wails.io/docs/reference/runtime/window#windowsetsize) +// Sets the width and height of the window. +export function WindowSetSize(width: number, height: number): void; + +// [WindowGetSize](https://wails.io/docs/reference/runtime/window#windowgetsize) +// Gets the width and height of the window. +export function WindowGetSize(): Promise; + +// [WindowSetMaxSize](https://wails.io/docs/reference/runtime/window#windowsetmaxsize) +// Sets the maximum window size. Will resize the window if the window is currently larger than the given dimensions. +// Setting a size of 0,0 will disable this constraint. +export function WindowSetMaxSize(width: number, height: number): void; + +// [WindowSetMinSize](https://wails.io/docs/reference/runtime/window#windowsetminsize) +// Sets the minimum window size. Will resize the window if the window is currently smaller than the given dimensions. +// Setting a size of 0,0 will disable this constraint. +export function WindowSetMinSize(width: number, height: number): void; + +// [WindowSetPosition](https://wails.io/docs/reference/runtime/window#windowsetposition) +// Sets the window position relative to the monitor the window is currently on. +export function WindowSetPosition(x: number, y: number): void; + +// [WindowGetPosition](https://wails.io/docs/reference/runtime/window#windowgetposition) +// Gets the window position relative to the monitor the window is currently on. +export function WindowGetPosition(): Promise; + +// [WindowHide](https://wails.io/docs/reference/runtime/window#windowhide) +// Hides the window. +export function WindowHide(): void; + +// [WindowShow](https://wails.io/docs/reference/runtime/window#windowshow) +// Shows the window, if it is currently hidden. +export function WindowShow(): void; + +// [WindowMaximise](https://wails.io/docs/reference/runtime/window#windowmaximise) +// Maximises the window to fill the screen. +export function WindowMaximise(): void; + +// [WindowToggleMaximise](https://wails.io/docs/reference/runtime/window#windowtogglemaximise) +// Toggles between Maximised and UnMaximised. +export function WindowToggleMaximise(): void; + +// [WindowUnmaximise](https://wails.io/docs/reference/runtime/window#windowunmaximise) +// Restores the window to the dimensions and position prior to maximising. +export function WindowUnmaximise(): void; + +// [WindowIsMaximised](https://wails.io/docs/reference/runtime/window#windowismaximised) +// Returns the state of the window, i.e. whether the window is maximised or not. +export function WindowIsMaximised(): Promise; + +// [WindowMinimise](https://wails.io/docs/reference/runtime/window#windowminimise) +// Minimises the window. +export function WindowMinimise(): void; + +// [WindowUnminimise](https://wails.io/docs/reference/runtime/window#windowunminimise) +// Restores the window to the dimensions and position prior to minimising. +export function WindowUnminimise(): void; + +// [WindowIsMinimised](https://wails.io/docs/reference/runtime/window#windowisminimised) +// Returns the state of the window, i.e. whether the window is minimised or not. +export function WindowIsMinimised(): Promise; + +// [WindowIsNormal](https://wails.io/docs/reference/runtime/window#windowisnormal) +// Returns the state of the window, i.e. whether the window is normal or not. +export function WindowIsNormal(): Promise; + +// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour) +// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels. +export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void; + +// [ScreenGetAll](https://wails.io/docs/reference/runtime/window#screengetall) +// Gets the all screens. Call this anew each time you want to refresh data from the underlying windowing system. +export function ScreenGetAll(): Promise; + +// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl) +// Opens the given URL in the system browser. +export function BrowserOpenURL(url: string): void; + +// [Environment](https://wails.io/docs/reference/runtime/intro#environment) +// Returns information about the environment +export function Environment(): Promise; + +// [Quit](https://wails.io/docs/reference/runtime/intro#quit) +// Quits the application. +export function Quit(): void; + +// [Hide](https://wails.io/docs/reference/runtime/intro#hide) +// Hides the application. +export function Hide(): void; + +// [Show](https://wails.io/docs/reference/runtime/intro#show) +// Shows the application. +export function Show(): void; + +// [ClipboardGetText](https://wails.io/docs/reference/runtime/clipboard#clipboardgettext) +// Returns the current text stored on clipboard +export function ClipboardGetText(): Promise; + +// [ClipboardSetText](https://wails.io/docs/reference/runtime/clipboard#clipboardsettext) +// Sets a text on the clipboard +export function ClipboardSetText(text: string): Promise; + +// [OnFileDrop](https://wails.io/docs/reference/runtime/draganddrop#onfiledrop) +// OnFileDrop listens to drag and drop events and calls the callback with the coordinates of the drop and an array of path strings. +export function OnFileDrop(callback: (x: number, y: number ,paths: string[]) => void, useDropTarget: boolean) :void + +// [OnFileDropOff](https://wails.io/docs/reference/runtime/draganddrop#dragandddropoff) +// OnFileDropOff removes the drag and drop listeners and handlers. +export function OnFileDropOff() :void + +// Check if the file path resolver is available +export function CanResolveFilePaths(): boolean; + +// Resolves file paths for an array of files +export function ResolveFilePaths(files: File[]): void + +// Notification types +export interface NotificationOptions { + id: string; + title: string; + subtitle?: string; // macOS and Linux only + body?: string; + categoryId?: string; + data?: { [key: string]: any }; +} + +export interface NotificationAction { + id?: string; + title?: string; + destructive?: boolean; // macOS-specific +} + +export interface NotificationCategory { + id?: string; + actions?: NotificationAction[]; + hasReplyField?: boolean; + replyPlaceholder?: string; + replyButtonTitle?: string; +} + +// [InitializeNotifications](https://wails.io/docs/reference/runtime/notification#initializenotifications) +// Initializes the notification service for the application. +// This must be called before sending any notifications. +export function InitializeNotifications(): Promise; + +// [CleanupNotifications](https://wails.io/docs/reference/runtime/notification#cleanupnotifications) +// Cleans up notification resources and releases any held connections. +export function CleanupNotifications(): Promise; + +// [IsNotificationAvailable](https://wails.io/docs/reference/runtime/notification#isnotificationavailable) +// Checks if notifications are available on the current platform. +export function IsNotificationAvailable(): Promise; + +// [RequestNotificationAuthorization](https://wails.io/docs/reference/runtime/notification#requestnotificationauthorization) +// Requests notification authorization from the user (macOS only). +export function RequestNotificationAuthorization(): Promise; + +// [CheckNotificationAuthorization](https://wails.io/docs/reference/runtime/notification#checknotificationauthorization) +// Checks the current notification authorization status (macOS only). +export function CheckNotificationAuthorization(): Promise; + +// [SendNotification](https://wails.io/docs/reference/runtime/notification#sendnotification) +// Sends a basic notification with the given options. +export function SendNotification(options: NotificationOptions): Promise; + +// [SendNotificationWithActions](https://wails.io/docs/reference/runtime/notification#sendnotificationwithactions) +// Sends a notification with action buttons. Requires a registered category. +export function SendNotificationWithActions(options: NotificationOptions): Promise; + +// [RegisterNotificationCategory](https://wails.io/docs/reference/runtime/notification#registernotificationcategory) +// Registers a notification category that can be used with SendNotificationWithActions. +export function RegisterNotificationCategory(category: NotificationCategory): Promise; + +// [RemoveNotificationCategory](https://wails.io/docs/reference/runtime/notification#removenotificationcategory) +// Removes a previously registered notification category. +export function RemoveNotificationCategory(categoryId: string): Promise; + +// [RemoveAllPendingNotifications](https://wails.io/docs/reference/runtime/notification#removeallpendingnotifications) +// Removes all pending notifications from the notification center. +export function RemoveAllPendingNotifications(): Promise; + +// [RemovePendingNotification](https://wails.io/docs/reference/runtime/notification#removependingnotification) +// Removes a specific pending notification by its identifier. +export function RemovePendingNotification(identifier: string): Promise; + +// [RemoveAllDeliveredNotifications](https://wails.io/docs/reference/runtime/notification#removealldeliverednotifications) +// Removes all delivered notifications from the notification center. +export function RemoveAllDeliveredNotifications(): Promise; + +// [RemoveDeliveredNotification](https://wails.io/docs/reference/runtime/notification#removedeliverednotification) +// Removes a specific delivered notification by its identifier. +export function RemoveDeliveredNotification(identifier: string): Promise; + +// [RemoveNotification](https://wails.io/docs/reference/runtime/notification#removenotification) +// Removes a notification by its identifier (cross-platform convenience function). +export function RemoveNotification(identifier: string): Promise; \ No newline at end of file diff --git a/frontend/frontend/wailsjs/runtime/runtime.js b/frontend/frontend/wailsjs/runtime/runtime.js new file mode 100644 index 00000000..556621ee --- /dev/null +++ b/frontend/frontend/wailsjs/runtime/runtime.js @@ -0,0 +1,298 @@ +/* + _ __ _ __ +| | / /___ _(_) /____ +| | /| / / __ `/ / / ___/ +| |/ |/ / /_/ / / (__ ) +|__/|__/\__,_/_/_/____/ +The electron alternative for Go +(c) Lea Anthony 2019-present +*/ + +export function LogPrint(message) { + window.runtime.LogPrint(message); +} + +export function LogTrace(message) { + window.runtime.LogTrace(message); +} + +export function LogDebug(message) { + window.runtime.LogDebug(message); +} + +export function LogInfo(message) { + window.runtime.LogInfo(message); +} + +export function LogWarning(message) { + window.runtime.LogWarning(message); +} + +export function LogError(message) { + window.runtime.LogError(message); +} + +export function LogFatal(message) { + window.runtime.LogFatal(message); +} + +export function EventsOnMultiple(eventName, callback, maxCallbacks) { + return window.runtime.EventsOnMultiple(eventName, callback, maxCallbacks); +} + +export function EventsOn(eventName, callback) { + return EventsOnMultiple(eventName, callback, -1); +} + +export function EventsOff(eventName, ...additionalEventNames) { + return window.runtime.EventsOff(eventName, ...additionalEventNames); +} + +export function EventsOffAll() { + return window.runtime.EventsOffAll(); +} + +export function EventsOnce(eventName, callback) { + return EventsOnMultiple(eventName, callback, 1); +} + +export function EventsEmit(eventName) { + let args = [eventName].slice.call(arguments); + return window.runtime.EventsEmit.apply(null, args); +} + +export function WindowReload() { + window.runtime.WindowReload(); +} + +export function WindowReloadApp() { + window.runtime.WindowReloadApp(); +} + +export function WindowSetAlwaysOnTop(b) { + window.runtime.WindowSetAlwaysOnTop(b); +} + +export function WindowSetSystemDefaultTheme() { + window.runtime.WindowSetSystemDefaultTheme(); +} + +export function WindowSetLightTheme() { + window.runtime.WindowSetLightTheme(); +} + +export function WindowSetDarkTheme() { + window.runtime.WindowSetDarkTheme(); +} + +export function WindowCenter() { + window.runtime.WindowCenter(); +} + +export function WindowSetTitle(title) { + window.runtime.WindowSetTitle(title); +} + +export function WindowFullscreen() { + window.runtime.WindowFullscreen(); +} + +export function WindowUnfullscreen() { + window.runtime.WindowUnfullscreen(); +} + +export function WindowIsFullscreen() { + return window.runtime.WindowIsFullscreen(); +} + +export function WindowGetSize() { + return window.runtime.WindowGetSize(); +} + +export function WindowSetSize(width, height) { + window.runtime.WindowSetSize(width, height); +} + +export function WindowSetMaxSize(width, height) { + window.runtime.WindowSetMaxSize(width, height); +} + +export function WindowSetMinSize(width, height) { + window.runtime.WindowSetMinSize(width, height); +} + +export function WindowSetPosition(x, y) { + window.runtime.WindowSetPosition(x, y); +} + +export function WindowGetPosition() { + return window.runtime.WindowGetPosition(); +} + +export function WindowHide() { + window.runtime.WindowHide(); +} + +export function WindowShow() { + window.runtime.WindowShow(); +} + +export function WindowMaximise() { + window.runtime.WindowMaximise(); +} + +export function WindowToggleMaximise() { + window.runtime.WindowToggleMaximise(); +} + +export function WindowUnmaximise() { + window.runtime.WindowUnmaximise(); +} + +export function WindowIsMaximised() { + return window.runtime.WindowIsMaximised(); +} + +export function WindowMinimise() { + window.runtime.WindowMinimise(); +} + +export function WindowUnminimise() { + window.runtime.WindowUnminimise(); +} + +export function WindowSetBackgroundColour(R, G, B, A) { + window.runtime.WindowSetBackgroundColour(R, G, B, A); +} + +export function ScreenGetAll() { + return window.runtime.ScreenGetAll(); +} + +export function WindowIsMinimised() { + return window.runtime.WindowIsMinimised(); +} + +export function WindowIsNormal() { + return window.runtime.WindowIsNormal(); +} + +export function BrowserOpenURL(url) { + window.runtime.BrowserOpenURL(url); +} + +export function Environment() { + return window.runtime.Environment(); +} + +export function Quit() { + window.runtime.Quit(); +} + +export function Hide() { + window.runtime.Hide(); +} + +export function Show() { + window.runtime.Show(); +} + +export function ClipboardGetText() { + return window.runtime.ClipboardGetText(); +} + +export function ClipboardSetText(text) { + return window.runtime.ClipboardSetText(text); +} + +/** + * Callback for OnFileDrop returns a slice of file path strings when a drop is finished. + * + * @export + * @callback OnFileDropCallback + * @param {number} x - x coordinate of the drop + * @param {number} y - y coordinate of the drop + * @param {string[]} paths - A list of file paths. + */ + +/** + * OnFileDrop listens to drag and drop events and calls the callback with the coordinates of the drop and an array of path strings. + * + * @export + * @param {OnFileDropCallback} callback - Callback for OnFileDrop returns a slice of file path strings when a drop is finished. + * @param {boolean} [useDropTarget=true] - Only call the callback when the drop finished on an element that has the drop target style. (--wails-drop-target) + */ +export function OnFileDrop(callback, useDropTarget) { + return window.runtime.OnFileDrop(callback, useDropTarget); +} + +/** + * OnFileDropOff removes the drag and drop listeners and handlers. + */ +export function OnFileDropOff() { + return window.runtime.OnFileDropOff(); +} + +export function CanResolveFilePaths() { + return window.runtime.CanResolveFilePaths(); +} + +export function ResolveFilePaths(files) { + return window.runtime.ResolveFilePaths(files); +} + +export function InitializeNotifications() { + return window.runtime.InitializeNotifications(); +} + +export function CleanupNotifications() { + return window.runtime.CleanupNotifications(); +} + +export function IsNotificationAvailable() { + return window.runtime.IsNotificationAvailable(); +} + +export function RequestNotificationAuthorization() { + return window.runtime.RequestNotificationAuthorization(); +} + +export function CheckNotificationAuthorization() { + return window.runtime.CheckNotificationAuthorization(); +} + +export function SendNotification(options) { + return window.runtime.SendNotification(options); +} + +export function SendNotificationWithActions(options) { + return window.runtime.SendNotificationWithActions(options); +} + +export function RegisterNotificationCategory(category) { + return window.runtime.RegisterNotificationCategory(category); +} + +export function RemoveNotificationCategory(categoryId) { + return window.runtime.RemoveNotificationCategory(categoryId); +} + +export function RemoveAllPendingNotifications() { + return window.runtime.RemoveAllPendingNotifications(); +} + +export function RemovePendingNotification(identifier) { + return window.runtime.RemovePendingNotification(identifier); +} + +export function RemoveAllDeliveredNotifications() { + return window.runtime.RemoveAllDeliveredNotifications(); +} + +export function RemoveDeliveredNotification(identifier) { + return window.runtime.RemoveDeliveredNotification(identifier); +} + +export function RemoveNotification(identifier) { + return window.runtime.RemoveNotification(identifier); +} \ No newline at end of file diff --git a/frontend/package.json.md5 b/frontend/package.json.md5 index 081234c5..d77522f4 100755 --- a/frontend/package.json.md5 +++ b/frontend/package.json.md5 @@ -1 +1 @@ -8e148ec9052b758c27dcf34bc3a3d905 \ No newline at end of file +358f50431c733436a625f0a56bcdbbb0 \ No newline at end of file diff --git a/frontend/src/lib/components/editor/AppColorOverrides.svelte b/frontend/src/lib/components/editor/AppColorOverrides.svelte index 67ce5884..a0af6fba 100644 --- a/frontend/src/lib/components/editor/AppColorOverrides.svelte +++ b/frontend/src/lib/components/editor/AppColorOverrides.svelte @@ -6,8 +6,9 @@ getAppOverrides, clearAppOverridesForApp, removeAppOverride, + setAppOverride, } from '$lib/stores/theme.svelte'; - import {openOverrideColorPicker} from '$lib/stores/ui.svelte'; + import {openOverrideColorPicker, getColorDrag, setColorDrag} from '$lib/stores/ui.svelte'; import {isLightColor, copyColor} from '$lib/utils/color'; import ContextMenu from '$lib/components/shared/ContextMenu.svelte'; import ExpandableSection from '$lib/components/shared/ExpandableSection.svelte'; @@ -113,6 +114,24 @@ return SHORT_LABELS[role] || role.replace(/_/g, ' '); } + let dragOverRole = $state(''); + + $effect(() => { + if (!getColorDrag()) dragOverRole = ''; + }); + + function onButtonMouseEnter(role: string) { + if (getColorDrag()) dragOverRole = role; + } + + function onButtonMouseUp(role: string) { + const drag = getColorDrag(); + if (!drag) return; + setColorDrag(null); + setAppOverride(selectedApp, role, drag.color); + dragOverRole = ''; + } + let menu = $state({open: false, x: 0, y: 0, role: ''}); function openMenu(e: MouseEvent, role: string) { @@ -207,14 +226,19 @@ class="group relative flex h-9 cursor-pointer items-end justify-center overflow-hidden border px-1 transition-all duration-100 {isOverridden ? 'border-accent border-2' - : 'border-border hover:border-border-focus'}" + : dragOverRole === role + ? 'border-accent border-2 scale-[1.06] shadow-md' + : 'border-border hover:border-border-focus'}" style:background-color={display} onclick={() => openOverrideColorPicker(selectedApp, role)} oncontextmenu={e => openMenu(e, role)} + onmouseenter={() => onButtonMouseEnter(role)} + onmouseleave={() => (dragOverRole = '')} + onmouseup={() => onButtonMouseUp(role)} title="{role}{isOverridden ? ` · override ${appOverrides[role]}` - : ` · computed ${display}`}\nClick edit · Right-click for menu" + : ` · computed ${display}`}\nClick edit · Right-click for menu · Drag palette color to override" > + import {getColorDrag} from '$lib/stores/ui.svelte'; + + let drag = $derived(getColorDrag()); + + $effect(() => { + document.body.style.cursor = drag ? 'copy' : ''; + }); + + +{#if drag} +
+{/if} diff --git a/frontend/src/lib/components/editor/ColorSwatch.svelte b/frontend/src/lib/components/editor/ColorSwatch.svelte index 0157f771..284cc3c1 100644 --- a/frontend/src/lib/components/editor/ColorSwatch.svelte +++ b/frontend/src/lib/components/editor/ColorSwatch.svelte @@ -9,7 +9,7 @@ contrastRatio, contrastLevel, } from '$lib/utils/color'; - import {setEyedropperActive} from '$lib/stores/ui.svelte'; + import {setEyedropperActive, getColorDrag, setColorDrag} from '$lib/stores/ui.svelte'; import {onActivate} from '$lib/utils/keyboard'; import LockIcon from '$lib/components/shared/LockIcon.svelte'; import ContextMenu from '$lib/components/shared/ContextMenu.svelte'; @@ -99,6 +99,10 @@ } function handleClick(event: MouseEvent) { + if (didDrag) { + didDrag = false; + return; + } if (event.ctrlKey || event.metaKey) { event.preventDefault(); copyColor(color); @@ -113,6 +117,47 @@ } let light = $derived(isLightColor(color)); + + let isDragging = $state(false); + let didDrag = $state(false); + let pendingDrag: {startX: number; startY: number} | null = null; + + function onMouseDown(e: MouseEvent) { + if (e.button !== 0) return; + pendingDrag = {startX: e.clientX, startY: e.clientY}; + window.addEventListener('mousemove', onDragMove); + window.addEventListener('mouseup', onDragUp); + } + + function onDragMove(e: MouseEvent) { + if (isDragging) { + setColorDrag({color, x: e.clientX, y: e.clientY}); + return; + } + if (!pendingDrag) return; + const dx = e.clientX - pendingDrag.startX; + const dy = e.clientY - pendingDrag.startY; + if (Math.hypot(dx, dy) >= 4) { + didDrag = true; + isDragging = true; + setColorDrag({color, x: e.clientX, y: e.clientY}); + } + } + + function onDragUp() { + window.removeEventListener('mousemove', onDragMove); + window.removeEventListener('mouseup', onDragUp); + pendingDrag = null; + isDragging = false; + setColorDrag(null); + } + + $effect(() => { + return () => { + window.removeEventListener('mousemove', onDragMove); + window.removeEventListener('mouseup', onDragUp); + }; + }); @@ -123,12 +168,14 @@ ? 'border-border cursor-default' : selected ? 'border-accent cursor-pointer border-2' - : 'hover:border-accent border-border cursor-pointer hover:z-10 hover:scale-[1.04] hover:shadow-lg'}" + : 'hover:border-accent border-border cursor-pointer hover:z-10 hover:scale-[1.04] hover:shadow-lg'} + {isDragging ? 'opacity-60' : ''}" style:background-color={color} role="button" tabindex={focused ? 0 : -1} data-swatch-idx={index} onclick={handleClick} + onmousedown={onMouseDown} oncontextmenu={handleContextMenu} title={`${label}${role ? ` · ${role}` : ''}\n${color}${ showBadge ? `\nContrast vs BG: ${ratio.toFixed(2)}:1 (${level})` : '' diff --git a/frontend/src/lib/components/editor/ThemeEditor.svelte b/frontend/src/lib/components/editor/ThemeEditor.svelte index 76f70419..8f7b5697 100644 --- a/frontend/src/lib/components/editor/ThemeEditor.svelte +++ b/frontend/src/lib/components/editor/ThemeEditor.svelte @@ -9,6 +9,7 @@ import SettingsSidebar from '../sidebar/SettingsSidebar.svelte'; import ColorPickerDialog from '../color-picker/ColorPickerDialog.svelte'; import WallpaperEditor from '../wallpaper-editor/WallpaperEditor.svelte'; + import ColorDragGhost from './ColorDragGhost.svelte'; import {getWallpaperPath, getPalette} from '$lib/stores/theme.svelte'; import { getSidebarVisible, @@ -74,4 +75,5 @@ open={getImageEditorOpen()} onclose={() => setImageEditorOpen(false)} /> + diff --git a/frontend/src/lib/stores/ui.svelte.ts b/frontend/src/lib/stores/ui.svelte.ts index 2773135a..1812574a 100644 --- a/frontend/src/lib/stores/ui.svelte.ts +++ b/frontend/src/lib/stores/ui.svelte.ts @@ -45,6 +45,7 @@ function writeBoolPref(key: string, value: boolean): void { } catch {} } let colorPickerOpen = $state(false); +let colorDrag = $state<{color: string; x: number; y: number} | null>(null); let colorPickerIndex = $state(-1); let colorPickerExtKey = $state(''); // non-empty = editing an extended color let colorPickerOverrideApp = $state(''); // non-empty = editing an app override @@ -276,3 +277,12 @@ export function getApplySaveDialogOpen(): boolean { export function setApplySaveDialogOpen(v: boolean): void { applySaveDialogOpen = v; } + +export function getColorDrag(): {color: string; x: number; y: number} | null { + return colorDrag; +} +export function setColorDrag( + v: {color: string; x: number; y: number} | null +): void { + colorDrag = v; +} diff --git a/frontend/wailsjs/go/main/App.d.ts b/frontend/wailsjs/go/main/App.d.ts index aee42045..65d72f7a 100755 --- a/frontend/wailsjs/go/main/App.d.ts +++ b/frontend/wailsjs/go/main/App.d.ts @@ -9,158 +9,126 @@ import {ipc} from '../models'; import {wallpaper} from '../models'; import {wallhaven} from '../models'; -export function AdjustPaletteColors( - arg1: Array, - arg2: color.Adjustments -): Promise>; +export function AdjustPaletteColors(arg1:Array,arg2:color.Adjustments):Promise>; -export function ApplyBlueprint(arg1: string): Promise; +export function ApplyBlueprint(arg1:string):Promise; -export function ApplyOmarchyThemeByName(arg1: string): Promise; +export function ApplyOmarchyThemeByName(arg1:string):Promise; -export function ApplyTheme( - arg1: main.ApplyThemeRequest -): Promise; +export function ApplyTheme(arg1:main.ApplyThemeRequest):Promise; -export function BlueprintExists(arg1: string): Promise; +export function BlueprintExists(arg1:string):Promise; -export function CancelBatchProcessing(): Promise; +export function CancelBatchProcessing():Promise; -export function CancelExternalImport(arg1: string): Promise; +export function CancelExternalImport(arg1:string):Promise; -export function ChooseWallpaperFolder(): Promise; +export function ChooseWallpaperFolder():Promise; -export function ClearTheme(): Promise; +export function ClearTheme():Promise; -export function CloseIPC(): Promise; +export function CloseIPC():Promise; -export function ComputeVariables( - arg1: Array, - arg2: Record, - arg3: boolean -): Promise>; +export function ComputeVariables(arg1:Array,arg2:Record,arg3:boolean):Promise>; -export function ConfirmExternalImport(arg1: string): Promise; +export function ConfirmExternalImport(arg1:string):Promise; -export function ContrastRatio(arg1: string, arg2: string): Promise; +export function ContrastRatio(arg1:string,arg2:string):Promise; -export function DeleteBlueprint(arg1: string): Promise; +export function DeleteBlueprint(arg1:string):Promise; -export function DownloadWallpaper(arg1: string): Promise; +export function DownloadWallpaper(arg1:string):Promise; -export function ExportTheme(arg1: main.ExportThemeRequest): Promise; +export function ExportTheme(arg1:main.ExportThemeRequest):Promise; -export function ExtractColors( - arg1: string, - arg2: boolean, - arg3: string -): Promise; +export function ExtractColors(arg1:string,arg2:boolean,arg3:string):Promise; -export function ExtractColorsFromImages( - arg1: Array, - arg2: boolean, - arg3: string -): Promise; +export function ExtractColorsFromImages(arg1:Array,arg2:boolean,arg3:string):Promise; -export function GenerateGradient(arg1: string, arg2: string): Promise; +export function GenerateGradient(arg1:string,arg2:string):Promise; -export function GeneratePaletteFromColor(arg1: string): Promise; +export function GeneratePaletteFromColor(arg1:string):Promise; -export function GetFavorites(): Promise>; +export function GetFavorites():Promise>; -export function GetFocusTab(): Promise; +export function GetFocusTab():Promise; -export function GetInitialState(): Promise; +export function GetInitialState():Promise; -export function GetOmarchyCapabilities(): Promise; +export function GetOmarchyCapabilities():Promise; -export function GetPendingExternalImport(): Promise; +export function GetPendingExternalImport():Promise; -export function GetPreview(arg1: string): Promise; +export function GetPreview(arg1:string):Promise; -export function GetReleaseStatus(arg1: string): Promise>; +export function GetReleaseStatus(arg1:string):Promise>; -export function GetSettings(): Promise>; +export function GetSettings():Promise>; -export function GetTemplateColors(): Promise>>; +export function GetTemplateColors():Promise>>; -export function GetThemeColors(): Promise>; +export function GetThemeColors():Promise>; -export function GetThumbnail(arg1: string): Promise; +export function GetThumbnail(arg1:string):Promise; -export function GetWallhavenConfig(): Promise>; +export function GetWallhavenConfig():Promise>; -export function GetWallpaperTags(): Promise>; +export function GetWallpaperTags():Promise>; -export function HandleDroppedFiles(arg1: Array): Promise; +export function HandleDroppedFiles(arg1:Array):Promise; -export function HandleIPC(arg1: ipc.Request): Promise; +export function HandleIPC(arg1:ipc.Request):Promise; -export function ImportFileDialog(arg1: string): Promise; +export function ImportFileDialog(arg1:string):Promise; -export function IsFavorite(arg1: string): Promise; +export function IsFavorite(arg1:string):Promise; -export function IsMacOS(): Promise; +export function IsMacOS():Promise; -export function IsOmarchyInstalled(): Promise; +export function IsOmarchyInstalled():Promise; -export function IsPreviewCached(arg1: string): Promise; +export function IsPreviewCached(arg1:string):Promise; -export function ListBlueprints(): Promise>>; +export function ListBlueprints():Promise>>; -export function LoadBlueprint(arg1: string): Promise; +export function LoadBlueprint(arg1:string):Promise; -export function LoadOmarchyThemes(): Promise>; +export function LoadOmarchyThemes():Promise>; -export function OpenExternalImportInEditor(arg1: string): Promise; +export function OpenExternalImportInEditor(arg1:string):Promise; -export function OpenFileDialog(): Promise; +export function OpenFileDialog():Promise; -export function PreviewExtractColors( - arg1: string, - arg2: boolean, - arg3: string -): Promise; +export function PreviewExtractColors(arg1:string,arg2:boolean,arg3:string):Promise; -export function ReadImageAsDataURL(arg1: string): Promise; +export function ReadImageAsDataURL(arg1:string):Promise; -export function ResetState(): Promise; +export function ResetState():Promise; -export function SaveAndApplyTheme( - arg1: main.SaveAndApplyThemeRequest -): Promise; +export function SaveAndApplyTheme(arg1:main.SaveAndApplyThemeRequest):Promise; -export function SaveBlueprint(arg1: main.SaveBlueprintRequest): Promise; +export function SaveBlueprint(arg1:main.SaveBlueprintRequest):Promise; -export function SaveDataURLToFile(arg1: string, arg2: string): Promise; +export function SaveDataURLToFile(arg1:string,arg2:string):Promise; -export function SaveSettings(arg1: Record): Promise; +export function SaveSettings(arg1:Record):Promise; -export function SaveWallhavenConfig(arg1: Record): Promise; +export function SaveWallhavenConfig(arg1:Record):Promise; -export function SaveWallpaperTags(arg1: Record): Promise; +export function SaveWallpaperTags(arg1:Record):Promise; -export function ScanLocalWallpapers(): Promise>; +export function ScanLocalWallpapers():Promise>; -export function SearchWallhaven( - arg1: wallhaven.SearchParams -): Promise; +export function SearchWallhaven(arg1:wallhaven.SearchParams):Promise; -export function SetExtractionMode(arg1: string): Promise; +export function SetExtractionMode(arg1:string):Promise; -export function SetWallhavenAPIKey(arg1: string): Promise; +export function SetWallhavenAPIKey(arg1:string):Promise; -export function StartBatchProcessing( - arg1: Array, - arg2: boolean -): Promise; +export function StartBatchProcessing(arg1:Array,arg2:boolean):Promise; -export function StartUpgrade(): Promise; +export function StartUpgrade():Promise; -export function SyncState(arg1: main.SyncStateRequest): Promise; +export function SyncState(arg1:main.SyncStateRequest):Promise; -export function ToggleFavorite( - arg1: string, - arg2: string, - arg3: Record -): Promise; +export function ToggleFavorite(arg1:string,arg2:string,arg3:Record):Promise; diff --git a/frontend/wailsjs/go/main/App.js b/frontend/wailsjs/go/main/App.js index c5ce5dff..c94b2c59 100755 --- a/frontend/wailsjs/go/main/App.js +++ b/frontend/wailsjs/go/main/App.js @@ -3,257 +3,249 @@ // This file is automatically generated. DO NOT EDIT export function AdjustPaletteColors(arg1, arg2) { - return window['go']['main']['App']['AdjustPaletteColors'](arg1, arg2); + return window['go']['main']['App']['AdjustPaletteColors'](arg1, arg2); } export function ApplyBlueprint(arg1) { - return window['go']['main']['App']['ApplyBlueprint'](arg1); + return window['go']['main']['App']['ApplyBlueprint'](arg1); } export function ApplyOmarchyThemeByName(arg1) { - return window['go']['main']['App']['ApplyOmarchyThemeByName'](arg1); + return window['go']['main']['App']['ApplyOmarchyThemeByName'](arg1); } export function ApplyTheme(arg1) { - return window['go']['main']['App']['ApplyTheme'](arg1); + return window['go']['main']['App']['ApplyTheme'](arg1); } export function BlueprintExists(arg1) { - return window['go']['main']['App']['BlueprintExists'](arg1); + return window['go']['main']['App']['BlueprintExists'](arg1); } export function CancelBatchProcessing() { - return window['go']['main']['App']['CancelBatchProcessing'](); + return window['go']['main']['App']['CancelBatchProcessing'](); } export function CancelExternalImport(arg1) { - return window['go']['main']['App']['CancelExternalImport'](arg1); + return window['go']['main']['App']['CancelExternalImport'](arg1); } export function ChooseWallpaperFolder() { - return window['go']['main']['App']['ChooseWallpaperFolder'](); + return window['go']['main']['App']['ChooseWallpaperFolder'](); } export function ClearTheme() { - return window['go']['main']['App']['ClearTheme'](); + return window['go']['main']['App']['ClearTheme'](); } export function CloseIPC() { - return window['go']['main']['App']['CloseIPC'](); + return window['go']['main']['App']['CloseIPC'](); } export function ComputeVariables(arg1, arg2, arg3) { - return window['go']['main']['App']['ComputeVariables'](arg1, arg2, arg3); + return window['go']['main']['App']['ComputeVariables'](arg1, arg2, arg3); } export function ConfirmExternalImport(arg1) { - return window['go']['main']['App']['ConfirmExternalImport'](arg1); + return window['go']['main']['App']['ConfirmExternalImport'](arg1); } export function ContrastRatio(arg1, arg2) { - return window['go']['main']['App']['ContrastRatio'](arg1, arg2); + return window['go']['main']['App']['ContrastRatio'](arg1, arg2); } export function DeleteBlueprint(arg1) { - return window['go']['main']['App']['DeleteBlueprint'](arg1); + return window['go']['main']['App']['DeleteBlueprint'](arg1); } export function DownloadWallpaper(arg1) { - return window['go']['main']['App']['DownloadWallpaper'](arg1); + return window['go']['main']['App']['DownloadWallpaper'](arg1); } export function ExportTheme(arg1) { - return window['go']['main']['App']['ExportTheme'](arg1); + return window['go']['main']['App']['ExportTheme'](arg1); } export function ExtractColors(arg1, arg2, arg3) { - return window['go']['main']['App']['ExtractColors'](arg1, arg2, arg3); + return window['go']['main']['App']['ExtractColors'](arg1, arg2, arg3); } export function ExtractColorsFromImages(arg1, arg2, arg3) { - return window['go']['main']['App']['ExtractColorsFromImages']( - arg1, - arg2, - arg3 - ); + return window['go']['main']['App']['ExtractColorsFromImages'](arg1, arg2, arg3); } export function GenerateGradient(arg1, arg2) { - return window['go']['main']['App']['GenerateGradient'](arg1, arg2); + return window['go']['main']['App']['GenerateGradient'](arg1, arg2); } export function GeneratePaletteFromColor(arg1) { - return window['go']['main']['App']['GeneratePaletteFromColor'](arg1); + return window['go']['main']['App']['GeneratePaletteFromColor'](arg1); } export function GetFavorites() { - return window['go']['main']['App']['GetFavorites'](); + return window['go']['main']['App']['GetFavorites'](); } export function GetFocusTab() { - return window['go']['main']['App']['GetFocusTab'](); + return window['go']['main']['App']['GetFocusTab'](); } export function GetInitialState() { - return window['go']['main']['App']['GetInitialState'](); + return window['go']['main']['App']['GetInitialState'](); } export function GetOmarchyCapabilities() { - return window['go']['main']['App']['GetOmarchyCapabilities'](); + return window['go']['main']['App']['GetOmarchyCapabilities'](); } export function GetPendingExternalImport() { - return window['go']['main']['App']['GetPendingExternalImport'](); + return window['go']['main']['App']['GetPendingExternalImport'](); } export function GetPreview(arg1) { - return window['go']['main']['App']['GetPreview'](arg1); + return window['go']['main']['App']['GetPreview'](arg1); } export function GetReleaseStatus(arg1) { - return window['go']['main']['App']['GetReleaseStatus'](arg1); + return window['go']['main']['App']['GetReleaseStatus'](arg1); } export function GetSettings() { - return window['go']['main']['App']['GetSettings'](); + return window['go']['main']['App']['GetSettings'](); } export function GetTemplateColors() { - return window['go']['main']['App']['GetTemplateColors'](); + return window['go']['main']['App']['GetTemplateColors'](); } export function GetThemeColors() { - return window['go']['main']['App']['GetThemeColors'](); + return window['go']['main']['App']['GetThemeColors'](); } export function GetThumbnail(arg1) { - return window['go']['main']['App']['GetThumbnail'](arg1); + return window['go']['main']['App']['GetThumbnail'](arg1); } export function GetWallhavenConfig() { - return window['go']['main']['App']['GetWallhavenConfig'](); + return window['go']['main']['App']['GetWallhavenConfig'](); } export function GetWallpaperTags() { - return window['go']['main']['App']['GetWallpaperTags'](); + return window['go']['main']['App']['GetWallpaperTags'](); } export function HandleDroppedFiles(arg1) { - return window['go']['main']['App']['HandleDroppedFiles'](arg1); + return window['go']['main']['App']['HandleDroppedFiles'](arg1); } export function HandleIPC(arg1) { - return window['go']['main']['App']['HandleIPC'](arg1); + return window['go']['main']['App']['HandleIPC'](arg1); } export function ImportFileDialog(arg1) { - return window['go']['main']['App']['ImportFileDialog'](arg1); + return window['go']['main']['App']['ImportFileDialog'](arg1); } export function IsFavorite(arg1) { - return window['go']['main']['App']['IsFavorite'](arg1); + return window['go']['main']['App']['IsFavorite'](arg1); } export function IsMacOS() { - return window['go']['main']['App']['IsMacOS'](); + return window['go']['main']['App']['IsMacOS'](); } export function IsOmarchyInstalled() { - return window['go']['main']['App']['IsOmarchyInstalled'](); + return window['go']['main']['App']['IsOmarchyInstalled'](); } export function IsPreviewCached(arg1) { - return window['go']['main']['App']['IsPreviewCached'](arg1); + return window['go']['main']['App']['IsPreviewCached'](arg1); } export function ListBlueprints() { - return window['go']['main']['App']['ListBlueprints'](); + return window['go']['main']['App']['ListBlueprints'](); } export function LoadBlueprint(arg1) { - return window['go']['main']['App']['LoadBlueprint'](arg1); + return window['go']['main']['App']['LoadBlueprint'](arg1); } export function LoadOmarchyThemes() { - return window['go']['main']['App']['LoadOmarchyThemes'](); + return window['go']['main']['App']['LoadOmarchyThemes'](); } export function OpenExternalImportInEditor(arg1) { - return window['go']['main']['App']['OpenExternalImportInEditor'](arg1); + return window['go']['main']['App']['OpenExternalImportInEditor'](arg1); } export function OpenFileDialog() { - return window['go']['main']['App']['OpenFileDialog'](); + return window['go']['main']['App']['OpenFileDialog'](); } export function PreviewExtractColors(arg1, arg2, arg3) { - return window['go']['main']['App']['PreviewExtractColors']( - arg1, - arg2, - arg3 - ); + return window['go']['main']['App']['PreviewExtractColors'](arg1, arg2, arg3); } export function ReadImageAsDataURL(arg1) { - return window['go']['main']['App']['ReadImageAsDataURL'](arg1); + return window['go']['main']['App']['ReadImageAsDataURL'](arg1); } export function ResetState() { - return window['go']['main']['App']['ResetState'](); + return window['go']['main']['App']['ResetState'](); } export function SaveAndApplyTheme(arg1) { - return window['go']['main']['App']['SaveAndApplyTheme'](arg1); + return window['go']['main']['App']['SaveAndApplyTheme'](arg1); } export function SaveBlueprint(arg1) { - return window['go']['main']['App']['SaveBlueprint'](arg1); + return window['go']['main']['App']['SaveBlueprint'](arg1); } export function SaveDataURLToFile(arg1, arg2) { - return window['go']['main']['App']['SaveDataURLToFile'](arg1, arg2); + return window['go']['main']['App']['SaveDataURLToFile'](arg1, arg2); } export function SaveSettings(arg1) { - return window['go']['main']['App']['SaveSettings'](arg1); + return window['go']['main']['App']['SaveSettings'](arg1); } export function SaveWallhavenConfig(arg1) { - return window['go']['main']['App']['SaveWallhavenConfig'](arg1); + return window['go']['main']['App']['SaveWallhavenConfig'](arg1); } export function SaveWallpaperTags(arg1) { - return window['go']['main']['App']['SaveWallpaperTags'](arg1); + return window['go']['main']['App']['SaveWallpaperTags'](arg1); } export function ScanLocalWallpapers() { - return window['go']['main']['App']['ScanLocalWallpapers'](); + return window['go']['main']['App']['ScanLocalWallpapers'](); } export function SearchWallhaven(arg1) { - return window['go']['main']['App']['SearchWallhaven'](arg1); + return window['go']['main']['App']['SearchWallhaven'](arg1); } export function SetExtractionMode(arg1) { - return window['go']['main']['App']['SetExtractionMode'](arg1); + return window['go']['main']['App']['SetExtractionMode'](arg1); } export function SetWallhavenAPIKey(arg1) { - return window['go']['main']['App']['SetWallhavenAPIKey'](arg1); + return window['go']['main']['App']['SetWallhavenAPIKey'](arg1); } export function StartBatchProcessing(arg1, arg2) { - return window['go']['main']['App']['StartBatchProcessing'](arg1, arg2); + return window['go']['main']['App']['StartBatchProcessing'](arg1, arg2); } export function StartUpgrade() { - return window['go']['main']['App']['StartUpgrade'](); + return window['go']['main']['App']['StartUpgrade'](); } export function SyncState(arg1) { - return window['go']['main']['App']['SyncState'](arg1); + return window['go']['main']['App']['SyncState'](arg1); } export function ToggleFavorite(arg1, arg2, arg3) { - return window['go']['main']['App']['ToggleFavorite'](arg1, arg2, arg3); + return window['go']['main']['App']['ToggleFavorite'](arg1, arg2, arg3); } diff --git a/frontend/wailsjs/go/models.ts b/frontend/wailsjs/go/models.ts index b99d8c55..6963886a 100755 --- a/frontend/wailsjs/go/models.ts +++ b/frontend/wailsjs/go/models.ts @@ -1,737 +1,739 @@ export namespace color { - export class Adjustments { - vibrance: number; - saturation: number; - contrast: number; - brightness: number; - shadows: number; - highlights: number; - hueShift: number; - temperature: number; - tint: number; - gamma: number; - blackPoint: number; - whitePoint: number; + + export class Adjustments { + vibrance: number; + saturation: number; + contrast: number; + brightness: number; + shadows: number; + highlights: number; + hueShift: number; + temperature: number; + tint: number; + gamma: number; + blackPoint: number; + whitePoint: number; + + static createFrom(source: any = {}) { + return new Adjustments(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.vibrance = source["vibrance"]; + this.saturation = source["saturation"]; + this.contrast = source["contrast"]; + this.brightness = source["brightness"]; + this.shadows = source["shadows"]; + this.highlights = source["highlights"]; + this.hueShift = source["hueShift"]; + this.temperature = source["temperature"]; + this.tint = source["tint"]; + this.gamma = source["gamma"]; + this.blackPoint = source["blackPoint"]; + this.whitePoint = source["whitePoint"]; + } + } - static createFrom(source: any = {}) { - return new Adjustments(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.vibrance = source['vibrance']; - this.saturation = source['saturation']; - this.contrast = source['contrast']; - this.brightness = source['brightness']; - this.shadows = source['shadows']; - this.highlights = source['highlights']; - this.hueShift = source['hueShift']; - this.temperature = source['temperature']; - this.tint = source['tint']; - this.gamma = source['gamma']; - this.blackPoint = source['blackPoint']; - this.whitePoint = source['whitePoint']; - } - } } export namespace favorites { - export class Favorite { - path: string; - type?: string; - data?: Record; - - static createFrom(source: any = {}) { - return new Favorite(source); - } + + export class Favorite { + path: string; + type?: string; + data?: Record; + + static createFrom(source: any = {}) { + return new Favorite(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.path = source["path"]; + this.type = source["type"]; + this.data = source["data"]; + } + } - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.path = source['path']; - this.type = source['type']; - this.data = source['data']; - } - } } export namespace ipc { - export class Request { - cmd: string; - path?: string; - mode?: string; - name?: string; - index?: number; - value?: string; - palette?: string[]; - vibrance?: number; - saturation?: number; - contrast?: number; - brightness?: number; - shadows?: number; - highlights?: number; - hue_shift?: number; - temperature?: number; - tint?: number; - gamma?: number; - black_point?: number; - white_point?: number; - light_mode?: boolean; - - static createFrom(source: any = {}) { - return new Request(source); - } + + export class Request { + cmd: string; + path?: string; + mode?: string; + name?: string; + index?: number; + value?: string; + palette?: string[]; + vibrance?: number; + saturation?: number; + contrast?: number; + brightness?: number; + shadows?: number; + highlights?: number; + hue_shift?: number; + temperature?: number; + tint?: number; + gamma?: number; + black_point?: number; + white_point?: number; + light_mode?: boolean; + + static createFrom(source: any = {}) { + return new Request(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.cmd = source["cmd"]; + this.path = source["path"]; + this.mode = source["mode"]; + this.name = source["name"]; + this.index = source["index"]; + this.value = source["value"]; + this.palette = source["palette"]; + this.vibrance = source["vibrance"]; + this.saturation = source["saturation"]; + this.contrast = source["contrast"]; + this.brightness = source["brightness"]; + this.shadows = source["shadows"]; + this.highlights = source["highlights"]; + this.hue_shift = source["hue_shift"]; + this.temperature = source["temperature"]; + this.tint = source["tint"]; + this.gamma = source["gamma"]; + this.black_point = source["black_point"]; + this.white_point = source["white_point"]; + this.light_mode = source["light_mode"]; + } + } + export class Response { + ok: boolean; + error?: string; + palette?: string[]; + light_mode?: boolean; + mode?: string; + wallpaper?: string; + data?: number[]; + + static createFrom(source: any = {}) { + return new Response(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.ok = source["ok"]; + this.error = source["error"]; + this.palette = source["palette"]; + this.light_mode = source["light_mode"]; + this.mode = source["mode"]; + this.wallpaper = source["wallpaper"]; + this.data = source["data"]; + } + } - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.cmd = source['cmd']; - this.path = source['path']; - this.mode = source['mode']; - this.name = source['name']; - this.index = source['index']; - this.value = source['value']; - this.palette = source['palette']; - this.vibrance = source['vibrance']; - this.saturation = source['saturation']; - this.contrast = source['contrast']; - this.brightness = source['brightness']; - this.shadows = source['shadows']; - this.highlights = source['highlights']; - this.hue_shift = source['hue_shift']; - this.temperature = source['temperature']; - this.tint = source['tint']; - this.gamma = source['gamma']; - this.black_point = source['black_point']; - this.white_point = source['white_point']; - this.light_mode = source['light_mode']; - } - } - export class Response { - ok: boolean; - error?: string; - palette?: string[]; - light_mode?: boolean; - mode?: string; - wallpaper?: string; - data?: number[]; - - static createFrom(source: any = {}) { - return new Response(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.ok = source['ok']; - this.error = source['error']; - this.palette = source['palette']; - this.light_mode = source['light_mode']; - this.mode = source['mode']; - this.wallpaper = source['wallpaper']; - this.data = source['data']; - } - } } export namespace main { - export class ApplyThemeRequest { - palette: string[]; - wallpaperPath: string; - lightMode: boolean; - additionalImages: string[]; - extendedColors: Record; - nativeColors: Record; - settings: theme.Settings; - appOverrides: Record; - - static createFrom(source: any = {}) { - return new ApplyThemeRequest(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.palette = source['palette']; - this.wallpaperPath = source['wallpaperPath']; - this.lightMode = source['lightMode']; - this.additionalImages = source['additionalImages']; - this.extendedColors = source['extendedColors']; - this.nativeColors = source['nativeColors']; - this.settings = this.convertValues( - source['settings'], - theme.Settings - ); - this.appOverrides = source['appOverrides']; - } - - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice && a.map) { - return (a as any[]).map(elem => - this.convertValues(elem, classs) - ); - } else if ('object' === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } - } - export class ExportThemeRequest { - name: string; - includedApps: string[]; - palette: string[]; - wallpaperPath: string; - lightMode: boolean; - additionalImages: string[]; - extendedColors: Record; - nativeColors: Record; - installToOmarchy: boolean; - appOverrides: Record; - - static createFrom(source: any = {}) { - return new ExportThemeRequest(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.name = source['name']; - this.includedApps = source['includedApps']; - this.palette = source['palette']; - this.wallpaperPath = source['wallpaperPath']; - this.lightMode = source['lightMode']; - this.additionalImages = source['additionalImages']; - this.extendedColors = source['extendedColors']; - this.nativeColors = source['nativeColors']; - this.installToOmarchy = source['installToOmarchy']; - this.appOverrides = source['appOverrides']; - } - } - export class ExternalImportPreview { - has_external_theme: boolean; - has_colors: boolean; - has_wallpaper: boolean; - source_url: string; - palette?: string[]; - wallpaper?: string; - theme_name?: string; - mode?: string; - edit: boolean; - omarchy_theme_name?: string; - - static createFrom(source: any = {}) { - return new ExternalImportPreview(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.has_external_theme = source['has_external_theme']; - this.has_colors = source['has_colors']; - this.has_wallpaper = source['has_wallpaper']; - this.source_url = source['source_url']; - this.palette = source['palette']; - this.wallpaper = source['wallpaper']; - this.theme_name = source['theme_name']; - this.mode = source['mode']; - this.edit = source['edit']; - this.omarchy_theme_name = source['omarchy_theme_name']; - } - } - export class ExtractFromImagesResult { - palette: string[]; - skipped: number; - - static createFrom(source: any = {}) { - return new ExtractFromImagesResult(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.palette = source['palette']; - this.skipped = source['skipped']; - } - } - export class ImportResult { - colors: string[]; - extendedColors: Record; - nativeColors: Record; - name: string; - path: string; - wallpaperPath: string; - lightMode: boolean; - - static createFrom(source: any = {}) { - return new ImportResult(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.colors = source['colors']; - this.extendedColors = source['extendedColors']; - this.nativeColors = source['nativeColors']; - this.name = source['name']; - this.path = source['path']; - this.wallpaperPath = source['wallpaperPath']; - this.lightMode = source['lightMode']; - } - } - export class SaveAndApplyThemeRequest { - name: string; - updateExisting: boolean; - palette: string[]; - wallpaperPath: string; - lightMode: boolean; - additionalImages: string[]; - extendedColors: Record; - nativeColors: Record; - settings: theme.Settings; - appOverrides: Record; - - static createFrom(source: any = {}) { - return new SaveAndApplyThemeRequest(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.name = source['name']; - this.updateExisting = source['updateExisting']; - this.palette = source['palette']; - this.wallpaperPath = source['wallpaperPath']; - this.lightMode = source['lightMode']; - this.additionalImages = source['additionalImages']; - this.extendedColors = source['extendedColors']; - this.nativeColors = source['nativeColors']; - this.settings = this.convertValues( - source['settings'], - theme.Settings - ); - this.appOverrides = source['appOverrides']; - } - - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice && a.map) { - return (a as any[]).map(elem => - this.convertValues(elem, classs) - ); - } else if ('object' === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } - } - export class SaveBlueprintRequest { - name: string; - palette: string[]; - wallpaperPath: string; - lightMode: boolean; - additionalImages: string[]; - lockedColors: number[]; - extendedColors: Record; - nativeColors: Record; - appOverrides: Record; - adjustments: Record; - - static createFrom(source: any = {}) { - return new SaveBlueprintRequest(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.name = source['name']; - this.palette = source['palette']; - this.wallpaperPath = source['wallpaperPath']; - this.lightMode = source['lightMode']; - this.additionalImages = source['additionalImages']; - this.lockedColors = source['lockedColors']; - this.extendedColors = source['extendedColors']; - this.nativeColors = source['nativeColors']; - this.appOverrides = source['appOverrides']; - this.adjustments = source['adjustments']; - } - } - export class SyncStateRequest { - palette: string[]; - wallpaperPath: string; - lightMode: boolean; - extendedColors: Record; - nativeColors: Record; - appOverrides: Record; - additionalImages: string[]; + + export class ApplyThemeRequest { + palette: string[]; + wallpaperPath: string; + lightMode: boolean; + additionalImages: string[]; + extendedColors: Record; + nativeColors: Record; + settings: theme.Settings; + appOverrides: Record; + + static createFrom(source: any = {}) { + return new ApplyThemeRequest(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.palette = source["palette"]; + this.wallpaperPath = source["wallpaperPath"]; + this.lightMode = source["lightMode"]; + this.additionalImages = source["additionalImages"]; + this.extendedColors = source["extendedColors"]; + this.nativeColors = source["nativeColors"]; + this.settings = this.convertValues(source["settings"], theme.Settings); + this.appOverrides = source["appOverrides"]; + } + + convertValues(a: any, classs: any, asMap: boolean = false): any { + if (!a) { + return a; + } + if (a.slice && a.map) { + return (a as any[]).map(elem => this.convertValues(elem, classs)); + } else if ("object" === typeof a) { + if (asMap) { + for (const key of Object.keys(a)) { + a[key] = new classs(a[key]); + } + return a; + } + return new classs(a); + } + return a; + } + } + export class ExportThemeRequest { + name: string; + includedApps: string[]; + palette: string[]; + wallpaperPath: string; + lightMode: boolean; + additionalImages: string[]; + extendedColors: Record; + nativeColors: Record; + installToOmarchy: boolean; + appOverrides: Record; + + static createFrom(source: any = {}) { + return new ExportThemeRequest(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.name = source["name"]; + this.includedApps = source["includedApps"]; + this.palette = source["palette"]; + this.wallpaperPath = source["wallpaperPath"]; + this.lightMode = source["lightMode"]; + this.additionalImages = source["additionalImages"]; + this.extendedColors = source["extendedColors"]; + this.nativeColors = source["nativeColors"]; + this.installToOmarchy = source["installToOmarchy"]; + this.appOverrides = source["appOverrides"]; + } + } + export class ExternalImportPreview { + has_external_theme: boolean; + has_colors: boolean; + has_wallpaper: boolean; + source_url: string; + palette?: string[]; + wallpaper?: string; + theme_name?: string; + mode?: string; + edit: boolean; + omarchy_theme_name?: string; + + static createFrom(source: any = {}) { + return new ExternalImportPreview(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.has_external_theme = source["has_external_theme"]; + this.has_colors = source["has_colors"]; + this.has_wallpaper = source["has_wallpaper"]; + this.source_url = source["source_url"]; + this.palette = source["palette"]; + this.wallpaper = source["wallpaper"]; + this.theme_name = source["theme_name"]; + this.mode = source["mode"]; + this.edit = source["edit"]; + this.omarchy_theme_name = source["omarchy_theme_name"]; + } + } + export class ExtractFromImagesResult { + palette: string[]; + skipped: number; + + static createFrom(source: any = {}) { + return new ExtractFromImagesResult(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.palette = source["palette"]; + this.skipped = source["skipped"]; + } + } + export class ImportResult { + colors: string[]; + extendedColors: Record; + nativeColors: Record; + name: string; + path: string; + wallpaperPath: string; + lightMode: boolean; + + static createFrom(source: any = {}) { + return new ImportResult(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.colors = source["colors"]; + this.extendedColors = source["extendedColors"]; + this.nativeColors = source["nativeColors"]; + this.name = source["name"]; + this.path = source["path"]; + this.wallpaperPath = source["wallpaperPath"]; + this.lightMode = source["lightMode"]; + } + } + export class SaveAndApplyThemeRequest { + name: string; + updateExisting: boolean; + palette: string[]; + wallpaperPath: string; + lightMode: boolean; + additionalImages: string[]; + extendedColors: Record; + nativeColors: Record; + settings: theme.Settings; + appOverrides: Record; + + static createFrom(source: any = {}) { + return new SaveAndApplyThemeRequest(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.name = source["name"]; + this.updateExisting = source["updateExisting"]; + this.palette = source["palette"]; + this.wallpaperPath = source["wallpaperPath"]; + this.lightMode = source["lightMode"]; + this.additionalImages = source["additionalImages"]; + this.extendedColors = source["extendedColors"]; + this.nativeColors = source["nativeColors"]; + this.settings = this.convertValues(source["settings"], theme.Settings); + this.appOverrides = source["appOverrides"]; + } + + convertValues(a: any, classs: any, asMap: boolean = false): any { + if (!a) { + return a; + } + if (a.slice && a.map) { + return (a as any[]).map(elem => this.convertValues(elem, classs)); + } else if ("object" === typeof a) { + if (asMap) { + for (const key of Object.keys(a)) { + a[key] = new classs(a[key]); + } + return a; + } + return new classs(a); + } + return a; + } + } + export class SaveBlueprintRequest { + name: string; + palette: string[]; + wallpaperPath: string; + lightMode: boolean; + additionalImages: string[]; + lockedColors: number[]; + extendedColors: Record; + nativeColors: Record; + appOverrides: Record; + adjustments: Record; + + static createFrom(source: any = {}) { + return new SaveBlueprintRequest(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.name = source["name"]; + this.palette = source["palette"]; + this.wallpaperPath = source["wallpaperPath"]; + this.lightMode = source["lightMode"]; + this.additionalImages = source["additionalImages"]; + this.lockedColors = source["lockedColors"]; + this.extendedColors = source["extendedColors"]; + this.nativeColors = source["nativeColors"]; + this.appOverrides = source["appOverrides"]; + this.adjustments = source["adjustments"]; + } + } + export class SyncStateRequest { + palette: string[]; + wallpaperPath: string; + lightMode: boolean; + extendedColors: Record; + nativeColors: Record; + appOverrides: Record; + additionalImages: string[]; + + static createFrom(source: any = {}) { + return new SyncStateRequest(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.palette = source["palette"]; + this.wallpaperPath = source["wallpaperPath"]; + this.lightMode = source["lightMode"]; + this.extendedColors = source["extendedColors"]; + this.nativeColors = source["nativeColors"]; + this.appOverrides = source["appOverrides"]; + this.additionalImages = source["additionalImages"]; + } + } - static createFrom(source: any = {}) { - return new SyncStateRequest(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.palette = source['palette']; - this.wallpaperPath = source['wallpaperPath']; - this.lightMode = source['lightMode']; - this.extendedColors = source['extendedColors']; - this.nativeColors = source['nativeColors']; - this.appOverrides = source['appOverrides']; - this.additionalImages = source['additionalImages']; - } - } } export namespace omarchy { - export class Capabilities { - available: boolean; - version: string; - themesDir: string; - stateDir: string; - currentTheme: string; - overrideApps: string[]; - - static createFrom(source: any = {}) { - return new Capabilities(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.available = source['available']; - this.version = source['version']; - this.themesDir = source['themesDir']; - this.stateDir = source['stateDir']; - this.currentTheme = source['currentTheme']; - this.overrideApps = source['overrideApps']; - } - } - export class Theme { - name: string; - path: string; - sources: string[]; - colors: string[]; - extendedColors: Record; - nativeColors: Record; - background: string; - foreground: string; - mode: string; - preview: string; - wallpapers: string[]; - isSymlink: boolean; - isOverlay: boolean; - isUserTheme: boolean; - canApply: boolean; - isCurrentTheme: boolean; - isAetherGenerated: boolean; + + export class Capabilities { + available: boolean; + version: string; + themesDir: string; + stateDir: string; + currentTheme: string; + overrideApps: string[]; + + static createFrom(source: any = {}) { + return new Capabilities(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.available = source["available"]; + this.version = source["version"]; + this.themesDir = source["themesDir"]; + this.stateDir = source["stateDir"]; + this.currentTheme = source["currentTheme"]; + this.overrideApps = source["overrideApps"]; + } + } + export class Theme { + name: string; + path: string; + sources: string[]; + colors: string[]; + extendedColors: Record; + nativeColors: Record; + background: string; + foreground: string; + mode: string; + preview: string; + wallpapers: string[]; + isSymlink: boolean; + isOverlay: boolean; + isUserTheme: boolean; + canApply: boolean; + isCurrentTheme: boolean; + isAetherGenerated: boolean; + + static createFrom(source: any = {}) { + return new Theme(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.name = source["name"]; + this.path = source["path"]; + this.sources = source["sources"]; + this.colors = source["colors"]; + this.extendedColors = source["extendedColors"]; + this.nativeColors = source["nativeColors"]; + this.background = source["background"]; + this.foreground = source["foreground"]; + this.mode = source["mode"]; + this.preview = source["preview"]; + this.wallpapers = source["wallpapers"]; + this.isSymlink = source["isSymlink"]; + this.isOverlay = source["isOverlay"]; + this.isUserTheme = source["isUserTheme"]; + this.canApply = source["canApply"]; + this.isCurrentTheme = source["isCurrentTheme"]; + this.isAetherGenerated = source["isAetherGenerated"]; + } + } - static createFrom(source: any = {}) { - return new Theme(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.name = source['name']; - this.path = source['path']; - this.sources = source['sources']; - this.colors = source['colors']; - this.extendedColors = source['extendedColors']; - this.nativeColors = source['nativeColors']; - this.background = source['background']; - this.foreground = source['foreground']; - this.mode = source['mode']; - this.preview = source['preview']; - this.wallpapers = source['wallpapers']; - this.isSymlink = source['isSymlink']; - this.isOverlay = source['isOverlay']; - this.isUserTheme = source['isUserTheme']; - this.canApply = source['canApply']; - this.isCurrentTheme = source['isCurrentTheme']; - this.isAetherGenerated = source['isAetherGenerated']; - } - } } export namespace template { - export class ColorRoles { - background: string; - foreground: string; - black: string; - red: string; - green: string; - yellow: string; - blue: string; - magenta: string; - cyan: string; - white: string; - bright_black: string; - bright_red: string; - bright_green: string; - bright_yellow: string; - bright_blue: string; - bright_magenta: string; - bright_cyan: string; - bright_white: string; - accent: string; - cursor: string; - selection_foreground: string; - selection_background: string; - - static createFrom(source: any = {}) { - return new ColorRoles(source); - } + + export class ColorRoles { + background: string; + foreground: string; + black: string; + red: string; + green: string; + yellow: string; + blue: string; + magenta: string; + cyan: string; + white: string; + bright_black: string; + bright_red: string; + bright_green: string; + bright_yellow: string; + bright_blue: string; + bright_magenta: string; + bright_cyan: string; + bright_white: string; + accent: string; + cursor: string; + selection_foreground: string; + selection_background: string; + + static createFrom(source: any = {}) { + return new ColorRoles(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.background = source["background"]; + this.foreground = source["foreground"]; + this.black = source["black"]; + this.red = source["red"]; + this.green = source["green"]; + this.yellow = source["yellow"]; + this.blue = source["blue"]; + this.magenta = source["magenta"]; + this.cyan = source["cyan"]; + this.white = source["white"]; + this.bright_black = source["bright_black"]; + this.bright_red = source["bright_red"]; + this.bright_green = source["bright_green"]; + this.bright_yellow = source["bright_yellow"]; + this.bright_blue = source["bright_blue"]; + this.bright_magenta = source["bright_magenta"]; + this.bright_cyan = source["bright_cyan"]; + this.bright_white = source["bright_white"]; + this.accent = source["accent"]; + this.cursor = source["cursor"]; + this.selection_foreground = source["selection_foreground"]; + this.selection_background = source["selection_background"]; + } + } - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.background = source['background']; - this.foreground = source['foreground']; - this.black = source['black']; - this.red = source['red']; - this.green = source['green']; - this.yellow = source['yellow']; - this.blue = source['blue']; - this.magenta = source['magenta']; - this.cyan = source['cyan']; - this.white = source['white']; - this.bright_black = source['bright_black']; - this.bright_red = source['bright_red']; - this.bright_green = source['bright_green']; - this.bright_yellow = source['bright_yellow']; - this.bright_blue = source['bright_blue']; - this.bright_magenta = source['bright_magenta']; - this.bright_cyan = source['bright_cyan']; - this.bright_white = source['bright_white']; - this.accent = source['accent']; - this.cursor = source['cursor']; - this.selection_foreground = source['selection_foreground']; - this.selection_background = source['selection_background']; - } - } } export namespace theme { - export class ApplyResult { - success: boolean; - isOmarchy: boolean; - themePath: string; - - static createFrom(source: any = {}) { - return new ApplyResult(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.success = source['success']; - this.isOmarchy = source['isOmarchy']; - this.themePath = source['themePath']; - } - } - export class Settings { - includeZed: boolean; - includeVscode: boolean; - includeNeovim: boolean; - selectedNeovimConfig: string; - includedApps?: Record; - excludedApps?: Record; - - static createFrom(source: any = {}) { - return new Settings(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.includeZed = source['includeZed']; - this.includeVscode = source['includeVscode']; - this.includeNeovim = source['includeNeovim']; - this.selectedNeovimConfig = source['selectedNeovimConfig']; - this.includedApps = source['includedApps']; - this.excludedApps = source['excludedApps']; - } - } - export class StateSnapshot { - palette: string[]; - wallpaperPath: string; - lightMode: boolean; - lockedColors: Record; - colorRoles: template.ColorRoles; - extendedColors: Record; - nativeColors: Record; - extractionMode: string; - additionalImages: string[]; - appOverrides: Record; - - static createFrom(source: any = {}) { - return new StateSnapshot(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.palette = source['palette']; - this.wallpaperPath = source['wallpaperPath']; - this.lightMode = source['lightMode']; - this.lockedColors = source['lockedColors']; - this.colorRoles = this.convertValues( - source['colorRoles'], - template.ColorRoles - ); - this.extendedColors = source['extendedColors']; - this.nativeColors = source['nativeColors']; - this.extractionMode = source['extractionMode']; - this.additionalImages = source['additionalImages']; - this.appOverrides = source['appOverrides']; - } + + export class ApplyResult { + success: boolean; + isOmarchy: boolean; + themePath: string; + + static createFrom(source: any = {}) { + return new ApplyResult(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.success = source["success"]; + this.isOmarchy = source["isOmarchy"]; + this.themePath = source["themePath"]; + } + } + export class Settings { + includeZed: boolean; + includeVscode: boolean; + includeNeovim: boolean; + selectedNeovimConfig: string; + includedApps?: Record; + excludedApps?: Record; + + static createFrom(source: any = {}) { + return new Settings(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.includeZed = source["includeZed"]; + this.includeVscode = source["includeVscode"]; + this.includeNeovim = source["includeNeovim"]; + this.selectedNeovimConfig = source["selectedNeovimConfig"]; + this.includedApps = source["includedApps"]; + this.excludedApps = source["excludedApps"]; + } + } + export class StateSnapshot { + palette: string[]; + wallpaperPath: string; + lightMode: boolean; + lockedColors: Record; + colorRoles: template.ColorRoles; + extendedColors: Record; + nativeColors: Record; + extractionMode: string; + additionalImages: string[]; + appOverrides: Record; + + static createFrom(source: any = {}) { + return new StateSnapshot(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.palette = source["palette"]; + this.wallpaperPath = source["wallpaperPath"]; + this.lightMode = source["lightMode"]; + this.lockedColors = source["lockedColors"]; + this.colorRoles = this.convertValues(source["colorRoles"], template.ColorRoles); + this.extendedColors = source["extendedColors"]; + this.nativeColors = source["nativeColors"]; + this.extractionMode = source["extractionMode"]; + this.additionalImages = source["additionalImages"]; + this.appOverrides = source["appOverrides"]; + } + + convertValues(a: any, classs: any, asMap: boolean = false): any { + if (!a) { + return a; + } + if (a.slice && a.map) { + return (a as any[]).map(elem => this.convertValues(elem, classs)); + } else if ("object" === typeof a) { + if (asMap) { + for (const key of Object.keys(a)) { + a[key] = new classs(a[key]); + } + return a; + } + return new classs(a); + } + return a; + } + } - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice && a.map) { - return (a as any[]).map(elem => - this.convertValues(elem, classs) - ); - } else if ('object' === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } - } } export namespace wallhaven { - export class SearchMeta { - current_page: number; - last_page: number; - total: number; - seed?: string; + + export class SearchMeta { + current_page: number; + last_page: number; + total: number; + seed?: string; + + static createFrom(source: any = {}) { + return new SearchMeta(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.current_page = source["current_page"]; + this.last_page = source["last_page"]; + this.total = source["total"]; + this.seed = source["seed"]; + } + } + export class SearchParams { + q: string; + categories: string; + purity: string; + sorting: string; + order: string; + page: number; + atleast: string; + colors: string; + + static createFrom(source: any = {}) { + return new SearchParams(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.q = source["q"]; + this.categories = source["categories"]; + this.purity = source["purity"]; + this.sorting = source["sorting"]; + this.order = source["order"]; + this.page = source["page"]; + this.atleast = source["atleast"]; + this.colors = source["colors"]; + } + } + export class WallpaperInfo { + id: string; + url: string; + path: string; + resolution: string; + file_size: number; + category: string; + purity: string; + thumbs: Record; + + static createFrom(source: any = {}) { + return new WallpaperInfo(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.id = source["id"]; + this.url = source["url"]; + this.path = source["path"]; + this.resolution = source["resolution"]; + this.file_size = source["file_size"]; + this.category = source["category"]; + this.purity = source["purity"]; + this.thumbs = source["thumbs"]; + } + } + export class SearchResult { + data: WallpaperInfo[]; + meta: SearchMeta; + + static createFrom(source: any = {}) { + return new SearchResult(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.data = this.convertValues(source["data"], WallpaperInfo); + this.meta = this.convertValues(source["meta"], SearchMeta); + } + + convertValues(a: any, classs: any, asMap: boolean = false): any { + if (!a) { + return a; + } + if (a.slice && a.map) { + return (a as any[]).map(elem => this.convertValues(elem, classs)); + } else if ("object" === typeof a) { + if (asMap) { + for (const key of Object.keys(a)) { + a[key] = new classs(a[key]); + } + return a; + } + return new classs(a); + } + return a; + } + } - static createFrom(source: any = {}) { - return new SearchMeta(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.current_page = source['current_page']; - this.last_page = source['last_page']; - this.total = source['total']; - this.seed = source['seed']; - } - } - export class SearchParams { - q: string; - categories: string; - purity: string; - sorting: string; - order: string; - page: number; - atleast: string; - colors: string; - - static createFrom(source: any = {}) { - return new SearchParams(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.q = source['q']; - this.categories = source['categories']; - this.purity = source['purity']; - this.sorting = source['sorting']; - this.order = source['order']; - this.page = source['page']; - this.atleast = source['atleast']; - this.colors = source['colors']; - } - } - export class WallpaperInfo { - id: string; - url: string; - path: string; - resolution: string; - file_size: number; - category: string; - purity: string; - thumbs: Record; - - static createFrom(source: any = {}) { - return new WallpaperInfo(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.id = source['id']; - this.url = source['url']; - this.path = source['path']; - this.resolution = source['resolution']; - this.file_size = source['file_size']; - this.category = source['category']; - this.purity = source['purity']; - this.thumbs = source['thumbs']; - } - } - export class SearchResult { - data: WallpaperInfo[]; - meta: SearchMeta; - - static createFrom(source: any = {}) { - return new SearchResult(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.data = this.convertValues(source['data'], WallpaperInfo); - this.meta = this.convertValues(source['meta'], SearchMeta); - } - - convertValues(a: any, classs: any, asMap: boolean = false): any { - if (!a) { - return a; - } - if (a.slice && a.map) { - return (a as any[]).map(elem => - this.convertValues(elem, classs) - ); - } else if ('object' === typeof a) { - if (asMap) { - for (const key of Object.keys(a)) { - a[key] = new classs(a[key]); - } - return a; - } - return new classs(a); - } - return a; - } - } } export namespace wallpaper { - export class WallpaperInfo { - path: string; - name: string; - size: number; - modTime: number; + + export class WallpaperInfo { + path: string; + name: string; + size: number; + modTime: number; + + static createFrom(source: any = {}) { + return new WallpaperInfo(source); + } + + constructor(source: any = {}) { + if ('string' === typeof source) source = JSON.parse(source); + this.path = source["path"]; + this.name = source["name"]; + this.size = source["size"]; + this.modTime = source["modTime"]; + } + } - static createFrom(source: any = {}) { - return new WallpaperInfo(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) source = JSON.parse(source); - this.path = source['path']; - this.name = source['name']; - this.size = source['size']; - this.modTime = source['modTime']; - } - } } + diff --git a/frontend/wailsjs/runtime/runtime.d.ts b/frontend/wailsjs/runtime/runtime.d.ts index 713e3f86..3bbea848 100644 --- a/frontend/wailsjs/runtime/runtime.d.ts +++ b/frontend/wailsjs/runtime/runtime.d.ts @@ -21,8 +21,8 @@ export interface Size { export interface Screen { isCurrent: boolean; isPrimary: boolean; - width: number; - height: number; + width : number + height : number } // Environment information such as platform, buildtype, ... @@ -38,32 +38,19 @@ export interface EnvironmentInfo { export function EventsEmit(eventName: string, ...data: any): void; // [EventsOn](https://wails.io/docs/reference/runtime/events#eventson) sets up a listener for the given event name. -export function EventsOn( - eventName: string, - callback: (...data: any) => void -): () => void; +export function EventsOn(eventName: string, callback: (...data: any) => void): () => void; // [EventsOnMultiple](https://wails.io/docs/reference/runtime/events#eventsonmultiple) // sets up a listener for the given event name, but will only trigger a given number times. -export function EventsOnMultiple( - eventName: string, - callback: (...data: any) => void, - maxCallbacks: number -): () => void; +export function EventsOnMultiple(eventName: string, callback: (...data: any) => void, maxCallbacks: number): () => void; // [EventsOnce](https://wails.io/docs/reference/runtime/events#eventsonce) // sets up a listener for the given event name, but will only trigger once. -export function EventsOnce( - eventName: string, - callback: (...data: any) => void -): () => void; +export function EventsOnce(eventName: string, callback: (...data: any) => void): () => void; // [EventsOff](https://wails.io/docs/reference/runtime/events#eventsoff) // unregisters the listener for the given event name. -export function EventsOff( - eventName: string, - ...additionalEventNames: string[] -): void; +export function EventsOff(eventName: string, ...additionalEventNames: string[]): void; // [EventsOffAll](https://wails.io/docs/reference/runtime/events#eventsoffall) // unregisters all listeners. @@ -213,12 +200,7 @@ export function WindowIsNormal(): Promise; // [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour) // Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels. -export function WindowSetBackgroundColour( - R: number, - G: number, - B: number, - A: number -): void; +export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void; // [ScreenGetAll](https://wails.io/docs/reference/runtime/window#screengetall) // Gets the all screens. Call this anew each time you want to refresh data from the underlying windowing system. @@ -254,17 +236,95 @@ export function ClipboardSetText(text: string): Promise; // [OnFileDrop](https://wails.io/docs/reference/runtime/draganddrop#onfiledrop) // OnFileDrop listens to drag and drop events and calls the callback with the coordinates of the drop and an array of path strings. -export function OnFileDrop( - callback: (x: number, y: number, paths: string[]) => void, - useDropTarget: boolean -): void; +export function OnFileDrop(callback: (x: number, y: number ,paths: string[]) => void, useDropTarget: boolean) :void // [OnFileDropOff](https://wails.io/docs/reference/runtime/draganddrop#dragandddropoff) // OnFileDropOff removes the drag and drop listeners and handlers. -export function OnFileDropOff(): void; +export function OnFileDropOff() :void // Check if the file path resolver is available export function CanResolveFilePaths(): boolean; // Resolves file paths for an array of files -export function ResolveFilePaths(files: File[]): void; +export function ResolveFilePaths(files: File[]): void + +// Notification types +export interface NotificationOptions { + id: string; + title: string; + subtitle?: string; // macOS and Linux only + body?: string; + categoryId?: string; + data?: { [key: string]: any }; +} + +export interface NotificationAction { + id?: string; + title?: string; + destructive?: boolean; // macOS-specific +} + +export interface NotificationCategory { + id?: string; + actions?: NotificationAction[]; + hasReplyField?: boolean; + replyPlaceholder?: string; + replyButtonTitle?: string; +} + +// [InitializeNotifications](https://wails.io/docs/reference/runtime/notification#initializenotifications) +// Initializes the notification service for the application. +// This must be called before sending any notifications. +export function InitializeNotifications(): Promise; + +// [CleanupNotifications](https://wails.io/docs/reference/runtime/notification#cleanupnotifications) +// Cleans up notification resources and releases any held connections. +export function CleanupNotifications(): Promise; + +// [IsNotificationAvailable](https://wails.io/docs/reference/runtime/notification#isnotificationavailable) +// Checks if notifications are available on the current platform. +export function IsNotificationAvailable(): Promise; + +// [RequestNotificationAuthorization](https://wails.io/docs/reference/runtime/notification#requestnotificationauthorization) +// Requests notification authorization from the user (macOS only). +export function RequestNotificationAuthorization(): Promise; + +// [CheckNotificationAuthorization](https://wails.io/docs/reference/runtime/notification#checknotificationauthorization) +// Checks the current notification authorization status (macOS only). +export function CheckNotificationAuthorization(): Promise; + +// [SendNotification](https://wails.io/docs/reference/runtime/notification#sendnotification) +// Sends a basic notification with the given options. +export function SendNotification(options: NotificationOptions): Promise; + +// [SendNotificationWithActions](https://wails.io/docs/reference/runtime/notification#sendnotificationwithactions) +// Sends a notification with action buttons. Requires a registered category. +export function SendNotificationWithActions(options: NotificationOptions): Promise; + +// [RegisterNotificationCategory](https://wails.io/docs/reference/runtime/notification#registernotificationcategory) +// Registers a notification category that can be used with SendNotificationWithActions. +export function RegisterNotificationCategory(category: NotificationCategory): Promise; + +// [RemoveNotificationCategory](https://wails.io/docs/reference/runtime/notification#removenotificationcategory) +// Removes a previously registered notification category. +export function RemoveNotificationCategory(categoryId: string): Promise; + +// [RemoveAllPendingNotifications](https://wails.io/docs/reference/runtime/notification#removeallpendingnotifications) +// Removes all pending notifications from the notification center. +export function RemoveAllPendingNotifications(): Promise; + +// [RemovePendingNotification](https://wails.io/docs/reference/runtime/notification#removependingnotification) +// Removes a specific pending notification by its identifier. +export function RemovePendingNotification(identifier: string): Promise; + +// [RemoveAllDeliveredNotifications](https://wails.io/docs/reference/runtime/notification#removealldeliverednotifications) +// Removes all delivered notifications from the notification center. +export function RemoveAllDeliveredNotifications(): Promise; + +// [RemoveDeliveredNotification](https://wails.io/docs/reference/runtime/notification#removedeliverednotification) +// Removes a specific delivered notification by its identifier. +export function RemoveDeliveredNotification(identifier: string): Promise; + +// [RemoveNotification](https://wails.io/docs/reference/runtime/notification#removenotification) +// Removes a notification by its identifier (cross-platform convenience function). +export function RemoveNotification(identifier: string): Promise; \ No newline at end of file diff --git a/frontend/wailsjs/runtime/runtime.js b/frontend/wailsjs/runtime/runtime.js index 7674e0de..556621ee 100644 --- a/frontend/wailsjs/runtime/runtime.js +++ b/frontend/wailsjs/runtime/runtime.js @@ -49,7 +49,7 @@ export function EventsOff(eventName, ...additionalEventNames) { } export function EventsOffAll() { - return window.runtime.EventsOffAll(); + return window.runtime.EventsOffAll(); } export function EventsOnce(eventName, callback) { @@ -240,3 +240,59 @@ export function CanResolveFilePaths() { export function ResolveFilePaths(files) { return window.runtime.ResolveFilePaths(files); } + +export function InitializeNotifications() { + return window.runtime.InitializeNotifications(); +} + +export function CleanupNotifications() { + return window.runtime.CleanupNotifications(); +} + +export function IsNotificationAvailable() { + return window.runtime.IsNotificationAvailable(); +} + +export function RequestNotificationAuthorization() { + return window.runtime.RequestNotificationAuthorization(); +} + +export function CheckNotificationAuthorization() { + return window.runtime.CheckNotificationAuthorization(); +} + +export function SendNotification(options) { + return window.runtime.SendNotification(options); +} + +export function SendNotificationWithActions(options) { + return window.runtime.SendNotificationWithActions(options); +} + +export function RegisterNotificationCategory(category) { + return window.runtime.RegisterNotificationCategory(category); +} + +export function RemoveNotificationCategory(categoryId) { + return window.runtime.RemoveNotificationCategory(categoryId); +} + +export function RemoveAllPendingNotifications() { + return window.runtime.RemoveAllPendingNotifications(); +} + +export function RemovePendingNotification(identifier) { + return window.runtime.RemovePendingNotification(identifier); +} + +export function RemoveAllDeliveredNotifications() { + return window.runtime.RemoveAllDeliveredNotifications(); +} + +export function RemoveDeliveredNotification(identifier) { + return window.runtime.RemoveDeliveredNotification(identifier); +} + +export function RemoveNotification(identifier) { + return window.runtime.RemoveNotification(identifier); +} \ No newline at end of file diff --git a/go.mod b/go.mod index f9307500..86de89c2 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,14 @@ module aether -go 1.23 +go 1.25.0 require ( - github.com/wailsapp/wails/v2 v2.11.0 - golang.org/x/image v0.23.0 + github.com/wailsapp/wails/v2 v2.16.0 + golang.org/x/image v0.41.0 ) require ( + git.sr.ht/~jackmordaunt/go-toast/v2 v2.0.3 // indirect github.com/bep/debounce v1.2.1 // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect @@ -31,8 +32,8 @@ require ( github.com/valyala/fasttemplate v1.2.2 // indirect github.com/wailsapp/go-webview2 v1.0.22 // indirect github.com/wailsapp/mimetype v1.4.1 // indirect - golang.org/x/crypto v0.33.0 // indirect - golang.org/x/net v0.35.0 // indirect - golang.org/x/sys v0.30.0 // indirect - golang.org/x/text v0.22.0 // indirect + golang.org/x/crypto v0.53.0 // indirect + golang.org/x/net v0.56.0 // indirect + golang.org/x/sys v0.46.0 // indirect + golang.org/x/text v0.39.0 // indirect ) diff --git a/go.sum b/go.sum index fcaee669..3134dde0 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +git.sr.ht/~jackmordaunt/go-toast/v2 v2.0.3 h1:N3IGoHHp9pb6mj1cbXbuaSXV/UMKwmbKLf53nQmtqMA= +git.sr.ht/~jackmordaunt/go-toast/v2 v2.0.3/go.mod h1:QtOLZGz8olr4qH2vWK0QH0w0O4T9fEIjMuWpKUsH7nc= github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY= github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -45,8 +47,8 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/samber/lo v1.49.1 h1:4BIFyVfuQSEpluc7Fua+j1NolZHiEHEpaSEKdsH0tew= github.com/samber/lo v1.49.1/go.mod h1:dO6KHFzUKXgP8LDhU0oI8d2hekjXnGOu0DB8Jecxd6o= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tkrajina/go-reflector v0.5.8 h1:yPADHrwmUbMq4RGEyaOUpz2H90sRsETNVpjzo3DLVQQ= github.com/tkrajina/go-reflector v0.5.8/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= @@ -57,27 +59,27 @@ github.com/wailsapp/go-webview2 v1.0.22 h1:YT61F5lj+GGaat5OB96Aa3b4QA+mybD0Ggq6N github.com/wailsapp/go-webview2 v1.0.22/go.mod h1:qJmWAmAmaniuKGZPWwne+uor3AHMB5PFhqiK0Bbj8kc= github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= -github.com/wailsapp/wails/v2 v2.11.0 h1:seLacV8pqupq32IjS4Y7V8ucab0WZwtK6VvUVxSBtqQ= -github.com/wailsapp/wails/v2 v2.11.0/go.mod h1:jrf0ZaM6+GBc1wRmXsM8cIvzlg0karYin3erahI4+0k= -golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= -golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= -golang.org/x/image v0.23.0 h1:HseQ7c2OpPKTPVzNjG5fwJsOTCiiwS4QdsYi5XU6H68= -golang.org/x/image v0.23.0/go.mod h1:wJJBTdLfCCf3tiHa1fNxpZmUI4mmoZvwMCPP0ddoNKY= +github.com/wailsapp/wails/v2 v2.16.0 h1:hLYrSHUUq6hRXl3rWT9ZXiyFIgM94nVN9Ns6iEJzxyw= +github.com/wailsapp/wails/v2 v2.16.0/go.mod h1:scxrgwfsv6yR6fE6cCF+Flfl+JeU+SR87T9x4kILJ6M= +golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto= +golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio= +golang.org/x/image v0.41.0 h1:8wS72eGJMJaBxK6okTzd4WaXumUlTVlb753MlsSvTCo= +golang.org/x/image v0.41.0/go.mod h1:uIc348UZMSvS5Z65CVZ7iDPaNobNFEPeJ4kbqTOszmA= golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= -golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= +golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o= +golang.org/x/net v0.56.0/go.mod h1:D3Ku6r+V6JROoZK144D2XfMHFcMq/0zSfLelVTCFKec= golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= -golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= +golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= -golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/text v0.39.0 h1:UbZz4pLOvn600D6Oh6GGEI6VAmndrEBLv8/6BEXzyus= +golang.org/x/text v0.39.0/go.mod h1:3UwRclnC2g0TU9x8PZiyfOajCd1zaUNHF9cvqcQZ+ZM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From d2f2aef62c31d847a6a9c75245a58560e15fbea8 Mon Sep 17 00:00:00 2001 From: Maximilian Jakob Maag Date: Mon, 14 Sep 2026 21:57:48 +0200 Subject: [PATCH 2/3] Remove spurious frontend/frontend directory --- .../frontend/wailsjs/runtime/package.json | 24 -- .../frontend/wailsjs/runtime/runtime.d.ts | 330 ------------------ frontend/frontend/wailsjs/runtime/runtime.js | 298 ---------------- 3 files changed, 652 deletions(-) delete mode 100644 frontend/frontend/wailsjs/runtime/package.json delete mode 100644 frontend/frontend/wailsjs/runtime/runtime.d.ts delete mode 100644 frontend/frontend/wailsjs/runtime/runtime.js diff --git a/frontend/frontend/wailsjs/runtime/package.json b/frontend/frontend/wailsjs/runtime/package.json deleted file mode 100644 index 1e7c8a5d..00000000 --- a/frontend/frontend/wailsjs/runtime/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@wailsapp/runtime", - "version": "2.0.0", - "description": "Wails Javascript runtime library", - "main": "runtime.js", - "types": "runtime.d.ts", - "scripts": { - }, - "repository": { - "type": "git", - "url": "git+https://github.com/wailsapp/wails.git" - }, - "keywords": [ - "Wails", - "Javascript", - "Go" - ], - "author": "Lea Anthony ", - "license": "MIT", - "bugs": { - "url": "https://github.com/wailsapp/wails/issues" - }, - "homepage": "https://github.com/wailsapp/wails#readme" -} diff --git a/frontend/frontend/wailsjs/runtime/runtime.d.ts b/frontend/frontend/wailsjs/runtime/runtime.d.ts deleted file mode 100644 index 3bbea848..00000000 --- a/frontend/frontend/wailsjs/runtime/runtime.d.ts +++ /dev/null @@ -1,330 +0,0 @@ -/* - _ __ _ __ -| | / /___ _(_) /____ -| | /| / / __ `/ / / ___/ -| |/ |/ / /_/ / / (__ ) -|__/|__/\__,_/_/_/____/ -The electron alternative for Go -(c) Lea Anthony 2019-present -*/ - -export interface Position { - x: number; - y: number; -} - -export interface Size { - w: number; - h: number; -} - -export interface Screen { - isCurrent: boolean; - isPrimary: boolean; - width : number - height : number -} - -// Environment information such as platform, buildtype, ... -export interface EnvironmentInfo { - buildType: string; - platform: string; - arch: string; -} - -// [EventsEmit](https://wails.io/docs/reference/runtime/events#eventsemit) -// emits the given event. Optional data may be passed with the event. -// This will trigger any event listeners. -export function EventsEmit(eventName: string, ...data: any): void; - -// [EventsOn](https://wails.io/docs/reference/runtime/events#eventson) sets up a listener for the given event name. -export function EventsOn(eventName: string, callback: (...data: any) => void): () => void; - -// [EventsOnMultiple](https://wails.io/docs/reference/runtime/events#eventsonmultiple) -// sets up a listener for the given event name, but will only trigger a given number times. -export function EventsOnMultiple(eventName: string, callback: (...data: any) => void, maxCallbacks: number): () => void; - -// [EventsOnce](https://wails.io/docs/reference/runtime/events#eventsonce) -// sets up a listener for the given event name, but will only trigger once. -export function EventsOnce(eventName: string, callback: (...data: any) => void): () => void; - -// [EventsOff](https://wails.io/docs/reference/runtime/events#eventsoff) -// unregisters the listener for the given event name. -export function EventsOff(eventName: string, ...additionalEventNames: string[]): void; - -// [EventsOffAll](https://wails.io/docs/reference/runtime/events#eventsoffall) -// unregisters all listeners. -export function EventsOffAll(): void; - -// [LogPrint](https://wails.io/docs/reference/runtime/log#logprint) -// logs the given message as a raw message -export function LogPrint(message: string): void; - -// [LogTrace](https://wails.io/docs/reference/runtime/log#logtrace) -// logs the given message at the `trace` log level. -export function LogTrace(message: string): void; - -// [LogDebug](https://wails.io/docs/reference/runtime/log#logdebug) -// logs the given message at the `debug` log level. -export function LogDebug(message: string): void; - -// [LogError](https://wails.io/docs/reference/runtime/log#logerror) -// logs the given message at the `error` log level. -export function LogError(message: string): void; - -// [LogFatal](https://wails.io/docs/reference/runtime/log#logfatal) -// logs the given message at the `fatal` log level. -// The application will quit after calling this method. -export function LogFatal(message: string): void; - -// [LogInfo](https://wails.io/docs/reference/runtime/log#loginfo) -// logs the given message at the `info` log level. -export function LogInfo(message: string): void; - -// [LogWarning](https://wails.io/docs/reference/runtime/log#logwarning) -// logs the given message at the `warning` log level. -export function LogWarning(message: string): void; - -// [WindowReload](https://wails.io/docs/reference/runtime/window#windowreload) -// Forces a reload by the main application as well as connected browsers. -export function WindowReload(): void; - -// [WindowReloadApp](https://wails.io/docs/reference/runtime/window#windowreloadapp) -// Reloads the application frontend. -export function WindowReloadApp(): void; - -// [WindowSetAlwaysOnTop](https://wails.io/docs/reference/runtime/window#windowsetalwaysontop) -// Sets the window AlwaysOnTop or not on top. -export function WindowSetAlwaysOnTop(b: boolean): void; - -// [WindowSetSystemDefaultTheme](https://wails.io/docs/next/reference/runtime/window#windowsetsystemdefaulttheme) -// *Windows only* -// Sets window theme to system default (dark/light). -export function WindowSetSystemDefaultTheme(): void; - -// [WindowSetLightTheme](https://wails.io/docs/next/reference/runtime/window#windowsetlighttheme) -// *Windows only* -// Sets window to light theme. -export function WindowSetLightTheme(): void; - -// [WindowSetDarkTheme](https://wails.io/docs/next/reference/runtime/window#windowsetdarktheme) -// *Windows only* -// Sets window to dark theme. -export function WindowSetDarkTheme(): void; - -// [WindowCenter](https://wails.io/docs/reference/runtime/window#windowcenter) -// Centers the window on the monitor the window is currently on. -export function WindowCenter(): void; - -// [WindowSetTitle](https://wails.io/docs/reference/runtime/window#windowsettitle) -// Sets the text in the window title bar. -export function WindowSetTitle(title: string): void; - -// [WindowFullscreen](https://wails.io/docs/reference/runtime/window#windowfullscreen) -// Makes the window full screen. -export function WindowFullscreen(): void; - -// [WindowUnfullscreen](https://wails.io/docs/reference/runtime/window#windowunfullscreen) -// Restores the previous window dimensions and position prior to full screen. -export function WindowUnfullscreen(): void; - -// [WindowIsFullscreen](https://wails.io/docs/reference/runtime/window#windowisfullscreen) -// Returns the state of the window, i.e. whether the window is in full screen mode or not. -export function WindowIsFullscreen(): Promise; - -// [WindowSetSize](https://wails.io/docs/reference/runtime/window#windowsetsize) -// Sets the width and height of the window. -export function WindowSetSize(width: number, height: number): void; - -// [WindowGetSize](https://wails.io/docs/reference/runtime/window#windowgetsize) -// Gets the width and height of the window. -export function WindowGetSize(): Promise; - -// [WindowSetMaxSize](https://wails.io/docs/reference/runtime/window#windowsetmaxsize) -// Sets the maximum window size. Will resize the window if the window is currently larger than the given dimensions. -// Setting a size of 0,0 will disable this constraint. -export function WindowSetMaxSize(width: number, height: number): void; - -// [WindowSetMinSize](https://wails.io/docs/reference/runtime/window#windowsetminsize) -// Sets the minimum window size. Will resize the window if the window is currently smaller than the given dimensions. -// Setting a size of 0,0 will disable this constraint. -export function WindowSetMinSize(width: number, height: number): void; - -// [WindowSetPosition](https://wails.io/docs/reference/runtime/window#windowsetposition) -// Sets the window position relative to the monitor the window is currently on. -export function WindowSetPosition(x: number, y: number): void; - -// [WindowGetPosition](https://wails.io/docs/reference/runtime/window#windowgetposition) -// Gets the window position relative to the monitor the window is currently on. -export function WindowGetPosition(): Promise; - -// [WindowHide](https://wails.io/docs/reference/runtime/window#windowhide) -// Hides the window. -export function WindowHide(): void; - -// [WindowShow](https://wails.io/docs/reference/runtime/window#windowshow) -// Shows the window, if it is currently hidden. -export function WindowShow(): void; - -// [WindowMaximise](https://wails.io/docs/reference/runtime/window#windowmaximise) -// Maximises the window to fill the screen. -export function WindowMaximise(): void; - -// [WindowToggleMaximise](https://wails.io/docs/reference/runtime/window#windowtogglemaximise) -// Toggles between Maximised and UnMaximised. -export function WindowToggleMaximise(): void; - -// [WindowUnmaximise](https://wails.io/docs/reference/runtime/window#windowunmaximise) -// Restores the window to the dimensions and position prior to maximising. -export function WindowUnmaximise(): void; - -// [WindowIsMaximised](https://wails.io/docs/reference/runtime/window#windowismaximised) -// Returns the state of the window, i.e. whether the window is maximised or not. -export function WindowIsMaximised(): Promise; - -// [WindowMinimise](https://wails.io/docs/reference/runtime/window#windowminimise) -// Minimises the window. -export function WindowMinimise(): void; - -// [WindowUnminimise](https://wails.io/docs/reference/runtime/window#windowunminimise) -// Restores the window to the dimensions and position prior to minimising. -export function WindowUnminimise(): void; - -// [WindowIsMinimised](https://wails.io/docs/reference/runtime/window#windowisminimised) -// Returns the state of the window, i.e. whether the window is minimised or not. -export function WindowIsMinimised(): Promise; - -// [WindowIsNormal](https://wails.io/docs/reference/runtime/window#windowisnormal) -// Returns the state of the window, i.e. whether the window is normal or not. -export function WindowIsNormal(): Promise; - -// [WindowSetBackgroundColour](https://wails.io/docs/reference/runtime/window#windowsetbackgroundcolour) -// Sets the background colour of the window to the given RGBA colour definition. This colour will show through for all transparent pixels. -export function WindowSetBackgroundColour(R: number, G: number, B: number, A: number): void; - -// [ScreenGetAll](https://wails.io/docs/reference/runtime/window#screengetall) -// Gets the all screens. Call this anew each time you want to refresh data from the underlying windowing system. -export function ScreenGetAll(): Promise; - -// [BrowserOpenURL](https://wails.io/docs/reference/runtime/browser#browseropenurl) -// Opens the given URL in the system browser. -export function BrowserOpenURL(url: string): void; - -// [Environment](https://wails.io/docs/reference/runtime/intro#environment) -// Returns information about the environment -export function Environment(): Promise; - -// [Quit](https://wails.io/docs/reference/runtime/intro#quit) -// Quits the application. -export function Quit(): void; - -// [Hide](https://wails.io/docs/reference/runtime/intro#hide) -// Hides the application. -export function Hide(): void; - -// [Show](https://wails.io/docs/reference/runtime/intro#show) -// Shows the application. -export function Show(): void; - -// [ClipboardGetText](https://wails.io/docs/reference/runtime/clipboard#clipboardgettext) -// Returns the current text stored on clipboard -export function ClipboardGetText(): Promise; - -// [ClipboardSetText](https://wails.io/docs/reference/runtime/clipboard#clipboardsettext) -// Sets a text on the clipboard -export function ClipboardSetText(text: string): Promise; - -// [OnFileDrop](https://wails.io/docs/reference/runtime/draganddrop#onfiledrop) -// OnFileDrop listens to drag and drop events and calls the callback with the coordinates of the drop and an array of path strings. -export function OnFileDrop(callback: (x: number, y: number ,paths: string[]) => void, useDropTarget: boolean) :void - -// [OnFileDropOff](https://wails.io/docs/reference/runtime/draganddrop#dragandddropoff) -// OnFileDropOff removes the drag and drop listeners and handlers. -export function OnFileDropOff() :void - -// Check if the file path resolver is available -export function CanResolveFilePaths(): boolean; - -// Resolves file paths for an array of files -export function ResolveFilePaths(files: File[]): void - -// Notification types -export interface NotificationOptions { - id: string; - title: string; - subtitle?: string; // macOS and Linux only - body?: string; - categoryId?: string; - data?: { [key: string]: any }; -} - -export interface NotificationAction { - id?: string; - title?: string; - destructive?: boolean; // macOS-specific -} - -export interface NotificationCategory { - id?: string; - actions?: NotificationAction[]; - hasReplyField?: boolean; - replyPlaceholder?: string; - replyButtonTitle?: string; -} - -// [InitializeNotifications](https://wails.io/docs/reference/runtime/notification#initializenotifications) -// Initializes the notification service for the application. -// This must be called before sending any notifications. -export function InitializeNotifications(): Promise; - -// [CleanupNotifications](https://wails.io/docs/reference/runtime/notification#cleanupnotifications) -// Cleans up notification resources and releases any held connections. -export function CleanupNotifications(): Promise; - -// [IsNotificationAvailable](https://wails.io/docs/reference/runtime/notification#isnotificationavailable) -// Checks if notifications are available on the current platform. -export function IsNotificationAvailable(): Promise; - -// [RequestNotificationAuthorization](https://wails.io/docs/reference/runtime/notification#requestnotificationauthorization) -// Requests notification authorization from the user (macOS only). -export function RequestNotificationAuthorization(): Promise; - -// [CheckNotificationAuthorization](https://wails.io/docs/reference/runtime/notification#checknotificationauthorization) -// Checks the current notification authorization status (macOS only). -export function CheckNotificationAuthorization(): Promise; - -// [SendNotification](https://wails.io/docs/reference/runtime/notification#sendnotification) -// Sends a basic notification with the given options. -export function SendNotification(options: NotificationOptions): Promise; - -// [SendNotificationWithActions](https://wails.io/docs/reference/runtime/notification#sendnotificationwithactions) -// Sends a notification with action buttons. Requires a registered category. -export function SendNotificationWithActions(options: NotificationOptions): Promise; - -// [RegisterNotificationCategory](https://wails.io/docs/reference/runtime/notification#registernotificationcategory) -// Registers a notification category that can be used with SendNotificationWithActions. -export function RegisterNotificationCategory(category: NotificationCategory): Promise; - -// [RemoveNotificationCategory](https://wails.io/docs/reference/runtime/notification#removenotificationcategory) -// Removes a previously registered notification category. -export function RemoveNotificationCategory(categoryId: string): Promise; - -// [RemoveAllPendingNotifications](https://wails.io/docs/reference/runtime/notification#removeallpendingnotifications) -// Removes all pending notifications from the notification center. -export function RemoveAllPendingNotifications(): Promise; - -// [RemovePendingNotification](https://wails.io/docs/reference/runtime/notification#removependingnotification) -// Removes a specific pending notification by its identifier. -export function RemovePendingNotification(identifier: string): Promise; - -// [RemoveAllDeliveredNotifications](https://wails.io/docs/reference/runtime/notification#removealldeliverednotifications) -// Removes all delivered notifications from the notification center. -export function RemoveAllDeliveredNotifications(): Promise; - -// [RemoveDeliveredNotification](https://wails.io/docs/reference/runtime/notification#removedeliverednotification) -// Removes a specific delivered notification by its identifier. -export function RemoveDeliveredNotification(identifier: string): Promise; - -// [RemoveNotification](https://wails.io/docs/reference/runtime/notification#removenotification) -// Removes a notification by its identifier (cross-platform convenience function). -export function RemoveNotification(identifier: string): Promise; \ No newline at end of file diff --git a/frontend/frontend/wailsjs/runtime/runtime.js b/frontend/frontend/wailsjs/runtime/runtime.js deleted file mode 100644 index 556621ee..00000000 --- a/frontend/frontend/wailsjs/runtime/runtime.js +++ /dev/null @@ -1,298 +0,0 @@ -/* - _ __ _ __ -| | / /___ _(_) /____ -| | /| / / __ `/ / / ___/ -| |/ |/ / /_/ / / (__ ) -|__/|__/\__,_/_/_/____/ -The electron alternative for Go -(c) Lea Anthony 2019-present -*/ - -export function LogPrint(message) { - window.runtime.LogPrint(message); -} - -export function LogTrace(message) { - window.runtime.LogTrace(message); -} - -export function LogDebug(message) { - window.runtime.LogDebug(message); -} - -export function LogInfo(message) { - window.runtime.LogInfo(message); -} - -export function LogWarning(message) { - window.runtime.LogWarning(message); -} - -export function LogError(message) { - window.runtime.LogError(message); -} - -export function LogFatal(message) { - window.runtime.LogFatal(message); -} - -export function EventsOnMultiple(eventName, callback, maxCallbacks) { - return window.runtime.EventsOnMultiple(eventName, callback, maxCallbacks); -} - -export function EventsOn(eventName, callback) { - return EventsOnMultiple(eventName, callback, -1); -} - -export function EventsOff(eventName, ...additionalEventNames) { - return window.runtime.EventsOff(eventName, ...additionalEventNames); -} - -export function EventsOffAll() { - return window.runtime.EventsOffAll(); -} - -export function EventsOnce(eventName, callback) { - return EventsOnMultiple(eventName, callback, 1); -} - -export function EventsEmit(eventName) { - let args = [eventName].slice.call(arguments); - return window.runtime.EventsEmit.apply(null, args); -} - -export function WindowReload() { - window.runtime.WindowReload(); -} - -export function WindowReloadApp() { - window.runtime.WindowReloadApp(); -} - -export function WindowSetAlwaysOnTop(b) { - window.runtime.WindowSetAlwaysOnTop(b); -} - -export function WindowSetSystemDefaultTheme() { - window.runtime.WindowSetSystemDefaultTheme(); -} - -export function WindowSetLightTheme() { - window.runtime.WindowSetLightTheme(); -} - -export function WindowSetDarkTheme() { - window.runtime.WindowSetDarkTheme(); -} - -export function WindowCenter() { - window.runtime.WindowCenter(); -} - -export function WindowSetTitle(title) { - window.runtime.WindowSetTitle(title); -} - -export function WindowFullscreen() { - window.runtime.WindowFullscreen(); -} - -export function WindowUnfullscreen() { - window.runtime.WindowUnfullscreen(); -} - -export function WindowIsFullscreen() { - return window.runtime.WindowIsFullscreen(); -} - -export function WindowGetSize() { - return window.runtime.WindowGetSize(); -} - -export function WindowSetSize(width, height) { - window.runtime.WindowSetSize(width, height); -} - -export function WindowSetMaxSize(width, height) { - window.runtime.WindowSetMaxSize(width, height); -} - -export function WindowSetMinSize(width, height) { - window.runtime.WindowSetMinSize(width, height); -} - -export function WindowSetPosition(x, y) { - window.runtime.WindowSetPosition(x, y); -} - -export function WindowGetPosition() { - return window.runtime.WindowGetPosition(); -} - -export function WindowHide() { - window.runtime.WindowHide(); -} - -export function WindowShow() { - window.runtime.WindowShow(); -} - -export function WindowMaximise() { - window.runtime.WindowMaximise(); -} - -export function WindowToggleMaximise() { - window.runtime.WindowToggleMaximise(); -} - -export function WindowUnmaximise() { - window.runtime.WindowUnmaximise(); -} - -export function WindowIsMaximised() { - return window.runtime.WindowIsMaximised(); -} - -export function WindowMinimise() { - window.runtime.WindowMinimise(); -} - -export function WindowUnminimise() { - window.runtime.WindowUnminimise(); -} - -export function WindowSetBackgroundColour(R, G, B, A) { - window.runtime.WindowSetBackgroundColour(R, G, B, A); -} - -export function ScreenGetAll() { - return window.runtime.ScreenGetAll(); -} - -export function WindowIsMinimised() { - return window.runtime.WindowIsMinimised(); -} - -export function WindowIsNormal() { - return window.runtime.WindowIsNormal(); -} - -export function BrowserOpenURL(url) { - window.runtime.BrowserOpenURL(url); -} - -export function Environment() { - return window.runtime.Environment(); -} - -export function Quit() { - window.runtime.Quit(); -} - -export function Hide() { - window.runtime.Hide(); -} - -export function Show() { - window.runtime.Show(); -} - -export function ClipboardGetText() { - return window.runtime.ClipboardGetText(); -} - -export function ClipboardSetText(text) { - return window.runtime.ClipboardSetText(text); -} - -/** - * Callback for OnFileDrop returns a slice of file path strings when a drop is finished. - * - * @export - * @callback OnFileDropCallback - * @param {number} x - x coordinate of the drop - * @param {number} y - y coordinate of the drop - * @param {string[]} paths - A list of file paths. - */ - -/** - * OnFileDrop listens to drag and drop events and calls the callback with the coordinates of the drop and an array of path strings. - * - * @export - * @param {OnFileDropCallback} callback - Callback for OnFileDrop returns a slice of file path strings when a drop is finished. - * @param {boolean} [useDropTarget=true] - Only call the callback when the drop finished on an element that has the drop target style. (--wails-drop-target) - */ -export function OnFileDrop(callback, useDropTarget) { - return window.runtime.OnFileDrop(callback, useDropTarget); -} - -/** - * OnFileDropOff removes the drag and drop listeners and handlers. - */ -export function OnFileDropOff() { - return window.runtime.OnFileDropOff(); -} - -export function CanResolveFilePaths() { - return window.runtime.CanResolveFilePaths(); -} - -export function ResolveFilePaths(files) { - return window.runtime.ResolveFilePaths(files); -} - -export function InitializeNotifications() { - return window.runtime.InitializeNotifications(); -} - -export function CleanupNotifications() { - return window.runtime.CleanupNotifications(); -} - -export function IsNotificationAvailable() { - return window.runtime.IsNotificationAvailable(); -} - -export function RequestNotificationAuthorization() { - return window.runtime.RequestNotificationAuthorization(); -} - -export function CheckNotificationAuthorization() { - return window.runtime.CheckNotificationAuthorization(); -} - -export function SendNotification(options) { - return window.runtime.SendNotification(options); -} - -export function SendNotificationWithActions(options) { - return window.runtime.SendNotificationWithActions(options); -} - -export function RegisterNotificationCategory(category) { - return window.runtime.RegisterNotificationCategory(category); -} - -export function RemoveNotificationCategory(categoryId) { - return window.runtime.RemoveNotificationCategory(categoryId); -} - -export function RemoveAllPendingNotifications() { - return window.runtime.RemoveAllPendingNotifications(); -} - -export function RemovePendingNotification(identifier) { - return window.runtime.RemovePendingNotification(identifier); -} - -export function RemoveAllDeliveredNotifications() { - return window.runtime.RemoveAllDeliveredNotifications(); -} - -export function RemoveDeliveredNotification(identifier) { - return window.runtime.RemoveDeliveredNotification(identifier); -} - -export function RemoveNotification(identifier) { - return window.runtime.RemoveNotification(identifier); -} \ No newline at end of file From 27a4574a3cf6c43de6b320d3da2b7536a5b78091 Mon Sep 17 00:00:00 2001 From: Maximilian Jakob Maag Date: Mon, 14 Sep 2026 21:58:10 +0200 Subject: [PATCH 3/3] Ignore frontend/frontend build artifact --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index fa4a8785..dc99b364 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ node_modules/ temp/ build/bin/ frontend/dist/ +frontend/frontend/ build/darwin/