Skip to content

Commit f2ceac9

Browse files
authored
Merge pull request #84 from cytechmobile/chore/8614c5c-change-default-radicle-explorer-domain
chore(config): change default radicle explorer domain
2 parents 1e984af + 1eb1ad7 commit f2ceac9

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

components/Header.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<script setup lang="ts">
2+
import { defaultRadicleExplorerBaseUrl } from '~/constants/config'
3+
24
const auth = useAuthStore()
35
const board = useBoardStore()
46
const tasks = useTasksStore()
@@ -37,6 +39,11 @@ async function handleImport() {
3739
console.error('Failed to import board data')
3840
}
3941
}
42+
43+
const aboutLink = new URL(
44+
`/nodes/seed.radicle.gr/rad:z2BdUVZFvHdxRfdtGJQdSH2kyXNM6`,
45+
defaultRadicleExplorerBaseUrl,
46+
).toString()
4047
</script>
4148

4249
<template>
@@ -49,7 +56,7 @@ async function handleImport() {
4956
<div class="flex gap-4">
5057
<a
5158
class="flex h-8 items-center justify-center gap-2 rounded-sm border border-rad-border-hint px-3 text-sm font-semibold"
52-
href="https://app.radicle.at/nodes/seed.radicle.gr/rad:z2BdUVZFvHdxRfdtGJQdSH2kyXNM6"
59+
:href="aboutLink"
5360
target="_blank"
5461
>
5562
<Icon name="octicon:link-external-16" size="16" />
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import { useStorage } from '@vueuse/core'
2+
import { defaultRadicleExplorerBaseUrl } from '~/constants/config'
23

34
export function useRadicleInterfaceBaseUrl(): string {
4-
const defaultRadicleInterfaceBaseUrl = 'https://app.radicle.xyz'
5-
65
const { baseUrl } = useRoute().query
76

87
const configuredRadicleInterfaceBaseUrl = useStorage(
98
'RPB_config-radicle-interface-base-url',
10-
defaultRadicleInterfaceBaseUrl,
9+
defaultRadicleExplorerBaseUrl,
1110
)
1211

1312
try {
@@ -17,6 +16,6 @@ export function useRadicleInterfaceBaseUrl(): string {
1716

1817
return new URL(configuredRadicleInterfaceBaseUrl.value).origin
1918
} catch {
20-
return defaultRadicleInterfaceBaseUrl
19+
return defaultRadicleExplorerBaseUrl
2120
}
2221
}

constants/config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* The default base URL for the Radicle Explorer
3+
*
4+
* Used for linking to public repositories
5+
*/
6+
export const defaultRadicleExplorerBaseUrl = 'https://explorer.radicle.gr/'

0 commit comments

Comments
 (0)