mirror of
https://github.com/edufeed-org/edufeed-web.git
synced 2025-12-10 08:44:39 +00:00
disable some logs, prettify add-resource
This commit is contained in:
parent
058d212109
commit
bdd0f4f1e6
4 changed files with 30 additions and 11 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -13,3 +13,9 @@
|
||||||
|
|
||||||
# shadow-cljs cache, port files
|
# shadow-cljs cache, port files
|
||||||
/.shadow-cljs/
|
/.shadow-cljs/
|
||||||
|
|
||||||
|
/.clj-kondo/
|
||||||
|
/.calva/
|
||||||
|
/.lsp/
|
||||||
|
|
||||||
|
/dev/
|
||||||
|
|
|
||||||
|
|
@ -2666,6 +2666,10 @@ details.collapse summary::-webkit-details-marker {
|
||||||
margin-top: 0.75rem;
|
margin-top: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mt-6 {
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.flex {
|
.flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
@ -2788,6 +2792,12 @@ details.collapse summary::-webkit-details-marker {
|
||||||
margin-bottom: calc(1rem * var(--tw-space-y-reverse));
|
margin-bottom: calc(1rem * var(--tw-space-y-reverse));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.space-y-2 > :not([hidden]) ~ :not([hidden]) {
|
||||||
|
--tw-space-y-reverse: 0;
|
||||||
|
margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
|
||||||
|
margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
|
||||||
|
}
|
||||||
|
|
||||||
.truncate {
|
.truncate {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
|
||||||
|
|
@ -115,8 +115,8 @@
|
||||||
#_(d-id-not-in-deleted-list-ids (get-d-id-from-tags (:tags %)) deleted-lists))
|
#_(d-id-not-in-deleted-list-ids (get-d-id-from-tags (:tags %)) deleted-lists))
|
||||||
events)
|
events)
|
||||||
most-recent-lists (most-recent-by-d-tag all-lists)]
|
most-recent-lists (most-recent-by-d-tag all-lists)]
|
||||||
(.log js/console "all lists: " (clj->js all-lists))
|
#_(.log js/console "all lists: " (clj->js all-lists))
|
||||||
(.log js/console "most recent lists: " (clj->js most-recent-lists))
|
#_(.log js/console "most recent lists: " (clj->js most-recent-lists))
|
||||||
most-recent-lists)))
|
most-recent-lists)))
|
||||||
|
|
||||||
(re-frame/reg-sub
|
(re-frame/reg-sub
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,8 @@
|
||||||
:uri uri
|
:uri uri
|
||||||
:author author})]
|
:author author})]
|
||||||
(fn []
|
(fn []
|
||||||
[:form {:on-submit (fn [e]
|
[:form {:class "flex flex-col space-y-4"
|
||||||
|
:on-submit (fn [e]
|
||||||
(.preventDefault e)
|
(.preventDefault e)
|
||||||
;; do something with the state @s
|
;; do something with the state @s
|
||||||
)}
|
)}
|
||||||
|
|
@ -46,12 +47,14 @@
|
||||||
(defn add-resource-by-json []
|
(defn add-resource-by-json []
|
||||||
(let [s (reagent/atom {:json-string ""})]
|
(let [s (reagent/atom {:json-string ""})]
|
||||||
(fn []
|
(fn []
|
||||||
|
[:div
|
||||||
|
[:p "Paste an AMB object"]
|
||||||
[:form {:on-submit (fn [e] (.preventDefault e))}
|
[:form {:on-submit (fn [e] (.preventDefault e))}
|
||||||
[:textarea {:on-change (fn [e]
|
[:textarea {:on-change (fn [e]
|
||||||
(swap! s assoc :json-string (-> e .-target .-value)))}]
|
(swap! s assoc :json-string (-> e .-target .-value)))}]
|
||||||
[:button {:class "btn btn-warning"
|
[:button {:class "btn btn-warning"
|
||||||
:on-click #(re-frame/dispatch [::events/convert-amb-and-publish-as-nostr-event (:json-string @s)])}
|
:on-click #(re-frame/dispatch [::events/convert-amb-and-publish-as-nostr-event (:json-string @s)])}
|
||||||
"Publish as Nostr Event"]])))
|
"Publish as Nostr Event"]]])))
|
||||||
|
|
||||||
;; TODO try again using xhrio
|
;; TODO try again using xhrio
|
||||||
(defn add-resosurce-by-uri []
|
(defn add-resosurce-by-uri []
|
||||||
|
|
@ -425,11 +428,11 @@
|
||||||
:class "collapse collapse-arrow border-base-300 bg-base-200 border"}
|
:class "collapse collapse-arrow border-base-300 bg-base-200 border"}
|
||||||
[:div
|
[:div
|
||||||
{:class "collapse-title text-xl font-medium"}
|
{:class "collapse-title text-xl font-medium"}
|
||||||
"Focus me to see content"]
|
"Advanced Options"]
|
||||||
[:div
|
[:div
|
||||||
{:class "collapse-content"}
|
{:class "collapse-content"}
|
||||||
[add-resource-by-json]
|
[add-resource-by-json]
|
||||||
[add-resosurce-by-uri]]]])
|
#_[add-resosurce-by-uri]]]])
|
||||||
|
|
||||||
(defmethod routes/panels :add-resource-panel [] [add-resource-panel])
|
(defmethod routes/panels :add-resource-panel [] [add-resource-panel])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue