mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-24 23:05:49 +00:00
feat(ui): add Remove background toggle to effects panel
This commit is contained in:
@@ -139,6 +139,7 @@ interface SettingsPanelProps {
|
||||
cropRegion?: CropRegion;
|
||||
onCropChange?: (region: CropRegion) => void;
|
||||
aspectRatio: AspectRatio;
|
||||
onAspectRatioChange?: (ratio: AspectRatio) => void;
|
||||
videoElement?: HTMLVideoElement | null;
|
||||
exportQuality?: ExportQuality;
|
||||
onExportQualityChange?: (quality: ExportQuality) => void;
|
||||
@@ -217,6 +218,7 @@ export function SettingsPanel({
|
||||
cropRegion,
|
||||
onCropChange,
|
||||
aspectRatio,
|
||||
onAspectRatioChange,
|
||||
videoElement,
|
||||
exportQuality = "good",
|
||||
onExportQualityChange,
|
||||
@@ -744,6 +746,19 @@ export function SettingsPanel({
|
||||
parseInput={(t) => parseFloat(t.replace(/%$/, ""))}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-2 flex items-center justify-between p-2 rounded-lg bg-white/5 border border-white/5">
|
||||
<div className="text-[10px] font-medium text-slate-300">{tSettings("effects.removeBackground")}</div>
|
||||
<Switch
|
||||
checked={aspectRatio === 'native' && padding === 0}
|
||||
onCheckedChange={(checked) => {
|
||||
if (checked) {
|
||||
onAspectRatioChange?.('native');
|
||||
onPaddingChange?.(0);
|
||||
}
|
||||
}}
|
||||
className="data-[state=checked]:bg-[#2563EB] scale-90"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Button
|
||||
|
||||
@@ -2172,6 +2172,7 @@ export default function VideoEditor() {
|
||||
cropRegion={cropRegion}
|
||||
onCropChange={setCropRegion}
|
||||
aspectRatio={aspectRatio}
|
||||
onAspectRatioChange={setAspectRatio}
|
||||
videoElement={videoPlaybackRef.current?.video || null}
|
||||
exportQuality={exportQuality}
|
||||
onExportQualityChange={setExportQuality}
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
"cursorSway": "Cursor Sway",
|
||||
"shadow": "Shadow",
|
||||
"roundness": "Roundness",
|
||||
"padding": "Padding"
|
||||
"padding": "Padding",
|
||||
"removeBackground": "Remove background"
|
||||
},
|
||||
"crop": {
|
||||
"title": "Crop Video",
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
"cursorSway": "Balanceo del cursor",
|
||||
"shadow": "Sombra",
|
||||
"roundness": "Redondez",
|
||||
"padding": "Relleno"
|
||||
"padding": "Relleno",
|
||||
"removeBackground": "Quitar fondo"
|
||||
},
|
||||
"crop": {
|
||||
"title": "Recortar video",
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
"cursorSway": "光标摆动",
|
||||
"shadow": "阴影",
|
||||
"roundness": "圆角",
|
||||
"padding": "内边距"
|
||||
"padding": "内边距",
|
||||
"removeBackground": "移除背景"
|
||||
},
|
||||
"crop": {
|
||||
"title": "裁剪视频",
|
||||
|
||||
Reference in New Issue
Block a user