mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 14:14:55 +00:00
fix(ios): ensure fallback system image
This commit is contained in:
@@ -39,11 +39,20 @@ public class LiquidTabsPlugin: CAPPlugin, CAPBridgedPlugin {
|
||||
|
||||
let tabs: [LiquidTab] = tabsArray.compactMap { dict in
|
||||
guard
|
||||
let id = dict["id"] as? String,
|
||||
let title = dict["title"] as? String
|
||||
let id = dict["id"] as? String,
|
||||
let title = dict["title"] as? String
|
||||
else { return nil }
|
||||
|
||||
let systemImage = dict["systemImage"] as? String ?? "square"
|
||||
let rawSystemImage = dict["systemImage"] as? String ?? "square"
|
||||
|
||||
let systemImage: String = {
|
||||
if UIImage(systemName: rawSystemImage) != nil {
|
||||
return rawSystemImage
|
||||
} else {
|
||||
return "square"
|
||||
}
|
||||
}()
|
||||
|
||||
let roleStr = dict["role"] as? String ?? "normal"
|
||||
let role: LiquidTab.Role = (roleStr == "search") ? .search : .normal
|
||||
|
||||
|
||||
@@ -122,7 +122,19 @@
|
||||
(defn configure
|
||||
[]
|
||||
(configure-tabs
|
||||
[{:id "home" :title "Home" :systemImage "house" :role "normal"}
|
||||
{:id "graphs" :title "Graphs" :systemImage "app.background.dotted" :role "normal"}
|
||||
{:id "capture" :title "Capture" :systemImage "tray" :role "normal"}
|
||||
{:id "go to" :title "Go To" :systemImage "square.stack.3d.down.right" :role "normal"}]))
|
||||
[{:id "home"
|
||||
:title "Home"
|
||||
:systemImage "house"
|
||||
:role "normal"}
|
||||
{:id "graphs"
|
||||
:title "Graphs"
|
||||
:systemImage "app.background.dotted"
|
||||
:role "normal"}
|
||||
{:id "capture"
|
||||
:title "Capture"
|
||||
:systemImage "tray"
|
||||
:role "normal"}
|
||||
{:id "go to"
|
||||
:title "Go To"
|
||||
:systemImage "square.stack.3d.down.right"
|
||||
:role "normal"}]))
|
||||
|
||||
Reference in New Issue
Block a user