Skip to content

Commit

Permalink
enhance(sync): move login-url to config.cljs and
Browse files Browse the repository at this point in the history
  • Loading branch information
RCmerci committed Apr 4, 2022
1 parent e147753 commit 33336bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/frontend/components/header.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
(if (user-handler/logged-in?)
[:span.text-sm.font-medium (user-handler/email)]

[:a.button.text-sm.font-medium.block {:on-click (fn []
(js/window.open "https://logseq-test.auth.us-east-2.amazoncognito.com/oauth2/authorize?client_id=4fi79en9aurclkb92e25hmu9ts&response_type=code&scope=email+openid+phone&redirect_uri=logseq%3A%2F%2Fauth-callback"))}
[:a.button.text-sm.font-medium.block {:on-click #(js/window.open config/LOGIN-URL)}
[:span (t :login)]]))))

(rum/defcs file-sync-remote-graphs <
Expand Down
4 changes: 4 additions & 0 deletions src/main/frontend/config.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

(def test? false)

;; TODO: add :closure-defines in shadow-cljs.edn when prod env is ready
(goog-define LOGIN-URL
"https://logseq-test.auth.us-east-2.amazoncognito.com/oauth2/authorize?client_id=4fi79en9aurclkb92e25hmu9ts&response_type=code&scope=email+openid+phone&redirect_uri=logseq%3A%2F%2Fauth-callback")

;; :TODO: How to do this?
;; (defonce desktop? ^boolean goog.DESKTOP)

Expand Down

0 comments on commit 33336bb

Please sign in to comment.