@@ -15,7 +15,7 @@ const props = defineProps({
1515const isVisible = ref (false );
1616const deferredPrompt = shallowRef (null );
1717
18- const handleBeforeInstall = (e ) => {
18+ const handleBeforeInstall = (e : Event ) => {
1919 e .preventDefault ();
2020 deferredPrompt .value = e ;
2121
@@ -36,7 +36,7 @@ const handleAppInstalled = () => {
3636onMounted (() => {
3737 const isStandalone =
3838 window .matchMedia (' (display-mode: standalone)' ).matches ||
39- window .navigator .standalone === true ;
39+ ( window .navigator as Record < string , unknown >) .standalone === true ;
4040
4141 if (isStandalone ) {
4242 return ;
@@ -98,8 +98,7 @@ const handleDismiss = () => {
9898 Install Mobile App
9999 </h3 >
100100 <p class =" text-xs text-slate-500" >
101- Get fast, offline access right from your home
102- screen.
101+ Get fast, offline access right from your home screen.
103102 </p >
104103 </div >
105104 </div >
@@ -122,37 +121,38 @@ const handleDismiss = () => {
122121 </div >
123122 </Teleport >
124123
124+ <!-- Compact Inline Banner (Mobile) / Scaled Up (PC) -->
125125 <div
126126 v-else
127127 v-bind =" $attrs"
128- class =" flex flex-col gap-3 rounded-2xl border border-indigo-100 bg-gradient-to-r from-indigo-50/80 to-slate-50/80 p-4 shadow-sm backdrop-blur-sm sm:flex-row sm:items-center sm:justify-between "
128+ class =" flex items-center justify-between gap-2.5 rounded-xl border border-indigo-100 bg-gradient-to-r from-indigo-50/80 to-slate-50/80 px-3 py-2 shadow-sm backdrop-blur-sm sm:gap-4 sm:px-5 sm:py-3.5 "
129129 >
130- <div class =" flex items-center gap-3 " >
130+ <div class =" flex min-w-0 items-center gap-2.5 sm:gap-3.5 " >
131131 <div
132- class =" flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-indigo-600/10 text-xl text-indigo-600 "
132+ class =" flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-indigo-600/10 text-base sm:h-10 sm:w-10 sm:rounded- xl sm: text-xl "
133133 >
134134 📱
135135 </div >
136- <div >
137- <h3 class =" text-sm font-bold text-slate-900" >
136+ <div class = " min-w-0 " >
137+ <h3 class =" truncate text-xs font-bold text-slate-900 sm:text-sm " >
138138 Install Mobile App
139139 </h3 >
140- <p class =" text-xs text-slate-500" >
141- Fast, offline access right from your home screen.
140+ <p class =" truncate text-[11px] text-slate-500 sm:text-xs " >
141+ Fast, offline home screen access .
142142 </p >
143143 </div >
144144 </div >
145145
146- <div class =" flex shrink-0 items-center justify-end gap-2" >
146+ <div class =" flex shrink-0 items-center gap-1.5 sm: gap-2" >
147147 <button
148148 @click =" handleInstall"
149- class =" rounded-lg bg-indigo-600 px-4 py-2 text-xs font-semibold text-white shadow transition hover:bg-indigo-700 active:scale-95"
149+ class =" rounded-md bg-indigo-600 px-3 py-1.5 text-xs font-semibold text-white shadow-xs transition hover:bg-indigo-700 active:scale-95 sm:rounded-lg sm:px-4 sm:py-2 sm:text-xs "
150150 >
151- Install App
151+ Install
152152 </button >
153153 <button
154154 @click =" handleDismiss"
155- class =" flex h-8 w-8 items-center justify-center rounded-lg text-slate-400 transition hover:bg-slate-200/50 hover:text-slate-600"
155+ class =" flex h-7 w-7 items-center justify-center rounded-md text-slate-400 transition hover:bg-slate-200/50 hover:text-slate-600 sm:h-8 sm:w-8 "
156156 title =" Dismiss"
157157 >
158158 ✕
0 commit comments