@@ -9,14 +9,14 @@ import { generalSettingsStore } from "~/store";
99export default function ( ) {
1010 const navigate = useNavigate ( ) ;
1111 const [ updateError , setUpdateError ] = createSignal < string | null > ( null ) ;
12+ const [ updatesDisabled , setUpdatesDisabled ] = createSignal < boolean > ( false ) ;
1213
1314 const [ update ] = createResource ( async ( ) => {
1415 try {
15- const settings = await generalSettingsStore . get ( ) ;
16- const isDisabled = settings ?. disableUpdateChecks ?? false ;
16+ const generalSettings = await generalSettingsStore . get ( ) ;
1717
18- if ( isDisabled ) {
19- setUpdateError ( "Update checks are currently disabled." ) ;
18+ if ( generalSettings ?. disableUpdateChecks ?? false ) {
19+ setUpdatesDisabled ( true ) ;
2020 return ;
2121 }
2222
@@ -32,6 +32,15 @@ export default function () {
3232
3333 return (
3434 < div class = "flex flex-col justify-center flex-1 items-center gap-[3rem] p-[1rem] text-[0.875rem] font-[400] h-full" >
35+ < Show when = { updatesDisabled ( ) } >
36+ < div class = "flex flex-col gap-4 items-center text-center max-w-md" >
37+ < p class = "text-[--text-primary]" > Update checks are currently disabled.</ p >
38+ < p class = "text-[--text-tertiary]" >
39+ To enable updates, go to General Settings and disable "Disable Update Checks".
40+ </ p >
41+ < Button onClick = { ( ) => navigate ( "/" ) } > Go Back</ Button >
42+ </ div >
43+ </ Show >
3544 < Show when = { updateError ( ) } >
3645 < div class = "flex flex-col gap-4 items-center text-center max-w-md" >
3746 < p class = "text-[--text-primary]" > { updateError ( ) } </ p >
@@ -48,7 +57,7 @@ export default function () {
4857 < Show
4958 when = { ! updateError ( ) && update ( ) }
5059 fallback = {
51- ! updateError ( ) && (
60+ ! updateError ( ) && ! updatesDisabled ( ) && (
5261 < span class = "text-[--text-tertiary]" > No update available</ span >
5362 )
5463 }
0 commit comments