File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 40
40
(defn root
41
41
[]
42
42
[:> Command/Command
43
- {:on-key-down #(when-not (= (.-key %) " Escape" ) (.stopPropagation %))}
43
+ {:label " Command Menu"
44
+ :on-key-down #(when-not (= (.-key %) " Escape" ) (.stopPropagation %))}
44
45
[:> Command/CommandInput
45
46
{:placeholder (t [:cmdk/search-command " Search for a command" ])}]
46
47
[:> Command/CommandList
Original file line number Diff line number Diff line change 13
13
(rf/reg-event-db
14
14
::about
15
15
(fn [db [_]]
16
- (update db :dialogs conj {:content [v/about]})))
16
+ (update db :dialogs conj {:title " Repath Studio"
17
+ :content [v/about]})))
17
18
18
19
(rf/reg-event-fx
19
20
::save
20
21
(fn [{:keys [db]} [_ k]]
21
- {:db (update db :dialogs conj {:content [v/save k]
22
+ {:db (update db :dialogs conj {:title " Do you want to save your changes?"
23
+ :content [v/save k]
22
24
:attrs {:onOpenAutoFocus #(.preventDefault %)}})}))
23
25
24
26
#_(rf/reg-event-db
Original file line number Diff line number Diff line change 22
22
[:div.p-4
23
23
[:div.flex.gap-3.items-start.pb-2
24
24
[:div
25
- [:h1.text-3xl.font-light.mb-2 " Repath Studio" ]
26
25
[:div [:strong " Version: " ] config/version]
27
26
[:div [:strong " Browser: " ] platform/user-agent]]]
28
27
[:button.button.px-2.bg-primary.rounded.w-full
51
50
[k]
52
51
(let [document @(rf/subscribe [::document.s/document k])]
53
52
[:div.p-4
54
- [:h1.text-xl.mb-2
55
- " Do you want to save your changes?" ]
56
53
[:p
57
54
" Your changes to " [:strong (:title document)]
58
55
" will be lost if you close the document without saving." ]
80
77
[:> Dialog/Portal
81
78
[:> Dialog/Overlay {:class " backdrop" }]
82
79
[:> Dialog/Content
83
- (merge {:class " dialog-content" }
80
+
81
+ (merge {:class " dialog-content"
82
+ :on-key-down #(.stopPropagation %)}
84
83
(:attrs (last dialogs)))
85
- (:content (last dialogs))]]]))
84
+ (when-let [title (:title (last dialogs))]
85
+ [:> Dialog/Title
86
+ {:class " text-xl px-4 pt-4" }
87
+ title])
88
+ [:> Dialog/Description
89
+ {:class " m-0" }
90
+ (:content (last dialogs))]]]]))
You can’t perform that action at this time.
0 commit comments