1
0
Weihua Lu 4 жил өмнө
parent
commit
a7c8a4c51a

+ 14 - 0
src/main/frontend/mobile/util.cljs

@@ -0,0 +1,14 @@
+(ns frontend.mobile.util
+  (:require ["@capacitor/core" :refer [Capacitor]]))
+
+(defn platform []
+  (.getPlatform Capacitor))
+
+(defn is-native-platform? []
+  (.isNativePlatform Capacitor))
+
+(defn convert-file-src [path-str]
+  (.convertFileSrc Capacitor path-str))
+
+(defn is-plugin-available? [name]
+  (.isPluginAvailable Capacitor name))