onboarding.cljs 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. (ns frontend.components.onboarding
  2. (:require [frontend.context.i18n :refer [t]]
  3. [rum.core :as rum]
  4. [frontend.ui :as ui]
  5. [frontend.state :as state]
  6. [frontend.components.onboarding.setups :as setups]))
  7. (rum/defc intro
  8. [onboarding-and-home?]
  9. (setups/picker onboarding-and-home?))
  10. (defn help
  11. []
  12. [:div.help.cp__sidebar-help-docs
  13. (let [discourse-with-icon [:div.flex-row.inline-flex.items-center
  14. [:span.mr-1 (t :help/forum-community)]
  15. (ui/icon "message-circle" {:style {:font-size 20}})]
  16. list
  17. [{:title "Usage"
  18. :children [[[:a
  19. {:on-click (fn [] (state/sidebar-add-block! (state/get-current-repo) "shortcut-settings" :shortcut-settings))}
  20. [:div.flex-row.inline-flex.items-center
  21. [:span.mr-1 (t :help/shortcuts)]
  22. (ui/icon "command" {:style {:font-size 20}})]]]
  23. [(t :help/docs) "https://docs.logseq.com/"]
  24. [(t :help/start) "https://docs.logseq.com/#/page/tutorial"]
  25. ["FAQ" "https://docs.logseq.com/#/page/faq"]]}
  26. {:title "Community"
  27. :children [[(t :help/awesome-logseq) "https://github.com/logseq/awesome-logseq"]
  28. [(t :help/blog) "https://blog.logseq.com"]
  29. [discourse-with-icon "https://discuss.logseq.com"]]}
  30. {:title "Development"
  31. :children [[(t :help/roadmap) "https://trello.com/b/8txSM12G/roadmap"]
  32. [(t :help/bug) "https://github.com/logseq/logseq/issues/new?labels=from:in-app&template=bug_report.yaml"]
  33. [(t :help/feature) "https://discuss.logseq.com/c/feature-requests/"]
  34. [(t :help/changelog) "https://docs.logseq.com/#/page/changelog"]]}
  35. {:title "About"
  36. :children [[(t :help/about) "https://logseq.com/blog/about"]]}
  37. {:title "Terms"
  38. :children [[(t :help/privacy) "https://logseq.com/blog/privacy-policy"]
  39. [(t :help/terms) "https://logseq.com/blog/terms"]]}]]
  40. (map (fn [sublist]
  41. [[:p.mt-4.mb-1 [:b (:title sublist)]]
  42. [:ul
  43. (map (fn [[title href]]
  44. [:li
  45. (if href
  46. [:a {:href href :target "_blank"} title]
  47. title)])
  48. (:children sublist))]])
  49. list))])