浏览代码

fix: can't found code-editor.js on desktop
fix: load setting page error when no repo

rainmote 4 年之前
父节点
当前提交
a6780401b4

+ 2 - 0
.gitignore

@@ -29,3 +29,5 @@ strings.csv
 
 .calva
 resources/electron.js
+.clj-kondo/
+.lsp/

+ 1 - 0
resources/electron-dev.html

@@ -103,5 +103,6 @@ const portal = new MagicPortal(worker);
 </script>
 <script src="./js/main.js"></script>
 <script src="./js/highlight.min.js"></script>
+<script src="./js/code-editor.js"></script>
 </body>
 </html>

+ 1 - 0
resources/electron.html

@@ -102,5 +102,6 @@ const portal = new MagicPortal(worker);
 </script>
 <script src="./js/main.js"></script>
 <script src="./js/highlight.min.js"></script>
+<script src="./js/code-editor.js"></script>
 </body>
 </html>

+ 4 - 3
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)

+ 4 - 4
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"}]])