feat(notes): surface GitHub auth-expired state on freshness badge
Show a cloud-lock badge with a re-sign-in tooltip when the freshness check resolves to unauthorized, and toast on badge click so the user gets explicit feedback instead of a silent retry-loop.
This commit is contained in:
@@ -228,6 +228,9 @@ const onBadgeClick = async () => {
|
||||
try {
|
||||
if (freshnessStatus.value !== "outdated") {
|
||||
await checkFreshness()
|
||||
if (freshnessStatus.value === "unauthorized") {
|
||||
errorMessage("🔐 GitHub auth expired — please sign in again")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -241,6 +244,10 @@ const onBadgeClick = async () => {
|
||||
if (newRaw !== null) {
|
||||
rawContent.value = newRaw
|
||||
initialRawContent.value = newRaw
|
||||
return
|
||||
}
|
||||
if (freshnessStatus.value === "unauthorized") {
|
||||
errorMessage("🔐 GitHub auth expired — please sign in again")
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("freshness badge click failed", error)
|
||||
|
||||
Reference in New Issue
Block a user