Add WATERMARK tab with custom draggable text; hide FRAME in camera; fix double-dark after highlight capture
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
import React from 'react';
|
||||
import { View, Text, TouchableOpacity, ScrollView } from 'react-native';
|
||||
import { LayoutGrid, Sun, Thermometer, Sparkles, Frame, type LucideIcon } from 'lucide-react-native';
|
||||
import { LayoutGrid, Sun, Thermometer, Sparkles, Frame, Stamp, type LucideIcon } from 'lucide-react-native';
|
||||
import * as Haptics from 'expo-haptics';
|
||||
|
||||
export type TabId = 'recipes' | 'iq' | 'wb' | 'filters' | 'frame';
|
||||
export type TabId = 'recipes' | 'iq' | 'wb' | 'filters' | 'frame' | 'watermark';
|
||||
|
||||
interface ToolRailProps {
|
||||
activeTab: TabId | null;
|
||||
onToggle: (tab: TabId) => void;
|
||||
// FRAME only exists in library mode (camera shows every frame WYSIWYG through
|
||||
// the viewfinder overlays); WATERMARK is available in both modes.
|
||||
mode: 'camera' | 'library';
|
||||
}
|
||||
|
||||
const TOOLS: { id: TabId; label: string; icon: LucideIcon }[] = [
|
||||
@@ -16,9 +19,12 @@ const TOOLS: { id: TabId; label: string; icon: LucideIcon }[] = [
|
||||
{ id: 'wb', label: 'WB', icon: Thermometer },
|
||||
{ id: 'filters', label: 'FX', icon: Sparkles },
|
||||
{ id: 'frame', label: 'FRAME', icon: Frame },
|
||||
{ id: 'watermark', label: 'WATERMARK', icon: Stamp },
|
||||
];
|
||||
|
||||
export default function ToolRail({ activeTab, onToggle }: ToolRailProps) {
|
||||
export default function ToolRail({ activeTab, onToggle, mode }: ToolRailProps) {
|
||||
// FRAME (frame picker) belongs to library stills only: camera mode hides it.
|
||||
const tools = TOOLS.filter((t) => t.id !== 'frame' || mode === 'library');
|
||||
return (
|
||||
<View className="py-1.5">
|
||||
<ScrollView
|
||||
@@ -26,7 +32,7 @@ export default function ToolRail({ activeTab, onToggle }: ToolRailProps) {
|
||||
showsHorizontalScrollIndicator={false}
|
||||
contentContainerStyle={{ alignItems: 'center', paddingHorizontal: 8 }}
|
||||
>
|
||||
{TOOLS.map((tool) => {
|
||||
{tools.map((tool) => {
|
||||
const isActive = activeTab === tool.id;
|
||||
const Icon = tool.icon;
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user