Page MenuHomePhorge

D356.1787982845.diff
No OneTemporary

Size
6 KB
Referenced Files
None
Subscribers
None

D356.1787982845.diff

diff --git a/src/contents/ui/Bubble.qml b/src/contents/ui/Bubble.qml
--- a/src/contents/ui/Bubble.qml
+++ b/src/contents/ui/Bubble.qml
@@ -65,46 +65,41 @@
Menu {
objectName: 'bubbleContextMenu'
property list<QtObject> staticItems: [
- Kirigami.Action {
+ Kazv.KazvAction {
objectName: 'replyToMenuItem'
- text: l10n.get('event-reply-action')
onTriggered: setDraftRelation('m.in_reply_to', currentEvent.eventId)
enabled: event && !event.redacted
},
- Kirigami.Action {
+ Kazv.KazvAction {
objectName: 'editMenuItem'
- text: l10n.get('event-edit-action')
onTriggered: {
setDraftRelation('m.replace', currentEvent.eventId, Helpers.getEventBodyForEditing(event));
}
enabled: event && !event.redacted && !event.isLocalEcho && getIsEditable(event)
},
- Kirigami.Action {
+ Kazv.KazvAction {
objectName: 'deleteMenuItem'
- text: l10n.get('event-delete')
onTriggered: deleteEventRequested(event.isLocalEcho ? event.txnId : event.eventId, event.isLocalEcho)
enabled: event && !event.redacted
},
- Kirigami.Action {
+ Kazv.KazvAction {
objectName: 'reactMenuItem'
- text: l10n.get('event-react-action')
onTriggered: reactionPopupComp.createObject(applicationWindow().overlay).open()
enabled: event && !event.redacted
},
- Kirigami.Action {
+ Kazv.KazvAction {
objectName: 'pinUnpinMenuItem'
enabled: !event.isLocalEcho
text: eventPinned ? l10n.get('event-unpin-action') : l10n.get('event-pin-action')
onTriggered: eventPinned ? unpinEventRequested(event.eventId) : pinEventRequested(event.eventId)
},
MenuSeparator {},
- Kirigami.Action {
- text: l10n.get('event-view-source')
+ Kazv.KazvAction {
+ objectName: 'view-source'
onTriggered: eventSourcePopupComp.createObject(applicationWindow().overlay).open()
},
- Kirigami.Action {
+ Kazv.KazvAction {
objectName: 'viewHistoryMenuItem'
- text: l10n.get('event-view-history')
enabled: event && !!event.isEdited
onTriggered: viewEventHistoryRequested(event.eventId)
}
@@ -189,10 +184,9 @@
}
}
- property var popupAction: Kirigami.Action {
+ property var popupAction: Kazv.KazvAction {
id: popupAction
- text: l10n.get('event-popup-action')
- icon.name: 'view-more-horizontal-symbolic'
+ objectName: 'popupAction'
onTriggered: maybePopupMenu()
}
diff --git a/src/contents/ui/Main.qml b/src/contents/ui/Main.qml
--- a/src/contents/ui/Main.qml
+++ b/src/contents/ui/Main.qml
@@ -293,11 +293,75 @@
]
}
+ property var bubbleContextActions: QtObject {
+ property var actionGroupName: l10n.get('action-group-bubble-context-menu-actions')
+ property list<Kirigami.Action> actions: [
+ Kirigami.Action {
+ objectName: 'replyToMenuItem'
+ icon.name: 'edit-reply'
+ text: l10n.get('event-reply-action')
+ },
+ Kirigami.Action {
+ objectName: 'editMenuItem'
+ icon.name: 'document-edit'
+ text: l10n.get('event-edit-action')
+ },
+ Kirigami.Action {
+ objectName: 'deleteMenuItem'
+ icon.name: 'edit-delete'
+ text: l10n.get('event-delete')
+ },
+ Kirigami.Action {
+ objectName: 'reactMenuItem'
+ icon.name: 'face-smile'
+ text: l10n.get('event-react-action')
+ },
+ Kirigami.Action {
+ objectName: 'pinUnpinMenuItem'
+ icon.name: 'pin'
+ text: l10n.get('event-pin-action')
+ },
+ Kirigami.Action {
+ objectName: 'view-source'
+ icon.name: 'text-html'
+ text: l10n.get('event-view-source')
+ },
+ Kirigami.Action {
+ objectName: 'viewHistoryMenuItem'
+ icon.name: 'view-history'
+ text: l10n.get('event-view-history')
+ },
+ Kirigami.Action {
+ objectName: 'popupAction'
+ icon.name: 'view-more-horizontal-symbolic'
+ text: l10n.get('event-popup-action')
+ }
+ ]
+ }
+
+ property var roomListContextActions: QtObject {
+ property var actionGroupName: l10n.get('action-group-room-list-context-menu-actions')
+ property list<Kirigami.Action> actions: [
+ Kirigami.Action {
+ objectName: 'toggle-favourite'
+ icon.name: 'starred-symbolic'
+ text: l10n.get('room-list-view-room-item-fav-action')
+ },
+ Kirigami.Action {
+ objectName: 'room-more-settings'
+ icon.name: 'view-more-horizontal-symbolic'
+ text: l10n.get('room-list-view-room-item-more-action')
+ }
+ ]
+ }
+
property var actionCollection: KazvShortcuts.ActionCollection {
id: globalActionCollection
children: [
root.globalDrawer,
- root.roomPageActions
+ root.roomPageActions,
+ root.bubbleContextActions,
+ root.roomListContextActions
]
shortcutsConfig: kazvConfig
}
diff --git a/src/contents/ui/RoomListViewItemDelegate.qml b/src/contents/ui/RoomListViewItemDelegate.qml
--- a/src/contents/ui/RoomListViewItemDelegate.qml
+++ b/src/contents/ui/RoomListViewItemDelegate.qml
@@ -130,16 +130,15 @@
}
}
ContextMenu.menu: Menu {
- Kirigami.Action {
- text: l10n.get("room-list-view-room-item-fav-action")
+ Kazv.KazvAction {
+ objectName: 'toggle-favourite'
checkable: true
checked: isFavourite
icon.name: isFavourite ? 'starred-symbolic' : 'non-starred-symbolic'
onTriggered: toggleFavourite()
}
- Kirigami.Action {
- text: l10n.get('room-list-view-room-item-more-action')
- icon.name: 'view-more-horizontal-symbolic'
+ Kazv.KazvAction {
+ objectName: 'room-more-settings'
onTriggered: activateRoomSettingsPage(item)
}
}
diff --git a/src/l10n/cmn-Hans/100-ui.ftl b/src/l10n/cmn-Hans/100-ui.ftl
--- a/src/l10n/cmn-Hans/100-ui.ftl
+++ b/src/l10n/cmn-Hans/100-ui.ftl
@@ -20,6 +20,8 @@
action-group-global-drawer-actions = 全局操作
action-group-context-drawer-actions = 页面操作
action-group-room-page-actions = 房间页面操作
+action-group-bubble-context-menu-actions = 消息操作
+action-group-room-list-context-menu-actions = 房间列表操作
user-name-with-id = { $name } ({ $userId })
user-name-overrided = { $overridedName } ({ $globalName })
diff --git a/src/l10n/en/100-ui.ftl b/src/l10n/en/100-ui.ftl
--- a/src/l10n/en/100-ui.ftl
+++ b/src/l10n/en/100-ui.ftl
@@ -20,6 +20,8 @@
action-group-global-drawer-actions = Global Actions
action-group-context-drawer-actions = Page Actions
action-group-room-page-actions = Room Page Actions
+action-group-bubble-context-menu-actions = Message Actions
+action-group-room-list-context-menu-actions = Room List Actions
user-name-with-id = { $name } ({ $userId })
user-name-overrided = { $overridedName } ({ $globalName })

File Metadata

Mime Type
text/plain
Expires
Fri, Aug 28, 10:54 PM (16 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1737561
Default Alt Text
D356.1787982845.diff (6 KB)

Event Timeline