diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-07-22 19:27:23 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-07-22 19:27:23 +0200 |
commit | baf30cbfe147a936d36d25f61fd2d1088dbd7418 (patch) | |
tree | 9729361e06a536bcd0e227c04ce5589d3f26bb43 /org-roam-ui.el | |
parent | 5e8cbb0f73e03da6c96e91c8a40b604466f0d5f8 (diff) | |
parent | 60801f2fdaf9a94ceec8a365937c6d8ac8a4f802 (diff) |
merge
Diffstat (limited to 'org-roam-ui.el')
-rw-r--r-- | org-roam-ui.el | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el index fe012f6..9420bf3 100644 --- a/org-roam-ui.el +++ b/org-roam-ui.el @@ -95,15 +95,15 @@ ROWS is the sql result, while COLUMN-NAMES is the columns to use." res)) (defservlet* theme application/json () - (when (boundp 'doom-themes--colors) + (progn + (when (boundp 'doom-themes--colors) (let* - ((colors (butlast doom-themes--colors (- (length doom-themes--colors) 25))) - ui-theme (list nil)) - (progn - (dolist (color colors) - (push (cons (car color) (car (cdr color))) ui-theme)) - (insert (json-encode ui-theme)) - (httpd-send-header t "text/plain" 200 :Access-Control-Allow-Origin "*"))))) + ((colors (butlast doom-themes--colors (- (length doom-themes--colors) 25))) ui-theme (list nil)) + (progn + (dolist (color colors) (push (cons (car color) (car (cdr color))) ui-theme)) + (insert (json-encode ui-theme))))) + (httpd-send-header t "text/plain" 200 :Access-Control-Allow-Origin "*"))) + (defservlet* id/:id text/html () (let ((node (org-roam-populate (org-roam-node-create :id id))) @@ -116,10 +116,9 @@ ROWS is the sql result, while COLUMN-NAMES is the columns to use." (insert html-string))) (defservlet* current-node-id text/event-stream () - (insert (format "data: %s\n\n" + (insert (format "data: %s\n\n" org-roam-ui-current-node-id)) - (httpd-send-header t "text/event-stream" 200 :Access-Control-Allow-Origin "*") - ) + (httpd-send-header t "text/event-stream" 200 :Access-Control-Allow-Origin "*")) (defun org-roam-ui-update () "Track changes within Emacs to update Org-roam UI. |