File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 5
5
import { useDarkMode } from ' $lib/utilities/dark-mode' ;
6
6
import { routeForNexusEndpointCreate } from ' $lib/utilities/route-for' ;
7
7
import andromeda from ' $lib/vendor/andromeda.png' ;
8
+
9
+ export let createDisabled = false ;
8
10
</script >
9
11
10
12
<div class =" flex min-h-screen flex-col gap-8 p-10" >
35
37
a uniform interface to get the status of an operation or its result,
36
38
receive a completion callback, or cancel the operation.
37
39
</p >
38
- <Button variant ="primary" href ={routeForNexusEndpointCreate ()}
40
+ <Button
41
+ disabled ={createDisabled }
42
+ variant =" primary"
43
+ href ={routeForNexusEndpointCreate ()}
39
44
>{translate (' nexus.create-endpoint' )}</Button
40
45
>
41
46
</div >
Original file line number Diff line number Diff line change 22
22
23
23
export let endpoints: NexusEndpoint [] = [];
24
24
export let searchPlaceholder = translate (' common.search' );
25
+ export let createDisabled = false ;
25
26
26
27
let search = ' ' ;
27
28
$ : searchParam = $page .url .searchParams .get (' search' ) || ' ' ;
40
41
</script >
41
42
42
43
{#if ! endpoints ?.length && ! searchParam }
43
- <NexusEmptyState />
44
+ <NexusEmptyState { createDisabled } />
44
45
{:else }
45
46
<div class =" mb-8 flex items-center justify-between" >
46
47
<h1 data-testid =" namespace-selector-title" >
47
48
{translate (' nexus.endpoints' )}
48
49
</h1 >
49
- <Button variant ="primary" href ={routeForNexusEndpointCreate ()}
50
+ <Button
51
+ disabled ={createDisabled }
52
+ variant =" primary"
53
+ href ={routeForNexusEndpointCreate ()}
50
54
>{translate (' nexus.create-endpoint' )}</Button
51
55
>
52
56
</div >
You can’t perform that action at this time.
0 commit comments