feat(wm): GPS watermark color + place-name/time toggles, "commune, city" locality
This commit is contained in:
@@ -4,7 +4,7 @@ import Slider from '@react-native-community/slider';
|
||||
import * as Haptics from 'expo-haptics';
|
||||
import { Trash2 } from 'lucide-react-native';
|
||||
import { Skia } from '@shopify/react-native-skia';
|
||||
import { Recipe, ColorAdjustments, CustomWatermark, FrameId, BaseFilter } from '../types';
|
||||
import { Recipe, ColorAdjustments, CustomWatermark, GpsWatermark, FrameId, BaseFilter } from '../types';
|
||||
import { FRAMES } from '../utils/frameUtils';
|
||||
import { PARAM_DEFS, ContinuousParamDef } from '../utils/paramDefs';
|
||||
import { FILM_SIMS, filmSimToRecipe } from '../utils/defaultRecipes';
|
||||
@@ -19,7 +19,16 @@ import RecipeCreateModal from './RecipeCreateModal';
|
||||
type TabId = 'recipes' | 'iq' | 'wb' | 'filters' | 'frame' | 'watermark';
|
||||
// Choice-group keys that open a strip above the chip row: color chrome groups
|
||||
// (wb tab) and the D.RANGE selector (iq tab).
|
||||
type GroupKey = 'cx' | 'cxb' | 'dr' | 'wmColor' | 'wmSize' | 'wmFont';
|
||||
type GroupKey =
|
||||
| 'cx'
|
||||
| 'cxb'
|
||||
| 'dr'
|
||||
| 'wmColor'
|
||||
| 'wmSize'
|
||||
| 'wmFont'
|
||||
| 'gpsColor'
|
||||
| 'gpsName'
|
||||
| 'gpsTime';
|
||||
|
||||
interface AdjustmentPanelProps {
|
||||
activeTab: TabId;
|
||||
@@ -59,6 +68,10 @@ interface AdjustmentPanelProps {
|
||||
// input and the export options all read the same object.
|
||||
customWm: CustomWatermark;
|
||||
onUpdateCustomWm: (wm: CustomWatermark) => void;
|
||||
// GPS mark styling — the SAME object the preview and the export read, so a
|
||||
// chip press repaints both.
|
||||
gpsWm: GpsWatermark;
|
||||
onUpdateGpsWm: (wm: GpsWatermark) => void;
|
||||
// ACCEPT: copy the live draft into the mark the export burns in. Edits stay a
|
||||
// draft (viewfinder preview only) until this is pressed.
|
||||
onAcceptCustomWm: () => void;
|
||||
@@ -152,6 +165,8 @@ export default function AdjustmentPanel({
|
||||
onDeleteRecipe,
|
||||
customWm,
|
||||
onUpdateCustomWm,
|
||||
gpsWm,
|
||||
onUpdateGpsWm,
|
||||
onAcceptCustomWm,
|
||||
onCancelCustomWm,
|
||||
wmEditNonce,
|
||||
@@ -388,6 +403,25 @@ export default function AdjustmentPanel({
|
||||
options: wmFontOptions,
|
||||
onPick: (v) => onUpdateCustomWm({ ...customWm, font: v === 'DEFAULT' ? null : v }),
|
||||
},
|
||||
// GPS mark's own features — one chip each, opening its options above (the
|
||||
// same one-row-at-a-time strip the custom mark's styling uses).
|
||||
gpsColor: {
|
||||
label: 'COLOR', off: WM_DEFAULT_COLOR,
|
||||
value: gpsWm.color ?? WM_DEFAULT_COLOR, options: WM_COLORS,
|
||||
onPick: (v) => onUpdateGpsWm({ ...gpsWm, color: v }),
|
||||
},
|
||||
gpsName: {
|
||||
label: 'PLACE NAME', off: 'ON',
|
||||
value: gpsWm.showName === false ? 'OFF' : 'ON',
|
||||
options: [{ v: 'on', d: 'ON' }, { v: 'off', d: 'OFF' }],
|
||||
onPick: (v) => onUpdateGpsWm({ ...gpsWm, showName: v === 'on' }),
|
||||
},
|
||||
gpsTime: {
|
||||
label: 'TIME', off: 'ON',
|
||||
value: gpsWm.showTime === false ? 'OFF' : 'ON',
|
||||
options: [{ v: 'on', d: 'ON' }, { v: 'off', d: 'OFF' }],
|
||||
onPick: (v) => onUpdateGpsWm({ ...gpsWm, showTime: v === 'on' }),
|
||||
},
|
||||
};
|
||||
const groupChip = (g: GroupKey): ChipDef => ({
|
||||
key: `grp-${g}`,
|
||||
@@ -537,6 +571,9 @@ export default function AdjustmentPanel({
|
||||
active: useGeotag,
|
||||
onPress: () => onToggleGeotag(!useGeotag),
|
||||
})}
|
||||
{useGeotag && renderChip(groupChip('gpsColor'))}
|
||||
{useGeotag && renderChip(groupChip('gpsName'))}
|
||||
{useGeotag && renderChip(groupChip('gpsTime'))}
|
||||
{renderChip({
|
||||
key: 'custom-wm',
|
||||
label: customWm.enabled ? 'CUSTOM WATERMARK ON' : 'CUSTOM WATERMARK OFF',
|
||||
|
||||
Reference in New Issue
Block a user