Browse Source

replace capacitor with mobile

Tienson Qin 3 tháng trước cách đây
mục cha
commit
9a7d43daf2

+ 1 - 1
capacitor.config.ts

@@ -6,7 +6,7 @@ const version = fs.readFileSync('static/package.json', 'utf8').match(/"version":
 const config: CapacitorConfig = {
 const config: CapacitorConfig = {
   appId: 'com.logseq.app',
   appId: 'com.logseq.app',
   appName: 'Logseq',
   appName: 'Logseq',
-  webDir: 'static/capacitor',
+  webDir: 'static/mobile',
   loggingBehavior: 'debug',
   loggingBehavior: 'debug',
   server: {
   server: {
       androidScheme: 'http',
       androidScheme: 'http',

+ 11 - 11
gulpfile.js

@@ -23,8 +23,8 @@ const css = {
     })
     })
   },
   },
 
 
-  watchCapacitorNewCSS () {
-    return cp.spawn(`yarn css:capacitor-new-watch`, {
+  watchMobileCSS () {
+    return cp.spawn(`yarn css:mobile-watch`, {
       shell: true,
       shell: true,
       stdio: 'inherit',
       stdio: 'inherit',
     })
     })
@@ -37,9 +37,9 @@ const css = {
     )(...params)
     )(...params)
   },
   },
 
 
-  buildCapacitorCSS (...params) {
+  buildMobileCSS (...params) {
     return gulp.series(
     return gulp.series(
-      () => exec(`yarn css:capacitor-new-build`, {}),
+      () => exec(`yarn css:mobile-build`, {}),
     )(...params)
     )(...params)
   },
   },
 
 
@@ -130,10 +130,10 @@ const common = {
         'packages/amplify/dist/amplify.js',
         'packages/amplify/dist/amplify.js',
         'packages/ui/dist/ui/ui.js',
         'packages/ui/dist/ui/ui.js',
         'node_modules/@logseq/sqlite-wasm/sqlite-wasm/jswasm/sqlite3.wasm',
         'node_modules/@logseq/sqlite-wasm/sqlite-wasm/jswasm/sqlite3.wasm',
-      ]).pipe(gulp.dest(path.join(outputPath, 'capacitor', 'js'))),
+      ]).pipe(gulp.dest(path.join(outputPath, 'mobile', 'js'))),
       () => gulp.src([
       () => gulp.src([
         'packages/ui/dist/ionic/*.js',
         'packages/ui/dist/ionic/*.js',
-      ]).pipe(gulp.dest(path.join(outputPath, 'capacitor'))),
+      ]).pipe(gulp.dest(path.join(outputPath, 'mobile'))),
     )(...params)
     )(...params)
   },
   },
 
 
@@ -146,7 +146,7 @@ const common = {
     return gulp.src([
     return gulp.src([
       outputFilePath,
       outputFilePath,
       '!' + path.join(outputPath, 'node_modules/**'),
       '!' + path.join(outputPath, 'node_modules/**'),
-      '!' + path.join(outputPath, 'capacitor/**'),
+      '!' + path.join(outputPath, 'mobile/**'),
       '!' + path.join(outputPath, 'android/**'),
       '!' + path.join(outputPath, 'android/**'),
       '!' + path.join(outputPath, 'ios/**'),
       '!' + path.join(outputPath, 'ios/**'),
     ]).pipe(gulp.dest(publicRootPath))
     ]).pipe(gulp.dest(publicRootPath))
@@ -275,10 +275,10 @@ exports.watch = gulp.series(
   common.syncResourceFile,
   common.syncResourceFile,
   common.syncAssetFiles, common.switchReactDevelopmentMode,
   common.syncAssetFiles, common.switchReactDevelopmentMode,
   gulp.parallel(common.keepSyncResourceFile, css.watchCSS))
   gulp.parallel(common.keepSyncResourceFile, css.watchCSS))
-exports.watchCapacitorNew = gulp.series(
+exports.watchMobile = gulp.series(
   common.syncResourceFile, common.syncAssetFiles,
   common.syncResourceFile, common.syncAssetFiles,
-  gulp.parallel(common.keepSyncResourceFile, css.watchCapacitorNewCSS))
+  gulp.parallel(common.keepSyncResourceFile, css.watchMobileCSS))
 exports.build = gulp.series(common.clean, common.syncResourceFile,
 exports.build = gulp.series(common.clean, common.syncResourceFile,
   common.syncAssetFiles, css.buildCSS)
   common.syncAssetFiles, css.buildCSS)
-exports.buildCapacitorNew = gulp.series(common.clean, common.syncResourceFile,
-  common.syncAssetFiles, css.buildCapacitorCSS)
+exports.buildMobile = gulp.series(common.clean, common.syncResourceFile,
+  common.syncAssetFiles, css.buildMobileCSS)

+ 11 - 11
package.json

@@ -48,34 +48,34 @@
         "watch": "run-p gulp:watch cljs:watch",
         "watch": "run-p gulp:watch cljs:watch",
         "electron-watch": "run-p gulp:watch cljs:electron-watch",
         "electron-watch": "run-p gulp:watch cljs:electron-watch",
         "app-watch": "run-p gulp:watch cljs:app-watch",
         "app-watch": "run-p gulp:watch cljs:app-watch",
-        "dev": "run-p gulp:watch gulp:capacitor-new-watch cljs:dev-watch",
+        "dev": "run-p gulp:watch gulp:mobile-watch cljs:dev-watch",
         "release": "run-s gulp:build cljs:release",
         "release": "run-s gulp:build cljs:release",
         "release-app": "run-s gulp:build cljs:release-app",
         "release-app": "run-s gulp:build cljs:release-app",
-        "release-capacitor-new": "run-s gulp:buildCapacitorNew cljs:release-capacitor-new",
+        "release-mobile": "run-s gulp:buildMobile cljs:release-mobile",
         "dev-release-app": "run-s gulp:build cljs:dev-release-app",
         "dev-release-app": "run-s gulp:build cljs:dev-release-app",
         "dev-electron-app": "gulp electron",
         "dev-electron-app": "gulp electron",
         "release-electron": "run-s gulp:build && gulp electronMaker",
         "release-electron": "run-s gulp:build && gulp electronMaker",
         "debug-electron": "cd static/ && yarn electron:debug",
         "debug-electron": "cd static/ && yarn electron:debug",
         "e2e-test": "cross-env DEBUG=pw:api CI=true npx playwright test --reporter github",
         "e2e-test": "cross-env DEBUG=pw:api CI=true npx playwright test --reporter github",
-        "sync-android-release": "yarn clean && yarn release-capacitor-new && rm -rf ./static/capacitor/**/*.map && npx cap sync android",
-        "sync-ios-release": "yarn clean && yarn release-capacitor-new && rm -rf ./static/capacitor/**/*.map && npx cap sync ios",
+        "sync-android-release": "yarn clean && yarn release-mobile && rm -rf ./static/mobile/**/*.map && npx cap sync android",
+        "sync-ios-release": "yarn clean && yarn release-mobile && rm -rf ./static/mobile/**/*.map && npx cap sync ios",
         "clean": "gulp clean",
         "clean": "gulp clean",
         "test": "run-s cljs:test cljs:run-test",
         "test": "run-s cljs:test cljs:run-test",
         "report": "run-s cljs:report",
         "report": "run-s cljs:report",
         "style:lint": "stylelint \"src/**/*.css\"",
         "style:lint": "stylelint \"src/**/*.css\"",
         "gulp:watch": "gulp watch",
         "gulp:watch": "gulp watch",
         "gulp:build": "cross-env NODE_ENV=production gulp build",
         "gulp:build": "cross-env NODE_ENV=production gulp build",
-        "gulp:buildCapacitorNew": "cross-env NODE_ENV=production gulp buildCapacitorNew",
+        "gulp:buildMobile": "cross-env NODE_ENV=production gulp buildMobile",
         "css:build": "postcss tailwind.all.css -o static/css/style.css --verbose --env production",
         "css:build": "postcss tailwind.all.css -o static/css/style.css --verbose --env production",
         "css:watch": "cross-env TAILWIND_MODE=watch postcss tailwind.all.css -o static/css/style.css --verbose --watch",
         "css:watch": "cross-env TAILWIND_MODE=watch postcss tailwind.all.css -o static/css/style.css --verbose --watch",
         "cljs:watch": "clojure -M:cljs watch app electron",
         "cljs:watch": "clojure -M:cljs watch app electron",
         "cljs:storybook-watch": "clojure -M:cljs watch stories-dev",
         "cljs:storybook-watch": "clojure -M:cljs watch stories-dev",
-        "gulp:capacitor-new-watch": "gulp watchCapacitorNew",
-        "css:capacitor-new-build": "postcss tailwind.capacitor.css -o static/capacitor/style.css --verbose --env production",
-        "css:capacitor-new-watch": "cross-env TAILWIND_MODE=watch postcss tailwind.capacitor.css -o static/capacitor/style.css --verbose --watch",
-        "cljs:capacitor-new-watch": "clojure -M:cljs watch capacitor-new",
-        "cljs:release-capacitor-new": "clojure -M:cljs release capacitor-new",
-        "cljs:dev-watch": "clojure -M:cljs watch app electron capacitor-new",
+        "gulp:mobile-watch": "gulp watchMobile",
+        "css:mobile-build": "postcss tailwind.mobile.css -o static/mobile/style.css --verbose --env production",
+        "css:mobile-watch": "cross-env TAILWIND_MODE=watch postcss tailwind.mobile.css -o static/mobile/style.css --verbose --watch",
+        "cljs:mobile-watch": "clojure -M:cljs watch mobile",
+        "cljs:release-mobile": "clojure -M:cljs release mobile",
+        "cljs:dev-watch": "clojure -M:cljs watch app electron mobile",
         "cljs:app-watch": "clojure -M:cljs watch app",
         "cljs:app-watch": "clojure -M:cljs watch app",
         "cljs:electron-watch": "clojure -M:cljs watch app electron --config-merge \"{:asset-path \\\"./js\\\"}\"",
         "cljs:electron-watch": "clojure -M:cljs watch app electron --config-merge \"{:asset-path \\\"./js\\\"}\"",
         "cljs:release": "clojure -M:cljs release app publishing electron",
         "cljs:release": "clojure -M:cljs release app publishing electron",

+ 0 - 0
resources/capacitor/index.html → resources/mobile/index.html


+ 0 - 0
resources/capacitor/ionic.bundle.css → resources/mobile/ionic.bundle.css


+ 0 - 0
resources/capacitor/js/eventemitter3.umd.min.js → resources/mobile/js/eventemitter3.umd.min.js


+ 0 - 0
resources/capacitor/js/magic_portal.js → resources/mobile/js/magic_portal.js


+ 0 - 0
resources/capacitor/js/tabler-icons-react.min.js → resources/mobile/js/tabler-icons-react.min.js


+ 0 - 0
resources/capacitor/js/tabler.ext.js → resources/mobile/js/tabler.ext.js


+ 0 - 0
resources/capacitor/js/worker.js → resources/mobile/js/worker.js


+ 45 - 47
shadow-cljs.edn

@@ -2,10 +2,10 @@
 {:deps true
 {:deps true
  :nrepl {:port 8701}
  :nrepl {:port 8701}
 
 
- ;; :ssl   {:password "logseq"}
+ :ssl   {:password "logseq"}
  ;; "." for /static
  ;; "." for /static
  :dev-http {3001 ["static" "."]
  :dev-http {3001 ["static" "."]
-            3002 "static/capacitor"
+            3002 "static/mobile"
             8021 "static/rtc-e2e-test"}
             8021 "static/rtc-e2e-test"}
 
 
  :js-options {:js-package-dirs ["node_modules" "packages/tldraw/apps"]}
  :js-options {:js-package-dirs ["node_modules" "packages/tldraw/apps"]}
@@ -69,54 +69,52 @@
                    :preloads [devtools.preload
                    :preloads [devtools.preload
                               shadow.remote.runtime.cljs.browser]}}
                               shadow.remote.runtime.cljs.browser]}}
 
 
-  :capacitor-new {:target        :browser
-                  :module-loader true
-                  :js-options    {:ignore-asset-requires true
-                                  :resolve {"react" {:target :global
-                                                     :global "React"}
-                                            "react-dom" {:target :global
-                                                         :global "ReactDOM"}}} ;; handle `require(xxx.css)`
-                  :modules       {:shared
-                                  {:entries []}
-                                  :main
-                                  {:init-fn capacitor.core/init
-                                   :depends-on #{:shared}}
-                                  :code-editor
-                                  {:entries [frontend.extensions.code]
-                                   :depends-on #{:main}}
-                                  :db-worker
-                                  {:init-fn frontend.worker.db-worker/init
-                                   :depends-on #{:shared}
-                                   :web-worker true}}
-
-                  :output-dir       "./static/capacitor/js"
-                  :asset-path       "./js"
-                  :release          {:asset-path "http://localhost"}
-                  :compiler-options {:infer-externs      :auto
-                                     :output-feature-set :es-next-in
-                                     :source-map true
-                                     :externs ["datascript/externs.js"
-                                               "externs.js"]
-                                     :warnings {:fn-deprecated false
-                                                :redef false}
-                                     :cross-chunk-method-motion false}
-                  :build-hooks [(shadow.hooks/git-revision-hook "--long --always --dirty")]
-                  :closure-defines
-                  {
-                   ;; Set to switch file sync server to dev, set this to false in `yarn watch`
-                   frontend.config/ENABLE-FILE-SYNC-PRODUCTION #shadow/env ["ENABLE_FILE_SYNC_PRODUCTION" :as :bool :default true]
-                   frontend.config/ENABLE-RTC-SYNC-PRODUCTION #shadow/env ["ENABLE_RTC_SYNC_PRODUCTION" :as :bool :default true]
-                   }
-
-                  ;; NOTE: electron, browser/mobile-app use different asset-paths.
+  :mobile {:target        :browser
+           :module-loader true
+           :js-options    {:ignore-asset-requires true
+                           :resolve {"react" {:target :global
+                                              :global "React"}
+                                     "react-dom" {:target :global
+                                                  :global "ReactDOM"}}} ;; handle `require(xxx.css)`
+           :modules       {:shared
+                           {:entries []}
+                           :main
+                           {:init-fn mobile.core/init
+                            :depends-on #{:shared}}
+                           :code-editor
+                           {:entries [frontend.extensions.code]
+                            :depends-on #{:main}}
+                           :db-worker
+                           {:init-fn frontend.worker.db-worker/init
+                            :depends-on #{:shared}
+                            :web-worker true}}
+
+           :output-dir       "./static/mobile/js"
+           :asset-path       "./js"
+           :release          {:asset-path "http://localhost"}
+           :compiler-options {:infer-externs      :auto
+                              :output-feature-set :es-next-in
+                              :source-map true
+                              :externs ["datascript/externs.js"
+                                        "externs.js"]
+                              :warnings {:fn-deprecated false
+                                         :redef false}
+                              :cross-chunk-method-motion false}
+           :build-hooks [(shadow.hooks/git-revision-hook "--long --always --dirty")]
+           :closure-defines
+           {;; Set to switch file sync server to dev, set this to false in `yarn watch`
+            frontend.config/ENABLE-FILE-SYNC-PRODUCTION #shadow/env ["ENABLE_FILE_SYNC_PRODUCTION" :as :bool :default true]
+            frontend.config/ENABLE-RTC-SYNC-PRODUCTION #shadow/env ["ENABLE_RTC_SYNC_PRODUCTION" :as :bool :default true]}
+
+;; NOTE: electron, browser/mobile-app use different asset-paths.
                   ;;   For browser/mobile-app devs, assets are located in /static/js(via HTTP root).
                   ;;   For browser/mobile-app devs, assets are located in /static/js(via HTTP root).
                   ;;   For electron devs, assets are located in ./js(via relative path).
                   ;;   For electron devs, assets are located in ./js(via relative path).
                   ;; :dev      {:asset-path "./js"}
                   ;; :dev      {:asset-path "./js"}
-                  :devtools {:before-load capacitor.core/stop!          ;; before live-reloading any code call this function
-                             :after-load capacitor.core/render!          ;; after live-reloading finishes call this function
-                             :watch-path "/static/capacitor"
-                             :preloads [devtools.preload
-                                        shadow.remote.runtime.cljs.browser]}}
+           :devtools {:before-load mobile.core/stop!          ;; before live-reloading any code call this function
+                      :after-load mobile.core/render!          ;; after live-reloading finishes call this function
+                      :watch-path "/static/mobile"
+                      :preloads [devtools.preload
+                                 shadow.remote.runtime.cljs.browser]}}
 
 
   :electron {:target :node-script
   :electron {:target :node-script
              :output-to "static/electron.js"
              :output-to "static/electron.js"

+ 2 - 2
src/main/frontend/handler/events/ui.cljs

@@ -1,7 +1,6 @@
 (ns frontend.handler.events.ui
 (ns frontend.handler.events.ui
   "UI events"
   "UI events"
-  (:require [capacitor.state :as mobile-state]
-            [clojure.core.async :as async]
+  (:require [clojure.core.async :as async]
             [clojure.core.async.interop :refer [p->c]]
             [clojure.core.async.interop :refer [p->c]]
             [frontend.components.cmdk.core :as cmdk]
             [frontend.components.cmdk.core :as cmdk]
             [frontend.components.file-sync :as file-sync]
             [frontend.components.file-sync :as file-sync]
@@ -40,6 +39,7 @@
             [goog.dom :as gdom]
             [goog.dom :as gdom]
             [logseq.common.util :as common-util]
             [logseq.common.util :as common-util]
             [logseq.shui.ui :as shui]
             [logseq.shui.ui :as shui]
+            [mobile.state :as mobile-state]
             [promesa.core :as p]))
             [promesa.core :as p]))
 
 
 (defmethod events/handle :go/search [_]
 (defmethod events/handle :go/search [_]

+ 10 - 10
src/main/capacitor/components/app.cljs → src/main/mobile/components/app.cljs

@@ -1,15 +1,15 @@
-(ns capacitor.components.app
+(ns mobile.components.app
   "App root"
   "App root"
   (:require ["../externals.js"]
   (:require ["../externals.js"]
-            [capacitor.components.editor-toolbar :as editor-toolbar]
-            [capacitor.components.modal :as modal]
-            [capacitor.components.popup :as popup]
-            [capacitor.components.search :as search]
-            [capacitor.components.selection-toolbar :as selection-toolbar]
-            [capacitor.components.settings :as settings]
-            [capacitor.components.ui :as ui-component]
-            [capacitor.ionic :as ion]
-            [capacitor.state :as mobile-state]
+            [mobile.components.editor-toolbar :as editor-toolbar]
+            [mobile.components.modal :as modal]
+            [mobile.components.popup :as popup]
+            [mobile.components.search :as search]
+            [mobile.components.selection-toolbar :as selection-toolbar]
+            [mobile.components.settings :as settings]
+            [mobile.components.ui :as ui-component]
+            [mobile.ionic :as ion]
+            [mobile.state :as mobile-state]
             [clojure.string :as string]
             [clojure.string :as string]
             [frontend.components.journal :as journal]
             [frontend.components.journal :as journal]
             [frontend.components.rtc.indicator :as rtc-indicator]
             [frontend.components.rtc.indicator :as rtc-indicator]

+ 0 - 0
src/main/capacitor/components/app.css → src/main/mobile/components/app.css


+ 2 - 2
src/main/capacitor/components/editor_toolbar.cljs → src/main/mobile/components/editor_toolbar.cljs

@@ -1,6 +1,6 @@
-(ns capacitor.components.editor-toolbar
+(ns mobile.components.editor-toolbar
   "Mobile editor toolbar"
   "Mobile editor toolbar"
-  (:require [capacitor.init :as init]
+  (:require [mobile.init :as init]
             [frontend.commands :as commands]
             [frontend.commands :as commands]
             [frontend.handler.editor :as editor-handler]
             [frontend.handler.editor :as editor-handler]
             [frontend.mobile.camera :as mobile-camera]
             [frontend.mobile.camera :as mobile-camera]

+ 7 - 7
src/main/capacitor/components/modal.cljs → src/main/mobile/components/modal.cljs

@@ -1,12 +1,12 @@
-(ns capacitor.components.modal
+(ns mobile.components.modal
   "Mobile modal"
   "Mobile modal"
   (:require ["../externals.js"]
   (:require ["../externals.js"]
-            [capacitor.components.editor-toolbar :as mobile-bar]
-            [capacitor.components.selection-toolbar :as selection-toolbar]
-            [capacitor.components.ui :as mobile-ui]
-            [capacitor.init :as init]
-            [capacitor.ionic :as ion]
-            [capacitor.state :as mobile-state]
+            [mobile.components.editor-toolbar :as mobile-bar]
+            [mobile.components.selection-toolbar :as selection-toolbar]
+            [mobile.components.ui :as mobile-ui]
+            [mobile.init :as init]
+            [mobile.ionic :as ion]
+            [mobile.state :as mobile-state]
             [frontend.components.page :as page]
             [frontend.components.page :as page]
             [frontend.db :as db]
             [frontend.db :as db]
             [frontend.handler.notification :as notification]
             [frontend.handler.notification :as notification]

+ 3 - 3
src/main/capacitor/components/popup.cljs → src/main/mobile/components/popup.cljs

@@ -1,7 +1,7 @@
-(ns capacitor.components.popup
+(ns mobile.components.popup
   "Mobile popup"
   "Mobile popup"
-  (:require [capacitor.ionic :as ion]
-            [capacitor.state :as mobile-state]
+  (:require [mobile.ionic :as ion]
+            [mobile.state :as mobile-state]
             [dommy.core :as dom]
             [dommy.core :as dom]
             [logseq.shui.popup.core :as shui-popup]
             [logseq.shui.popup.core :as shui-popup]
             [logseq.shui.ui :as shui]
             [logseq.shui.ui :as shui]

+ 3 - 3
src/main/capacitor/components/search.cljs → src/main/mobile/components/search.cljs

@@ -1,7 +1,7 @@
-(ns capacitor.components.search
+(ns mobile.components.search
   "Mobile search"
   "Mobile search"
-  (:require [capacitor.ionic :as ion]
-            [capacitor.state :as mobile-state]
+  (:require [mobile.ionic :as ion]
+            [mobile.state :as mobile-state]
             [clojure.string :as string]
             [clojure.string :as string]
             [frontend.components.cmdk.core :as cmdk]
             [frontend.components.cmdk.core :as cmdk]
             [frontend.db :as db]
             [frontend.db :as db]

+ 1 - 1
src/main/capacitor/components/selection_toolbar.cljs → src/main/mobile/components/selection_toolbar.cljs

@@ -1,4 +1,4 @@
-(ns capacitor.components.selection-toolbar
+(ns mobile.components.selection-toolbar
   "Selection action bar, activated when swipe on a block"
   "Selection action bar, activated when swipe on a block"
   (:require [frontend.db :as db]
   (:require [frontend.db :as db]
             [frontend.handler.editor :as editor-handler]
             [frontend.handler.editor :as editor-handler]

+ 2 - 2
src/main/capacitor/components/settings.cljs → src/main/mobile/components/settings.cljs

@@ -1,6 +1,6 @@
-(ns capacitor.components.settings
+(ns mobile.components.settings
   "Mobile settings"
   "Mobile settings"
-  (:require [capacitor.ionic :as ion]
+  (:require [mobile.ionic :as ion]
             [frontend.components.repo :as repo]
             [frontend.components.repo :as repo]
             [frontend.components.user.login :as login]
             [frontend.components.user.login :as login]
             [frontend.handler.user :as user-handler]
             [frontend.handler.user :as user-handler]

+ 3 - 3
src/main/capacitor/components/ui.cljs → src/main/mobile/components/ui.cljs

@@ -1,7 +1,7 @@
-(ns capacitor.components.ui
+(ns mobile.components.ui
   "Mobile ui"
   "Mobile ui"
-  (:require [capacitor.ionic :as ion]
-            [capacitor.state :as mobile-state]
+  (:require [mobile.ionic :as ion]
+            [mobile.state :as mobile-state]
             [cljs-bean.core :as bean]
             [cljs-bean.core :as bean]
             [frontend.handler.notification :as notification]
             [frontend.handler.notification :as notification]
             [frontend.rum :as r]
             [frontend.rum :as r]

+ 4 - 4
src/main/capacitor/core.cljs → src/main/mobile/core.cljs

@@ -1,9 +1,9 @@
-(ns capacitor.core
+(ns mobile.core
   "Mobile core"
   "Mobile core"
   (:require ["react-dom/client" :as rdc]
   (:require ["react-dom/client" :as rdc]
-            [capacitor.components.app :as app]
-            [capacitor.init :as init]
-            [capacitor.state :as state]
+            [mobile.components.app :as app]
+            [mobile.init :as init]
+            [mobile.state :as state]
             [frontend.background-tasks]
             [frontend.background-tasks]
             [frontend.components.page :as page]
             [frontend.components.page :as page]
             [frontend.handler :as fhandler]
             [frontend.handler :as fhandler]

+ 2 - 2
src/main/capacitor/events.cljs → src/main/mobile/events.cljs

@@ -1,6 +1,6 @@
-(ns capacitor.events
+(ns mobile.events
   "Mobile events"
   "Mobile events"
-  (:require [capacitor.init :as init]
+  (:require [mobile.init :as init]
             [frontend.handler.events :as events]
             [frontend.handler.events :as events]
             [promesa.core :as p]))
             [promesa.core :as p]))
 
 

+ 0 - 0
src/main/capacitor/externals.js → src/main/mobile/externals.js


+ 3 - 3
src/main/capacitor/init.cljs → src/main/mobile/init.cljs

@@ -1,10 +1,10 @@
-(ns capacitor.init
+(ns mobile.init
   "Main ns for handling mobile start"
   "Main ns for handling mobile start"
   (:require ["@capacitor/app" :refer [^js App]]
   (:require ["@capacitor/app" :refer [^js App]]
             ["@capacitor/keyboard" :refer [^js Keyboard]]
             ["@capacitor/keyboard" :refer [^js Keyboard]]
             ["@capacitor/network" :refer [^js Network]]
             ["@capacitor/network" :refer [^js Network]]
-            [capacitor.components.ui :as cc-ui]
-            [capacitor.state :as mobile-state]
+            [mobile.components.ui :as cc-ui]
+            [mobile.state :as mobile-state]
             [frontend.handler.editor :as editor-handler]
             [frontend.handler.editor :as editor-handler]
             [frontend.mobile.deeplink :as deeplink]
             [frontend.mobile.deeplink :as deeplink]
             [frontend.mobile.flows :as mobile-flows]
             [frontend.mobile.flows :as mobile-flows]

+ 1 - 1
src/main/capacitor/ionic.cljs → src/main/mobile/ionic.cljs

@@ -1,4 +1,4 @@
-(ns capacitor.ionic
+(ns mobile.ionic
   "Ionic ui"
   "Ionic ui"
   (:refer-clojure :exclude [list])
   (:refer-clojure :exclude [list])
   (:require [logseq.shui.icon.v2 :as shui-icon]
   (:require [logseq.shui.icon.v2 :as shui-icon]

+ 1 - 1
src/main/capacitor/state.cljs → src/main/mobile/state.cljs

@@ -1,4 +1,4 @@
-(ns capacitor.state
+(ns mobile.state
   "Mobile state"
   "Mobile state"
   (:require [frontend.rum :as r]))
   (:require [frontend.rum :as r]))
 
 

+ 1 - 1
tailwind.capacitor.css → tailwind.mobile.css

@@ -31,4 +31,4 @@
 @import "src/main/frontend/components/file_sync.css";
 @import "src/main/frontend/components/file_sync.css";
 @import "src/main/frontend/components/table.css";
 @import "src/main/frontend/components/table.css";
 
 
-@import-glob "src/main/capacitor/**/[!_]*.css";
+@import-glob "src/main/mobile/**/[!_]*.css";