+
+
+ 📐
+ {projectName || 'LVGL UI Editor'}
+
-
-
-
-
-
-
useEditorStore.getState().undo()} shortcut="Ctrl+Z" />
- useEditorStore.getState().redo()} shortcut="Ctrl+Y" />
-
- setShowResourcePanel(!showResourcePanel)}
- active={showResourcePanel}
- />
- setShowProjectSettings(true)}
- />
-
-
-
- setShowHelpPanel(true)}
- shortcut="F1"
- />
+ {/* Main tabs */}
+
+
+
+
+
+
+
+
+
+
+
+
+
useEditorStore.getState().undo()} shortcut="Ctrl+Z" />
+ useEditorStore.getState().redo()} shortcut="Ctrl+Y" />
+
+ setShowResourcePanel(!showResourcePanel)}
+ active={showResourcePanel}
+ />
+ setShowProjectSettings(true)}
+ />
+
+
+
+ setShowHelpPanel(true)}
+ shortcut="F1"
+ />
+
void;
+}
+
+interface DesktopMenuBarProps {
+ projectName: string;
+ activeTab: EditorTab;
+ showResourcePanel: boolean;
+ onNewProject: () => void;
+ onOpenProject: () => void;
+ onSaveProject: () => void;
+ onExportProject: () => void;
+ onImportProject: () => void;
+ onUndo: () => void;
+ onRedo: () => void;
+ onSelectTab: (tab: EditorTab) => void;
+ onToggleResources: () => void;
+ onOpenSettings: () => void;
+ onOpenHelp: () => void;
+}
+
+const DesktopMenuBar = ({
+ projectName,
+ activeTab,
+ showResourcePanel,
+ onNewProject,
+ onOpenProject,
+ onSaveProject,
+ onExportProject,
+ onImportProject,
+ onUndo,
+ onRedo,
+ onSelectTab,
+ onToggleResources,
+ onOpenSettings,
+ onOpenHelp,
+}: DesktopMenuBarProps) => {
+ const [openMenuId, setOpenMenuId] = useState
(null);
+ const hostMode = isDesktopHostAvailable() ? 'Desktop' : 'Web';
+ const containerRef = useRef(null);
+
+ useEffect(() => {
+ const handlePointerDown = (event: MouseEvent) => {
+ if (!containerRef.current?.contains(event.target as Node)) {
+ setOpenMenuId(null);
+ }
+ };
+
+ window.addEventListener('mousedown', handlePointerDown);
+ return () => window.removeEventListener('mousedown', handlePointerDown);
+ }, []);
+
+ const menus = useMemo(
+ () => [
+ {
+ id: 'file',
+ label: '文件',
+ items: [
+ { id: 'new', label: '新建项目', shortcut: 'Ctrl+N', onClick: onNewProject },
+ { id: 'open', label: '打开项目', shortcut: 'Ctrl+O', onClick: onOpenProject },
+ { id: 'save', label: '保存项目', shortcut: 'Ctrl+S', onClick: onSaveProject },
+ { id: 'export', label: '导出项目', onClick: onExportProject },
+ { id: 'import', label: '导入项目', onClick: onImportProject },
+ ] satisfies MenuAction[],
+ },
+ {
+ id: 'edit',
+ label: '编辑',
+ items: [
+ { id: 'undo', label: '撤销', shortcut: 'Ctrl+Z', onClick: onUndo },
+ { id: 'redo', label: '重做', shortcut: 'Ctrl+Y', onClick: onRedo },
+ ] satisfies MenuAction[],
+ },
+ {
+ id: 'view',
+ label: '视图',
+ items: [
+ { id: 'design', label: '设计视图', active: activeTab === 'design', onClick: () => onSelectTab('design') },
+ { id: 'logic', label: '逻辑视图', active: activeTab === 'logic', onClick: () => onSelectTab('logic') },
+ { id: 'code', label: '代码视图', active: activeTab === 'code', onClick: () => onSelectTab('code') },
+ { id: 'preview', label: '预览视图', active: activeTab === 'preview', onClick: () => onSelectTab('preview') },
+ { id: 'resources', label: showResourcePanel ? '隐藏资源面板' : '显示资源面板', active: showResourcePanel, onClick: onToggleResources },
+ { id: 'settings', label: '项目设置', onClick: onOpenSettings },
+ ] satisfies MenuAction[],
+ },
+ {
+ id: 'help',
+ label: '帮助',
+ items: [
+ { id: 'shortcuts', label: '快捷键帮助', shortcut: 'F1', onClick: onOpenHelp },
+ ] satisfies MenuAction[],
+ },
+ ],
+ [
+ activeTab,
+ onExportProject,
+ onImportProject,
+ onNewProject,
+ onOpenHelp,
+ onOpenProject,
+ onOpenSettings,
+ onRedo,
+ onSaveProject,
+ onSelectTab,
+ onToggleResources,
+ onUndo,
+ showResourcePanel,
+ ],
+ );
+
+ const handleMenuAction = (action: MenuAction) => {
+ setOpenMenuId(null);
+ action.onClick();
+ };
+
+ return (
+
+
+ {menus.map(menu => (
+
+
+ {openMenuId === menu.id && (
+
+ {menu.items.map(item => (
+
+ ))}
+
+ )}
+
+ ))}
+
+
+
+ {projectName || 'LVGL UI Editor'}
+ {hostMode}
+
+
+ );
+};
+
+export default DesktopMenuBar;
diff --git a/src/utils/desktopHost.ts b/src/utils/desktopHost.ts
new file mode 100644
index 0000000..12a7139
--- /dev/null
+++ b/src/utils/desktopHost.ts
@@ -0,0 +1,3 @@
+export function isDesktopHostAvailable() {
+ return typeof window !== 'undefined' && typeof window.omni !== 'undefined';
+}
diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts
index f10863c..5706733 100644
--- a/src/vite-env.d.ts
+++ b/src/vite-env.d.ts
@@ -6,3 +6,19 @@ declare module 'virtual:compile-preview' {
const CompilePreview: FC;
export default CompilePreview;
}
+
+interface OmniHostWindowApi {
+ minimize: () => void;
+ maximize: () => void;
+ close: () => void;
+}
+
+interface OmniHostBridge {
+ window: OmniHostWindowApi;
+ invoke?: (handler: string, payload?: unknown) => Promise;
+ on?: (event: string, handler: (payload: unknown) => void) => void;
+}
+
+interface Window {
+ omni?: OmniHostBridge;
+}
From 26e8826e22bb919c06c69988894c85880e202a34 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 15 Apr 2026 20:34:16 +0000
Subject: [PATCH 2/5] chore: ignore generated dotnet artifacts
Agent-Logs-Url: https://github.com/IoTSharp/lvgl-editor/sessions/ab1aca59-4e9e-473a-847e-86d1e2f9aafa
Co-authored-by: maikebing <3445167+maikebing@users.noreply.github.com>
---
.gitignore | 2 +
...vglEditor.Desktop.csproj.nuget.dgspec.json | 143 ----------
.../LvglEditor.Desktop.csproj.nuget.g.props | 15 -
.../LvglEditor.Desktop.csproj.nuget.g.targets | 2 -
.../obj/project.assets.json | 263 ------------------
.../obj/project.nuget.cache | 164 -----------
6 files changed, 2 insertions(+), 587 deletions(-)
delete mode 100644 desktop/LvglEditor.Desktop/obj/LvglEditor.Desktop.csproj.nuget.dgspec.json
delete mode 100644 desktop/LvglEditor.Desktop/obj/LvglEditor.Desktop.csproj.nuget.g.props
delete mode 100644 desktop/LvglEditor.Desktop/obj/LvglEditor.Desktop.csproj.nuget.g.targets
delete mode 100644 desktop/LvglEditor.Desktop/obj/project.assets.json
delete mode 100644 desktop/LvglEditor.Desktop/obj/project.nuget.cache
diff --git a/.gitignore b/.gitignore
index 8adcdb2..71e3378 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,5 @@ dist-ssr
*.sln
*.sw?
wasm/build/
+bin/
+obj/
diff --git a/desktop/LvglEditor.Desktop/obj/LvglEditor.Desktop.csproj.nuget.dgspec.json b/desktop/LvglEditor.Desktop/obj/LvglEditor.Desktop.csproj.nuget.dgspec.json
deleted file mode 100644
index bfb6a2c..0000000
--- a/desktop/LvglEditor.Desktop/obj/LvglEditor.Desktop.csproj.nuget.dgspec.json
+++ /dev/null
@@ -1,143 +0,0 @@
-{
- "format": 1,
- "restore": {
- "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj": {}
- },
- "projects": {
- "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj": {
- "version": "1.0.0",
- "restore": {
- "projectUniqueName": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "projectName": "LvglEditor.Desktop",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "packagesPath": "/home/runner/.nuget/packages/",
- "outputPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/obj/",
- "projectStyle": "PackageReference",
- "crossTargeting": true,
- "configFilePaths": [
- "/home/runner/work/lvgl-editor/lvgl-editor/NuGet.config",
- "/home/runner/.nuget/NuGet/NuGet.Config"
- ],
- "originalTargetFrameworks": [
- "net8.0",
- "net8.0-windows"
- ],
- "sources": {
- "https://api.nuget.org/v3/index.json": {},
- "https://nuget.pkg.github.com/maikebing/index.json": {}
- },
- "frameworks": {
- "net8.0": {
- "targetAlias": "net8.0",
- "projectReferences": {}
- },
- "net8.0-windows7.0": {
- "targetAlias": "net8.0-windows",
- "projectReferences": {}
- }
- },
- "warningProperties": {
- "warnAsError": [
- "NU1605"
- ]
- },
- "restoreAuditProperties": {
- "enableAudit": "true",
- "auditLevel": "low",
- "auditMode": "direct"
- },
- "SdkAnalysisLevel": "10.0.200"
- },
- "frameworks": {
- "net8.0": {
- "targetAlias": "net8.0",
- "dependencies": {
- "OmniHost": {
- "target": "Package",
- "version": "[1.0.0, )"
- },
- "OmniHost.Gtk": {
- "target": "Package",
- "version": "[1.0.0, )"
- },
- "OmniHost.WebKitGtk": {
- "target": "Package",
- "version": "[1.0.0, )"
- }
- },
- "imports": [
- "net461",
- "net462",
- "net47",
- "net471",
- "net472",
- "net48",
- "net481"
- ],
- "assetTargetFallback": true,
- "warn": true,
- "downloadDependencies": [
- {
- "name": "Microsoft.WindowsDesktop.App.Ref",
- "version": "[8.0.25, 8.0.25]"
- }
- ],
- "frameworkReferences": {
- "Microsoft.NETCore.App": {
- "privateAssets": "all"
- }
- },
- "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/10.0.201/PortableRuntimeIdentifierGraph.json"
- },
- "net8.0-windows7.0": {
- "targetAlias": "net8.0-windows",
- "dependencies": {
- "OmniHost": {
- "target": "Package",
- "version": "[1.0.0, )"
- },
- "OmniHost.Gtk": {
- "target": "Package",
- "version": "[1.0.0, )"
- },
- "OmniHost.WebKitGtk": {
- "target": "Package",
- "version": "[1.0.0, )"
- },
- "OmniHost.WebView2": {
- "target": "Package",
- "version": "[1.0.0, )"
- },
- "OmniHost.Windows": {
- "target": "Package",
- "version": "[1.0.0, )"
- }
- },
- "imports": [
- "net461",
- "net462",
- "net47",
- "net471",
- "net472",
- "net48",
- "net481"
- ],
- "assetTargetFallback": true,
- "warn": true,
- "downloadDependencies": [
- {
- "name": "Microsoft.WindowsDesktop.App.Ref",
- "version": "[8.0.25, 8.0.25]"
- }
- ],
- "frameworkReferences": {
- "Microsoft.NETCore.App": {
- "privateAssets": "all"
- }
- },
- "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/10.0.201/PortableRuntimeIdentifierGraph.json"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/desktop/LvglEditor.Desktop/obj/LvglEditor.Desktop.csproj.nuget.g.props b/desktop/LvglEditor.Desktop/obj/LvglEditor.Desktop.csproj.nuget.g.props
deleted file mode 100644
index 2098f6f..0000000
--- a/desktop/LvglEditor.Desktop/obj/LvglEditor.Desktop.csproj.nuget.g.props
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- True
- NuGet
- $(MSBuildThisFileDirectory)project.assets.json
- /home/runner/.nuget/packages/
- /home/runner/.nuget/packages/
- PackageReference
- 7.0.0
-
-
-
-
-
\ No newline at end of file
diff --git a/desktop/LvglEditor.Desktop/obj/LvglEditor.Desktop.csproj.nuget.g.targets b/desktop/LvglEditor.Desktop/obj/LvglEditor.Desktop.csproj.nuget.g.targets
deleted file mode 100644
index 3dc06ef..0000000
--- a/desktop/LvglEditor.Desktop/obj/LvglEditor.Desktop.csproj.nuget.g.targets
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/desktop/LvglEditor.Desktop/obj/project.assets.json b/desktop/LvglEditor.Desktop/obj/project.assets.json
deleted file mode 100644
index a9c5000..0000000
--- a/desktop/LvglEditor.Desktop/obj/project.assets.json
+++ /dev/null
@@ -1,263 +0,0 @@
-{
- "version": 3,
- "targets": {
- "net8.0": {},
- "net8.0-windows7.0": {}
- },
- "libraries": {},
- "projectFileDependencyGroups": {
- "net8.0": [
- "OmniHost >= 1.0.0",
- "OmniHost.Gtk >= 1.0.0",
- "OmniHost.WebKitGtk >= 1.0.0"
- ],
- "net8.0-windows7.0": [
- "OmniHost >= 1.0.0",
- "OmniHost.Gtk >= 1.0.0",
- "OmniHost.WebKitGtk >= 1.0.0",
- "OmniHost.WebView2 >= 1.0.0",
- "OmniHost.Windows >= 1.0.0"
- ]
- },
- "packageFolders": {
- "/home/runner/.nuget/packages/": {}
- },
- "project": {
- "version": "1.0.0",
- "restore": {
- "projectUniqueName": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "projectName": "LvglEditor.Desktop",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "packagesPath": "/home/runner/.nuget/packages/",
- "outputPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/obj/",
- "projectStyle": "PackageReference",
- "crossTargeting": true,
- "configFilePaths": [
- "/home/runner/work/lvgl-editor/lvgl-editor/NuGet.config",
- "/home/runner/.nuget/NuGet/NuGet.Config"
- ],
- "originalTargetFrameworks": [
- "net8.0",
- "net8.0-windows"
- ],
- "sources": {
- "https://api.nuget.org/v3/index.json": {},
- "https://nuget.pkg.github.com/maikebing/index.json": {}
- },
- "frameworks": {
- "net8.0": {
- "targetAlias": "net8.0",
- "projectReferences": {}
- },
- "net8.0-windows7.0": {
- "targetAlias": "net8.0-windows",
- "projectReferences": {}
- }
- },
- "warningProperties": {
- "warnAsError": [
- "NU1605"
- ]
- },
- "restoreAuditProperties": {
- "enableAudit": "true",
- "auditLevel": "low",
- "auditMode": "direct"
- },
- "SdkAnalysisLevel": "10.0.200"
- },
- "frameworks": {
- "net8.0": {
- "targetAlias": "net8.0",
- "dependencies": {
- "OmniHost": {
- "target": "Package",
- "version": "[1.0.0, )"
- },
- "OmniHost.Gtk": {
- "target": "Package",
- "version": "[1.0.0, )"
- },
- "OmniHost.WebKitGtk": {
- "target": "Package",
- "version": "[1.0.0, )"
- }
- },
- "imports": [
- "net461",
- "net462",
- "net47",
- "net471",
- "net472",
- "net48",
- "net481"
- ],
- "assetTargetFallback": true,
- "warn": true,
- "downloadDependencies": [
- {
- "name": "Microsoft.WindowsDesktop.App.Ref",
- "version": "[8.0.25, 8.0.25]"
- }
- ],
- "frameworkReferences": {
- "Microsoft.NETCore.App": {
- "privateAssets": "all"
- }
- },
- "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/10.0.201/PortableRuntimeIdentifierGraph.json"
- },
- "net8.0-windows7.0": {
- "targetAlias": "net8.0-windows",
- "dependencies": {
- "OmniHost": {
- "target": "Package",
- "version": "[1.0.0, )"
- },
- "OmniHost.Gtk": {
- "target": "Package",
- "version": "[1.0.0, )"
- },
- "OmniHost.WebKitGtk": {
- "target": "Package",
- "version": "[1.0.0, )"
- },
- "OmniHost.WebView2": {
- "target": "Package",
- "version": "[1.0.0, )"
- },
- "OmniHost.Windows": {
- "target": "Package",
- "version": "[1.0.0, )"
- }
- },
- "imports": [
- "net461",
- "net462",
- "net47",
- "net471",
- "net472",
- "net48",
- "net481"
- ],
- "assetTargetFallback": true,
- "warn": true,
- "downloadDependencies": [
- {
- "name": "Microsoft.WindowsDesktop.App.Ref",
- "version": "[8.0.25, 8.0.25]"
- }
- ],
- "frameworkReferences": {
- "Microsoft.NETCore.App": {
- "privateAssets": "all"
- }
- },
- "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/10.0.201/PortableRuntimeIdentifierGraph.json"
- }
- }
- },
- "logs": [
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "warningLevel": 1,
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured."
- },
- {
- "code": "NU1301",
- "level": "Error",
- "message": "Failed to retrieve information about 'OmniHost' from remote source 'https://nuget.pkg.github.com/maikebing/download/omnihost/index.json'.\n Response status code does not indicate success: 403 (Forbidden)."
- }
- ]
-}
\ No newline at end of file
diff --git a/desktop/LvglEditor.Desktop/obj/project.nuget.cache b/desktop/LvglEditor.Desktop/obj/project.nuget.cache
deleted file mode 100644
index ee46352..0000000
--- a/desktop/LvglEditor.Desktop/obj/project.nuget.cache
+++ /dev/null
@@ -1,164 +0,0 @@
-{
- "version": 2,
- "dgSpecHash": "66fO9ALc1ms=",
- "success": false,
- "projectFilePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "expectedPackageFiles": [
- "/home/runner/.nuget/packages/microsoft.windowsdesktop.app.ref/8.0.25/microsoft.windowsdesktop.app.ref.8.0.25.nupkg.sha512",
- "/home/runner/.nuget/packages/microsoft.windowsdesktop.app.ref/8.0.25/microsoft.windowsdesktop.app.ref.8.0.25.nupkg.sha512"
- ],
- "logs": [
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "Undefined",
- "level": "Warning",
- "message": "Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "warningLevel": 1,
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- },
- {
- "code": "NU1301",
- "level": "Error",
- "message": "Failed to retrieve information about 'OmniHost' from remote source 'https://nuget.pkg.github.com/maikebing/download/omnihost/index.json'.\n Response status code does not indicate success: 403 (Forbidden).",
- "projectPath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "filePath": "/home/runner/work/lvgl-editor/lvgl-editor/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj",
- "targetGraphs": []
- }
- ]
-}
\ No newline at end of file
From 2333b94649ac40375d539547afba0bf5be59fe8c Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 15 Apr 2026 20:38:01 +0000
Subject: [PATCH 3/5] fix: gate desktop packaging by feed credentials
Agent-Logs-Url: https://github.com/IoTSharp/lvgl-editor/sessions/ab1aca59-4e9e-473a-847e-86d1e2f9aafa
Co-authored-by: maikebing <3445167+maikebing@users.noreply.github.com>
---
.github/workflows/desktop-packages.yml | 37 ++++++++++++++++++--------
1 file changed, 26 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/desktop-packages.yml b/.github/workflows/desktop-packages.yml
index a7f10b6..c7f1469 100644
--- a/.github/workflows/desktop-packages.yml
+++ b/.github/workflows/desktop-packages.yml
@@ -8,10 +8,12 @@ on:
pull_request:
workflow_dispatch:
+permissions:
+ contents: read
+
jobs:
package:
name: Package (${{ matrix.os_name }})
- if: ${{ secrets.OMNIHOST_PACKAGES_TOKEN != '' }}
runs-on: ${{ matrix.runner }}
env:
OMNIHOST_PACKAGES_USERNAME: ${{ github.actor }}
@@ -34,30 +36,52 @@ jobs:
archive_name: lvgl-editor-desktop-macos
steps:
+ - name: Check package feed credentials
+ id: package-feed
+ shell: bash
+ run: |
+ if [ -z "${OMNIHOST_PACKAGES_TOKEN}" ]; then
+ echo "enabled=false" >> "${GITHUB_OUTPUT}"
+ exit 0
+ fi
+
+ echo "enabled=true" >> "${GITHUB_OUTPUT}"
+
+ - name: Explain skipped packaging
+ if: steps.package-feed.outputs.enabled != 'true'
+ run: echo "desktop packaging skipped: set OMNIHOST_PACKAGES_TOKEN to enable OmniHost package restore."
+
- name: Checkout
+ if: steps.package-feed.outputs.enabled == 'true'
uses: actions/checkout@v4
- name: Setup Node.js
+ if: steps.package-feed.outputs.enabled == 'true'
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Setup .NET
+ if: steps.package-feed.outputs.enabled == 'true'
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Install web dependencies
+ if: steps.package-feed.outputs.enabled == 'true'
run: npm ci
- name: Build desktop web assets
+ if: steps.package-feed.outputs.enabled == 'true'
run: npm run build:desktop-web
- name: Publish desktop host
+ if: steps.package-feed.outputs.enabled == 'true'
run: dotnet publish ./desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj -c Release -f ${{ matrix.framework }} -o ./artifacts/${{ matrix.archive_name }}
- name: Create zip artifact
+ if: steps.package-feed.outputs.enabled == 'true'
uses: thedoctor0/zip-release@0.7.6
with:
type: zip
@@ -66,17 +90,8 @@ jobs:
path: ${{ matrix.archive_name }}
- name: Upload packaged artifact
+ if: steps.package-feed.outputs.enabled == 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.archive_name }}
path: ./artifacts/${{ matrix.archive_name }}.zip
-
- package-requirements:
- name: Package prerequisites
- if: ${{ secrets.OMNIHOST_PACKAGES_TOKEN == '' }}
- runs-on: ubuntu-latest
- steps:
- - name: Explain skipped packaging
- run: |
- echo "desktop packaging skipped"
- echo "Set the OMNIHOST_PACKAGES_TOKEN secret with read access to the maikebing GitHub Packages feed."
From ec39166b7f459970639728f50247cdc7be4343f5 Mon Sep 17 00:00:00 2001
From: maikebing
Date: Thu, 16 Apr 2026 11:19:04 +0800
Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitignore b/.gitignore
index 71e3378..1ff98cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,5 @@ dist-ssr
wasm/build/
bin/
obj/
+/.vs
+/desktop/.vs/LvglEditor.Desktop
From d8a0efe19eddcb58b4c4b7bd6a7ad65361862754 Mon Sep 17 00:00:00 2001
From: maikebing
Date: Thu, 16 Apr 2026 11:19:09 +0800
Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/desktop-packages.yml | 2 +-
desktop/{LvglEditor.Desktop => }/LvglEditor.Desktop.csproj | 0
desktop/{LvglEditor.Desktop => }/Program.cs | 0
3 files changed, 1 insertion(+), 1 deletion(-)
rename desktop/{LvglEditor.Desktop => }/LvglEditor.Desktop.csproj (100%)
rename desktop/{LvglEditor.Desktop => }/Program.cs (100%)
diff --git a/.github/workflows/desktop-packages.yml b/.github/workflows/desktop-packages.yml
index c7f1469..0427b00 100644
--- a/.github/workflows/desktop-packages.yml
+++ b/.github/workflows/desktop-packages.yml
@@ -78,7 +78,7 @@ jobs:
- name: Publish desktop host
if: steps.package-feed.outputs.enabled == 'true'
- run: dotnet publish ./desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj -c Release -f ${{ matrix.framework }} -o ./artifacts/${{ matrix.archive_name }}
+ run: dotnet publish ./desktop/LvglEditor.Desktop.csproj -c Release -f ${{ matrix.framework }} -o ./artifacts/${{ matrix.archive_name }}
- name: Create zip artifact
if: steps.package-feed.outputs.enabled == 'true'
diff --git a/desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj b/desktop/LvglEditor.Desktop.csproj
similarity index 100%
rename from desktop/LvglEditor.Desktop/LvglEditor.Desktop.csproj
rename to desktop/LvglEditor.Desktop.csproj
diff --git a/desktop/LvglEditor.Desktop/Program.cs b/desktop/Program.cs
similarity index 100%
rename from desktop/LvglEditor.Desktop/Program.cs
rename to desktop/Program.cs