From: Kilian Saffran Date: Fri, 31 May 2024 09:55:38 +0000 (+0200) Subject: v240531 removed data 2 X-Git-Tag: 0.12.4~1 X-Git-Url: http://cloud.dks.lu/git/?a=commitdiff_plain;h=76511966fbea10f9a07a709561b7d5223ce1fa49;p=ngl-snep.git v240531 removed data 2 --- diff --git a/desktopapp/ngl-snep/.tmp/window_state.config.json b/desktopapp/ngl-snep/.tmp/window_state.config.json deleted file mode 100644 index 2d7111d..0000000 --- a/desktopapp/ngl-snep/.tmp/window_state.config.json +++ /dev/null @@ -1 +0,0 @@ -{"height":1048,"maxHeight":-1,"maxWidth":-1,"maximize":true,"minHeight":600,"minWidth":800,"resizable":true,"width":1936,"x":-8,"y":-8} \ No newline at end of file diff --git a/desktopapp/ngl-snep/LICENSE b/desktopapp/ngl-snep/LICENSE deleted file mode 100644 index 2f31491..0000000 --- a/desktopapp/ngl-snep/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2021 Neutralinojs and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/desktopapp/ngl-snep/README.md b/desktopapp/ngl-snep/README.md deleted file mode 100644 index fe348b7..0000000 --- a/desktopapp/ngl-snep/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# neutralinojs-minimal - -The default template for a Neutralinojs app. It's possible to use your favorite frontend framework by using [these steps](https://neutralino.js.org/docs/getting-started/using-frontend-libraries). - -## Contributors - -[![Contributors](https://contrib.rocks/image?repo=neutralinojs/neutralinojs-minimal)](https://github.com/neutralinojs/neutralinojs-minimal/graphs/contributors) - -## License - -[MIT](LICENSE) - -## Icon credits - -- `trayIcon.png` - Made by [Freepik](https://www.freepik.com) and downloaded from [Flaticon](https://www.flaticon.com) diff --git a/desktopapp/ngl-snep/bin/neutralino-linux_arm64 b/desktopapp/ngl-snep/bin/neutralino-linux_arm64 deleted file mode 100644 index 1d65cc4..0000000 Binary files a/desktopapp/ngl-snep/bin/neutralino-linux_arm64 and /dev/null differ diff --git a/desktopapp/ngl-snep/bin/neutralino-linux_armhf b/desktopapp/ngl-snep/bin/neutralino-linux_armhf deleted file mode 100644 index bb2a0fb..0000000 Binary files a/desktopapp/ngl-snep/bin/neutralino-linux_armhf and /dev/null differ diff --git a/desktopapp/ngl-snep/bin/neutralino-linux_x64 b/desktopapp/ngl-snep/bin/neutralino-linux_x64 deleted file mode 100644 index de54e66..0000000 Binary files a/desktopapp/ngl-snep/bin/neutralino-linux_x64 and /dev/null differ diff --git a/desktopapp/ngl-snep/bin/neutralino-mac_arm64 b/desktopapp/ngl-snep/bin/neutralino-mac_arm64 deleted file mode 100644 index 5257658..0000000 Binary files a/desktopapp/ngl-snep/bin/neutralino-mac_arm64 and /dev/null differ diff --git a/desktopapp/ngl-snep/bin/neutralino-mac_universal b/desktopapp/ngl-snep/bin/neutralino-mac_universal deleted file mode 100644 index b35a7b4..0000000 Binary files a/desktopapp/ngl-snep/bin/neutralino-mac_universal and /dev/null differ diff --git a/desktopapp/ngl-snep/bin/neutralino-mac_x64 b/desktopapp/ngl-snep/bin/neutralino-mac_x64 deleted file mode 100644 index b71a17e..0000000 Binary files a/desktopapp/ngl-snep/bin/neutralino-mac_x64 and /dev/null differ diff --git a/desktopapp/ngl-snep/bin/neutralino-win_x64.exe b/desktopapp/ngl-snep/bin/neutralino-win_x64.exe deleted file mode 100644 index 067ead4..0000000 Binary files a/desktopapp/ngl-snep/bin/neutralino-win_x64.exe and /dev/null differ diff --git a/desktopapp/ngl-snep/neutralino.config.json b/desktopapp/ngl-snep/neutralino.config.json deleted file mode 100644 index bf15d13..0000000 --- a/desktopapp/ngl-snep/neutralino.config.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/neutralinojs/neutralinojs/main/schemas/neutralino.config.schema.json", - "applicationId": "app.ngl-snep.eu", - "version": "1.0.0", - "defaultMode": "window", - "port": 0, - "documentRoot": "/resources/", - "url": "http://localhost/nglsnep/", - "enableServer": false, - "enableNativeAPI": true, - "tokenSecurity": "one-time", - "logging": { - "enabled": true, - "writeToLogFile": true - }, - "nativeAllowList": [ - "app.*", - "os.*", - "debug.log" - ], - "globalVariables": { - "TEST1": "Hello", - "TEST2": [ - 2, - 4, - 5 - ], - "TEST3": { - "value1": 10, - "value2": {} - } - }, - "modes": { - "window": { - "title": "ngl-snep", - "width": 1024, - "height": 786, - "minWidth": 800, - "minHeight": 600, - "center": true, - "fullScreen": false, - "alwaysOnTop": false, - "icon": "/resources/icons/appIcon.png", - "enableInspector": true, - "borderless": false, - "maximize": true, - "hidden": false, - "resizable": true, - "exitProcessOnClose": true - }, - "browser": { - "globalVariables": { - "TEST": "Test value browser" - }, - "nativeBlockList": [ - "filesystem.*" - ] - }, - "cloud": { - "url": "/resources/#cloud", - "nativeAllowList": [ - "app.*" - ] - }, - "chrome": { - "width": 800, - "height": 500, - "args": "--user-agent=\"Neutralinojs chrome mode\"", - "nativeBlockList": [ - "filesystem.*", - "os.*" - ] - } - }, - "cli": { - "binaryName": "ngl-snep", - "resourcesPath": "/resources/", - "extensionsPath": "/extensions/", - "clientLibrary": "/resources/js/neutralino.js", - "binaryVersion": "5.0.0", - "clientVersion": "5.0.0" - } -} \ No newline at end of file diff --git a/desktopapp/ngl-snep/neutralinojs.log b/desktopapp/ngl-snep/neutralinojs.log deleted file mode 100644 index ed3f7db..0000000 --- a/desktopapp/ngl-snep/neutralinojs.log +++ /dev/null @@ -1,4 +0,0 @@ -INFO 2024-02-12 09:18:52,617 Auth info was exported to ./.tmp/auth_info.json api\debug\debug.cpp:17 Kilian@LAPTOP-KILIAN -ERROR 2024-02-12 09:18:54,792 NE_RS_UNBLDRE: Unable to load application resource file /resources/favicon.ico api\debug\debug.cpp:20 Kilian@LAPTOP-KILIAN -INFO 2024-02-12 09:23:03,277 Auth info was exported to ./.tmp/auth_info.json api\debug\debug.cpp:17 Kilian@LAPTOP-KILIAN -INFO 2024-02-12 09:23:35,996 Auth info was exported to ./.tmp/auth_info.json api\debug\debug.cpp:17 Kilian@LAPTOP-KILIAN diff --git a/desktopapp/ngl-snep/resources/icons/appIcon.png b/desktopapp/ngl-snep/resources/icons/appIcon.png deleted file mode 100644 index d708bc3..0000000 Binary files a/desktopapp/ngl-snep/resources/icons/appIcon.png and /dev/null differ diff --git a/desktopapp/ngl-snep/resources/icons/logo.gif b/desktopapp/ngl-snep/resources/icons/logo.gif deleted file mode 100644 index 058c9bf..0000000 Binary files a/desktopapp/ngl-snep/resources/icons/logo.gif and /dev/null differ diff --git a/desktopapp/ngl-snep/resources/icons/trayIcon.png b/desktopapp/ngl-snep/resources/icons/trayIcon.png deleted file mode 100644 index bcfeb18..0000000 Binary files a/desktopapp/ngl-snep/resources/icons/trayIcon.png and /dev/null differ diff --git a/desktopapp/ngl-snep/resources/index.html b/desktopapp/ngl-snep/resources/index.html deleted file mode 100644 index 90a1da6..0000000 --- a/desktopapp/ngl-snep/resources/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - NeutralinoJs sample app - - - -
-

NeutralinoJs

-
-
- Neutralinojs -
- Docs · - Video tutorial -
-
- - - - - - diff --git a/desktopapp/ngl-snep/resources/js/main.js b/desktopapp/ngl-snep/resources/js/main.js deleted file mode 100644 index ce89a98..0000000 --- a/desktopapp/ngl-snep/resources/js/main.js +++ /dev/null @@ -1,63 +0,0 @@ -// This is just a sample app. You can structure your Neutralinojs app code as you wish. -// This example app is written with vanilla JavaScript and HTML. -// Feel free to use any frontend framework you like :) -// See more details: https://neutralino.js.org/docs/how-to/use-a-frontend-library - -function showInfo() { - document.getElementById('info').innerHTML = ` - ${NL_APPID} is running on port ${NL_PORT} inside ${NL_OS} -

- server: v${NL_VERSION} . client: v${NL_CVERSION} - `; -} - -function openDocs() { - Neutralino.os.open("https://neutralino.js.org/docs"); -} - -function openTutorial() { - Neutralino.os.open("https://www.youtube.com/c/CodeZri"); -} - -function setTray() { - if(NL_MODE != "window") { - console.log("INFO: Tray menu is only available in the window mode."); - return; - } - let tray = { - icon: "/resources/icons/trayIcon.png", - menuItems: [ - {id: "VERSION", text: "Get version"}, - {id: "SEP", text: "-"}, - {id: "QUIT", text: "Quit"} - ] - }; - Neutralino.os.setTray(tray); -} - -function onTrayMenuItemClicked(event) { - switch(event.detail.id) { - case "VERSION": - Neutralino.os.showMessageBox("Version information", - `Neutralinojs server: v${NL_VERSION} | Neutralinojs client: v${NL_CVERSION}`); - break; - case "QUIT": - Neutralino.app.exit(); - break; - } -} - -function onWindowClose() { - Neutralino.app.exit(); -} - -Neutralino.init(); - -Neutralino.events.on("trayMenuItemClicked", onTrayMenuItemClicked); -Neutralino.events.on("windowClose", onWindowClose); - -if(NL_OS != "Darwin") { // TODO: Fix https://github.com/neutralinojs/neutralinojs/issues/615 - setTray(); -} - -showInfo(); diff --git a/desktopapp/ngl-snep/resources/js/neutralino.d.ts b/desktopapp/ngl-snep/resources/js/neutralino.d.ts deleted file mode 100644 index 527299b..0000000 --- a/desktopapp/ngl-snep/resources/js/neutralino.d.ts +++ /dev/null @@ -1,346 +0,0 @@ -// Type definitions for Neutralino 5.0.0 -// Project: https://github.com/neutralinojs -// Definitions project: https://github.com/neutralinojs/neutralino.js - -declare namespace Neutralino { - -namespace filesystem { - interface DirectoryEntry { - entry: string; - path: string; - type: string; - } - interface FileReaderOptions { - pos: number; - size: number; - } - interface DirectoryReaderOptions { - recursive: boolean; - } - interface OpenedFile { - id: number; - eof: boolean; - pos: number; - lastRead: number; - } - interface Stats { - size: number; - isFile: boolean; - isDirectory: boolean; - createdAt: number; - modifiedAt: number; - } - interface Watcher { - id: number; - path: string; - } - function createDirectory(path: string): Promise; - function remove(path: string): Promise; - function writeFile(path: string, data: string): Promise; - function appendFile(path: string, data: string): Promise; - function writeBinaryFile(path: string, data: ArrayBuffer): Promise; - function appendBinaryFile(path: string, data: ArrayBuffer): Promise; - function readFile(path: string, options?: FileReaderOptions): Promise; - function readBinaryFile(path: string, options?: FileReaderOptions): Promise; - function openFile(path: string): Promise; - function createWatcher(path: string): Promise; - function removeWatcher(id: number): Promise; - function getWatchers(): Promise; - function updateOpenedFile(id: number, event: string, data?: any): Promise; - function getOpenedFileInfo(id: number): Promise; - function readDirectory(path: string, options?: DirectoryReaderOptions): Promise; - function copy(source: string, destination: string): Promise; - function move(source: string, destination: string): Promise; - function getStats(path: string): Promise; -} -namespace os { - interface ExecCommandOptions { - stdIn?: string; - background?: boolean; - cwd?: string; - } - interface ExecCommandResult { - pid: number; - stdOut: string; - stdErr: string; - exitCode: number; - } - interface SpawnedProcess { - id: number; - pid: number; - } - interface Envs { - [key: string]: string; - } - interface OpenDialogOptions { - multiSelections?: boolean; - filters?: Filter[]; - defaultPath?: string; - } - interface FolderDialogOptions { - defaultPath?: string; - } - interface SaveDialogOptions { - forceOverwrite?: boolean; - filters?: Filter[]; - defaultPath?: string; - } - interface Filter { - name: string; - extensions: string[]; - } - interface TrayOptions { - icon: string; - menuItems: TrayMenuItem[]; - } - interface TrayMenuItem { - id?: string; - text: string; - isDisabled?: boolean; - isChecked?: boolean; - } - enum Icon { - WARNING = "WARNING", - ERROR = "ERROR", - INFO = "INFO", - QUESTION = "QUESTION" - } - enum MessageBoxChoice { - OK = "OK", - OK_CANCEL = "OK_CANCEL", - YES_NO = "YES_NO", - YES_NO_CANCEL = "YES_NO_CANCEL", - RETRY_CANCEL = "RETRY_CANCEL", - ABORT_RETRY_IGNORE = "ABORT_RETRY_IGNORE" - } - type KnownPath = "config" | "data" | "cache" | "documents" | "pictures" | "music" | "video" | "downloads" | "savedGames1" | "savedGames2"; - function execCommand(command: string, options?: ExecCommandOptions): Promise; - function spawnProcess(command: string, cwd?: string): Promise; - function updateSpawnedProcess(id: number, event: string, data?: any): Promise; - function getSpawnedProcesses(): Promise; - function getEnv(key: string): Promise; - function getEnvs(): Promise; - function showOpenDialog(title?: string, options?: OpenDialogOptions): Promise; - function showFolderDialog(title?: string, options?: FolderDialogOptions): Promise; - function showSaveDialog(title?: string, options?: SaveDialogOptions): Promise; - function showNotification(title: string, content: string, icon?: Icon): Promise; - function showMessageBox(title: string, content: string, choice?: MessageBoxChoice, icon?: Icon): Promise; - function setTray(options: TrayOptions): Promise; - function open(url: string): Promise; - function getPath(name: KnownPath): Promise; -} -namespace computer { - interface MemoryInfo { - total: number; - available: number; - } - interface KernelInfo { - variant: string; - version: string; - } - interface OSInfo { - name: string; - description: string; - version: string; - } - interface CPUInfo { - vendor: string; - model: string; - frequency: number; - architecture: string; - logicalThreads: number; - physicalCores: number; - physicalUnits: number; - } - interface Display { - id: number; - resolution: Resolution; - dpi: number; - bpp: number; - refreshRate: number; - } - interface Resolution { - width: number; - height: number; - } - interface MousePosition { - x: number; - y: number; - } - function getMemoryInfo(): Promise; - function getArch(): Promise; - function getKernelInfo(): Promise; - function getOSInfo(): Promise; - function getCPUInfo(): Promise; - function getDisplays(): Promise; - function getMousePosition(): Promise; -} -namespace storage { - function setData(key: string, data: string): Promise; - function getData(key: string): Promise; - function getKeys(): Promise; -} -namespace debug { - enum LoggerType { - WARNING = "WARNING", - ERROR = "ERROR", - INFO = "INFO" - } - function log(message: string, type?: LoggerType): Promise; -} -namespace app { - interface OpenActionOptions { - url: string; - } - interface RestartOptions { - args: string; - } - function exit(code?: number): Promise; - function killProcess(): Promise; - function restartProcess(options?: RestartOptions): Promise; - function getConfig(): Promise; - function broadcast(event: string, data?: any): Promise; - function readProcessInput(readAll?: boolean): Promise; - function writeProcessOutput(data: string): Promise; - function writeProcessError(data: string): Promise; -} -namespace window { - interface WindowOptions extends WindowSizeOptions, WindowPosOptions { - title?: string; - icon?: string; - fullScreen?: boolean; - alwaysOnTop?: boolean; - enableInspector?: boolean; - borderless?: boolean; - maximize?: boolean; - hidden?: boolean; - maximizable?: boolean; - useSavedState?: boolean; - exitProcessOnClose?: boolean; - extendUserAgentWith?: string; - processArgs?: string; - } - interface WindowSizeOptions { - width?: number; - height?: number; - minWidth?: number; - minHeight?: number; - maxWidth?: number; - maxHeight?: number; - resizable?: boolean; - } - interface WindowPosOptions { - x: number; - y: number; - } - function setTitle(title: string): Promise; - function getTitle(): Promise; - function maximize(): Promise; - function unmaximize(): Promise; - function isMaximized(): Promise; - function minimize(): Promise; - function setFullScreen(): Promise; - function exitFullScreen(): Promise; - function isFullScreen(): Promise; - function show(): Promise; - function hide(): Promise; - function isVisible(): Promise; - function focus(): Promise; - function setIcon(icon: string): Promise; - function move(x: number, y: number): Promise; - function center(): Promise; - function setDraggableRegion(domElementOrId: string | HTMLElement): Promise; - function unsetDraggableRegion(domElementOrId: string | HTMLElement): Promise; - function setSize(options: WindowSizeOptions): Promise; - function getSize(): Promise; - function getPosition(): Promise; - function setAlwaysOnTop(onTop: boolean): Promise; - function create(url: string, options?: WindowOptions): Promise; -} -namespace events { - interface Response { - success: boolean; - message: string; - } - type Builtin = "ready" | "trayMenuItemClicked" | "windowClose" | "serverOffline" | "clientConnect" | "clientDisconnect" | "appClientConnect" | "appClientDisconnect" | "extClientConnect" | "extClientDisconnect" | "extensionReady" | "neuDev_reloadApp"; - function on(event: string, handler: (ev: CustomEvent) => void): Promise; - function off(event: string, handler: (ev: CustomEvent) => void): Promise; - function dispatch(event: string, data?: any): Promise; - function broadcast(event: string, data?: any): Promise; -} -namespace extensions { - interface ExtensionStats { - loaded: string[]; - connected: string[]; - } - function dispatch(extensionId: string, event: string, data?: any): Promise; - function broadcast(event: string, data?: any): Promise; - function getStats(): Promise; -} -namespace updater { - interface Manifest { - applicationId: string; - version: string; - resourcesURL: string; - } - function checkForUpdates(url: string): Promise; - function install(): Promise; -} -namespace clipboard { - function readText(key: string, data: string): Promise; - function writeText(data: string): Promise; -} -namespace custom { - function getMethods(): Promise; -} -interface InitOptions { - exportCustomMethods?: boolean; -} -function init(options?: InitOptions): void; -type ErrorCode = "NE_FS_DIRCRER" | "NE_FS_RMDIRER" | "NE_FS_FILRDER" | "NE_FS_FILWRER" | "NE_FS_FILRMER" | "NE_FS_NOPATHE" | "NE_FS_COPYFER" | "NE_FS_MOVEFER" | "NE_OS_INVMSGA" | "NE_OS_INVKNPT" | "NE_ST_INVSTKY" | "NE_ST_STKEYWE" | "NE_RT_INVTOKN" | "NE_RT_NATPRME" | "NE_RT_APIPRME" | "NE_RT_NATRTER" | "NE_RT_NATNTIM" | "NE_CL_NSEROFF" | "NE_EX_EXTNOTC" | "NE_UP_CUPDMER" | "NE_UP_CUPDERR" | "NE_UP_UPDNOUF" | "NE_UP_UPDINER"; -interface Error { - code: ErrorCode; - message: string; -} - -} - -/** Basic authentication token */ -declare const NL_TOKEN: string; - -/** Operating system name: Linux, Windows, or Darwin */ -declare const NL_OS: "Linux"|"Windows"|"Darwin"; - -/** Application identifier */ -declare const NL_APPID: string; - -/** Application port */ -declare const NL_PORT: number; - -/** Mode of the application: window, browser, or cloud */ -declare const NL_MODE: "window"|"browser"|"cloud"; - -/** Neutralinojs server version */ -declare const NL_VERSION: string; - -/** Neutralinojs client version */ -declare const NL_CVERSION: "5.0.0"; - -/** Current working directory */ -declare const NL_CWD: string; - -/** Application path */ -declare const NL_PATH: string; - -/** Command-line arguments */ -declare const NL_ARGS: string[]; - -/** Current process's identifier */ -declare const NL_PID: number - -/** Release commit of the client library */ -declare const NL_CCOMMIT: string; - -/** An array of custom methods */ -declare const NL_CMETHODS: string[]; - diff --git a/desktopapp/ngl-snep/resources/js/neutralino.js b/desktopapp/ngl-snep/resources/js/neutralino.js deleted file mode 100644 index 47a7e42..0000000 --- a/desktopapp/ngl-snep/resources/js/neutralino.js +++ /dev/null @@ -1 +0,0 @@ -var Neutralino=function(e){"use strict";function t(e,t,n,o){return new(n||(n=Promise))((function(i,r){function s(e){try{c(o.next(e))}catch(e){r(e)}}function a(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((o=o.apply(e,t||[])).next())}))}function n(){return f("extensions.getStats")}var o={__proto__:null,dispatch:function(e,o,i){return new Promise(((r,s)=>t(this,void 0,void 0,(function*(){let t=yield n();if(t.loaded.includes(e))if(t.connected.includes(e))try{let t=yield f("extensions.dispatch",{extensionId:e,event:o,data:i});r(t)}catch(e){s(e)}else!function(e,t){e in d?d[e].push(t):d[e]=[t]}(e,{method:"extensions.dispatch",data:{extensionId:e,event:o,data:i},resolve:r,reject:s});else s({code:"NE_EX_EXTNOTL",message:`${e} is not loaded`})}))))},broadcast:function(e,t){return f("extensions.broadcast",{event:e,data:t})},getStats:n};function i(e,t){return window.addEventListener(e,t),Promise.resolve({success:!0,message:"Event listener added"})}function r(e,t){let n=new CustomEvent(e,{detail:t});return window.dispatchEvent(n),Promise.resolve({success:!0,message:"Message dispatched"})}function s(e){let t=window.atob(e),n=t.length,o=new Uint8Array(n);for(let e=0;et(this,void 0,void 0,(function*(){if(yield p(u),!window.NL_EXTENABLED)return;let e=yield n();for(let t of e.connected)r("extensionReady",t)})))),i("extClientConnect",(e=>{r("extensionReady",e.detail)})),!window.NL_EXTENABLED)return;i("extensionReady",(e=>t(this,void 0,void 0,(function*(){e.detail in d&&(yield p(d[e.detail]),delete d[e.detail])}))))}(),function(){a.addEventListener("message",(e=>{var t,n,o;const i=JSON.parse(e.data);i.id&&i.id in c?((null===(t=i.data)||void 0===t?void 0:t.error)?(c[i.id].reject(i.data.error),"NE_RT_INVTOKN"==i.data.error.code&&(a.close(),document.body.innerText="",document.write("NE_RT_INVTOKN: Neutralinojs application cannot execute native methods since NL_TOKEN is invalid."))):(null===(n=i.data)||void 0===n?void 0:n.success)&&c[i.id].resolve(i.data.hasOwnProperty("returnValue")?i.data.returnValue:i.data),delete c[i.id]):i.event&&("openedFile"==i.event&&"dataBinary"==(null===(o=null==i?void 0:i.data)||void 0===o?void 0:o.action)&&(i.data.data=s(i.data.data)),r(i.event,i.data))})),a.addEventListener("open",(e=>t(this,void 0,void 0,(function*(){r("ready")})))),a.addEventListener("close",(e=>t(this,void 0,void 0,(function*(){r("serverOffline",{code:"NE_CL_NSEROFF",message:"Neutralino server is offline. Try restarting the application"})})))),a.addEventListener("error",(e=>t(this,void 0,void 0,(function*(){document.body.innerText="",document.write("NE_CL_IVCTOKN: Neutralinojs application cannot connect with the framework core using NL_TOKEN.")}))))}()}function f(e,t){return new Promise(((n,o)=>{if((null==a?void 0:a.readyState)!=WebSocket.OPEN)return i={method:e,data:t,resolve:n,reject:o},void u.push(i);var i;const r="10000000-1000-4000-8000-100000000000".replace(/[018]/g,(e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))),s=w();c[r]={resolve:n,reject:o},a.send(JSON.stringify({id:r,method:e,data:t,accessToken:s}))}))}function p(e){return t(this,void 0,void 0,(function*(){for(;e.length>0;){let t=e.shift();try{let e=yield f(t.method,t.data);t.resolve(e)}catch(e){t.reject(e)}}}))}function w(){return window.NL_TOKEN||sessionStorage.getItem("NL_TOKEN")||""}function g(e,t){return f("filesystem.writeBinaryFile",{path:e,data:m(t)})}function m(e){let t=new Uint8Array(e),n="";for(let e of t)n+=String.fromCharCode(e);return window.btoa(n)}var v,_,h={__proto__:null,createDirectory:function(e){return f("filesystem.createDirectory",{path:e})},remove:function(e){return f("filesystem.remove",{path:e})},writeFile:function(e,t){return f("filesystem.writeFile",{path:e,data:t})},appendFile:function(e,t){return f("filesystem.appendFile",{path:e,data:t})},writeBinaryFile:g,appendBinaryFile:function(e,t){return f("filesystem.appendBinaryFile",{path:e,data:m(t)})},readFile:function(e,t){return f("filesystem.readFile",Object.assign({path:e},t))},readBinaryFile:function(e,t){return new Promise(((n,o)=>{f("filesystem.readBinaryFile",Object.assign({path:e},t)).then((e=>{n(s(e))})).catch((e=>{o(e)}))}))},openFile:function(e){return f("filesystem.openFile",{path:e})},createWatcher:function(e){return f("filesystem.createWatcher",{path:e})},removeWatcher:function(e){return f("filesystem.removeWatcher",{id:e})},getWatchers:function(){return f("filesystem.getWatchers")},updateOpenedFile:function(e,t,n){return f("filesystem.updateOpenedFile",{id:e,event:t,data:n})},getOpenedFileInfo:function(e){return f("filesystem.getOpenedFileInfo",{id:e})},readDirectory:function(e,t){return f("filesystem.readDirectory",Object.assign({path:e},t))},copy:function(e,t){return f("filesystem.copy",{source:e,destination:t})},move:function(e,t){return f("filesystem.move",{source:e,destination:t})},getStats:function(e){return f("filesystem.getStats",{path:e})}};function N(e,t){return f("os.execCommand",Object.assign({command:e},t))}!function(e){e.WARNING="WARNING",e.ERROR="ERROR",e.INFO="INFO",e.QUESTION="QUESTION"}(v||(v={})),function(e){e.OK="OK",e.OK_CANCEL="OK_CANCEL",e.YES_NO="YES_NO",e.YES_NO_CANCEL="YES_NO_CANCEL",e.RETRY_CANCEL="RETRY_CANCEL",e.ABORT_RETRY_IGNORE="ABORT_RETRY_IGNORE"}(_||(_={}));var y={__proto__:null,get Icon(){return v},get MessageBoxChoice(){return _},execCommand:N,spawnProcess:function(e,t){return f("os.spawnProcess",{command:e,cwd:t})},updateSpawnedProcess:function(e,t,n){return f("os.updateSpawnedProcess",{id:e,event:t,data:n})},getSpawnedProcesses:function(){return f("os.getSpawnedProcesses")},getEnv:function(e){return f("os.getEnv",{key:e})},getEnvs:function(){return f("os.getEnvs")},showOpenDialog:function(e,t){return f("os.showOpenDialog",Object.assign({title:e},t))},showFolderDialog:function(e,t){return f("os.showFolderDialog",Object.assign({title:e},t))},showSaveDialog:function(e,t){return f("os.showSaveDialog",Object.assign({title:e},t))},showNotification:function(e,t,n){return f("os.showNotification",{title:e,content:t,icon:n})},showMessageBox:function(e,t,n,o){return f("os.showMessageBox",{title:e,content:t,choice:n,icon:o})},setTray:function(e){return f("os.setTray",e)},open:function(e){return f("os.open",{url:e})},getPath:function(e){return f("os.getPath",{name:e})}};var E={__proto__:null,getMemoryInfo:function(){return f("computer.getMemoryInfo")},getArch:function(){return f("computer.getArch")},getKernelInfo:function(){return f("computer.getKernelInfo")},getOSInfo:function(){return f("computer.getOSInfo")},getCPUInfo:function(){return f("computer.getCPUInfo")},getDisplays:function(){return f("computer.getDisplays")},getMousePosition:function(){return f("computer.getMousePosition")}};var O,R={__proto__:null,setData:function(e,t){return f("storage.setData",{key:e,data:t})},getData:function(e){return f("storage.getData",{key:e})},getKeys:function(){return f("storage.getKeys")}};function T(e,t){return f("debug.log",{message:e,type:t})}!function(e){e.WARNING="WARNING",e.ERROR="ERROR",e.INFO="INFO"}(O||(O={}));var P={__proto__:null,get LoggerType(){return O},log:T};function b(e){return f("app.exit",{code:e})}var L={__proto__:null,exit:b,killProcess:function(){return f("app.killProcess")},restartProcess:function(e){return new Promise((n=>t(this,void 0,void 0,(function*(){let t=window.NL_ARGS.reduce(((e,t)=>(t.includes(" ")&&(t=`"${t}"`),e+=" "+t)),"");(null==e?void 0:e.args)&&(t+=" "+e.args),yield N(t,{background:!0}),b(),n()}))))},getConfig:function(){return f("app.getConfig")},broadcast:function(e,t){return f("app.broadcast",{event:e,data:t})},readProcessInput:function(e){return f("app.readProcessInput",{readAll:e})},writeProcessOutput:function(e){return f("app.writeProcessOutput",{data:e})},writeProcessError:function(e){return f("app.writeProcessError",{data:e})}};const S=new WeakMap;function I(e,t){return f("window.move",{x:e,y:t})}function D(){return f("window.getSize")}var C={__proto__:null,setTitle:function(e){return f("window.setTitle",{title:e})},getTitle:function(){return f("window.getTitle")},maximize:function(){return f("window.maximize")},unmaximize:function(){return f("window.unmaximize")},isMaximized:function(){return f("window.isMaximized")},minimize:function(){return f("window.minimize")},setFullScreen:function(){return f("window.setFullScreen")},exitFullScreen:function(){return f("window.exitFullScreen")},isFullScreen:function(){return f("window.isFullScreen")},show:function(){return f("window.show")},hide:function(){return f("window.hide")},isVisible:function(){return f("window.isVisible")},focus:function(){return f("window.focus")},setIcon:function(e){return f("window.setIcon",{icon:e})},move:I,center:function(){return f("window.center")},setDraggableRegion:function(e){return new Promise(((n,o)=>{const i=e instanceof Element?e:document.getElementById(e);let r=0,s=0,a=0,c=!1,u=performance.now();if(!i)return o({code:"NE_WD_DOMNOTF",message:"Unable to find DOM element"});if(S.has(i))return o({code:"NE_WD_ALRDREL",message:"This DOM element is already an active draggable region"});function d(e){return t(this,void 0,void 0,(function*(){if(c){const t=performance.now(),n=t-u;if(n<5)return;return u=t-(n-5),void(yield I(e.screenX-r,e.screenY-s))}a=Math.sqrt(e.movementX*e.movementX+e.movementY*e.movementY),a>=10&&(c=!0,i.setPointerCapture(e.pointerId))}))}function l(e){0===e.button&&(r=e.clientX,s=e.clientY,i.addEventListener("pointermove",d))}function f(e){i.removeEventListener("pointermove",d),i.releasePointerCapture(e.pointerId)}i.addEventListener("pointerdown",l),i.addEventListener("pointerup",f),S.set(i,{pointerdown:l,pointerup:f}),n({success:!0,message:"Draggable region was activated"})}))},unsetDraggableRegion:function(e){return new Promise(((t,n)=>{const o=e instanceof Element?e:document.getElementById(e);if(!o)return n({code:"NE_WD_DOMNOTF",message:"Unable to find DOM element"});if(!S.has(o))return n({code:"NE_WD_NOTDRRE",message:"DOM element is not an active draggable region"});const{pointerdown:i,pointerup:r}=S.get(o);o.removeEventListener("pointerdown",i),o.removeEventListener("pointerup",r),S.delete(o),t({success:!0,message:"Draggable region was deactivated"})}))},setSize:function(e){return new Promise(((n,o)=>t(this,void 0,void 0,(function*(){let t=yield D();f("window.setSize",e=Object.assign(Object.assign({},t),e)).then((e=>{n(e)})).catch((e=>{o(e)}))}))))},getSize:D,getPosition:function(){return f("window.getPosition")},setAlwaysOnTop:function(e){return f("window.setAlwaysOnTop",{onTop:e})},create:function(e,t){return new Promise(((n,o)=>{function i(e){return"string"!=typeof e||(e=e.trim()).includes(" ")&&(e=`"${e}"`),e}t=Object.assign(Object.assign({},t),{useSavedState:!1});let r=window.NL_ARGS.reduce(((e,t,n)=>((t.includes("--path=")||t.includes("--debug-mode")||t.includes("--load-dir-res")||0==n)&&(e+=" "+i(t)),e)),"");r+=" --url="+i(e);for(let e in t){if("processArgs"==e)continue;r+=` --window${e.replace(/[A-Z]|^[a-z]/g,(e=>"-"+e.toLowerCase()))}=${i(t[e])}`}t&&t.processArgs&&(r+=" "+t.processArgs),N(r,{background:!0}).then((e=>{n(e)})).catch((e=>{o(e)}))}))}};var x={__proto__:null,broadcast:function(e,t){return f("events.broadcast",{event:e,data:t})},on:i,off:function(e,t){return window.removeEventListener(e,t),Promise.resolve({success:!0,message:"Event listener removed"})},dispatch:r};let A=null;var F={__proto__:null,checkForUpdates:function(e){return new Promise(((n,o)=>t(this,void 0,void 0,(function*(){if(!e)return o({code:"NE_RT_NATRTER",message:"Missing require parameter: url"});try{let t=yield fetch(e);A=JSON.parse(yield t.text()),!function(e){return!!(e.applicationId&&e.applicationId==window.NL_APPID&&e.version&&e.resourcesURL)}(A)?o({code:"NE_UP_CUPDMER",message:"Invalid update manifest or mismatching applicationId"}):n(A)}catch(e){o({code:"NE_UP_CUPDERR",message:"Unable to fetch update manifest"})}}))))},install:function(){return new Promise(((e,n)=>t(this,void 0,void 0,(function*(){if(!A)return n({code:"NE_UP_UPDNOUF",message:"No update manifest loaded"});try{let t=yield fetch(A.resourcesURL),n=yield t.arrayBuffer();yield g(window.NL_PATH+"/resources.neu",n),e({success:!0,message:"Update installed. Restart the process to see updates"})}catch(e){n({code:"NE_UP_UPDINER",message:"Update installation error"})}}))))}};var M={__proto__:null,readText:function(e,t){return f("clipboard.readText",{key:e,data:t})},writeText:function(e){return f("clipboard.writeText",{data:e})}};var j={__proto__:null,getMethods:function(){return f("custom.getMethods")}};let U=!1;return e.app=L,e.clipboard=M,e.computer=E,e.custom=j,e.debug=P,e.events=x,e.extensions=o,e.filesystem=h,e.init=function(e={}){if(e=Object.assign({exportCustomMethods:!0},e),!U){if(l(),window.NL_ARGS.find((e=>"--neu-dev-auto-reload"==e))&&i("neuDev_reloadApp",(()=>t(this,void 0,void 0,(function*(){yield T("Reloading the application..."),location.reload()})))),e.exportCustomMethods&&window.NL_CMETHODS&&window.NL_CMETHODS.length>0)for(let e of window.NL_CMETHODS)Neutralino.custom[e]=(...t)=>{let n={};for(let[e,o]of t.entries())n="object"!=typeof o||Array.isArray(o)||null==o?Object.assign(Object.assign({},n),{["arg"+e]:o}):Object.assign(Object.assign({},n),o);return f("custom."+e,n)};window.NL_CVERSION="5.0.0",window.NL_CCOMMIT="8ac7ce9a81b3001f5f185913760eff83c746eb5f",U=!0}},e.os=y,e.storage=R,e.updater=F,e.window=C,e}({}); diff --git a/desktopapp/ngl-snep/resources/styles.css b/desktopapp/ngl-snep/resources/styles.css deleted file mode 100644 index e498629..0000000 --- a/desktopapp/ngl-snep/resources/styles.css +++ /dev/null @@ -1,16 +0,0 @@ -#neutralinoapp { - text-align: center; - -webkit-user-select: none; - user-select: none; - cursor: default; -} - -#neutralinoapp h1{ - font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; - font-size: 20px; -} - -#neutralinoapp > div { - font-size: 16px; - font-weight: normal; -}