File tree Expand file tree Collapse file tree 3 files changed +17
-12
lines changed
Expand file tree Collapse file tree 3 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export default function App() {
2323 < FileRoutes />
2424 </ Router >
2525 < Show when = { isClient ( ) } >
26- < ReloadPrompt />
26+ < ReloadPrompt class = "fixed top-1 right-1 p-2 bg-white rd-1" />
2727 </ Show >
2828 </ >
2929 )
Original file line number Diff line number Diff line change 11import { useRegisterSW } from 'virtual:pwa-register/solid'
2- import { JSX , Show } from 'solid-js'
2+ import { createSignal , JSX , Show } from 'solid-js'
3+ import { preventGlobalTouchAttrs } from 'src/components/real-button/use-global-touch'
34
45export interface ReloadPromptProps extends JSX . HTMLAttributes < HTMLDivElement > {
56 //
@@ -23,24 +24,29 @@ export const ReloadPrompt = (props: ReloadPromptProps) => {
2324
2425 return (
2526 < Show when = { offlineReady ( ) || needRefresh ( ) } >
26- < div { ...props } >
27+ < div { ...props } { ... preventGlobalTouchAttrs ( ) } >
2728 < Show when = { offlineReady ( ) } >
28- < div >
29+ < div class = "flex flex-col gap-2" >
2930 < span > App ready to work offline</ span >
3031 < button class = "" onClick = { handleClose } >
3132 OK
3233 </ button >
3334 </ div >
3435 </ Show >
3536 < Show when = { needRefresh ( ) } >
36- < div >
37+ < div class = "flex flex-col gap-2" >
3738 < span > App Updated Please Click Reload to use the updated App</ span >
38- < button class = "" onClick = { ( ) => updateServiceWorker ( true ) } >
39- Reload
40- </ button >
41- < button class = "" onClick = { handleClose } >
42- Skip
43- </ button >
39+ < div class = "flex gap-2" >
40+ < button
41+ class = "b-0 cusor-pointer rd-1 px-5 py-1"
42+ onClick = { ( ) => updateServiceWorker ( true ) }
43+ >
44+ Reload
45+ </ button >
46+ < button class = "b-0 cusor-pointer rd-1 px-2 py-1" onClick = { handleClose } >
47+ Skip
48+ </ button >
49+ </ div >
4450 </ div >
4551 </ Show >
4652 </ div >
Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ export const SPlayer = (props: SPlayerProps) => {
4242 'initMusics' ,
4343 'onMusicsChange' ,
4444 ] )
45- // eslint-disable-next-line solid/reactivity
4645 const [ playList , setPlayList ] = createSignal < MusicInfo [ ] > ( innerProps . initMusics ?? [ ] )
4746 const [ selectedId , setSelectedId ] = createSignal < string > ( '' )
4847 const [ repeat , setRepeat ] = createSignal < RepeatType > ( 'no' )
You can’t perform that action at this time.
0 commit comments