mirror of
https://github.com/logseq/logseq.git
synced 2026-05-05 19:36:35 +00:00
remove unused code
This commit is contained in:
@@ -227,41 +227,6 @@
|
||||
|
||||
(rum/defc date-picker < rum/reactive
|
||||
(bind-state :component/date-picker)
|
||||
#_
|
||||
(mixins/event-mixin
|
||||
(fn [state]
|
||||
(let [{:keys [on-change on-switch deadline-or-schedule?]} (last (:rum/args state))]
|
||||
(mixins/on-key-down
|
||||
state
|
||||
{;; enter, current day
|
||||
13 (fn [state e]
|
||||
(when (and on-change
|
||||
(not (input-or-select?)))
|
||||
(when-not deadline-or-schedule?
|
||||
(on-change e @*internal-model))))
|
||||
|
||||
;; left, previous day
|
||||
37 (fn [state e]
|
||||
(when-not (input-or-select?)
|
||||
(swap! *internal-model inc-date -1)))
|
||||
|
||||
;; right, next day
|
||||
39 (fn [state e]
|
||||
(when-not (input-or-select?)
|
||||
(swap! *internal-model inc-date 1)))
|
||||
|
||||
;; up, one week ago
|
||||
38 (fn [state e]
|
||||
(when-not (input-or-select?)
|
||||
(swap! *internal-model inc-week -1)))
|
||||
;; down, next week
|
||||
40 (fn [state e]
|
||||
(when-not (input-or-select?)
|
||||
(swap! *internal-model inc-week 1)))}
|
||||
{:all-handler (fn [e key-code]
|
||||
(when (and (contains? #{13 37 39 38 40} key-code)
|
||||
(edit-input?))
|
||||
(util/stop e)))}))))
|
||||
{:init (fn [state]
|
||||
(reset! *internal-model (first (:rum/args state)))
|
||||
state)}
|
||||
|
||||
Reference in New Issue
Block a user