mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge branch 'main' of https://github.com/noctalia-dev/noctalia-shell
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user