diff --git a/src/components/NoteFreshnessBadge.vue b/src/components/NoteFreshnessBadge.vue index 40d582b..415e975 100644 --- a/src/components/NoteFreshnessBadge.vue +++ b/src/components/NoteFreshnessBadge.vue @@ -23,6 +23,8 @@ const label = computed(() => { return "Outdated" case "offline": return "Can’t reach GitHub" + case "unauthorized": + return "Sign in to GitHub" case "unknown": default: return "Not checked" @@ -39,6 +41,8 @@ const tooltip = computed(() => { return "GitHub has a newer version. Click to pull latest." case "offline": return "Could not reach GitHub. Click to retry." + case "unauthorized": + return "GitHub auth expired. Sign in again, then click to retry." case "checking": return "Checking against GitHub…" case "unknown": @@ -133,6 +137,25 @@ const isBusy = computed(() => props.status === "checking") > + + + + + props.status === "checking") color: var(--color-error, hsl(0, 70%, 45%)); } +.state-unauthorized { + color: var(--color-warning, hsl(35, 90%, 45%)); +} + .state-unknown, .state-checking { color: var(--color-base-content); diff --git a/src/components/StackedNote.vue b/src/components/StackedNote.vue index efede40..e2b18e6 100644 --- a/src/components/StackedNote.vue +++ b/src/components/StackedNote.vue @@ -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)