fix(ios): distinguish localized and verbatim session actions

This commit is contained in:
Vincent Koc
2026-07-12 17:34:14 +02:00
parent 7394d07a49
commit 01ed6b1f04
3 changed files with 15 additions and 10 deletions
+1 -1
View File
@@ -15075,7 +15075,7 @@
},
{
"kind": "ui-call",
"line": 340,
"line": 344,
"path": "apps/ios/Sources/Design/CommandCenterSupport.swift",
"source": "View More",
"surface": "apple",
@@ -160,16 +160,16 @@ struct CommandSessionActionsModifier: ViewModifier {
} else {
self.actionButton(
self.session.pinned == true
? LocalizedStringKey("Unpin")
: LocalizedStringKey("Pin"),
? OpenClawTextValue.localized("Unpin")
: OpenClawTextValue.localized("Pin"),
systemImage: self.session.pinned == true ? "pin.slash" : "pin")
{
self.actions.togglePinned()
}
self.actionButton(
self.session.unread == true
? LocalizedStringKey("Mark as Read")
: LocalizedStringKey("Mark as Unread"),
? OpenClawTextValue.localized("Mark as Read")
: OpenClawTextValue.localized("Mark as Unread"),
systemImage: self.session.unread == true ? "envelope.open" : "envelope.badge")
{
self.actions.toggleUnread()
@@ -229,7 +229,7 @@ struct CommandSessionActionsModifier: ViewModifier {
private var groupMenu: some View {
Menu {
ForEach(self.categories, id: \.self) { category in
self.actionButton(category, systemImage: "folder") {
self.actionButton(.verbatim(category), systemImage: "folder") {
self.actions.moveToGroup(category)
}
}
@@ -276,13 +276,17 @@ struct CommandSessionActionsModifier: ViewModifier {
}
private func actionButton(
_ title: LocalizedStringKey,
_ title: OpenClawTextValue,
systemImage: String,
action: @escaping () -> Void) -> some View
{
Button(action: action) {
Label(title, systemImage: systemImage)
.font(OpenClawType.subhead)
Label {
title.text
.font(OpenClawType.subhead)
} icon: {
Image(systemName: systemImage)
}
}
}
+2 -1
View File
@@ -223,7 +223,8 @@ const LOCALIZED_WRAPPER_CONTRACTS: Record<string, readonly string[]> = {
"Text(verbatim: self.item.trailing)",
"Text(verbatim: self.item.detail)",
"struct CommandEmptyStateRow: View {\n let icon: String\n let title: OpenClawTextValue\n let detail: OpenClawTextValue",
"private func actionButton(\n _ title: LocalizedStringKey",
"private func actionButton(\n _ title: OpenClawTextValue",
"self.actionButton(.verbatim(category)",
],
"apps/ios/Sources/Design/IPadSkillWorkshopScreen.swift": [
'format: String(localized: "No proposals in %@")',