mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-03 04:00:02 +00:00
classicapi: two-tier version check + drop hardcoded github URLs
Splits the ClassicAPI version check into a hard floor (MIN, manual) and a soft target (LATEST, pinned by the release workflow). Below MIN pfUI disables itself entirely as before; between MIN and LATEST it runs normally but fires a delayed chat nudge after PLAYER_LOGIN with the available update. PLAYER_LOGIN handlers swap to EventUtil.ContinueOnPlayerLogin so we don't have to spin a frame for each branch. URLs centralize on toc X-Website fields. pfUI.lua factors out ClassicAPIReleaseUrl(version) sourcing from !!!ClassicAPI's metadata; modules/gui.lua and libs/libdebuff.lua replace hardcoded me0wg4ming/pfUI links with GetAddOnMetadata(pfUI.name, "X-Website") lookups. release.yml gains a pre-package step that queries ClassicAPI's latest release tag, packs it (X*10000 + Y*100 + Z), and seds only the LATEST line in pfUI.lua so the published zip ships with the correct soft target.
This commit is contained in:
+3
-3
@@ -1401,7 +1401,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
donate:SetHeight(20)
|
||||
donate:SetText(T["Donate"])
|
||||
donate:SetScript("OnClick", function()
|
||||
pfUI.chat.urlcopy.CopyText("https://buymeacoffee.com/w1ot8abps4")
|
||||
pfUI.chat.urlcopy.CopyText("https://buymeacoffee.com/brues")
|
||||
end)
|
||||
SkinButton(donate)
|
||||
|
||||
@@ -1411,7 +1411,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
github:SetHeight(20)
|
||||
github:SetText(T["GitHub"])
|
||||
github:SetScript("OnClick", function()
|
||||
pfUI.chat.urlcopy.CopyText("https://github.com/me0wg4ming/pfUI")
|
||||
pfUI.chat.urlcopy.CopyText(GetAddOnMetadata(pfUI.name, "X-Website"))
|
||||
end)
|
||||
SkinButton(github)
|
||||
|
||||
@@ -1421,7 +1421,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
website:SetHeight(20)
|
||||
website:SetText(T["Website"])
|
||||
website:SetScript("OnClick", function()
|
||||
pfUI.chat.urlcopy.CopyText("https://github.com/me0wg4ming/pfUI")
|
||||
pfUI.chat.urlcopy.CopyText(GetAddOnMetadata(pfUI.name, "X-Website"))
|
||||
end)
|
||||
SkinButton(website)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user