mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 09:54:14 +00:00
feat(mobile): admin, settings picker and place sheets in the common style, all sheets on glass
Admin sheets: their frame draws the icon tile header (an icon per sheet, the plugin sheets' icons moved out of the title into the tile), the soft scroll edge and 42 px footer buttons; admin fields use the sheets' eyebrow labels and round inputs. The settings picker, the bulk category sheet and the save to list sheet get the common header (TileHeader may now leave out the icon for a plain picker). Every phone sheet now uses the glass material, as the trip settings do; it stays 94 % opaque, so forms over the map remain legible.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { ReactNode } from 'react'
|
||||
import { Check } from 'lucide-react'
|
||||
import MSheet from '../../components/MSheet'
|
||||
import { TileHeader } from '../trip/sheets/MTripSheetUi'
|
||||
import { useTranslation } from '../../../i18n'
|
||||
|
||||
export interface MSetPickerOption {
|
||||
value: string
|
||||
@@ -21,10 +23,14 @@ interface MSetPickerSheetProps {
|
||||
* presets). Selecting closes the sheet.
|
||||
*/
|
||||
export default function MSetPickerSheet({ open, onClose, title, options, value, onSelect }: MSetPickerSheetProps) {
|
||||
const { t } = useTranslation()
|
||||
const closeLabel = t('common.close')
|
||||
return (
|
||||
<MSheet open={open} onClose={onClose} variant="bottom" material="opaque" ariaLabel={title}>
|
||||
<div className="px-[14px] pb-2 pt-4 text-[0.875rem] font-extrabold text-m-ink">{title}</div>
|
||||
<div className="min-h-0 overflow-y-auto px-2 pb-3">
|
||||
<MSheet open={open} onClose={onClose} variant="bottom" material="glass" ariaLabel={title}>
|
||||
<div className="flex-none px-[18px] pt-4">
|
||||
<TileHeader title={title} onClose={onClose} closeLabel={closeLabel} />
|
||||
</div>
|
||||
<div className="m-scroll-fade mt-1 min-h-0 overflow-y-auto px-2 pb-3 pt-2">
|
||||
{options.map((opt) => {
|
||||
const active = opt.value === value
|
||||
return (
|
||||
|
||||
@@ -300,7 +300,7 @@ export default function MSettingsMcp() {
|
||||
if (!createdClient) setCreateOpen(false)
|
||||
}}
|
||||
variant="card"
|
||||
material="opaque"
|
||||
material="glass"
|
||||
ariaLabel={t('settings.oauth.modal.createTitle')}
|
||||
>
|
||||
<div className="min-h-0 overflow-y-auto p-[18px]">
|
||||
@@ -409,7 +409,7 @@ export default function MSettingsMcp() {
|
||||
if (!createdToken) setTokenModalOpen(false)
|
||||
}}
|
||||
variant="card"
|
||||
material="opaque"
|
||||
material="glass"
|
||||
ariaLabel={t('settings.mcp.modal.createTitle')}
|
||||
>
|
||||
<div className="p-[18px]">
|
||||
@@ -461,7 +461,7 @@ export default function MSettingsMcp() {
|
||||
</MSheet>
|
||||
|
||||
{/* Rotated secret display */}
|
||||
<MSheet open={rotatedSecret !== null} onClose={() => setRotatedSecret(null)} variant="card" material="opaque" ariaLabel={t('settings.oauth.rotateSecretDoneTitle')}>
|
||||
<MSheet open={rotatedSecret !== null} onClose={() => setRotatedSecret(null)} variant="card" material="glass" ariaLabel={t('settings.oauth.rotateSecretDoneTitle')}>
|
||||
<div className="p-[18px]">
|
||||
<div className="text-[0.9375rem] font-extrabold text-m-ink">{t('settings.oauth.rotateSecretDoneTitle')}</div>
|
||||
<p className="mt-2 rounded-xl border border-[color:var(--m-rowbr)] bg-[color:var(--m-ic)] p-3 font-geist text-[0.625rem] leading-relaxed text-[color:var(--m-st-pending)]">
|
||||
|
||||
Reference in New Issue
Block a user