Skip to content

Commit

Permalink
add link
Browse files Browse the repository at this point in the history
  • Loading branch information
vganshin committed Dec 28, 2023
1 parent 6d76a34 commit d8a44f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions routes/ui/auth/login_get.clj
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,16 @@ background-image: linear-gradient(160deg, #0093E9 0%, #80D0C7 100%);
[:button.py-2.px-4.text-white.rounded.w-full
{:style "background-color: #0093E9"}
"Sign in"]

[:a {:href "/auth/redirect/google"} "Login with Google"]

#_[:button.py-2.px-4.text-white.rounded.w-full
{:style "background-color: #0093E9"}
"Sign in"]

]


[:div.px-8

[:form.m-auto {:method "POST" :action "/ui/auth/logout"}
Expand Down
4 changes: 3 additions & 1 deletion routes/ui/chat/:id/get.clj
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@
[:input {:name "message"}]
[:button "Send"]]]

[:a {:href "/ui/chat"} "Back to chats"]


(let [messages (map :resource (box/sql ["select resource || jsonb_build_object('id', id) resource from chatmessage where resource#>>'{chat,id}' = ?" (:id (box/route-params))]))]
[:turbo-frame {:id "chat"}
(for [msg (reverse messages)]
[:div [:span {:style "font-weight: bold;"} (get-in msg [:author :id]) ": "]
(:message msg)])])

[:a {:href "/ui/chat"} "Back to chats"]

[:div
[:hr]
[:div {:style "font-family: monospace"} (format "Aidbox version %s" (box/version))]]])

0 comments on commit d8a44f5

Please sign in to comment.