261022_01_ENH: 태블릿에 대한 UI 분기 추가
This commit is contained in:
@@ -145,8 +145,12 @@ export function AppHeader({ user }: AppHeaderProps) {
|
||||
<div className="mt-[2.5px] w-[400px] max-[1300px]:w-full">
|
||||
{external ? <div className="h-8" /> : <ProjectSelector />}
|
||||
</div>
|
||||
<div className="mt-[2.5px] max-[1300px]:mt-1.5">
|
||||
<h2 className="text-xl leading-[1.28571] font-bold break-all text-kart-title max-[1300px]:text-lg">
|
||||
<div className="mt-[2.5px] w-full min-w-0 max-[1300px]:mt-1.5">
|
||||
{/* One line; a long title ends with "..." and shows in full on hover. */}
|
||||
<h2
|
||||
title={projectTitle || undefined}
|
||||
className="truncate text-xl leading-[1.28571] font-bold text-kart-title max-[1300px]:text-lg"
|
||||
>
|
||||
{projectTitle}
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@@ -198,10 +198,10 @@ function Workspace({ project }: { project: ProjectRef }) {
|
||||
aria-label="Create Variable"
|
||||
className="-mx-[1.0416vw] -mt-2.5 -mb-6 min-h-[calc(100vh-146px)] bg-white"
|
||||
>
|
||||
<div className="hidden [@media(pointer:coarse)_and_(max-width:767px)]:block">
|
||||
<div className="hidden [@media(hover:none)_and_(pointer:coarse),(max-width:767px)]:block">
|
||||
<PcOnlyNotice />
|
||||
</div>
|
||||
<div className="flex items-start gap-[1.041vw] px-[1.0416vw] py-5 [@media(pointer:coarse)_and_(max-width:767px)]:hidden">
|
||||
<div className="flex items-start gap-[1.041vw] px-[1.0416vw] py-5 [@media(hover:none)_and_(pointer:coarse),(max-width:767px)]:hidden">
|
||||
<div className="w-[396px] shrink-0">
|
||||
<VariableList
|
||||
variables={variables.data}
|
||||
|
||||
@@ -75,10 +75,10 @@ function Workspace({ project }: { project: ProjectRef }) {
|
||||
aria-label="Export/Import"
|
||||
className="-mx-[1.0416vw] -mt-2.5 -mb-6 min-h-[calc(100vh-146px)] bg-white"
|
||||
>
|
||||
<div className="hidden [@media(pointer:coarse)_and_(max-width:767px)]:block">
|
||||
<div className="hidden [@media(hover:none)_and_(pointer:coarse),(max-width:767px)]:block">
|
||||
<PcOnlyNotice />
|
||||
</div>
|
||||
<div className="flex items-start gap-4 px-[1.0416vw] py-5 [@media(pointer:coarse)_and_(max-width:767px)]:hidden">
|
||||
<div className="flex items-start gap-4 px-[1.0416vw] py-5 [@media(hover:none)_and_(pointer:coarse),(max-width:767px)]:hidden">
|
||||
<Column icon="/images/kart/ic_export.svg" title="Export">
|
||||
<EximBox title="Data Export" info="Raw Data를 다운로드 받을 수 있습니다.">
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
@@ -13,6 +13,7 @@ import { bookmarkAxis, bookmarkTest, readBookmarkSetting } from "@/lib/bookmark-
|
||||
import { cn } from "@/lib/utils";
|
||||
import { bookmarkIndexes, crosstabBatch } from "./crosstab-conditions";
|
||||
import { ResultBlock } from "./LegacyResultTable";
|
||||
import { MobileNotice } from "./ReportChrome";
|
||||
import { plainText } from "./ReportResultView";
|
||||
|
||||
/**
|
||||
@@ -31,6 +32,19 @@ export function CrosstabPhone({
|
||||
const bookmarks = list.data ?? [];
|
||||
const current =
|
||||
bookmarks.find((bookmark) => bookmark.bookmarkId === selectedId) ?? bookmarks[0];
|
||||
// Without the empty tab strip, so it sits at the same height as the PC-only notice.
|
||||
if (!current) {
|
||||
return (
|
||||
<MobileNotice>
|
||||
<p>
|
||||
이 메뉴는 셋팅된 북마크만
|
||||
<br />
|
||||
확인 가능합니다.
|
||||
</p>
|
||||
<p className="mt-2">설정된 북마크가 없습니다.</p>
|
||||
</MobileNotice>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<div className="min-h-[calc(100vh-146px)] bg-kart-bg">
|
||||
<ul className="flex h-[60px] items-end gap-[30px] overflow-x-auto overflow-y-hidden bg-white px-4 [&::-webkit-scrollbar]:hidden">
|
||||
@@ -56,25 +70,12 @@ export function CrosstabPhone({
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
{current ? (
|
||||
<PhoneBookmarkView
|
||||
key={current.bookmarkId}
|
||||
project={project}
|
||||
bookmark={current}
|
||||
questions={questions}
|
||||
/>
|
||||
) : (
|
||||
<div className="w-full bg-white pt-10 text-center">
|
||||
<Image
|
||||
src="/images/kart/icon_none_bookmark.svg"
|
||||
alt="저장된 북마크가 없습니다."
|
||||
width={102}
|
||||
height={140}
|
||||
className="inline-block h-[70vh] w-auto"
|
||||
unoptimized
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<PhoneBookmarkView
|
||||
key={current.bookmarkId}
|
||||
project={project}
|
||||
bookmark={current}
|
||||
questions={questions}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import Image from "next/image";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useEffect, useState, type ReactNode } from "react";
|
||||
import { Carousel, CarouselContent, CarouselItem, type CarouselApi } from "@/components/ui/carousel";
|
||||
import { cn } from "@/lib/utils";
|
||||
import type { Bookmark } from "@/types/bookmark";
|
||||
@@ -151,17 +151,27 @@ export function LeftToggleBox({ onExpand }: { onExpand: () => void }) {
|
||||
);
|
||||
}
|
||||
|
||||
/** Legacy mobile Tabulation: the PC-only illustration. */
|
||||
export function PcOnlyNotice() {
|
||||
/** Mobile-mode notice: the monitor icon with guide text, at one shared size and position. */
|
||||
export function MobileNotice({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<div className="flex h-[80vh] items-center justify-center">
|
||||
<Image
|
||||
src="/images/kart/icon_pc.svg"
|
||||
alt="PC 화면에서 사용할 수 있습니다."
|
||||
width={233}
|
||||
height={140}
|
||||
unoptimized
|
||||
/>
|
||||
<div className="flex h-[80vh] flex-col items-center justify-center bg-white text-center">
|
||||
<Image src="/images/kart/icon_notice.svg" alt="" width={69} height={61} unoptimized />
|
||||
<div className="mt-5 text-[13px] leading-5 text-[#9e9e9e]">{children}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
/** Legacy mobile Tabulation / Derived / Exim: PC-only notice. */
|
||||
export function PcOnlyNotice() {
|
||||
return (
|
||||
<MobileNotice>
|
||||
<p>
|
||||
이 메뉴는 PC에서 접속하셔야만
|
||||
<br />
|
||||
사용하실 수 있습니다.
|
||||
<br />
|
||||
번거로우시겠지만, PC를 이용해 주세요.
|
||||
</p>
|
||||
</MobileNotice>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -69,8 +69,8 @@ export function ReportFrame({
|
||||
aria-label={label}
|
||||
className="-mx-[1.0416vw] -mt-2.5 -mb-6 min-h-[calc(100vh-146px)] bg-white"
|
||||
>
|
||||
{/* Legacy shows reduced content on phones (small touch screens). */}
|
||||
<div className="[@media(pointer:coarse)_and_(max-width:767px)]:hidden">
|
||||
{/* Reduced content on touch devices (phones and tablets) or windows 767px or narrower. */}
|
||||
<div className="[@media(hover:none)_and_(pointer:coarse),(max-width:767px)]:hidden">
|
||||
{tabs}
|
||||
<DndContext
|
||||
sensors={sensors}
|
||||
@@ -124,7 +124,7 @@ export function ReportFrame({
|
||||
</DragOverlay>
|
||||
</DndContext>
|
||||
</div>
|
||||
<div className="hidden [@media(pointer:coarse)_and_(max-width:767px)]:block">
|
||||
<div className="hidden [@media(hover:none)_and_(pointer:coarse),(max-width:767px)]:block">
|
||||
{phone}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
|
||||
import { useSyncExternalStore } from "react";
|
||||
|
||||
/** Same "small touch screen" test as the phone-only CSS in ReportFrame. */
|
||||
const PHONE_QUERY = "(pointer: coarse) and (max-width: 767px)";
|
||||
/**
|
||||
* Same mobile test as the reduced-view CSS in ReportFrame: a touch device (phone/tablet) at any
|
||||
* width, or any window 767px wide or narrower.
|
||||
*/
|
||||
const PHONE_QUERY = "(hover: none) and (pointer: coarse), (max-width: 767px)";
|
||||
|
||||
function subscribe(onChange: () => void) {
|
||||
const media = window.matchMedia(PHONE_QUERY);
|
||||
|
||||
Reference in New Issue
Block a user