feat: show GitHub sign-in when repo is not accessible

Adds a message + sign-in button in FluxNote when the readme resolves
to null (private/unauthorized repo), and on the SpaceCowboy 404 page.
This commit is contained in:
Julien Calixte
2026-04-27 10:12:09 +02:00
parent 28ca9a17a9
commit 78de5e280f
2 changed files with 18 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
import { computed, nextTick, onMounted, onUnmounted, toRefs, watch } from "vue"
import HeaderNote from "@/components/HeaderNote.vue"
import SignInGithub from "@/components/SignInGithub.vue"
import SkeletonLoader from "@/components/SkeletonLoader.vue"
import StackedNote from "@/components/StackedNote.vue"
import { useLinks } from "@/hooks/useLinks.hook"
@@ -102,6 +103,10 @@ onUnmounted(() => {
</div>
<slot />
<skeleton-loader v-if="isLoading" />
<div v-else-if="withContent && !hasContent" class="repo-not-found">
<p>This repository is not accessible.</p>
<sign-in-github />
</div>
<p
v-else-if="withContent && hasContent"
class="note-display"
@@ -189,6 +194,15 @@ $header-height: 40px;
}
}
.repo-not-found {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
padding: 2rem 0;
color: var(--color-base-content);
}
.note-display {
padding-bottom: 2rem;
}

View File

@@ -1,4 +1,6 @@
<script lang="ts" setup></script>
<script lang="ts" setup>
import SignInGithub from "@/components/SignInGithub.vue"
</script>
<template>
<main class="space-cowboy content">
@@ -43,6 +45,7 @@
<router-link class="button is-links" :to="{ name: 'Home' }"
>return to homepage</router-link
>
<sign-in-github />
</main>
</template>