1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-19 09:35:22 -04:00

feat(Clipboard): Clipboard Editor PR Revived (#2492)

* feat(clipboard): Add editing capability to clipboard entries
* Add split save menu for clipboard editor
* Add clipboard editor shortcuts and hints
* Show full clipboard text in editor
* feat(Clipboard): Revive ClipboardEditor PR

- Original PR #1916 by @nabaco
* fix(clipboard): restore Save button targets in editor

---------

Co-authored-by: Nachum Barcohen <38861757+nabaco@users.noreply.github.com>
This commit is contained in:
purian23
2026-05-25 23:25:57 -04:00
committed by GitHub
parent 078180fe42
commit 045ac59a44
7 changed files with 714 additions and 7 deletions
@@ -66,7 +66,24 @@ QtObject {
}
}
function editSelected() {
const entries = modal.activeTab === "saved" ? ClipboardService.pinnedEntries : ClipboardService.unpinnedEntries;
if (!entries || entries.length === 0) {
return;
}
const index = ClipboardService.selectedIndex >= 0 && ClipboardService.selectedIndex < entries.length ? ClipboardService.selectedIndex : 0;
modal.editEntry(entries[index]);
}
function handleKey(event) {
if (modal.mode === "editor") {
if (event.key === Qt.Key_Escape) {
modal.mode = "history";
event.accepted = true;
}
return;
}
switch (event.key) {
case Qt.Key_Escape:
if (ClipboardService.keyboardNavigationActive) {
@@ -152,6 +169,10 @@ QtObject {
event.accepted = true;
}
return;
case Qt.Key_E:
editSelected();
event.accepted = true;
return;
}
}