Tweak error screen to look more like mockup

Also tweak steps based on Junyi's feedback
This commit is contained in:
Gabriel Horner
2022-03-30 13:14:27 -04:00
committed by Tienson Qin
parent a4d3cba2e8
commit da3c9b04c4
2 changed files with 28 additions and 20 deletions

View File

@@ -34,40 +34,45 @@
[:div#main-content-container.scrollbar-spacing.w-full.flex.justify-center
[:div.cp__sidebar-main-content
[:div.ls-center
[:div.text-center (ui/icon "bug" {:style {:font-size ui/icon-size}})]
[:div.font-bold.text-center
[:div (ui/icon "bug" {:style {:font-size ui/icon-size}})]
[:div.font-bold
"Sorry. Something went wrong!"]
[:div.mt-2.mb-2 "Logseq is having a problem. To try to get it back to a
working state, please try the following safe steps in order:"]
[:div
;; TODO: Enable once multi-window case doesn't result in possible data loss
#_[:div.flex.flex-row.justify-between.align-items.mb-2
[:div.flex.flex-col.items-start
[:div.text-xs "STEP 1"]
[:div [:span.font-bold "Reload"] " the app"]]
[:div (ui/icon "command") (ui/icon "letter-r")]]
[:div.flex.flex-row.justify-between.align-items.mb-2
[:div.flex.flex-col.items-start
[:div.text-xs "STEP 1"]
[:div [:span.font-bold "Reload"] " the app"]]
[:div (ui/icon "command") (ui/icon "letter-r")]]
[:div [:span.font-bold "Rebuild"] " search index"]]
[:div
(ui/button "Try"
:small? true
:on-click (fn []
(search-handler/rebuild-indices! true)))]]
[:div.flex.flex-row.justify-between.align-items.mb-2
[:div.flex.flex-col.items-start
[:div.text-xs "STEP 2"]
[:div [:span.font-bold "Relaunch"] " the app"]
[:div.text-xs "Quit the app and then reopen it."]]
[:div (ui/icon "command") (ui/icon "letter-q")]]
[:div.flex.flex-row.justify-between.align-items.mb-2
[:div (ui/icon "command" {:class "rounded-md p-1 mr-2 bg-quaternary"})
(ui/icon "letter-q" {:class "rounded-md p-1 bg-quaternary"})]]
[:div.flex.flex-row.justify-between.align-items.mb-4
[:div.flex.flex-col.items-start
[:div.text-xs "STEP 3"]
[:div [:span.font-bold "Clear"] " local storage"]]
(ui/button "Try"
:small? true
:on-click (fn []
(.clear js/localStorage)
(notification/show! "Cleared!" :success)))]
[:div.flex.flex-row.justify-between.align-items.mb-2
[:div.flex.flex-col.items-start
[:div.text-xs "STEP 4"]
[:div [:span.font-bold "Rebuild"] " search index"]]
(ui/button "Try"
:small? true
:on-click (fn []
(search-handler/rebuild-indices! true)))]]
[:div [:span.font-bold "Clear"] " local storage"]
[:div.text-xs "This does delete minor preferences like dark/light theme preference."]]
[:div
(ui/button "Try"
:small? true
:on-click (fn []
(.clear js/localStorage)
(notification/show! "Cleared!" :success)))]]]
[:div
[:p "If you think you have experienced data loss, check for backup files under
the folder logseq/bak/."]