mirror of
https://github.com/theupriser/steamify-cachyos.git
synced 2026-10-03 17:41:58 +02:00
feat: New badge for default sub-options added in this version
This commit is contained in:
1 parent
c4280ecf60
commit
64536fe531
5 files changed
+21
-12
No files matched your search
+8
-5
@@ -90,11 +90,14 @@ feature_outdated() {
|
||||
|
||||
menu_label() {
|
||||
# The label, with "(update)" after the name when a newer version of it
|
||||
# will be applied.
|
||||
local l="${LABEL[$1]}"
|
||||
if feature_outdated "$1"; then
|
||||
if [[ "$l" == *:* ]]; then l="${l%%:*} ${c_yellow}(update)${c_reset}:${l#*:}"
|
||||
else l+=" ${c_yellow}(update)${c_reset}"; fi
|
||||
# will be applied, "(new)" for a default sub-option added since the
|
||||
# last run.
|
||||
local l="${LABEL[$1]}" b=""
|
||||
if feature_outdated "$1"; then b="${c_yellow}(update)${c_reset}"
|
||||
elif feature_new "$1"; then b="${c_green}(new)${c_reset}"; fi
|
||||
if [[ -n "$b" ]]; then
|
||||
if [[ "$l" == *:* ]]; then l="${l%%:*} $b:${l#*:}"
|
||||
else l+=" $b"; fi
|
||||
fi
|
||||
printf '%s' "$l"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user