mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
enhance(mobile): add a refresh button
This commit is contained in:
@@ -11,5 +11,9 @@
|
|||||||
"splashImmersive": true,
|
"splashImmersive": true,
|
||||||
"backgroundColor": "#002b36"
|
"backgroundColor": "#002b36"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"server": {
|
||||||
|
"url": "http://192.168.0.104:3001",
|
||||||
|
"cleartext": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ const config: CapacitorConfig = {
|
|||||||
}
|
}
|
||||||
// do not commit this into source control
|
// do not commit this into source control
|
||||||
// source: https://capacitorjs.com/docs/guides/live-reload
|
// source: https://capacitorjs.com/docs/guides/live-reload
|
||||||
//, server: {
|
, server: {
|
||||||
// url: process.env.LOGSEQ_APP_SERVER_URL,
|
url: "http://192.168.0.104:3001" //process.env.LOGSEQ_APP_SERVER_URL,
|
||||||
// cleartext: true
|
cleartext: true
|
||||||
//}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export = config;
|
export = config;
|
||||||
|
|||||||
@@ -24,7 +24,8 @@
|
|||||||
[reitit.frontend.easy :as rfe]
|
[reitit.frontend.easy :as rfe]
|
||||||
[rum.core :as rum]
|
[rum.core :as rum]
|
||||||
[frontend.mobile.util :as mobile-util]
|
[frontend.mobile.util :as mobile-util]
|
||||||
[frontend.components.widgets :as widgets]))
|
[frontend.components.widgets :as widgets]
|
||||||
|
[frontend.handler.web.nfs :as nfs-handler]))
|
||||||
|
|
||||||
(rum/defc home-button []
|
(rum/defc home-button []
|
||||||
(ui/with-shortcut :go/home "left"
|
(ui/with-shortcut :go/home "left"
|
||||||
@@ -205,9 +206,24 @@
|
|||||||
|
|
||||||
(new-block-mode)
|
(new-block-mode)
|
||||||
|
|
||||||
(when refreshing?
|
(when (mobile-util/is-native-platform?)
|
||||||
[:div {:class "animate-spin-reverse"}
|
[:a.text-sm.font-medium.button
|
||||||
svg/refresh])
|
{:on-click
|
||||||
|
(fn []
|
||||||
|
(state/pub-event!
|
||||||
|
[:modal/show
|
||||||
|
[:div {:style {:max-width 700}}
|
||||||
|
[:p "Refresh detects and processes files modified on your disk and diverged from the actual Logseq page content. Continue?"]
|
||||||
|
(ui/button
|
||||||
|
"Yes"
|
||||||
|
:on-click (fn []
|
||||||
|
(state/close-modal!)
|
||||||
|
(nfs-handler/refresh! (state/get-current-repo) repo/refresh-cb)))]]))}
|
||||||
|
(if refreshing?
|
||||||
|
[:div {:class "animate-spin-reverse"}
|
||||||
|
svg/refresh]
|
||||||
|
[:div.flex.flex-row.text-center.open-button__inner.items-center
|
||||||
|
(ui/icon "refresh" {:style {:fontSize ui/icon-size}})])])
|
||||||
|
|
||||||
(repo/sync-status current-repo)
|
(repo/sync-status current-repo)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user