Browse Source

chore: add export-as-markdown ui

rcmerci 4 years ago
parent
commit
e72c4c16d4
2 changed files with 9 additions and 0 deletions
  1. 6 0
      src/main/frontend/components/header.cljs
  2. 3 0
      src/main/frontend/dicts.cljs

+ 6 - 0
src/main/frontend/components/header.cljs

@@ -131,6 +131,12 @@
           :options {:on-click (fn []
                                 (export/export-repo-as-html! current-repo))}
           :icon nil})
+
+       (when current-repo
+         {:title (t :export-markdown)
+          :options {:on-click (fn []
+                                (export/export-repo-as-markdown! current-repo))}})
+
        (when current-repo
          {:title (t :import)
           :options {:href (rfe/href :import)}

+ 3 - 0
src/main/frontend/dicts.cljs

@@ -311,6 +311,7 @@ title: How to take dummy notes?
         :close "Close"
         :re-index "Re-index"
         :export-json "Export as JSON"
+        :export-markdown "Export as Markdown"
         :unlink "unlink"
         :search (if config/publishing?
                   "Search"
@@ -1033,6 +1034,7 @@ title: How to take dummy notes?
            :cancel "取消"
            :re-index "重新建立索引"
            :export-json "以 JSON 格式导出"
+           :export-markdown "以 Markdown 格式导出"
            :unlink "解除绑定"
            :search (if config/publishing?
                      "搜索"
@@ -1297,6 +1299,7 @@ title: How to take dummy notes?
              :cancel "取消"
              :re-index "重新建立索引"
              :export-json "以 JSON 格式導出"
+             :export-markdown "以 Markdown 格式導出"
              :unlink "解除綁定"
              :search (if config/publishing?
                        "搜索"