Skip to content

Commit bf91893

Browse files
committed
use more config vars
1 parent 6d42dbb commit bf91893

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/config.cljs

+4
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@
99
(def app-key :repath-studio)
1010

1111
(def app-name "Repath Studio")
12+
13+
(def mime-type "application/x-repath-studio")
14+
15+
(def default-path "documents")

src/electron/file.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[config :as config]))
88

99
(def dialog-options
10-
{:defaultPath (.getPath app "documents")
10+
{:defaultPath (.getPath app config/default-path)
1111
:properties ["multiSelections"]
1212
:filters [{:name config/ext
1313
:extensions [config/ext]}]})

src/renderer/document/events.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
[renderer.window.effects :as-alias window.fx]))
2626

2727
(def file-picker-options
28-
{:startIn "documents"
29-
:types [{:accept {"application/repath-studio" [".rps"]}}]})
28+
{:startIn config/default-path
29+
:types [{:accept {config/mime-type [(str "." config/ext)]}}]})
3030

3131
(rf/reg-event-db
3232
::center

0 commit comments

Comments
 (0)