File tree Expand file tree Collapse file tree 4 files changed +1
-10
lines changed
Expand file tree Collapse file tree 4 files changed +1
-10
lines changed Original file line number Diff line number Diff line change 3737(defonce conf-state (local-storage (rc/atom {:task-location " " }) :conf-state ))
3838(if (or (empty? (:task-location @conf-state)) nil )
3939 (swap! conf-state assoc :task-location (fo/user-home )))
40- ; (defonce conf-state (rc/atom {:task-location (fo/user-home)}))
41- (println " CONF-STATE ######################" )
42- (println (:task-location @conf-state))
4340
4441(defonce app-state (rc/atom (global-state. false false false false " " nil nil DOING)))
4542
5653 " String -> GlobalState
5754 Consume a Task-Location directory and produces a new GlobalState with new tasks"
5855 [pth]
59- (println " RESET-TASKLIST " pth)
6056 (let [tlf (fo/create-task-list-file pth)]
6157 (reset! task-list (load-task-list tlf))))
6258
395391 returns a ListOfNode"
396392 [n pro gs]
397393 (let [lon (vec @task-list)
398- tmp (println lon)
399394 i (inc (node-pos-by-headline pro lon))
400395 new-lon (vec (concat (subvec lon 0 i) [n] (subvec lon i)))]
401396 (reset-lon! gs new-lon)))
Original file line number Diff line number Diff line change 167167 (dialogs/empty-message )
168168 [:table.table
169169 [:tbody
170- (println (count tb))
171170 (for [t tb]
172171 [task t])]]))
173172
Original file line number Diff line number Diff line change 11(ns akiee.filewatcher
2- (:require [cljs.nodejs :as nj]
3- [akiee.helpers :refer [log]]))
2+ (:require [cljs.nodejs :as nj]))
43; ; Node modules
54(def fs (js/require " fs" ))
65(def path (nj/require " path" ))
1312(defn watch-file [pth func]
1413 " String Function -> Void
1514 Watches the file at the specified String pth and triggers the Function func"
16- (.log js/console func)
1715 (.watchFile fs pth func)) ; watch file again
1816
1917(defn unwatch-file [pth]
Original file line number Diff line number Diff line change 372372 " \n\n Task-Location: " (db/task-location )))))
373373
374374(defn save-task-helper [pth fpth]
375- (println " SAVENTASTHELPER" )
376375 (fw/unwatch-file (db/task-file-path ))
377376 (db/set-task-location! pth)
378377 (fo/save-task-file (no/lon->md (db/nodes )) fpth true db/set-changed! #(fw/on-file-change %1 %2 (on-file-change-reload pth))))
You can’t perform that action at this time.
0 commit comments