ArchUpdater: permanently removed
This commit is contained in:
parent
955369ab13
commit
ca7684c944
5 changed files with 18 additions and 619 deletions
|
|
@ -1,80 +0,0 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import qs.Commons
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
NIconButton {
|
||||
id: root
|
||||
|
||||
property ShellScreen screen
|
||||
property real scaling: 1.0
|
||||
|
||||
sizeRatio: 0.8
|
||||
colorBg: Color.mSurfaceVariant
|
||||
colorBorder: Color.transparent
|
||||
colorBorderHover: Color.transparent
|
||||
colorFg: {
|
||||
if (!ArchUpdaterService.terminalAvailable || !ArchUpdaterService.aurHelperAvailable) {
|
||||
return Color.mError
|
||||
}
|
||||
return (ArchUpdaterService.totalUpdates === 0) ? Color.mOnSurface : Color.mPrimary
|
||||
}
|
||||
|
||||
// Icon states
|
||||
icon: {
|
||||
if (!ArchUpdaterService.terminalAvailable) {
|
||||
return "terminal"
|
||||
}
|
||||
if (!ArchUpdaterService.aurHelperAvailable) {
|
||||
return "box"
|
||||
}
|
||||
if (ArchUpdaterService.aurBusy) {
|
||||
return "refresh"
|
||||
}
|
||||
if (ArchUpdaterService.totalUpdates > 0) {
|
||||
return "box-fill"
|
||||
}
|
||||
return "box"
|
||||
}
|
||||
|
||||
// Tooltip with repo vs AUR breakdown and sample lists
|
||||
tooltipText: {
|
||||
if (!ArchUpdaterService.terminalAvailable) {
|
||||
return "Terminal not configured\nSet TERMINAL environment variable"
|
||||
}
|
||||
if (!ArchUpdaterService.aurHelperAvailable) {
|
||||
return "AUR helper not found\nInstall yay or paru"
|
||||
}
|
||||
if (ArchUpdaterService.aurBusy) {
|
||||
return "Checking for updates…"
|
||||
}
|
||||
|
||||
const total = ArchUpdaterService.totalUpdates
|
||||
if (total === 0) {
|
||||
return "System is up to date ✓"
|
||||
}
|
||||
let header = (total === 1) ? "1 package can be updated" : (total + " packages can be updated")
|
||||
|
||||
const pacCount = ArchUpdaterService.updates
|
||||
const aurCount = ArchUpdaterService.aurUpdates
|
||||
const pacmanTooltip = (pacCount > 0) ? ((pacCount === 1) ? "1 system package" : pacCount + " system packages") : ""
|
||||
const aurTooltip = (aurCount > 0) ? ((aurCount === 1) ? "1 AUR package" : aurCount + " AUR packages") : ""
|
||||
|
||||
let tooltip = header
|
||||
if (pacmanTooltip !== "") {
|
||||
tooltip += "\n" + pacmanTooltip
|
||||
}
|
||||
if (aurTooltip !== "") {
|
||||
tooltip += "\n" + aurTooltip
|
||||
}
|
||||
return tooltip
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
// Always allow panel to open, never block
|
||||
PanelService.getPanel("archUpdaterPanel").toggle(screen, this)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue