diff --git a/app/app.android.scss b/app/app.android.scss index ef3308722..100db4cdc 100644 --- a/app/app.android.scss +++ b/app/app.android.scss @@ -3,6 +3,16 @@ checkbox { margin-right: 0; } +// the primary button is a 40 tall pill +button[variant='contained'] { + height: 40; +} + +.sheetHeaderTitle { + font-size: 22; + margin-left: 8; +} + // a tonal chip: the surface has no glass here .cardChip { background-color: var(--colorPrimaryContainer); @@ -17,3 +27,15 @@ checkbox { border-radius: 30; border-width: 1; } + +// a field: 56 tall and 4 around +.formRow { + height: 64; +} + +// the outline takes the accent while the field has the focus +textfield[variant='outline'] { + floating-color: var(--colorPrimary); + stroke-color: var(--colorPrimary); + stroke-inactive-color: var(--colorOutline); +} diff --git a/app/app.ios.scss b/app/app.ios.scss index 4f7d17469..b4a3a3270 100644 --- a/app/app.ios.scss +++ b/app/app.ios.scss @@ -75,6 +75,18 @@ textfield[variant='none'] { font-weight: 700; } +// the primary button is a 44 tall capsule +button[variant='prominentGlass'], +button[variant='contained'] { + height: 44; +} + +.sheetHeaderTitle { + font-size: 17; + font-weight: bold; + text-align: center; +} + // capsule text fields: the system fill, 12% gray in light and 24% in dark textfield[variant='outline'], textview[variant='outline'] { @@ -94,3 +106,14 @@ textview[variant='outline'] { min-height: 84; padding: 12 16; } + +// a field: 48 tall and 4 around +.formRow { + height: 56; +} + +textfield[variant='outline']:focused, +textview[variant='outline']:focused { + border-color: var(--colorPrimary); + border-width: 1.5; +} diff --git a/app/components/common/SheetHeader.svelte b/app/components/common/SheetHeader.svelte new file mode 100644 index 000000000..948a64f5f --- /dev/null +++ b/app/components/common/SheetHeader.svelte @@ -0,0 +1,24 @@ + + + + + diff --git a/app/components/list/CardsList.svelte b/app/components/list/CardsList.svelte index 38a4faf7a..d1fa6ec22 100644 --- a/app/components/list/CardsList.svelte +++ b/app/components/list/CardsList.svelte @@ -20,7 +20,8 @@ DEFAULT_NB_COLUMNS_LANDSCAPE, SETTINGS_CARD_ALWAYS_SHOW_NAME, SETTINGS_NB_COLUMNS, - SETTINGS_NB_COLUMNS_LANDSCAPE + SETTINGS_NB_COLUMNS_LANDSCAPE, + SHEET_SOFT_INPUT_MODE } from '~/utils/constants'; import { appIcon } from '~/utils/appIcons'; import { documentHasPKPassData } from '~/utils/pkpass'; @@ -82,6 +83,7 @@ const result = await showBottomSheet({ parent: this, view: CreateCard, + windowSoftInputMode: SHEET_SOFT_INPUT_MODE, ignoreTopSafeArea: true }); DEV_LOG && console.log('CreateCard', result); diff --git a/app/components/view/CardEditSheet.svelte b/app/components/view/CardEditSheet.svelte index 3717c63b9..0f473c7b9 100644 --- a/app/components/view/CardEditSheet.svelte +++ b/app/components/view/CardEditSheet.svelte @@ -2,6 +2,7 @@ import { lc } from '@nativescript-community/l'; import { Template } from '@nativescript-community/svelte-native/components'; import { TextField } from '@nativescript-community/ui-textfield'; + import SheetHeader from '~/components/common/SheetHeader.svelte'; import { showBottomSheet } from '@nativescript-community/ui-bottomsheet/svelte'; import { showError } from '@shared/utils/showError'; import dayjs from 'dayjs'; @@ -9,6 +10,7 @@ import { qrcodeService } from '~/services/qrcode'; import { shortcutService } from '~/services/shortcuts'; import { appIcon } from '~/utils/appIcons'; + import { SHEET_SOFT_INPUT_MODE } from '~/utils/constants'; import { pickColor } from '~/utils/ui'; import { colors } from '~/variables'; import ListItemAutoSize from '@shared/components/ListItemAutoSize.svelte'; @@ -108,6 +110,7 @@ parent: rootView, skipCollapsedState: true, view: ExtraFieldPicker, + windowSoftInputMode: SHEET_SOFT_INPUT_MODE, props: { editing: !!field, ...(field?.extra || {}) } }); if (!result) { @@ -166,11 +169,7 @@ - - close(false)} /> - + close(false)} onDone={save} title={lc('edit')} />