fix(team-calc) : improve mobile equipment and export layout
This commit is contained in:
@@ -52,6 +52,7 @@ export function GuideImageExport({
|
|||||||
allowWithoutNotes = true,
|
allowWithoutNotes = true,
|
||||||
captureClassName,
|
captureClassName,
|
||||||
buttonLabel = "ส่งออกภาพ",
|
buttonLabel = "ส่งออกภาพ",
|
||||||
|
mobileIconOnly = false,
|
||||||
language: controlledLanguage,
|
language: controlledLanguage,
|
||||||
showLanguageSelector = true,
|
showLanguageSelector = true,
|
||||||
promptForLanguage = false,
|
promptForLanguage = false,
|
||||||
@@ -66,6 +67,7 @@ export function GuideImageExport({
|
|||||||
allowWithoutNotes?: boolean;
|
allowWithoutNotes?: boolean;
|
||||||
captureClassName?: string;
|
captureClassName?: string;
|
||||||
buttonLabel?: string;
|
buttonLabel?: string;
|
||||||
|
mobileIconOnly?: boolean;
|
||||||
language?: ExportLanguage;
|
language?: ExportLanguage;
|
||||||
showLanguageSelector?: boolean;
|
showLanguageSelector?: boolean;
|
||||||
promptForLanguage?: boolean;
|
promptForLanguage?: boolean;
|
||||||
@@ -165,6 +167,7 @@ export function GuideImageExport({
|
|||||||
type="button"
|
type="button"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
className={mobileIconOnly ? "max-sm:size-7 max-sm:px-0 max-sm:has-data-[icon=inline-start]:pl-0" : undefined}
|
||||||
disabled={capturing || disabled}
|
disabled={capturing || disabled}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (promptForLanguage) setPendingCaptureMode(mode);
|
if (promptForLanguage) setPendingCaptureMode(mode);
|
||||||
@@ -176,11 +179,13 @@ export function GuideImageExport({
|
|||||||
) : (
|
) : (
|
||||||
<DownloadIcon data-icon="inline-start" />
|
<DownloadIcon data-icon="inline-start" />
|
||||||
)}
|
)}
|
||||||
{captureMode === mode
|
<span className={mobileIconOnly ? "sr-only sm:not-sr-only" : undefined}>
|
||||||
? "กำลังส่งออก…"
|
{captureMode === mode
|
||||||
: mode === "without-notes"
|
? "กำลังส่งออก…"
|
||||||
? "ส่งออกภาพโดยไม่รวมโน้ต"
|
: mode === "without-notes"
|
||||||
: buttonLabel}
|
? "ส่งออกภาพโดยไม่รวมโน้ต"
|
||||||
|
: buttonLabel}
|
||||||
|
</span>
|
||||||
</Button>
|
</Button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ function TeamCard({
|
|||||||
eager={exporting}
|
eager={exporting}
|
||||||
linked={!exporting}
|
linked={!exporting}
|
||||||
sizes="64px"
|
sizes="64px"
|
||||||
className="sm:col-span-2"
|
className="order-first sm:order-none sm:col-span-2"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -474,6 +474,7 @@ export function TeamSearch({ groups }: { groups: PublicGuide["teamGroups"] }) {
|
|||||||
width={1080}
|
width={1080}
|
||||||
captureClassName="p-0"
|
captureClassName="p-0"
|
||||||
allowWithoutNotes={false}
|
allowWithoutNotes={false}
|
||||||
|
mobileIconOnly
|
||||||
showLanguageSelector={false}
|
showLanguageSelector={false}
|
||||||
promptForLanguage
|
promptForLanguage
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user