From d8a44f53c536f544ed0f8b3921a8e41fa871e72e Mon Sep 17 00:00:00 2001 From: Vlad Ganshin Date: Thu, 28 Dec 2023 15:54:45 +0100 Subject: [PATCH] add link --- routes/ui/auth/login_get.clj | 8 ++++++++ routes/ui/chat/:id/get.clj | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/routes/ui/auth/login_get.clj b/routes/ui/auth/login_get.clj index 11ad267..b058f06 100644 --- a/routes/ui/auth/login_get.clj +++ b/routes/ui/auth/login_get.clj @@ -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"} diff --git a/routes/ui/chat/:id/get.clj b/routes/ui/chat/:id/get.clj index edb4da6..3e2c388 100644 --- a/routes/ui/chat/:id/get.clj +++ b/routes/ui/chat/:id/get.clj @@ -32,7 +32,7 @@ [: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"} @@ -40,6 +40,8 @@ [: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))]]])