diff --git a/public/containers/mobile.svg b/public/containers/mobile.svg
index 403db18f..6c1fc8d1 100644
--- a/public/containers/mobile.svg
+++ b/public/containers/mobile.svg
@@ -11,6 +11,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 17:00
+
+
\ No newline at end of file
diff --git a/src/common/components/mock-components/front-containers/mobilephone-shape.tsx b/src/common/components/mock-components/front-containers/mobilephone-shape.tsx
index 1585ee53..ddab3381 100644
--- a/src/common/components/mock-components/front-containers/mobilephone-shape.tsx
+++ b/src/common/components/mock-components/front-containers/mobilephone-shape.tsx
@@ -1,12 +1,14 @@
-import { forwardRef } from 'react';
-import { Group, Rect, Circle } from 'react-konva';
+import { forwardRef, useEffect, useState } from 'react';
+import { Group, Rect, Circle, Image, Text } from 'react-konva';
import { ShapeSizeRestrictions, ShapeType } from '@/core/model';
import { ShapeProps } from '../shape.model';
import { fitSizeToShapeSizeRestrictions } from '@/common/utils/shapes/shape-restrictions';
import { useGroupShapeProps } from '../mock-components.utils';
+import { loadSvgWithFill } from '@/common/utils/svg.utils';
+import { BASIC_SHAPE } from '../front-components/shape.const';
const mobilePhoneShapeSizeRestrictions: ShapeSizeRestrictions = {
- minWidth: 150,
+ minWidth: 200,
minHeight: 150,
maxWidth: 1000,
maxHeight: 1000,
@@ -37,6 +39,33 @@ export const MobilePhoneShape = forwardRef((props, ref) => {
const speakerRadius = 2;
const buttonRadius = 9;
+ const [wifiIcon, setWifiIcon] = useState(null);
+ const [batteryIcon, setBatteryIcon] = useState(null);
+ const [signalIcon, setSignalIcon] = useState(null);
+ const [currentTime, setCurrentTime] = useState('');
+
+ const adornerIconSize = 20;
+ const adornerPadding = 5;
+ const adornerTotalWidth = adornerIconSize * 3 + 17 * 2 + 30;
+
+ // Calculate inner screen coordinates (excluding frame margins)
+ const screenX = margin + screenMargin; // Left edge of inner screen
+ const screenY = screenMargin * 3; // Top edge of inner screen
+ const screenWidth = restrictedWidth - 2 * margin - 2 * screenMargin; // Available width inside screen
+
+ // Position adorner in top-right corner of inner screen
+ const adornerStartX = screenX + screenWidth - adornerTotalWidth; // Right-aligned positioning
+ const adornerY = screenY + adornerPadding; // Top-aligned with padding
+
+ // Individual icon positions within the adorner
+ const wifiX = adornerStartX;
+ const signalX = adornerStartX + 17;
+ const batteryX = adornerStartX + 20 * 2;
+
+ const timeX = adornerStartX + 23 * 3;
+ const timeY = adornerY + 4;
+ const timeWidth = 40;
+
const commonGroupProps = useGroupShapeProps(
props,
restrictedSize,
@@ -44,6 +73,34 @@ export const MobilePhoneShape = forwardRef((props, ref) => {
ref
);
+ useEffect(() => {
+ loadSvgWithFill('/icons/wifi.svg', 'black').then(img => setWifiIcon(img));
+ loadSvgWithFill('/icons/cellsignal.svg', 'black').then(img =>
+ setSignalIcon(img)
+ );
+ loadSvgWithFill('/icons/batteryfull.svg', 'black').then(img =>
+ setBatteryIcon(img)
+ );
+ }, []);
+
+ useEffect(() => {
+ const updateTime = () => {
+ const now = new Date();
+ setCurrentTime(
+ now.toLocaleTimeString('es-ES', {
+ hour: '2-digit',
+ minute: '2-digit',
+ hour12: false,
+ })
+ );
+ };
+
+ updateTime();
+ const timer = setInterval(updateTime, 1000);
+
+ return () => clearInterval(timer);
+ }, []);
+
return (
{/* Mobile Frame */}
@@ -82,6 +139,53 @@ export const MobilePhoneShape = forwardRef((props, ref) => {
fill="white"
/>
+ {/* Adorner */}
+
+ {/* Wifi */}
+ {wifiIcon && (
+
+ )}
+
+ {/* Cell signal */}
+ {signalIcon && (
+
+ )}
+
+ {/* Battery */}
+ {batteryIcon && (
+
+ )}
+
+ {/* Current time */}
+
+
{/* Init button */}