This commit is contained in:
Lysec
2026-02-10 14:36:13 +01:00
2 changed files with 31 additions and 2 deletions
+10 -2
View File
@@ -299,17 +299,25 @@ Variants {
// Right-click to dismiss
MouseArea {
anchors.fill: cardBackground
acceptedButtons: Qt.RightButton
acceptedButtons: Qt.LeftButton | Qt.RightButton
hoverEnabled: true
onEntered: card.hoverCount++
onExited: card.hoverCount--
onClicked: {
if (mouse.button === Qt.RightButton) {
animateOut();
} else if (mouse.button === Qt.LeftButton) {
var actions = model.actionsJson ? JSON.parse(model.actionsJson) : [];
var hasDefault = actions.some(function (a) {
return a.identifier === "default";
});
if (hasDefault) {
NotificationService.invokeAction(notificationId, "default");
animateOut();
}
}
}
}
// Animation setup
function triggerEntryAnimation() {
animInDelayTimer.stop();
@@ -46,6 +46,14 @@ Item {
}
}
}
function onActiveChanged() {
// When active state changes (e.g. dependency check completes), refresh results
if (ClipboardService.active && launcher && launcher.searchText.startsWith(">clip")) {
isWaitingForData = true;
gotResults = false;
ClipboardService.list(100);
}
}
}
// Initialize provider
@@ -113,6 +121,19 @@ Item {
// Check if clipboard service is not active
if (!ClipboardService.active) {
// If dependency check hasn't completed yet, show loading instead of disabled
if (!ClipboardService.dependencyChecked) {
return [
{
"name": I18n.tr("launcher.providers.clipboard-loading"),
"description": I18n.tr("launcher.providers.emoji-loading-description"),
"icon": iconMode === "tabler" ? "refresh" : "view-refresh",
"isTablerIcon": true,
"isImage": false,
"onActivate": function () {}
}
];
}
return [
{
"name": I18n.tr("launcher.providers.clipboard-history-disabled"),