feat: Update screen reference handling in V2 layouts
- Enhanced the `ScreenManagementService` to include updates for V2 layouts in the `screen_layouts_v2` table. - Implemented logic to remap `screenId`, `targetScreenId`, `modalScreenId`, and other related IDs in layout data. - Added logging for the number of layouts updated in both V1 and V2, improving traceability of the update process. - This update ensures that screen references are correctly maintained across different layout versions, enhancing the overall functionality of the screen management system.
This commit is contained in:
40
frontend/components/screen/config-panels/button/BasicTab.tsx
Normal file
40
frontend/components/screen/config-panels/button/BasicTab.tsx
Normal file
@@ -0,0 +1,40 @@
|
||||
"use client";
|
||||
|
||||
import React from "react";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { Input } from "@/components/ui/input";
|
||||
|
||||
export interface BasicTabProps {
|
||||
config: any;
|
||||
onChange: (key: string, value: any) => void;
|
||||
localText?: string;
|
||||
onTextChange?: (value: string) => void;
|
||||
}
|
||||
|
||||
export const BasicTab: React.FC<BasicTabProps> = ({
|
||||
config,
|
||||
onChange,
|
||||
localText,
|
||||
onTextChange,
|
||||
}) => {
|
||||
const text = localText !== undefined ? localText : (config.text !== undefined ? config.text : "버튼");
|
||||
|
||||
const handleChange = (newValue: string) => {
|
||||
onTextChange?.(newValue);
|
||||
onChange("componentConfig.text", newValue);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<div>
|
||||
<Label htmlFor="button-text">버튼 텍스트</Label>
|
||||
<Input
|
||||
id="button-text"
|
||||
value={text}
|
||||
onChange={(e) => handleChange(e.target.value)}
|
||||
placeholder="버튼 텍스트를 입력하세요"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user