diff --git a/src/components/floor-plan/modal/dimensionLine/DimensionLineSetting.jsx b/src/components/floor-plan/modal/dimensionLine/DimensionLineSetting.jsx index 6c83ecd9..8a775c49 100644 --- a/src/components/floor-plan/modal/dimensionLine/DimensionLineSetting.jsx +++ b/src/components/floor-plan/modal/dimensionLine/DimensionLineSetting.jsx @@ -81,24 +81,24 @@ export default function DimensionLineSetting(props) {
-

表示の変更

+

{getMessage('contextmenu.display.edit')}

-
寸法線に表示する数値を入力してください
+
{getMessage('modal.display.edit.info')}
- 既存の長さ + {getMessage('modal.display.edit.before.length')}
- 変更の長さ + {getMessage('modal.display.edit.after.length')}
@@ -106,34 +106,32 @@ export default function DimensionLineSetting(props) {
setSlopeAble(!slopeAble)} /> - +
-
傾斜を着せてください。
+
{getMessage('modal.display.edit.input.slope')}
- 傾斜 + {getMessage('slope')}
{pitchText}
- 傾斜 + {getMessage('slope')}
{pitchText}
-
傾き設定されている場合、入力した数値に傾き計算をした数値が表示されます。
+
{getMessage('modal.display.edit.input.slope.info')}
- +
diff --git a/src/components/floor-plan/modal/distance/Distance.jsx b/src/components/floor-plan/modal/distance/Distance.jsx index 70ddfb35..745ca4f2 100644 --- a/src/components/floor-plan/modal/distance/Distance.jsx +++ b/src/components/floor-plan/modal/distance/Distance.jsx @@ -19,7 +19,7 @@ export default function Distance(props) {
-

距離測定

+

{getMessage('modal.distance')}

@@ -28,7 +28,7 @@ export default function Distance(props) {
-
2点間距離
+
{getMessage('modal.distance.dual.point')}
@@ -39,7 +39,7 @@ export default function Distance(props) {
-
水平距離
+
{getMessage('modal.distance.horizon')}
@@ -50,7 +50,7 @@ export default function Distance(props) {
-
垂直距離
+
{getMessage('modal.distance.vertical')}
@@ -63,9 +63,7 @@ export default function Distance(props) {
- +
diff --git a/src/components/floor-plan/modal/module/CircuitNumberEdit.jsx b/src/components/floor-plan/modal/module/CircuitNumberEdit.jsx new file mode 100644 index 00000000..d565e1a1 --- /dev/null +++ b/src/components/floor-plan/modal/module/CircuitNumberEdit.jsx @@ -0,0 +1,48 @@ +import WithDraggable from '@/components/common/draggable/withDraggable' +import { useRecoilValue } from 'recoil' +import { contextPopupPositionState } from '@/store/popupAtom' +import { usePopup } from '@/hooks/usePopup' +import { useMessage } from '@/hooks/useMessage' + +export default function CircuitNumberEdit(props) { + const contextPopupPosition = useRecoilValue(contextPopupPositionState) + const { id, pos = contextPopupPosition, apply } = props + const { closePopup } = usePopup() + const { getMessage } = useMessage() + const handleApply = () => { + if (apply) apply() + closePopup(id) + } + return ( + +
+
+

{getMessage('modal.module.circuit.number.edit')}

+ +
+
+
{getMessage('modal.module.circuit.number.edit.info')}
+
+
+
+ + {getMessage('modal.module.circuit.number')} + +
+ +
+
+
+
+
+ +
+
+
+
+ ) +} diff --git a/src/components/floor-plan/modal/module/PanelEdit.jsx b/src/components/floor-plan/modal/module/PanelEdit.jsx new file mode 100644 index 00000000..1f40b703 --- /dev/null +++ b/src/components/floor-plan/modal/module/PanelEdit.jsx @@ -0,0 +1,78 @@ +import WithDraggable from '@/components/common/draggable/WithDraggable' +import { useRecoilValue } from 'recoil' +import { contextPopupPositionState } from '@/store/popupAtom' +import { usePopup } from '@/hooks/usePopup' +import { useMessage } from '@/hooks/useMessage' +import { useState } from 'react' + +export default function PanelEdit(props) { + const contextPopupPosition = useRecoilValue(contextPopupPositionState) + const { id, pos = contextPopupPosition, type = 'move', apply } = props + const { closePopup } = usePopup() + const [length, setLength] = useState(0) + const [direction, setDirection] = useState('') + const { getMessage } = useMessage() + + const handleApply = () => { + apply() + closePopup(id) + } + + return ( + +
+
+

{getMessage(type === 'move' ? 'modal.move.setting' : 'modal.copy.setting')}

+ +
+
+
{getMessage(type === 'move' ? 'modal.move.setting.info' : 'modal.copy.setting.info')}
+
+
+
+ {getMessage('margin')} +
+ setLength(e.target.value)} /> +
+ mm +
+
+ + + + +
+
+
+
+ +
+
+
+
+ ) +} diff --git a/src/components/floor-plan/modal/module/column/ColumnInsert.jsx b/src/components/floor-plan/modal/module/column/ColumnInsert.jsx new file mode 100644 index 00000000..c2f24095 --- /dev/null +++ b/src/components/floor-plan/modal/module/column/ColumnInsert.jsx @@ -0,0 +1,95 @@ +import WithDraggable from '@/components/common/draggable/WithDraggable' +import { useRecoilValue } from 'recoil' +import { contextPopupPositionState } from '@/store/popupAtom' +import { usePopup } from '@/hooks/usePopup' +import { useMessage } from '@/hooks/useMessage' +import { useState } from 'react' +import Image from 'next/image' + +export default function ColumnInsert(props) { + const contextPopupPosition = useRecoilValue(contextPopupPositionState) + const { id, pos = contextPopupPosition, apply } = props + const { closePopup } = usePopup() + const [selectedType, setSelectedType] = useState(1) + const { getMessage } = useMessage() + const handleApply = () => { + if (apply) apply() + closePopup(id) + } + + const HandleRadioChange = (e) => { + setSelectedType(Number(e.target.value)) + } + + return ( + +
+
+

{getMessage('modal.panel.column.insert')}

+ +
+
+
+
{getMessage('modal.panel.column.insert.info')}
+
+
+
+ + +
+
+ + +
+
+
+ {selectedType === 1 && ( + react + )} + {selectedType === 2 && ( + react + )} +
+
+
+
+
{getMessage('legend')}
+
+
+
+
+ + {getMessage('modal.panel.select.column')} +
+
+ + {getMessage('modal.panel.insert.column')} +
+
+
+
+
+
+ +
+
+
+
+ ) +} diff --git a/src/components/floor-plan/modal/module/column/ColumnRemove.jsx b/src/components/floor-plan/modal/module/column/ColumnRemove.jsx new file mode 100644 index 00000000..b4baf0d7 --- /dev/null +++ b/src/components/floor-plan/modal/module/column/ColumnRemove.jsx @@ -0,0 +1,118 @@ +import WithDraggable from '@/components/common/draggable/WithDraggable' +import { useRecoilValue } from 'recoil' +import { contextPopupPositionState } from '@/store/popupAtom' +import { usePopup } from '@/hooks/usePopup' +import { useMessage } from '@/hooks/useMessage' +import { useState } from 'react' +import Image from 'next/image' + +export default function ColumnRemove(props) { + const contextPopupPosition = useRecoilValue(contextPopupPositionState) + const { id, pos = contextPopupPosition, apply } = props + const { closePopup } = usePopup() + const [selectedType, setSelectedType] = useState(1) + const { getMessage } = useMessage() + const types = [ + { name: getMessage('modal.panel.column.remove.type.left'), value: 1 }, + { name: getMessage('modal.panel.column.remove.type.right'), value: 2 }, + { name: getMessage('modal.panel.column.remove.type.side'), value: 3 }, + { name: getMessage('modal.panel.column.remove.type.none'), value: 4 }, + ] + const handleApply = () => { + if (apply) apply() + closePopup(id) + } + + return ( + +
+
+

{getMessage('modal.panel.column.remove')}

+ +
+
+
+
{getMessage('modal.panel.column.remove.info')}
+
+
+ {types.map((type, index) => { + return ( +
+ setSelectedType(Number(e.target.value))} + value={type.value} + checked={selectedType === type.value} + /> + +
+ ) + })} +
+
+ {selectedType === 1 && ( + react + )} + {selectedType === 2 && ( + react + )} + {selectedType === 3 && ( + react + )} + {selectedType === 4 && ( + react + )} +
+
+
+
+
{getMessage('legend')}
+
+
+
+
+ + {getMessage('modal.panel.select.column')} +
+
+
+
+
+
+ +
+
+
+
+ ) +} diff --git a/src/components/floor-plan/modal/module/row/RowInsert.jsx b/src/components/floor-plan/modal/module/row/RowInsert.jsx new file mode 100644 index 00000000..e6e99c0c --- /dev/null +++ b/src/components/floor-plan/modal/module/row/RowInsert.jsx @@ -0,0 +1,95 @@ +import WithDraggable from '@/components/common/draggable/withDraggable' +import Image from 'next/image' +import { useState } from 'react' +import { useRecoilValue } from 'recoil' +import { contextPopupPositionState } from '@/store/popupAtom' +import { usePopup } from '@/hooks/usePopup' +import { useMessage } from '@/hooks/useMessage' + +export default function RowInsert(props) { + const contextPopupPosition = useRecoilValue(contextPopupPositionState) + const { id, pos = contextPopupPosition, apply } = props + const { closePopup } = usePopup() + const [selectedType, setSelectedType] = useState(1) + const { getMessage } = useMessage() + const handleApply = () => { + if (apply) apply() + closePopup(id) + } + + const HandleRadioChange = (e) => { + setSelectedType(Number(e.target.value)) + } + + return ( + +
+
+

{getMessage('modal.row.insert')}

+ +
+
+
+
{getMessage('modal.row.insert.info')}
+
+
+
+ + +
+
+ + +
+
+
+ {selectedType === 1 && ( + react + )} + {selectedType === 2 && ( + react + )} +
+
+
+
+
{getMessage('legend')}
+
+
+
+
+ + {getMessage('modal.panel.select.row')} +
+
+ + {getMessage('modal.panel.insert.row')} +
+
+
+
+
+
+ +
+
+
+
+ ) +} diff --git a/src/components/floor-plan/modal/module/row/RowRemove.jsx b/src/components/floor-plan/modal/module/row/RowRemove.jsx new file mode 100644 index 00000000..6b93b41c --- /dev/null +++ b/src/components/floor-plan/modal/module/row/RowRemove.jsx @@ -0,0 +1,118 @@ +import WithDraggable from '@/components/common/draggable/withDraggable' +import Image from 'next/image' +import { useState } from 'react' +import { useRecoilValue } from 'recoil' +import { contextPopupPositionState } from '@/store/popupAtom' +import { usePopup } from '@/hooks/usePopup' +import { useMessage } from '@/hooks/useMessage' + +export default function RowRemove(props) { + const contextPopupPosition = useRecoilValue(contextPopupPositionState) + const { id, pos = contextPopupPosition, apply } = props + const { closePopup } = usePopup() + const [selectedType, setSelectedType] = useState(1) + const { getMessage } = useMessage() + const types = [ + { name: getMessage('modal.row.remove.type.up'), value: 1 }, + { name: getMessage('modal.row.remove.type.down'), value: 2 }, + { name: getMessage('modal.row.remove.type.side'), value: 3 }, + { name: getMessage('modal.row.remove.type.none'), value: 4 }, + ] + const handleApply = () => { + if (apply) apply() + closePopup(id) + } + + return ( + +
+
+

{getMessage('modal.row.remove')}

+ +
+
+
+
{getMessage('modal.row.remove.info')}
+
+
+ {types.map((type, index) => { + return ( +
+ setSelectedType(Number(e.target.value))} + value={type.value} + checked={selectedType === type.value} + /> + +
+ ) + })} +
+
+ {selectedType === 1 && ( + react + )} + {selectedType === 2 && ( + react + )} + {selectedType === 3 && ( + react + )} + {selectedType === 4 && ( + react + )} +
+
+
+
+
{getMessage('legend')}
+
+
+
+
+ + {getMessage('modal.panel.select.row')} +
+
+
+
+
+
+ +
+
+
+
+ ) +} diff --git a/src/components/floor-plan/modal/object/SizeSetting.jsx b/src/components/floor-plan/modal/object/SizeSetting.jsx index bdb25821..fd172aee 100644 --- a/src/components/floor-plan/modal/object/SizeSetting.jsx +++ b/src/components/floor-plan/modal/object/SizeSetting.jsx @@ -16,7 +16,7 @@ export default function SizeSetting(props) { return ( -
+

{getMessage('modal.size.setting')}