From a6780401b47ce0702205301c3196cfb8fa3307d9 Mon Sep 17 00:00:00 2001 From: rainmote Date: Sun, 31 Jan 2021 09:18:38 +0800 Subject: [PATCH] fix: can't found code-editor.js on desktop fix: load setting page error when no repo --- .gitignore | 2 ++ resources/electron-dev.html | 1 + resources/electron.html | 1 + src/main/frontend/components/header.cljs | 7 ++++--- src/main/frontend/components/svg.cljs | 8 ++++---- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index ad9f3a9323..904dc1ac80 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,5 @@ strings.csv .calva resources/electron.js +.clj-kondo/ +.lsp/ diff --git a/resources/electron-dev.html b/resources/electron-dev.html index f1dadf367f..f266d16d1d 100644 --- a/resources/electron-dev.html +++ b/resources/electron-dev.html @@ -103,5 +103,6 @@ const portal = new MagicPortal(worker); + diff --git a/resources/electron.html b/resources/electron.html index 450fa09eaa..3079701b6e 100644 --- a/resources/electron.html +++ b/resources/electron.html @@ -102,5 +102,6 @@ const portal = new MagicPortal(worker); + diff --git a/src/main/frontend/components/header.cljs b/src/main/frontend/components/header.cljs index 41fc6397a9..f7e1c2ebcf 100644 --- a/src/main/frontend/components/header.cljs +++ b/src/main/frontend/components/header.cljs @@ -116,9 +116,10 @@ :target "_blank"} :icon svg/external-link})) - {:title (t :settings) - :options {:href (rfe/href :settings)} - :icon svg/settings-sm} + (when current-repo + {:title (t :settings) + :options {:href (rfe/href :settings)} + :icon svg/settings-sm}) (when current-repo {:title (t :export) diff --git a/src/main/frontend/components/svg.cljs b/src/main/frontend/components/svg.cljs index 03b11aed37..704d15ce5f 100644 --- a/src/main/frontend/components/svg.cljs +++ b/src/main/frontend/components/svg.cljs @@ -32,7 +32,7 @@ (rum/defc arrow-left [] [:svg.w-6.h-6 - {:viewbox "0 0 24 24", :stroke "currentColor", :fill "none"} + {:viewBox "0 0 24 24", :stroke "currentColor", :fill "none"} [:path {:d "M15 19l-7-7 7-7", :stroke-width "2", @@ -42,7 +42,7 @@ (rum/defc arrow-right [] [:svg.w-6.h-6 - {:viewbox "0 0 24 24", :stroke "currentColor", :fill "none"} + {:viewBox "0 0 24 24", :stroke "currentColor", :fill "none"} [:path {:d "M9 5l7 7-7 7", :stroke-width "2", @@ -105,7 +105,7 @@ (defonce minus [:svg.w-6.h-6 - {:viewbox "0 0 24 24", :stroke "currentColor", :fill "none"} + {:viewBox "0 0 24 24", :stroke "currentColor", :fill "none"} [:path {:d "M20 12H4" :stroke-width "2" @@ -114,7 +114,7 @@ (defonce rectangle [:svg.w-6.h-6 - {:viewbox "0 0 24 24", :stroke "currentColor", :fill "none"} + {:viewBox "0 0 24 24", :stroke "currentColor", :fill "none"} [:path {:d "M3.16580358,18.5038125 L20.5529464,18.5038125 C22.6525178,18.5038125 23.7072321,17.4593839 23.7072321,15.3902411 L23.7072321,3.12495537 C23.7072321,1.0558125 22.6525178,0.0113839219 20.5529464,0.0113839219 L3.16580358,0.0113839219 C1.07651787,0.0118125 0.0115178672,1.04638392 0.0115178672,3.12495537 L0.0115178672,15.3906696 C0.0115178672,17.4696696 1.07651787,18.5042411 3.16580358,18.5042411 L3.16580358,18.5038125 Z M3.19580358,16.8868125 C2.19123216,16.8868125 1.62894642,16.3545268 1.62894642,15.3096696 L1.62894642,3.20638392 C1.62894642,2.16152679 2.19123213,1.62924108 3.19580358,1.62924108 L20.5229464,1.62924108 C21.5172321,1.62924108 22.0898036,2.16152679 22.0898036,3.20638392 L22.0898036,15.3092411 C22.0898036,16.3540982 21.5172322,16.8863839 20.5229464,16.8863839 L3.19580358,16.8868125 Z" :stroke-width "2"}]])