fix: link to repo root instead of 404ing /stargazers page (#8756)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
832aa69ce8
commit
462020d372
|
|
@ -26,7 +26,8 @@ type ShortcutItem = {
|
|||
action: string
|
||||
}
|
||||
|
||||
const ORCA_STARGAZERS_URL = 'https://github.com/stablyai/orca/stargazers'
|
||||
// Do not deep-link to /stargazers: GitHub 404s that page for users without repo write access.
|
||||
const ORCA_GITHUB_URL = 'https://github.com/stablyai/orca'
|
||||
|
||||
type StarState = 'loading' | 'starred' | 'not-starred' | 'web-fallback' | 'hidden'
|
||||
|
||||
|
|
@ -72,7 +73,7 @@ function GitHubStarButton({ hasRepos }: { hasRepos: boolean }): React.JSX.Elemen
|
|||
return
|
||||
}
|
||||
if (state === 'web-fallback') {
|
||||
await window.api.shell.openUrl(ORCA_STARGAZERS_URL)
|
||||
await window.api.shell.openUrl(ORCA_GITHUB_URL)
|
||||
return
|
||||
}
|
||||
if (state !== 'not-starred') {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@ import { SearchableSetting } from './SearchableSetting'
|
|||
import { SettingsSubsectionHeader } from './SettingsFormControls'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
|
||||
const ORCA_STARGAZERS_URL = 'https://github.com/stablyai/orca/stargazers'
|
||||
// Do not deep-link to /stargazers: GitHub 404s that page for users without repo write access.
|
||||
const ORCA_GITHUB_URL = 'https://github.com/stablyai/orca'
|
||||
|
||||
type SupportState =
|
||||
| 'loading'
|
||||
|
|
@ -58,7 +59,7 @@ export function GeneralSupportSection({
|
|||
const handleStarClick = async (): Promise<void> => {
|
||||
if (starState === 'web-fallback') {
|
||||
setStarState('opening-github')
|
||||
await window.api.shell.openUrl(ORCA_STARGAZERS_URL)
|
||||
await window.api.shell.openUrl(ORCA_GITHUB_URL)
|
||||
if (mountedRef.current) {
|
||||
setStarState('web-fallback')
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue