From dd9f0f362ec8e7193a4920c2ee46246f1cbe67c9 Mon Sep 17 00:00:00 2001 From: mrxiaozhuox Date: Mon, 14 Feb 2022 16:52:16 +0800 Subject: [PATCH 1/2] fix: statement problem --- packages/interpreter/src/interpreter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/interpreter/src/interpreter.js b/packages/interpreter/src/interpreter.js index f0acd0802..a631d0368 100644 --- a/packages/interpreter/src/interpreter.js +++ b/packages/interpreter/src/interpreter.js @@ -102,10 +102,11 @@ export class Interpreter { SetAttribute(root, field, value, ns) { const name = field; const node = this.nodes[root]; + console.log(ns); if (ns === "style") { // @ts-ignore node.style[name] = value; - } else if (ns != null || ns !== undefined) { + } else if (ns != null || ns != undefined) { node.setAttributeNS(ns, name, value); } else { switch (name) { From e3e5f22bc7605b7019d5f92eeff719abcbf512c5 Mon Sep 17 00:00:00 2001 From: mrxiaozhuox Date: Mon, 14 Feb 2022 16:53:35 +0800 Subject: [PATCH 2/2] feat: move `default_icon` to assets --- packages/desktop/src/{ => assets}/default_icon.bin | Bin packages/desktop/src/{ => assets}/default_icon.png | Bin packages/desktop/src/cfg.rs | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename packages/desktop/src/{ => assets}/default_icon.bin (100%) rename packages/desktop/src/{ => assets}/default_icon.png (100%) diff --git a/packages/desktop/src/default_icon.bin b/packages/desktop/src/assets/default_icon.bin similarity index 100% rename from packages/desktop/src/default_icon.bin rename to packages/desktop/src/assets/default_icon.bin diff --git a/packages/desktop/src/default_icon.png b/packages/desktop/src/assets/default_icon.png similarity index 100% rename from packages/desktop/src/default_icon.png rename to packages/desktop/src/assets/default_icon.png diff --git a/packages/desktop/src/cfg.rs b/packages/desktop/src/cfg.rs index 49a26ae78..2a1067ded 100644 --- a/packages/desktop/src/cfg.rs +++ b/packages/desktop/src/cfg.rs @@ -88,7 +88,7 @@ impl DesktopConfig { impl DesktopConfig { pub(crate) fn with_default_icon(mut self) -> Self { - let bin: &[u8] = include_bytes!("default_icon.bin"); + let bin: &[u8] = include_bytes!("./assets/default_icon.bin"); let rgba = Icon::from_rgba(bin.to_owned(), 460, 460).expect("image parse failed"); self.window.window.window_icon = Some(rgba); self