From 5f4611d65e40eae3ca6191a15f68d69ea5a1c4cb Mon Sep 17 00:00:00 2001 From: Kirill Rogovoy Date: Tue, 20 Jul 2021 21:24:52 +0300 Subject: WIP --- org-roam-ui.el | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'org-roam-ui.el') diff --git a/org-roam-ui.el b/org-roam-ui.el index 2d4eb98..9b8590e 100644 --- a/org-roam-ui.el +++ b/org-roam-ui.el @@ -50,15 +50,16 @@ (cons 'target (elt row 2)))) (defservlet* theme application/json () - (when 'doom-themes--colors + (progn + (if + (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)))) + (insert "{}")) + (httpd-send-header t "application/json" 200 :Access-Control-Allow-Origin "*"))) (provide 'org-roam-ui) -- cgit v1.2.3