File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed
Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ import { component$ , useSignal , useVisibleTask$ } from '@builder.io/qwik' ;
2+ import { LuX } from '@qwikest/icons/lucide' ;
3+ import { Button } from '~/components/ui/button/button' ;
4+
5+ export const MobileBanner = component$ ( ( ) => {
6+ const isVisible = useSignal ( false ) ;
7+
8+ useVisibleTask$ ( ( ) => {
9+ isVisible . value = localStorage . getItem ( 'mobile_banner' ) !== 'false' ;
10+ } ) ;
11+
12+ if ( ! isVisible . value ) {
13+ return null ;
14+ }
15+
16+ return (
17+ < div class = "fixed top-0 left-0 right-0 z-[53] visible md:invisible" >
18+ < div
19+ class = "bg-blue-100 border-t border-b border-blue-500 text-blue-700 px-4 py-1"
20+ role = "alert"
21+ >
22+ < div class = "flex items-center justify-between gap-2" >
23+ < p class = "font-bold" > Sheets is optimized for desktop use</ p >
24+ < Button
25+ look = "ghost"
26+ class = "text-blue-500 hover:text-blue-700"
27+ onClick$ = { ( ) => {
28+ isVisible . value = false ;
29+ localStorage . setItem ( 'mobile_banner' , 'false' ) ;
30+ } }
31+ >
32+ < LuX class = "text-lg" />
33+ </ Button >
34+ </ div >
35+ < p class = "text-sm" >
36+ Please use a larger-screen device for the best experience, including
37+ full table interaction and access to all features.
38+ </ p >
39+ </ div >
40+ </ div >
41+ ) ;
42+ } ) ;
Original file line number Diff line number Diff line change 11import { component$ } from '@builder.io/qwik' ;
22import type { DocumentHead } from '@builder.io/qwik-city' ;
33import { Login } from '~/components/ui/login/Login' ;
4+ import { MobileBanner } from '~/components/ui/mobile/banner' ;
45import { Tips } from '~/components/ui/tips/tips' ;
56import { DatasetName } from '~/features/datasets' ;
67import { SaveDataset } from '~/features/export' ;
@@ -16,6 +17,7 @@ export default component$(() => {
1617
1718 return (
1819 < ActiveDatasetProvider >
20+ < MobileBanner />
1921 < div class = "flex flex-col h-full w-full" >
2022 < div class = "sticky" >
2123 < div class = "flex flex-col gap-2" >
You can’t perform that action at this time.
0 commit comments