Compare commits

..

21 Commits

Author SHA1 Message Date
21cad0d9e8 Refactor menu view and add build number and environment label 2025-05-12 10:58:16 +03:00
9c6ab888a7 Merge pull request #98 from SyncrowIOT/SP-1523-FE-Implement-Task-Dialogs-for-Editable-Sensor-Parameters-Sensitivity-Distances-Timings-Levels
Implement Flush Mounted Presence Sensor Routine Control and change th…
2025-05-12 10:51:11 +03:00
0a4ec1c6de Refactor API endpoint for getting device reports and fix the record title 2025-05-12 10:18:02 +03:00
adb42f95e8 Implement Flush Mounted Presence Sensor Routine Control and change the device type logic 2025-05-11 16:33:11 +03:00
2651de71e4 Merge pull request #97 from SyncrowIOT/SP-1522-FE-Implement-Device-Settings-Screen-Edit-Name-Location-Device-Info
Sp 1522 fe implement device settings screen edit name location device info
2025-05-07 11:07:43 +03:00
5411d84759 Refactor device avatar and add icon to setting 2025-05-07 11:01:51 +03:00
a1954b3ad3 add settings to flush sensor 2025-05-07 10:37:59 +03:00
56007d6a8c Merge pull request #96 from SyncrowIOT/SP-1520-FE-Build-Motion-Status-Illuminance-Row-and-Presence-Record-Navigation
add new flush sensor device to app
2025-05-07 10:16:12 +03:00
9cc4538dc5 Add flush sensor icon to assets and enhancement code 2025-05-07 10:11:33 +03:00
14a5d26ef9 add new flush sensor device to app 2025-05-06 16:20:05 +03:00
7fd825516f Merge pull request #95 from SyncrowIOT/staging-release-30+16
Added Client id, and client secret to `.env.prod`.
2025-05-06 09:40:23 +03:00
9919840391 Added Client id, and client secret to .env.prod. 2025-05-06 09:35:02 +03:00
8a21828dd4 add water heater device to routine and fix device type in routine 2025-05-05 10:00:54 +03:00
5890a70243 Added CLIENT_ID and CLIENT_SECRET to .env.staging file. 2025-04-29 10:37:08 +03:00
5a70df0a61 Merge pull request #94 from SyncrowIOT/SP-1471-BE-On-mobile-app-Error-while-retrieving-scene-details-on-4-6-Scenes-devices
Refactor device_info_model.dart and devices_api.dart
2025-04-28 16:13:34 +03:00
d493000c20 Refactor return type of deviceByUuid API method in devices_api.dart 2025-04-28 16:11:07 +03:00
6a27f863c3 Refactor device_info_model.dart and devices_api.dart 2025-04-28 15:59:10 +03:00
bde418e52a Merge pull request #93 from SyncrowIOT/SP-1472-FE-On-Mobile-2-3-Gangs-Devices-conditions-Action-names-are-changing-when-we-save-a-routine-then-try-to-edit-it
Sp 1472 fe on mobile 2 3 gangs devices conditions action names are changing when we save a routine then try to edit it
2025-04-28 11:25:33 +03:00
3725d28a5e Refactor device names in scene operations data helper 2025-04-28 11:06:27 +03:00
f30b7b0831 Fixed routines bug where it threw 404 because of a developer error. 2025-04-28 10:02:41 +03:00
405cccad03 Merge pull request #92 from SyncrowIOT/SP-1477-FE-On-mobile-app-Error-fetching-device-functions-status-when-we-open-the-power-clamp-device-control
SP-1477
2025-04-28 09:02:02 +03:00
63 changed files with 2739 additions and 246 deletions

View File

@ -1,3 +1,5 @@
ENV_NAME=production
BASE_URL=https://syncrow-staging.azurewebsites.net
PROJECT_ID=bcda711e-9fc2-4168-a05e-171b4026d1ff
CLIENT_ID=ac05b6c26bdb0543ec6200781d8177f1
CLIENT_SECRET=fdbaafdd5a94bbd542a4a6739cf0178c8bb2e87bff39232a3aaa993fbd5d71e7

View File

@ -1,3 +1,5 @@
ENV_NAME=staging
BASE_URL=https://syncrow-staging.azurewebsites.net
PROJECT_ID=bcda711e-9fc2-4168-a05e-171b4026d1ff
CLIENT_ID=ac05b6c26bdb0543ec6200781d8177f1
CLIENT_SECRET=fdbaafdd5a94bbd542a4a6739cf0178c8bb2e87bff39232a3aaa993fbd5d71e7

View File

@ -0,0 +1,18 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.8326 16.8575C7.55614 16.8575 4.89062 14.192 4.89062 10.9156C4.89062 7.63915 7.55614 4.97363 10.8326 4.97363C14.1091 4.97363 16.7746 7.63915 16.7746 10.9156C16.7746 14.192 14.1091 16.8575 10.8326 16.8575Z" fill="#FFE645"/>
<path d="M10.8333 4.97363C10.8332 4.97363 10.833 4.97363 10.833 4.97363V16.8575H10.8333C14.1098 16.8575 16.7753 14.192 16.7753 10.9156C16.7753 7.63915 14.1098 4.97363 10.8333 4.97363Z" fill="#FFF1B9"/>
<path d="M10.833 21.8334C10.4824 21.8334 10.1982 21.5493 10.1982 21.1986V18.8289C10.1982 18.4784 10.4824 18.1941 10.833 18.1941C11.1836 18.1941 11.4678 18.4784 11.4678 18.8289V21.1986C11.4678 21.5493 11.1836 21.8334 10.833 21.8334Z" fill="#FFE645"/>
<path d="M21.0317 11.6348H18.7461C18.3955 11.6348 18.1113 11.3506 18.1113 11C18.1113 10.6496 18.3955 10.3652 18.7461 10.3652H21.0317C21.3824 10.3652 21.6665 10.6496 21.6665 11C21.6665 11.3506 21.3824 11.6348 21.0317 11.6348Z" fill="#FFCF2C"/>
<path d="M2.92042 11.6348H0.634766C0.284157 11.6348 0 11.3506 0 11C0 10.6496 0.284157 10.3652 0.634766 10.3652H2.92042C3.27103 10.3652 3.55518 10.6496 3.55518 11C3.55518 11.3506 3.27103 11.6348 2.92042 11.6348Z" fill="#FFE645"/>
<path d="M17.7243 7.65695C17.5049 7.65695 17.2915 7.54306 17.174 7.33941C16.9988 7.03591 17.1027 6.64761 17.4064 6.47239L19.3481 5.3513C19.6517 5.17591 20.04 5.28005 20.2152 5.58372C20.3905 5.88721 20.2865 6.27551 19.9828 6.45073L18.0412 7.57182C17.9412 7.62951 17.8321 7.65695 17.7243 7.65695Z" fill="#FFCF2C"/>
<path d="M2.03686 16.7139C1.8175 16.7139 1.60409 16.6 1.48656 16.3963C1.31117 16.0928 1.41531 15.7045 1.71881 15.5293L3.69865 14.3862C4.00231 14.2108 4.39045 14.315 4.56567 14.6186C4.74106 14.9221 4.63708 15.3104 4.33342 15.4856L2.35358 16.6287C2.25373 16.6864 2.14447 16.7139 2.03686 16.7139Z" fill="#FFE645"/>
<path d="M5.76902 20.4051C5.6614 20.4051 5.5523 20.3778 5.4523 20.32C5.14863 20.1448 5.04466 19.7565 5.21988 19.453L6.36279 17.4735C6.53801 17.17 6.92631 17.0658 7.22981 17.2412C7.53347 17.4164 7.63744 17.8047 7.46222 18.1082L6.31931 20.0877C6.20178 20.2914 5.98838 20.4051 5.76902 20.4051Z" fill="#FFE645"/>
<path d="M3.94197 7.65681C3.83419 7.65681 3.72509 7.62937 3.62524 7.57168L1.64557 6.42877C1.34207 6.25355 1.23793 5.86525 1.41332 5.56158C1.58854 5.25809 1.97667 5.15395 2.28033 5.32933L4.26001 6.47224C4.56351 6.64746 4.66748 7.03576 4.49226 7.33926C4.37473 7.54291 4.16132 7.65681 3.94197 7.65681Z" fill="#FFE645"/>
<path d="M19.6649 16.7342C19.5572 16.7342 19.4481 16.7067 19.348 16.6491L17.333 15.4857C17.0295 15.3103 16.9255 14.9221 17.1007 14.6185C17.276 14.315 17.6643 14.2108 17.9678 14.3862L19.9828 15.5496C20.2865 15.7248 20.3905 16.1131 20.2152 16.4166C20.0977 16.6203 19.8843 16.7342 19.6649 16.7342Z" fill="#FFCF2C"/>
<path d="M15.8973 20.4051C15.6778 20.4051 15.4645 20.2913 15.347 20.0877L14.2043 18.1085C14.029 17.8048 14.133 17.4167 14.4367 17.2415C14.7402 17.0661 15.1285 17.1701 15.3037 17.4737L16.4464 19.4529C16.6217 19.7566 16.5177 20.1447 16.214 20.3199C16.114 20.3778 16.0049 20.4051 15.8973 20.4051Z" fill="#FFCF2C"/>
<path d="M10.833 3.72144C10.4824 3.72144 10.1982 3.43728 10.1982 3.08667V0.801514C10.1982 0.450905 10.4824 0.166748 10.833 0.166748C11.1836 0.166748 11.4678 0.450905 11.4678 0.801514V3.08667C11.4678 3.43728 11.1836 3.72144 10.833 3.72144Z" fill="#FFE645"/>
<path d="M14.7534 4.75952C14.6458 4.75952 14.5365 4.73208 14.4367 4.67422C14.133 4.499 14.029 4.11086 14.2043 3.8072L15.3472 1.82786C15.5224 1.5242 15.9105 1.42005 16.2142 1.59544C16.5178 1.77066 16.6218 2.15896 16.4466 2.46262L15.3037 4.44197C15.1862 4.64562 14.9728 4.75952 14.7534 4.75952Z" fill="#FFCF2C"/>
<path d="M6.91292 4.75919C6.69356 4.75919 6.48015 4.64529 6.36262 4.44164L5.21988 2.46262C5.04466 2.15896 5.14863 1.77066 5.4523 1.59544C5.75579 1.42005 6.14409 1.5242 6.31931 1.82786L7.46206 3.80687C7.63728 4.11053 7.5333 4.49867 7.22964 4.67405C7.1298 4.73175 7.02053 4.75919 6.91292 4.75919Z" fill="#FFE645"/>
<path d="M10.8333 18.1941C10.8332 18.1941 10.833 18.1941 10.833 18.1941V21.8334H10.8333C11.1839 21.8334 11.4681 21.5493 11.4681 21.1986V18.8289C11.4681 18.4784 11.1839 18.1941 10.8333 18.1941Z" fill="#FFCF2C"/>
<path d="M10.8333 0.166748C10.8332 0.166748 10.833 0.166748 10.833 0.166748V3.72144H10.8333C11.1839 3.72144 11.4681 3.43728 11.4681 3.08667V0.801514C11.4681 0.450905 11.1839 0.166748 10.8333 0.166748Z" fill="#FFCF2C"/>
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -0,0 +1,17 @@
<svg width="22" height="14" viewBox="0 0 22 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M21.6663 11.1257L7.02441 8.58667L10.833 13.6648H21.6663V11.1257Z" fill="#FFB54C"/>
<path d="M0 11.1257V13.6648H10.8333V8.58667L0 11.1257Z" fill="#FFCC4A"/>
<path d="M21.6663 11.1257V5.41284H20.0688L19.4341 6.04761L18.7993 5.41284H17.2018L16.5671 6.04761L15.9323 5.41284H14.3348L13.7 6.04761L13.0653 5.41284H11.4678L8.29395 8.26929L10.833 11.1257H21.6663Z" fill="#FFCC4A"/>
<path d="M10.8333 5.41284H10.1986H8.60107L7.96631 6.04761L7.33154 5.41284H5.73405L5.09928 6.04761L4.46452 5.41284H2.86702L2.23226 6.04761L1.59749 5.41284H0V11.1257H10.8333V5.41284Z" fill="#FFE278"/>
<path d="M21.0316 1.60449H10.833L10.1982 2.23926L10.833 2.87402H21.0316V1.60449Z" fill="#ABD5ED"/>
<path d="M10.8333 1.60449H1.26953V0.334961H0V4.14355H1.26953V2.87402H10.8333V1.60449Z" fill="#BFEBFF"/>
<path d="M20.3965 0.334961H21.666V4.14355H20.3965V0.334961Z" fill="#ABD5ED"/>
<path d="M1.59766 5.41284H2.86719V8.58667H1.59766V5.41284Z" fill="#587AA1"/>
<path d="M4.46484 5.41284H5.73438V7.31714H4.46484V5.41284Z" fill="#587AA1"/>
<path d="M7.33203 5.41284H8.60156V8.58667H7.33203V5.41284Z" fill="#587AA1"/>
<path d="M11.4678 7.31714H10.833L10.5156 6.99976V5.73022L10.833 5.41284H11.4678V7.31714Z" fill="#455F80"/>
<path d="M10.1982 5.41284H10.833V7.31714H10.1982V5.41284Z" fill="#587AA1"/>
<path d="M13.0654 5.41284H14.335V8.58667H13.0654V5.41284Z" fill="#455F80"/>
<path d="M15.9326 5.41284H17.2021V7.31714H15.9326V5.41284Z" fill="#455F80"/>
<path d="M18.7998 5.41284H20.0693V8.58667H18.7998V5.41284Z" fill="#455F80"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,17 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_8194_10048)">
<path d="M11.4732 16.7316C8.31096 16.7316 5.73828 14.1589 5.73828 10.9967C5.73828 7.8344 8.31096 5.26172 11.4732 5.26172C14.6355 5.26172 17.2081 7.8344 17.2081 10.9967C17.2081 14.1589 14.6355 16.7316 11.4732 16.7316Z" fill="#EBF6FF"/>
<path d="M17.2076 10.9967C17.2076 7.8344 14.6349 5.26172 11.4727 5.26172V16.7316C14.6349 16.7316 17.2076 14.1589 17.2076 10.9967Z" fill="#D7E7F8"/>
<path d="M11.4721 17.3699C7.95827 17.3699 5.09961 14.5112 5.09961 10.9974C5.09961 7.48362 7.95827 4.625 11.472 4.625C14.9858 4.625 17.8445 7.48366 17.8445 10.9974C17.8445 14.5112 14.9858 17.3699 11.4721 17.3699ZM11.4721 5.89473C8.6584 5.89473 6.36934 8.18379 6.36934 10.9974C6.36934 13.811 8.6584 16.1001 11.472 16.1001C14.2857 16.1001 16.5748 13.8111 16.5748 10.9974C16.5748 8.18375 14.2857 5.89473 11.4721 5.89473Z" fill="#9FE066"/>
<path d="M11.4728 11.6318H8.28525C7.93464 11.6318 7.65039 11.3475 7.65039 10.9969C7.65039 10.6463 7.93464 10.3621 8.28525 10.3621H10.8379V8.95127C10.8379 8.60066 11.1222 8.31641 11.4728 8.31641C11.8234 8.31641 12.1076 8.60066 12.1076 8.95127V10.9969C12.1077 11.3475 11.8234 11.6318 11.4728 11.6318Z" fill="#394949"/>
<path d="M12.1075 10.9969V8.95127C12.1075 8.60066 11.8233 8.31641 11.4727 8.31641V11.6318C11.8233 11.6318 12.1075 11.3475 12.1075 10.9969Z" fill="#151F1F"/>
<path d="M16.5753 10.9974C16.5753 13.8111 14.2863 16.1001 11.4727 16.1001V17.3698C14.9865 17.3698 17.8451 14.5112 17.8451 10.9974C17.8451 7.48366 14.9864 4.625 11.4727 4.625V5.89473C14.2863 5.89473 16.5753 8.18379 16.5753 10.9974Z" fill="#4ACA7B"/>
<path d="M18.6832 3.78752C16.7572 1.86147 14.1963 0.800781 11.4725 0.800781C8.74869 0.800781 6.18782 1.86147 4.26177 3.78752C2.67775 5.37158 1.67966 7.38516 1.37492 9.56545L1.08378 9.2743C0.835882 9.02641 0.433887 9.02641 0.185951 9.2743C-0.0619838 9.52219 -0.0619838 9.92419 0.185951 10.1721L1.46097 11.4471C1.58494 11.5711 1.74742 11.6331 1.90986 11.6331C2.0723 11.6331 2.23482 11.5711 2.35875 11.4471L3.63377 10.1721C3.8817 9.92423 3.8817 9.52224 3.63377 9.2743C3.38587 9.02641 2.98388 9.02641 2.73594 9.2743L2.70678 9.30346C3.50083 5.18845 7.12907 2.07051 11.4725 2.07051C16.3953 2.07051 20.4003 6.07548 20.4003 10.9983C20.4003 15.921 16.3953 19.926 11.4725 19.926C7.46868 19.926 3.9294 17.234 2.86558 13.3794C2.77234 13.0413 2.42266 12.8429 2.08474 12.9363C1.74674 13.0295 1.54837 13.3792 1.64165 13.7171C2.22378 15.8264 3.50315 17.7286 5.24408 19.0732C7.04184 20.4618 9.19555 21.1957 11.4725 21.1957C14.1963 21.1957 16.7571 20.135 18.6832 18.209C20.6093 16.2829 21.67 13.7221 21.67 10.9983C21.67 8.27439 20.6093 5.71361 18.6832 3.78752Z" fill="#FF4D5B"/>
<path d="M20.4004 10.9983C20.4004 15.9211 16.3955 19.926 11.4727 19.926V21.1958C14.1965 21.1958 16.7573 20.135 18.6834 18.209C20.6095 16.2829 21.6702 13.7221 21.6702 10.9983C21.6702 8.27439 20.6094 5.71361 18.6834 3.78752C16.7573 1.86147 14.1965 0.800781 11.4727 0.800781V2.07051C16.3955 2.07051 20.4004 6.07548 20.4004 10.9983Z" fill="#DE0062"/>
</g>
<defs>
<clipPath id="clip0_8194_10048">
<rect width="21.67" height="21.67" fill="white" transform="translate(0 0.164062)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,17 @@
<svg width="30" height="19" viewBox="0 0 30 19" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M29.9999 14.9414L9.72644 11.4258L14.9999 18.457H29.9999V14.9414Z" fill="#FFB54C"/>
<path d="M0 14.9414V18.457H15V11.4258L0 14.9414Z" fill="#FFCC4A"/>
<path d="M30.0002 14.9404V7.03027H27.7883L26.9094 7.90918L26.0305 7.03027H23.8186L22.9397 7.90918L22.0608 7.03027H19.8489L18.97 7.90918L18.0911 7.03027H15.8792L11.4846 10.9854L15.0002 14.9404H30.0002Z" fill="#FFCC4A"/>
<path d="M15 7.03027H14.1211H11.9092L11.0303 7.90918L10.1514 7.03027H7.93945L7.06055 7.90918L6.18164 7.03027H3.96973L3.09082 7.90918L2.21191 7.03027H0V14.9404H15V7.03027Z" fill="#FFE278"/>
<path d="M29.1212 1.75781H15.0001L14.1212 2.63672L15.0001 3.51562H29.1212V1.75781Z" fill="#ABD5ED"/>
<path d="M15 1.75781H1.75781V0H0V5.27344H1.75781V3.51562H15V1.75781Z" fill="#BFEBFF"/>
<path d="M28.2423 0H30.0001V5.27344H28.2423V0Z" fill="#ABD5ED"/>
<path d="M2.21191 7.03076H3.96973V11.4253H2.21191V7.03076Z" fill="#587AA1"/>
<path d="M6.18152 7.03076H7.93933V9.66748H6.18152V7.03076Z" fill="#587AA1"/>
<path d="M10.1516 7.03076H11.9094V11.4253H10.1516V7.03076Z" fill="#587AA1"/>
<path d="M15.8787 9.66699H14.9998L14.5603 9.22754V7.46973L14.9998 7.03027H15.8787V9.66699Z" fill="#455F80"/>
<path d="M14.1212 7.03027H15.0001V9.66699H14.1212V7.03027Z" fill="#587AA1"/>
<path d="M18.0907 7.03027H19.8485V11.4248H18.0907V7.03027Z" fill="#455F80"/>
<path d="M22.0603 7.03027H23.8181V9.66699H22.0603V7.03027Z" fill="#455F80"/>
<path d="M26.0304 7.03027H27.7882V11.4248H26.0304V7.03027Z" fill="#455F80"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,17 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_8194_10048)">
<path d="M11.4732 16.7316C8.31096 16.7316 5.73828 14.1589 5.73828 10.9967C5.73828 7.8344 8.31096 5.26172 11.4732 5.26172C14.6355 5.26172 17.2081 7.8344 17.2081 10.9967C17.2081 14.1589 14.6355 16.7316 11.4732 16.7316Z" fill="#EBF6FF"/>
<path d="M17.2076 10.9967C17.2076 7.8344 14.6349 5.26172 11.4727 5.26172V16.7316C14.6349 16.7316 17.2076 14.1589 17.2076 10.9967Z" fill="#D7E7F8"/>
<path d="M11.4721 17.3699C7.95827 17.3699 5.09961 14.5112 5.09961 10.9974C5.09961 7.48362 7.95827 4.625 11.472 4.625C14.9858 4.625 17.8445 7.48366 17.8445 10.9974C17.8445 14.5112 14.9858 17.3699 11.4721 17.3699ZM11.4721 5.89473C8.6584 5.89473 6.36934 8.18379 6.36934 10.9974C6.36934 13.811 8.6584 16.1001 11.472 16.1001C14.2857 16.1001 16.5748 13.8111 16.5748 10.9974C16.5748 8.18375 14.2857 5.89473 11.4721 5.89473Z" fill="#9FE066"/>
<path d="M11.4728 11.6318H8.28525C7.93464 11.6318 7.65039 11.3475 7.65039 10.9969C7.65039 10.6463 7.93464 10.3621 8.28525 10.3621H10.8379V8.95127C10.8379 8.60066 11.1222 8.31641 11.4728 8.31641C11.8234 8.31641 12.1076 8.60066 12.1076 8.95127V10.9969C12.1077 11.3475 11.8234 11.6318 11.4728 11.6318Z" fill="#394949"/>
<path d="M12.1075 10.9969V8.95127C12.1075 8.60066 11.8233 8.31641 11.4727 8.31641V11.6318C11.8233 11.6318 12.1075 11.3475 12.1075 10.9969Z" fill="#151F1F"/>
<path d="M16.5753 10.9974C16.5753 13.8111 14.2863 16.1001 11.4727 16.1001V17.3698C14.9865 17.3698 17.8451 14.5112 17.8451 10.9974C17.8451 7.48366 14.9864 4.625 11.4727 4.625V5.89473C14.2863 5.89473 16.5753 8.18379 16.5753 10.9974Z" fill="#4ACA7B"/>
<path d="M18.6832 3.78752C16.7572 1.86147 14.1963 0.800781 11.4725 0.800781C8.74869 0.800781 6.18782 1.86147 4.26177 3.78752C2.67775 5.37158 1.67966 7.38516 1.37492 9.56545L1.08378 9.2743C0.835882 9.02641 0.433887 9.02641 0.185951 9.2743C-0.0619838 9.52219 -0.0619838 9.92419 0.185951 10.1721L1.46097 11.4471C1.58494 11.5711 1.74742 11.6331 1.90986 11.6331C2.0723 11.6331 2.23482 11.5711 2.35875 11.4471L3.63377 10.1721C3.8817 9.92423 3.8817 9.52224 3.63377 9.2743C3.38587 9.02641 2.98388 9.02641 2.73594 9.2743L2.70678 9.30346C3.50083 5.18845 7.12907 2.07051 11.4725 2.07051C16.3953 2.07051 20.4003 6.07548 20.4003 10.9983C20.4003 15.921 16.3953 19.926 11.4725 19.926C7.46868 19.926 3.9294 17.234 2.86558 13.3794C2.77234 13.0413 2.42266 12.8429 2.08474 12.9363C1.74674 13.0295 1.54837 13.3792 1.64165 13.7171C2.22378 15.8264 3.50315 17.7286 5.24408 19.0732C7.04184 20.4618 9.19555 21.1957 11.4725 21.1957C14.1963 21.1957 16.7571 20.135 18.6832 18.209C20.6093 16.2829 21.67 13.7221 21.67 10.9983C21.67 8.27439 20.6093 5.71361 18.6832 3.78752Z" fill="#FF4D5B"/>
<path d="M20.4004 10.9983C20.4004 15.9211 16.3955 19.926 11.4727 19.926V21.1958C14.1965 21.1958 16.7573 20.135 18.6834 18.209C20.6095 16.2829 21.6702 13.7221 21.6702 10.9983C21.6702 8.27439 20.6094 5.71361 18.6834 3.78752C16.7573 1.86147 14.1965 0.800781 11.4727 0.800781V2.07051C16.3955 2.07051 20.4004 6.07548 20.4004 10.9983Z" fill="#DE0062"/>
</g>
<defs>
<clipPath id="clip0_8194_10048">
<rect width="21.67" height="21.67" fill="white" transform="translate(0 0.164062)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,17 @@
<svg width="22" height="14" viewBox="0 0 22 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M21.6663 11.1257L7.02441 8.58667L10.833 13.6648H21.6663V11.1257Z" fill="#FFB54C"/>
<path d="M0 11.1257V13.6648H10.8333V8.58667L0 11.1257Z" fill="#FFCC4A"/>
<path d="M21.6663 11.1257V5.41284H20.0688L19.4341 6.04761L18.7993 5.41284H17.2018L16.5671 6.04761L15.9323 5.41284H14.3348L13.7 6.04761L13.0653 5.41284H11.4678L8.29395 8.26929L10.833 11.1257H21.6663Z" fill="#FFCC4A"/>
<path d="M10.8333 5.41284H10.1986H8.60107L7.96631 6.04761L7.33154 5.41284H5.73405L5.09928 6.04761L4.46452 5.41284H2.86702L2.23226 6.04761L1.59749 5.41284H0V11.1257H10.8333V5.41284Z" fill="#FFE278"/>
<path d="M21.0316 1.60449H10.833L10.1982 2.23926L10.833 2.87402H21.0316V1.60449Z" fill="#ABD5ED"/>
<path d="M10.8333 1.60449H1.26953V0.334961H0V4.14355H1.26953V2.87402H10.8333V1.60449Z" fill="#BFEBFF"/>
<path d="M20.3965 0.334961H21.666V4.14355H20.3965V0.334961Z" fill="#ABD5ED"/>
<path d="M1.59766 5.41284H2.86719V8.58667H1.59766V5.41284Z" fill="#587AA1"/>
<path d="M4.46484 5.41284H5.73438V7.31714H4.46484V5.41284Z" fill="#587AA1"/>
<path d="M7.33203 5.41284H8.60156V8.58667H7.33203V5.41284Z" fill="#587AA1"/>
<path d="M11.4678 7.31714H10.833L10.5156 6.99976V5.73022L10.833 5.41284H11.4678V7.31714Z" fill="#455F80"/>
<path d="M10.1982 5.41284H10.833V7.31714H10.1982V5.41284Z" fill="#587AA1"/>
<path d="M13.0654 5.41284H14.335V8.58667H13.0654V5.41284Z" fill="#455F80"/>
<path d="M15.9326 5.41284H17.2021V7.31714H15.9326V5.41284Z" fill="#455F80"/>
<path d="M18.7998 5.41284H20.0693V8.58667H18.7998V5.41284Z" fill="#455F80"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,22 @@
<svg width="38" height="40" viewBox="0 0 38 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19 0C18.3528 0 17.8281 0.524531 17.8281 1.17188V5.85938C17.8281 6.50656 18.3528 7.03125 19 7.03125C19.6472 7.03125 20.1719 6.50656 20.1719 5.85938V1.17188C20.1719 0.524531 19.6472 0 19 0Z" fill="#596C76"/>
<path d="M20.1719 5.85938V1.17188C20.1719 0.524531 19.6472 0 19 0V7.03125C19.6472 7.03125 20.1719 6.50656 20.1719 5.85938Z" fill="#3B4A51"/>
<path d="M30.7188 4.6875H19H7.28125C5.34266 4.6875 3.76562 6.26453 3.76562 8.20312V13.0469C3.76562 14.9855 5.34266 16.5625 7.28125 16.5625H19H30.7188C32.6573 16.5625 34.2344 14.9855 34.2344 13.0469V8.20312C34.2344 6.26453 32.6573 4.6875 30.7188 4.6875Z" fill="#596C76"/>
<path d="M34.2344 13.0469V8.20312C34.2344 6.26453 32.6573 4.6875 30.7188 4.6875H19V16.5625H30.7188C32.6573 16.5625 34.2344 14.9855 34.2344 13.0469Z" fill="#3B4A51"/>
<path d="M28.375 0H19H9.625C8.97727 0 8.45312 0.524141 8.45312 1.17188C8.45312 1.81961 8.97727 2.34375 9.625 2.34375H19H28.375C29.0227 2.34375 29.5469 1.81961 29.5469 1.17188C29.5469 0.524141 29.0227 0 28.375 0Z" fill="#596C76"/>
<path d="M29.5469 1.17188C29.5469 0.524141 29.0227 0 28.375 0H19V2.34375H28.375C29.0227 2.34375 29.5469 1.81961 29.5469 1.17188Z" fill="#3B4A51"/>
<path d="M19 35.3125C24.5046 35.3125 29.6315 33.1096 33.4344 29.1087C33.8808 28.6395 33.8613 27.8979 33.3933 27.4516C32.9229 27.0053 32.1825 27.0247 31.7361 27.4928C28.3796 31.0244 23.8557 32.9688 19 32.9688C14.1443 32.9688 9.62037 31.0244 6.26388 27.4928C5.81873 27.0247 5.07716 27.0053 4.60677 27.4516C4.13873 27.8979 4.11927 28.6395 4.5656 29.1087C8.36841 33.1096 13.4954 35.3125 19 35.3125Z" fill="#D5E8FE"/>
<path d="M19 30.6253C23.0203 30.6253 26.8152 29.0677 29.6853 26.2399C30.1465 25.7867 30.1511 25.044 29.6967 24.5828C29.2447 24.1227 28.5031 24.1182 28.0396 24.5714C25.6112 26.9632 22.4001 28.2816 19 28.2816C15.5999 28.2816 12.3887 26.9632 9.96031 24.5714C9.49679 24.1148 8.75523 24.1217 8.3032 24.5828C7.8489 25.044 7.85343 25.7867 8.31461 26.2399C11.1848 29.0677 14.9797 30.6253 19 30.6253Z" fill="#D5E8FE"/>
<path d="M19 25.9377C21.5223 25.9377 23.9667 25.0291 25.8813 23.3788C26.3712 22.9554 26.4261 22.2161 26.0037 21.7252C25.578 21.233 24.8399 21.1816 24.3501 21.6027C22.8612 22.8868 20.9305 23.5287 19 23.5287C17.0695 23.5287 15.1387 22.8867 13.6499 21.6027C13.1578 21.1816 12.4185 21.2331 11.9962 21.7252C11.574 22.2161 11.6289 22.9554 12.1187 23.3788C14.0333 25.0291 16.4777 25.9377 19 25.9377Z" fill="#D5E8FE"/>
<path d="M16.1687 20.52C17.0316 20.9973 18.0112 21.2502 19 21.2502C19.9887 21.2502 20.9683 20.9973 21.8312 20.52C22.3977 20.2064 22.6026 19.4934 22.289 18.927C21.9754 18.3605 21.259 18.1545 20.6959 18.4692C20.1798 18.7553 19.5898 18.8984 18.9999 18.8984C18.41 18.8984 17.82 18.7553 17.3039 18.4692C16.7386 18.1545 16.0233 18.3605 15.7109 18.927C15.3974 19.4935 15.6023 20.2065 16.1687 20.52Z" fill="#D5E8FE"/>
<path d="M37.0897 30.324C36.6113 29.8903 35.8709 29.92 35.4337 30.3984C31.2177 35.0104 25.2279 37.6563 19 37.6563C12.7721 37.6563 6.78226 35.0104 2.56624 30.3985C2.12906 29.9201 1.38867 29.8904 0.910306 30.3241C0.433119 30.7613 0.399916 31.5017 0.835931 31.98C5.49593 37.0772 12.1164 40 19 40C25.8836 40 32.5041 37.0772 37.1641 31.98C37.6001 31.5017 37.5669 30.7612 37.0897 30.324Z" fill="#D5E8FE"/>
<path d="M37.0897 30.324C36.6113 29.8903 35.8709 29.92 35.4338 30.3984C31.2177 35.0104 25.2279 37.6563 19 37.6563V40C25.8836 40 32.5041 37.0772 37.1641 31.98C37.6001 31.5017 37.5669 30.7612 37.0897 30.324Z" fill="#B5DBFF"/>
<path d="M33.3932 27.4516C32.9228 27.0053 32.1824 27.0247 31.7361 27.4928C28.3796 31.0244 23.8557 32.9688 19 32.9688V35.3125C24.5046 35.3125 29.6316 33.1096 33.4345 29.1087C33.8808 28.6395 33.8613 27.8979 33.3932 27.4516Z" fill="#B5DBFF"/>
<path d="M29.6968 24.5826C29.2448 24.1225 28.5032 24.118 28.0397 24.5712C25.6113 26.963 22.4001 28.2813 19 28.2813V30.6251C23.0203 30.6251 26.8152 29.0675 29.6853 26.2397C30.1466 25.7865 30.1511 25.0438 29.6968 24.5826Z" fill="#B5DBFF"/>
<path d="M26.0038 21.7252C25.578 21.233 24.8399 21.1816 24.3501 21.6027C22.8612 22.8868 20.9305 23.5287 19 23.5287V25.9377C21.5223 25.9377 23.9667 25.0291 25.8813 23.3788C26.3712 22.9554 26.4261 22.2161 26.0038 21.7252Z" fill="#B5DBFF"/>
<path d="M22.2891 18.927C21.9755 18.3605 21.2591 18.1545 20.696 18.4692C20.1799 18.7553 19.5899 18.8984 19 18.8984V21.2501C19.9887 21.2501 20.9684 20.9972 21.8312 20.5199C22.3977 20.2064 22.6026 19.4934 22.2891 18.927Z" fill="#B5DBFF"/>
<path d="M14.3125 11.7969C14.9597 11.7969 15.4844 11.2722 15.4844 10.625C15.4844 9.97779 14.9597 9.45312 14.3125 9.45312C13.6653 9.45312 13.1406 9.97779 13.1406 10.625C13.1406 11.2722 13.6653 11.7969 14.3125 11.7969Z" fill="#EDF5FF"/>
<path d="M23.6875 11.7969C24.3347 11.7969 24.8594 11.2722 24.8594 10.625C24.8594 9.97779 24.3347 9.45312 23.6875 9.45312C23.0403 9.45312 22.5156 9.97779 22.5156 10.625C22.5156 11.2722 23.0403 11.7969 23.6875 11.7969Z" fill="#51FAFF"/>
<path d="M19 11.7969C19.6472 11.7969 20.1719 11.2722 20.1719 10.625C20.1719 9.97779 19.6472 9.45312 19 9.45312C18.3528 9.45312 17.8281 9.97779 17.8281 10.625C17.8281 11.2722 18.3528 11.7969 19 11.7969Z" fill="#EDF5FF"/>
<path d="M20.1719 10.625C20.1719 9.97766 19.6472 9.45312 19 9.45312V11.7969C19.6472 11.7969 20.1719 11.2722 20.1719 10.625Z" fill="#D5E8FE"/>
</svg>

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -0,0 +1,13 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_8194_10065)">
<path d="M17.6069 21.8341H4.06313C1.81893 21.8341 0 20.0151 0 17.7709V4.22719C0 1.98299 1.81893 0.164062 4.06313 0.164062H17.6069C19.8511 0.164062 21.67 1.98299 21.67 4.22719V17.7709C21.67 20.0151 19.8511 21.8341 17.6069 21.8341Z" fill="#E3F8FA"/>
<path d="M15.1312 7.18375L10.955 5.60387C10.8771 5.57475 10.7925 5.57475 10.7153 5.60387L6.53904 7.18375C6.40767 7.23386 6.32031 7.35982 6.32031 7.50067V9.30605C6.32031 9.41711 6.37516 9.5214 6.46591 9.58438C6.55868 9.64736 6.67516 9.6609 6.77877 9.6223L10.8351 8.08779L14.8915 9.62298C14.9301 9.6372 14.9707 9.64465 15.0113 9.64465C15.0791 9.64465 15.1461 9.62433 15.2043 9.58438C15.2958 9.5214 15.3499 9.41711 15.3499 9.30605V7.5C15.3499 7.35914 15.2626 7.23318 15.1312 7.18375Z" fill="#8CE1EB"/>
<path d="M15.1312 13.9572L10.955 12.3773C10.8771 12.3482 10.7925 12.3482 10.7153 12.3773L6.53904 13.9572C6.40767 14.0073 6.32031 14.1333 6.32031 14.2741V16.0795C6.32031 16.1906 6.37516 16.2948 6.46591 16.3578C6.55868 16.4215 6.67516 16.435 6.77877 16.3957L10.8351 14.8612L14.8915 16.3964C14.9301 16.4106 14.9707 16.4181 15.0113 16.4181C15.0791 16.4181 15.1461 16.3978 15.2043 16.3578C15.2958 16.2948 15.3499 16.1906 15.3499 16.0795V14.2734C15.3499 14.1326 15.2626 14.0066 15.1312 13.9572Z" fill="#26C6DA"/>
<path d="M15.1312 10.5705L10.955 8.99059C10.8771 8.96147 10.7925 8.96147 10.7153 8.99059L6.53904 10.5705C6.40767 10.6206 6.32031 10.7465 6.32031 10.8874V12.6928C6.32031 12.8038 6.37516 12.9081 6.46591 12.9711C6.55868 13.0348 6.67516 13.0483 6.77877 13.009L10.8351 11.4745L14.8915 13.0097C14.9301 13.0239 14.9707 13.0314 15.0113 13.0314C15.0791 13.0314 15.1461 13.0111 15.2043 12.9711C15.2958 12.9081 15.3499 12.8038 15.3499 12.6928V10.8867C15.3499 10.7459 15.2626 10.6199 15.1312 10.5705Z" fill="#26C6DA"/>
</g>
<defs>
<clipPath id="clip0_8194_10065">
<rect width="21.67" height="21.67" fill="white" transform="translate(0 0.164062)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,23 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_8194_10077)">
<path d="M17.6 18.673C17.3521 18.4251 17.3521 18.0231 17.6 17.7752C19.4054 15.9698 20.3996 13.5678 20.3996 11.0115C20.3996 8.45525 19.4054 6.05318 17.6 4.24784C17.3521 3.99994 17.3521 3.59795 17.6 3.35001C17.8479 3.10208 18.2499 3.10208 18.4978 3.35001C20.543 5.39516 21.6694 8.11606 21.6694 11.0115C21.6694 13.9069 20.543 16.6278 18.4978 18.673C18.2503 18.9205 17.8484 18.9213 17.6 18.673Z" fill="#7AFFE4"/>
<path d="M15.6781 16.7502C15.4302 16.5023 15.4302 16.1003 15.6781 15.8524C16.9704 14.5602 17.6821 12.8408 17.6821 11.011C17.6821 9.18128 16.9705 7.46194 15.6781 6.1697C15.4302 5.92176 15.4302 5.51981 15.6781 5.27187C15.926 5.02398 16.328 5.02394 16.576 5.27187C18.1081 6.80393 18.9519 8.84213 18.9519 11.0111C18.9519 13.18 18.1081 15.2182 16.576 16.7503C16.3279 16.9982 15.926 16.9981 15.6781 16.7502Z" fill="#00DDC1"/>
<path d="M13.7543 14.8285C13.5064 14.5805 13.5064 14.1785 13.7543 13.9306C14.5331 13.152 14.9619 12.1158 14.9619 11.0131C14.9619 9.91034 14.5331 8.87416 13.7543 8.09548C13.5064 7.84758 13.5064 7.44559 13.7543 7.19765C14.0022 6.94976 14.4042 6.94972 14.6521 7.19765C15.6707 8.21619 16.2317 9.5712 16.2317 11.0131C16.2317 12.455 15.6707 13.81 14.6521 14.8285C14.4042 15.0764 14.0022 15.0763 13.7543 14.8285Z" fill="#7AFFE4"/>
<path d="M17.6 18.6732C17.8484 18.9216 18.2503 18.9207 18.4978 18.6732C20.543 16.6281 21.6694 13.9072 21.6694 11.0117H20.3996C20.3996 13.568 19.4054 15.97 17.6 17.7754C17.3521 18.0233 17.3521 18.4253 17.6 18.6732Z" fill="#00DDC1"/>
<path d="M15.6781 16.7509C15.926 16.9988 16.3279 16.9989 16.5759 16.7509C18.1081 15.2189 18.9518 13.1807 18.9518 11.0117H17.6821C17.6821 12.8415 16.9704 14.5608 15.6781 15.8531C15.4302 16.101 15.4302 16.503 15.6781 16.7509Z" fill="#00B4BC"/>
<path d="M13.7543 14.8272C14.0022 15.0751 14.4041 15.0751 14.6521 14.8272C15.6707 13.8086 16.2316 12.4536 16.2316 11.0117H14.9619C14.9619 12.1144 14.533 13.1506 13.7543 13.9293C13.5064 14.1772 13.5064 14.5792 13.7543 14.8272Z" fill="#00DDC1"/>
<path d="M3.17152 18.673C1.12633 16.6278 0 13.9069 0 11.0115C0 8.11604 1.12633 5.39515 3.17152 3.35C3.41946 3.10206 3.82141 3.10211 4.06935 3.35C4.31728 3.59793 4.31728 3.99989 4.06935 4.24782C2.26396 6.05316 1.26973 8.45523 1.26973 11.0115C1.26973 13.5677 2.26396 15.9698 4.06935 17.7751C4.31728 18.023 4.31728 18.425 4.06935 18.673C3.82141 18.921 3.41937 18.9209 3.17152 18.673Z" fill="#7AFFE4"/>
<path d="M5.09462 16.7503C3.56253 15.2182 2.71875 13.18 2.71875 11.0111C2.71875 8.84212 3.56253 6.80391 5.09466 5.27186C5.3426 5.02396 5.74459 5.02396 5.99249 5.27186C6.24038 5.51979 6.24038 5.92175 5.99249 6.16968C4.70016 7.46197 3.98848 9.1813 3.98848 11.0111C3.98848 12.8408 4.70016 14.5602 5.99249 15.8524C6.24042 16.1003 6.24042 16.5023 5.99249 16.7502C5.74489 16.9978 5.34294 16.9985 5.09462 16.7503Z" fill="#00DDC1"/>
<path d="M7.01704 14.8285C5.99847 13.81 5.4375 12.455 5.4375 11.0131C5.4375 9.5712 5.99847 8.21619 7.01704 7.19765C7.26498 6.94972 7.66697 6.94976 7.91486 7.19765C8.1628 7.44559 8.16276 7.84758 7.91486 8.09548C7.1361 8.87416 6.70723 9.91034 6.70723 11.0131C6.70723 12.1158 7.1361 13.152 7.91486 13.9306C8.1628 14.1785 8.1628 14.5805 7.91486 14.8285C7.66727 15.0761 7.26531 15.0768 7.01704 14.8285Z" fill="#7AFFE4"/>
<path d="M4.06935 18.6732C4.31728 18.4253 4.31728 18.0233 4.06935 17.7754C2.26396 15.97 1.26973 13.568 1.26973 11.0117H0C0 13.9072 1.12633 16.6281 3.17152 18.6732C3.41937 18.9211 3.82141 18.9212 4.06935 18.6732Z" fill="#00DDC1"/>
<path d="M5.99249 16.7509C6.24038 16.5029 6.24038 16.101 5.99249 15.8531C4.70016 14.5609 3.98848 12.8415 3.98848 11.0117H2.71875C2.71875 13.1807 3.56253 15.2189 5.09466 16.7509C5.34294 16.9992 5.74489 16.9985 5.99249 16.7509Z" fill="#00B4BC"/>
<path d="M7.91486 14.8271C8.1628 14.5792 8.16276 14.1772 7.91486 13.9293C7.1361 13.1506 6.70723 12.1144 6.70723 11.0117H5.4375C5.4375 12.4536 5.99846 13.8086 7.01704 14.8272C7.26527 15.0754 7.66722 15.0747 7.91486 14.8271Z" fill="#00DDC1"/>
<path d="M10.835 13.6857C12.3123 13.6857 13.5099 12.4881 13.5099 11.0108C13.5099 9.53353 12.3123 8.33594 10.835 8.33594C9.35775 8.33594 8.16016 9.53353 8.16016 11.0108C8.16016 12.4881 9.35775 13.6857 10.835 13.6857Z" fill="#00DDC1"/>
<path d="M10.835 13.6866C12.31 13.6866 13.5099 12.4866 13.5099 11.0117H8.16016C8.16016 12.4867 9.36009 13.6866 10.835 13.6866Z" fill="#00B4BC"/>
</g>
<defs>
<clipPath id="clip0_8194_10077">
<rect width="21.67" height="21.67" fill="white" transform="translate(0 0.164062)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -0,0 +1,4 @@
<svg width="23" height="22" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20.0539 4.23654C21.4826 6.07144 22.3331 8.37817 22.3331 10.8834C22.3331 16.8663 17.4827 21.7167 11.4998 21.7167L10.2744 20.2302L11.4998 18.829C15.8882 18.829 19.4454 15.2717 19.4454 10.8834C19.4454 9.17629 18.9075 7.59487 17.9909 6.29953L11.4998 12.7906L10.5337 11.1112L11.4998 8.97612L16.0837 4.39227C14.7883 3.47567 13.2069 2.93781 11.4998 2.93781L10.2744 1.33418L11.4998 0.0500488C14.005 0.0500488 16.3118 0.900635 18.1467 2.32928L20.4115 0.0500488L22.3331 1.94165L20.0539 4.23654Z" fill="#66B3FF"/>
<path d="M3.55475 10.8834C3.55475 12.5905 4.09261 14.1719 5.00921 15.4672L11.5003 8.97612V12.7906L6.91647 17.3745C8.21182 18.2911 9.79323 18.829 11.5003 18.829V21.7167C8.99512 21.7167 6.68838 20.8661 4.85348 19.4375L2.57214 21.7167L0.666992 19.8116L2.94622 17.5302C1.51758 15.6953 0.666992 13.3886 0.666992 10.8834C0.666992 4.9005 5.51745 0.0500488 11.5003 0.0500488V2.93781C7.11198 2.93781 3.55475 6.49504 3.55475 10.8834Z" fill="#80D4FF"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,18 @@
<svg width="23" height="20" viewBox="0 0 23 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.5833 1.84497L1.22267 16.046C0.0476544 17.6566 1.198 19.9198 3.19166 19.9198H19.975C21.9687 19.9198 23.119 17.6566 21.944 16.046L11.5833 1.84497Z" fill="#F1FAFF"/>
<path d="M21.9431 16.0448L11.5833 1.84497L9.81055 4.27486L18.3975 16.0448C19.5729 17.6558 18.4222 19.9198 16.4279 19.9198H19.9735C21.9678 19.9198 23.1185 17.6559 21.9431 16.0448Z" fill="#C7EEFB"/>
<path d="M13.6602 6.1864H9.51926C8.38838 6.1864 7.47168 5.26966 7.47168 4.13882V2.24846C7.47168 2.13162 7.56643 2.03687 7.68327 2.03687H15.4963C15.6131 2.03687 15.7079 2.13162 15.7079 2.24846V4.13882C15.7079 5.26966 14.7911 6.1864 13.6602 6.1864Z" fill="#E0DDE2"/>
<path d="M15.498 2.03687H14.3393V2.76335C14.3393 3.89681 13.4204 4.81567 12.287 4.81567H8.15546C7.94886 4.81567 7.74959 4.78482 7.56152 4.72807C7.81628 5.57186 8.59934 6.18645 9.52624 6.18645H13.6578C14.7912 6.18645 15.7101 5.26759 15.7101 4.13413V2.24892C15.7101 2.13183 15.6151 2.03687 15.498 2.03687Z" fill="#C8C1C9"/>
<path d="M17.0524 2.78679H6.12858C6.01174 2.78679 5.91699 2.69204 5.91699 2.5752V0.544844C5.91699 0.428003 6.01174 0.333252 6.12858 0.333252H17.0524C17.1692 0.333252 17.264 0.428003 17.264 0.544844V2.5752C17.264 2.69208 17.1693 2.78679 17.0524 2.78679Z" fill="#E0DDE2"/>
<path d="M17.0519 0.333252H15.8129V1.12359C15.8129 1.24073 15.7179 1.33569 15.6008 1.33569H5.91699V2.57473C5.91699 2.69187 6.01195 2.78684 6.12909 2.78684H17.0519C17.1691 2.78684 17.264 2.69187 17.264 2.57473V0.545352C17.264 0.428215 17.1691 0.333252 17.0519 0.333252Z" fill="#C8C1C9"/>
<path d="M11.591 4.95259C11.891 4.95259 12.1342 4.7094 12.1342 4.4094C12.1342 4.10941 11.891 3.86621 11.591 3.86621C11.291 3.86621 11.0479 4.10941 11.0479 4.4094C11.0479 4.7094 11.291 4.95259 11.591 4.95259Z" fill="#FA2A3B"/>
<path d="M11.4636 10.3904C12.0045 10.3904 12.4429 9.95199 12.4429 9.41116C12.4429 8.87032 12.0045 8.43188 11.4636 8.43188C10.9228 8.43188 10.4844 8.87032 10.4844 9.41116C10.4844 9.95199 10.9228 10.3904 11.4636 10.3904Z" fill="#62D8F9"/>
<path d="M11.4638 8.43213C11.3942 8.43213 11.3262 8.43953 11.2607 8.45333C11.7041 8.54685 12.0369 8.94019 12.0369 9.4114C12.0369 9.88261 11.7041 10.276 11.2607 10.3695C11.3263 10.3833 11.3942 10.3907 11.4638 10.3907C12.0046 10.3907 12.4431 9.95222 12.4431 9.4114C12.4431 8.87058 12.0047 8.43213 11.4638 8.43213Z" fill="#00BEF7"/>
<path d="M14.8717 13.5145L13.1586 13.236L12.2278 11.4381C12.1444 11.2501 12.0134 10.9926 11.7241 10.9064L10.637 10.5802C10.5178 10.5512 10.4031 10.5405 10.1997 10.5725L7.88145 11.1109C7.74264 11.1432 7.61865 11.2211 7.5294 11.3322L6.29163 12.8728C6.07157 13.1467 6.1152 13.5471 6.38913 13.7672C6.50661 13.8617 6.64736 13.9075 6.78718 13.9075C6.97338 13.9075 7.15789 13.8262 7.28357 13.6697L8.3836 12.3006L9.47165 12.0479L8.83273 14.1772C8.82045 14.213 8.81652 14.2593 8.79896 14.3605L8.43849 16.9193L6.75734 18.3779C6.49192 18.6082 6.46344 19.0101 6.69374 19.2755C6.81959 19.4205 6.99657 19.4948 7.1746 19.4948C7.32238 19.4948 7.47087 19.4435 7.59127 19.3391L9.45227 17.7244C9.56826 17.6238 9.64393 17.4847 9.66534 17.3326L9.96009 15.2404L9.99932 15.2522L11.5919 17.1109L12.5347 19.1578C12.642 19.3907 12.8723 19.528 13.113 19.528C13.202 19.528 13.2925 19.5092 13.3787 19.4695C13.6979 19.3225 13.8374 18.9446 13.6905 18.6254L12.7106 16.4981C12.686 16.4446 12.6542 16.3949 12.6159 16.3503L11.2825 14.7941L11.7411 13.2658L12.1757 14.1053C12.2683 14.2841 12.44 14.4085 12.6386 14.4408L14.6674 14.7706C14.702 14.7762 14.7364 14.7789 14.7703 14.7789C15.0767 14.7789 15.3468 14.5569 15.3975 14.2447C15.4539 13.8978 15.2185 13.5709 14.8717 13.5145Z" fill="#62D8F9"/>
<path d="M9.74707 10.6776C9.95045 10.6457 10.0645 10.6586 10.1838 10.6876L11.2709 11.0138C11.5602 11.1 11.6911 11.3574 11.7745 11.5454L12.8085 13.5537C12.835 13.6052 12.8845 13.6409 12.9417 13.6497L15.395 14.0282C15.3479 13.7709 15.1447 13.5589 14.8718 13.5145L13.1588 13.236L12.2279 11.4381C12.1445 11.2501 12.0135 10.9926 11.7242 10.9064L10.6372 10.5802C10.5179 10.5512 10.4032 10.5405 10.1998 10.5725L9.74707 10.6776Z" fill="#00BEF7"/>
<path d="M12.7115 16.498C12.6869 16.4446 12.655 16.3948 12.6167 16.3502L11.2833 14.794L11.7419 13.266L11.6837 13.1536C11.6079 13.0072 11.3924 13.0273 11.345 13.1852L10.8916 14.6961C10.8532 14.824 10.8825 14.9627 10.9694 15.0642L12.1634 16.4576C12.2016 16.5023 12.2335 16.552 12.2581 16.6054L13.2379 18.7328C13.3691 19.0176 13.2716 19.3488 13.0223 19.5213C13.0525 19.5257 13.0831 19.528 13.1138 19.528C13.2028 19.528 13.2933 19.5092 13.3795 19.4695C13.6987 19.3224 13.8382 18.9445 13.6913 18.6254L12.7115 16.498Z" fill="#00BEF7"/>
<path d="M4.22827 18.567C4.06064 18.567 3.92032 18.436 3.91092 18.2666C3.83839 16.9594 4.84282 15.8369 6.14991 15.7644C6.32574 15.7553 6.47551 15.8889 6.4852 16.0643C6.49493 16.2398 6.36065 16.3899 6.1852 16.3996C5.22834 16.4528 4.49305 17.2745 4.54616 18.2313C4.5559 18.4067 4.42162 18.5568 4.24617 18.5666C4.2402 18.5669 4.23419 18.567 4.22827 18.567Z" fill="#00BEF7"/>
<path d="M5.51838 18.5804C5.35076 18.5804 5.21044 18.4493 5.20104 18.2799C5.16524 17.635 5.66082 17.0812 6.3057 17.0454C6.48081 17.0358 6.63121 17.17 6.64094 17.3454C6.65068 17.5209 6.51636 17.671 6.34091 17.6807C6.04634 17.6971 5.81994 17.95 5.83627 18.2447C5.84601 18.4201 5.71169 18.5702 5.53624 18.5799C5.53032 18.5802 5.52431 18.5804 5.51838 18.5804Z" fill="#00BEF7"/>
<path d="M17.7606 13.7491C17.7576 13.7491 17.7546 13.749 17.7516 13.749C17.576 13.744 17.4376 13.5977 17.4425 13.4221C17.4691 12.4641 16.7115 11.663 15.7536 11.6364C15.578 11.6315 15.4396 11.4851 15.4445 11.3095C15.4494 11.1339 15.5966 10.9955 15.7713 11.0004C17.0799 11.0368 18.115 12.1311 18.0785 13.4398C18.0737 13.6124 17.9322 13.7491 17.7606 13.7491Z" fill="#00BEF7"/>
<path d="M16.4716 13.7978C16.4686 13.7978 16.4656 13.7978 16.4626 13.7977C16.287 13.7928 16.1486 13.6465 16.1535 13.4708C16.1575 13.328 16.1055 13.1921 16.0074 13.0882C15.9091 12.9844 15.7763 12.925 15.6335 12.921C15.4579 12.9161 15.3195 12.7698 15.3243 12.5942C15.3293 12.4186 15.474 12.2798 15.6512 12.2851C15.964 12.2938 16.2546 12.4238 16.4696 12.6511C16.6846 12.8784 16.7982 13.1758 16.7895 13.4886C16.7846 13.6611 16.6432 13.7978 16.4716 13.7978Z" fill="#00BEF7"/>
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,12 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_7305_15779)">
<path d="M17.0872 11.5142C17.0872 13.2025 16.427 14.8021 15.2211 15.9954C14.0278 17.2014 12.4283 17.8615 10.7399 17.8615C9.05141 17.8615 7.45185 17.2014 6.25856 15.9954C5.05262 14.8021 4.39249 13.2025 4.39249 11.5142C4.39249 9.82574 5.05266 8.22618 6.25856 7.03289C7.45185 5.8269 9.05141 5.16681 10.7399 5.16681C11.8063 5.16681 12.8471 5.43337 13.7866 5.95388L11.2984 8.97523H21.0861L18.6486 0L16.2113 2.97053C14.5737 1.91691 12.6948 1.35835 10.7398 1.35835C8.02314 1.35835 5.47142 2.41197 3.55459 4.32888C1.63765 6.24578 0.583984 8.79747 0.583984 11.5142C0.583984 14.2309 1.63765 16.7825 3.55459 18.6994C5.47146 20.6163 8.0231 21.67 10.7398 21.67C13.4565 21.67 16.0082 20.6163 17.925 18.6994C19.8419 16.7825 20.8956 14.2309 20.8956 11.5142V10.8794H17.0872V11.5142Z" fill="#77DD00"/>
<path d="M17.0876 10.8799H20.8961V11.5146C20.8961 14.2313 19.8424 16.7829 17.9254 18.6998C16.0086 20.6168 13.4569 21.6704 10.7402 21.6704V17.862C12.4287 17.862 14.0282 17.2019 15.2215 15.9959C16.4275 14.8026 17.0876 13.203 17.0876 11.5147V10.8799H17.0876Z" fill="#66BB00"/>
<path d="M13.787 5.95388C12.8475 5.43333 11.8066 5.16681 10.7402 5.16681V1.35835C12.6952 1.35835 14.5741 1.91691 16.2117 2.97057L18.6491 0L21.0866 8.97523H11.2989L13.787 5.95388Z" fill="#66BB00"/>
</g>
<defs>
<clipPath id="clip0_7305_15779">
<rect width="21.67" height="21.67" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,21 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20.7802 9.0399L20.0667 9.18046C19.7057 9.25157 19.4663 9.5894 19.5103 9.95466C19.6254 10.9106 19.5871 11.9137 19.3549 12.9433C18.5334 16.5849 15.4143 19.3394 11.6982 19.6957C6.22309 20.2206 1.65927 15.6884 2.13085 10.223C2.48684 6.09727 5.78343 2.73681 9.90242 2.3098C12.864 2.00274 15.5631 3.17762 17.3531 5.18175L18.396 4.25096C16.4588 2.08197 13.6036 0.750365 10.4397 0.87082C5.29437 1.06665 1.04625 5.19944 0.720226 10.3382C0.34608 16.2355 5.01846 21.1352 10.8352 21.1352C16.4331 21.1352 20.9712 16.5971 20.9712 10.9992C20.9712 10.3288 20.9044 9.674 20.7802 9.0399Z" fill="#FFF0D2"/>
<path d="M10.8355 12.7451C11.8006 12.7451 12.583 11.9627 12.583 10.9976C12.583 10.0324 11.8006 9.25 10.8355 9.25C9.8703 9.25 9.08789 10.0324 9.08789 10.9976C9.08789 11.9627 9.8703 12.7451 10.8355 12.7451Z" fill="#FFF0D2"/>
<path d="M10.8358 16.5911C10.6426 16.5911 10.4863 16.4346 10.4863 16.2416V10.9989C10.4863 10.9062 10.5232 10.8173 10.5887 10.7517L14.4334 6.90709C14.5699 6.77055 14.7911 6.77055 14.9276 6.90709C15.0642 7.04363 15.0642 7.26482 14.9276 7.40131L11.1854 11.1436V16.2416C11.1854 16.4347 11.029 16.5911 10.8358 16.5911Z" fill="#7A4646"/>
<path d="M10.8356 12.0463C11.4147 12.0463 11.8842 11.5769 11.8842 10.9978C11.8842 10.4187 11.4147 9.94922 10.8356 9.94922C10.2566 9.94922 9.78711 10.4187 9.78711 10.9978C9.78711 11.5769 10.2566 12.0463 10.8356 12.0463Z" fill="#AA6E4D"/>
<path d="M10.8358 4.35899C10.6426 4.35899 10.4863 4.20248 10.4863 4.00948V3.31045C10.4863 3.11745 10.6427 2.96094 10.8358 2.96094C11.0291 2.96094 11.1854 3.11745 11.1854 3.31045V4.00948C11.1854 4.20248 11.029 4.35899 10.8358 4.35899Z" fill="#DE966C"/>
<path d="M10.8358 19.0387C10.6426 19.0387 10.4863 18.8822 10.4863 18.6892V17.9901C10.4863 17.7971 10.6427 17.6406 10.8358 17.6406C11.0291 17.6406 11.1854 17.7971 11.1854 17.9901V18.6892C11.1854 18.8822 11.029 19.0387 10.8358 19.0387Z" fill="#DE966C"/>
<path d="M18.5251 11.3475H17.8261C17.6329 11.3475 17.4766 11.1909 17.4766 10.998C17.4766 10.805 17.6329 10.6484 17.8261 10.6484H18.5251C18.7183 10.6484 18.8746 10.805 18.8746 10.998C18.8746 11.1909 18.7183 11.3475 18.5251 11.3475Z" fill="#DE966C"/>
<path d="M3.84546 11.3475H3.14639C2.95318 11.3475 2.79688 11.1909 2.79688 10.998C2.79688 10.805 2.95322 10.6484 3.14639 10.6484H3.84541C4.03863 10.6484 4.19493 10.805 4.19493 10.998C4.19493 11.1909 4.03863 11.3475 3.84546 11.3475Z" fill="#DE966C"/>
<path d="M4.78099 7.85338C4.72161 7.85338 4.66151 7.83836 4.60657 7.80661L4.00108 7.4571C3.83382 7.36051 3.77651 7.14682 3.87309 6.9796C3.96968 6.81233 4.18371 6.75502 4.35059 6.85161L4.95608 7.20112C5.12335 7.29771 5.18066 7.5114 5.08407 7.67862C5.01923 7.79074 4.90178 7.85338 4.78099 7.85338Z" fill="#F7B97E"/>
<path d="M17.4939 15.1933C17.4345 15.1933 17.3744 15.1782 17.3195 15.1465L16.714 14.797C16.5467 14.7004 16.4894 14.4867 16.586 14.3195C16.6826 14.152 16.8966 14.0949 17.0635 14.1915L17.669 14.541C17.8362 14.6376 17.8935 14.8513 17.797 15.0185C17.7321 15.1306 17.6147 15.1933 17.4939 15.1933Z" fill="#F7B97E"/>
<path d="M14.3298 5.29299C14.2704 5.29299 14.2103 5.27796 14.1554 5.24622C13.9881 5.14964 13.9308 4.93594 14.0274 4.76872L14.3769 4.16323C14.4735 3.99579 14.6875 3.93866 14.8544 4.03524C15.0217 4.13182 15.079 4.34552 14.9824 4.51274L14.6329 5.11823C14.568 5.23035 14.4506 5.29299 14.3298 5.29299Z" fill="#F7B97E"/>
<path d="M6.98995 18.0077C6.93057 18.0077 6.87047 17.9927 6.81553 17.961C6.64827 17.8644 6.59096 17.6507 6.68755 17.4834L7.03706 16.878C7.13331 16.7107 7.34768 16.6536 7.51456 16.75C7.68183 16.8466 7.73913 17.0602 7.64255 17.2275L7.29304 17.833C7.2282 17.9451 7.11079 18.0077 6.98995 18.0077Z" fill="#F7B97E"/>
<path d="M16.8891 7.85337C16.7682 7.85337 16.6508 7.79073 16.586 7.67861C16.4894 7.51135 16.5467 7.2977 16.714 7.20111L17.3195 6.8516C17.486 6.75502 17.7004 6.81236 17.797 6.97959C17.8935 7.14685 17.8362 7.36051 17.669 7.45709L17.0635 7.8066C17.0085 7.83835 16.9485 7.85337 16.8891 7.85337Z" fill="#F7B97E"/>
<path d="M4.17617 15.1933C4.05533 15.1933 3.93792 15.1306 3.87308 15.0185C3.7765 14.8512 3.83385 14.6376 4.00107 14.541L4.60656 14.1915C4.77277 14.0949 4.98714 14.1521 5.08406 14.3195C5.18065 14.4867 5.1233 14.7004 4.95608 14.797L4.35059 15.1465C4.29565 15.1782 4.23555 15.1933 4.17617 15.1933Z" fill="#F7B97E"/>
<path d="M7.34013 5.29298C7.2193 5.29298 7.10189 5.23034 7.03705 5.11822L6.68754 4.51273C6.59095 4.34547 6.6483 4.13181 6.81553 4.03523C6.98207 3.93865 7.1961 3.99583 7.29303 4.16322L7.64254 4.76871C7.73912 4.93597 7.68178 5.14963 7.51455 5.24621C7.45962 5.27795 7.39956 5.29298 7.34013 5.29298Z" fill="#F7B97E"/>
<path d="M14.68 18.0077C14.5591 18.0077 14.4417 17.9451 14.3769 17.833L14.0274 17.2275C13.9308 17.0602 13.9881 16.8465 14.1554 16.75C14.3219 16.6535 14.5363 16.7107 14.6329 16.8779L14.9824 17.4834C15.079 17.6507 15.0216 17.8644 14.8544 17.9609C14.7994 17.9927 14.7394 18.0077 14.68 18.0077Z" fill="#F7B97E"/>
<path d="M10.8358 11.3475C11.0289 11.3475 11.1854 11.191 11.1854 10.998C11.1854 10.8049 11.0289 10.6484 10.8358 10.6484C10.6428 10.6484 10.4863 10.8049 10.4863 10.998C10.4863 11.191 10.6428 11.3475 10.8358 11.3475Z" fill="#7A4646"/>
<path d="M10.8356 1.56212C5.42443 1.56212 1.07697 6.11655 1.41743 11.6012C1.70913 16.3007 5.53397 20.1256 10.2335 20.4173C15.7181 20.7578 20.2726 16.4103 20.2726 10.9991C20.2726 10.2541 20.1854 9.5297 20.0217 8.83474C19.9829 8.66988 20.0623 8.5019 20.2172 8.43346C20.4105 8.34805 20.6773 8.24402 20.8922 8.16267C21.0866 8.08907 21.3059 8.19949 21.3557 8.40125C21.6326 9.52411 21.7356 10.7154 21.6299 11.9463C21.4062 14.551 20.2433 16.8986 18.4888 18.652C18.4888 18.652 14.9619 21.4157 11.4687 21.4157C4.94621 21.4157 0.410156 16.7271 0.410156 10.1916C0.410156 7.40625 3.18409 3.34816 3.18409 3.34816C5.04237 1.49153 7.56422 0.300058 10.3375 0.175287C13.4409 0.035659 16.2657 1.20796 18.3212 3.17781L18.9202 2.71389C19.1388 2.5446 19.4582 2.68418 19.4824 2.95967L19.7199 5.66482C19.7422 5.91826 19.4949 6.10982 19.2551 6.02483L16.6954 5.11791C16.4348 5.02556 16.3795 4.68142 16.5982 4.51212L17.2071 4.04055C15.5283 2.50215 13.2923 1.56212 10.8356 1.56212Z" fill="#FB5F7A"/>
<path d="M18.485 18.6485C18.2212 18.3848 17.7996 18.3723 17.5193 18.6183C15.5456 20.3511 12.893 21.3292 10.0123 21.102C5.09917 20.7145 1.11879 16.7339 0.731479 11.8208C0.50441 8.94025 1.48256 6.28788 3.21519 4.3143C3.46126 4.03403 3.44709 3.61138 3.18336 3.34766C1.37642 5.15274 0.197009 7.58634 0.0232257 10.2799C-0.397562 16.8019 4.95607 22.1858 11.468 21.8155C14.1882 21.6609 16.6595 20.4788 18.4881 18.6515L18.485 18.6485Z" fill="#F74455"/>
</svg>

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -0,0 +1,23 @@
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_8194_10077)">
<path d="M17.6 18.673C17.3521 18.4251 17.3521 18.0231 17.6 17.7752C19.4054 15.9698 20.3996 13.5678 20.3996 11.0115C20.3996 8.45525 19.4054 6.05318 17.6 4.24784C17.3521 3.99994 17.3521 3.59795 17.6 3.35001C17.8479 3.10208 18.2499 3.10208 18.4978 3.35001C20.543 5.39516 21.6694 8.11606 21.6694 11.0115C21.6694 13.9069 20.543 16.6278 18.4978 18.673C18.2503 18.9205 17.8484 18.9213 17.6 18.673Z" fill="#7AFFE4"/>
<path d="M15.6781 16.7502C15.4302 16.5023 15.4302 16.1003 15.6781 15.8524C16.9704 14.5602 17.6821 12.8408 17.6821 11.011C17.6821 9.18128 16.9705 7.46194 15.6781 6.1697C15.4302 5.92176 15.4302 5.51981 15.6781 5.27187C15.926 5.02398 16.328 5.02394 16.576 5.27187C18.1081 6.80393 18.9519 8.84213 18.9519 11.0111C18.9519 13.18 18.1081 15.2182 16.576 16.7503C16.3279 16.9982 15.926 16.9981 15.6781 16.7502Z" fill="#00DDC1"/>
<path d="M13.7543 14.8285C13.5064 14.5805 13.5064 14.1785 13.7543 13.9306C14.5331 13.152 14.9619 12.1158 14.9619 11.0131C14.9619 9.91034 14.5331 8.87416 13.7543 8.09548C13.5064 7.84758 13.5064 7.44559 13.7543 7.19765C14.0022 6.94976 14.4042 6.94972 14.6521 7.19765C15.6707 8.21619 16.2317 9.5712 16.2317 11.0131C16.2317 12.455 15.6707 13.81 14.6521 14.8285C14.4042 15.0764 14.0022 15.0763 13.7543 14.8285Z" fill="#7AFFE4"/>
<path d="M17.6 18.6732C17.8484 18.9216 18.2503 18.9207 18.4978 18.6732C20.543 16.6281 21.6694 13.9072 21.6694 11.0117H20.3996C20.3996 13.568 19.4054 15.97 17.6 17.7754C17.3521 18.0233 17.3521 18.4253 17.6 18.6732Z" fill="#00DDC1"/>
<path d="M15.6781 16.7509C15.926 16.9988 16.3279 16.9989 16.5759 16.7509C18.1081 15.2189 18.9518 13.1807 18.9518 11.0117H17.6821C17.6821 12.8415 16.9704 14.5608 15.6781 15.8531C15.4302 16.101 15.4302 16.503 15.6781 16.7509Z" fill="#00B4BC"/>
<path d="M13.7543 14.8272C14.0022 15.0751 14.4041 15.0751 14.6521 14.8272C15.6707 13.8086 16.2316 12.4536 16.2316 11.0117H14.9619C14.9619 12.1144 14.533 13.1506 13.7543 13.9293C13.5064 14.1772 13.5064 14.5792 13.7543 14.8272Z" fill="#00DDC1"/>
<path d="M3.17152 18.673C1.12633 16.6278 0 13.9069 0 11.0115C0 8.11604 1.12633 5.39515 3.17152 3.35C3.41946 3.10206 3.82141 3.10211 4.06935 3.35C4.31728 3.59793 4.31728 3.99989 4.06935 4.24782C2.26396 6.05316 1.26973 8.45523 1.26973 11.0115C1.26973 13.5677 2.26396 15.9698 4.06935 17.7751C4.31728 18.023 4.31728 18.425 4.06935 18.673C3.82141 18.921 3.41937 18.9209 3.17152 18.673Z" fill="#7AFFE4"/>
<path d="M5.09462 16.7503C3.56253 15.2182 2.71875 13.18 2.71875 11.0111C2.71875 8.84212 3.56253 6.80391 5.09466 5.27186C5.3426 5.02396 5.74459 5.02396 5.99249 5.27186C6.24038 5.51979 6.24038 5.92175 5.99249 6.16968C4.70016 7.46197 3.98848 9.1813 3.98848 11.0111C3.98848 12.8408 4.70016 14.5602 5.99249 15.8524C6.24042 16.1003 6.24042 16.5023 5.99249 16.7502C5.74489 16.9978 5.34294 16.9985 5.09462 16.7503Z" fill="#00DDC1"/>
<path d="M7.01704 14.8285C5.99847 13.81 5.4375 12.455 5.4375 11.0131C5.4375 9.5712 5.99847 8.21619 7.01704 7.19765C7.26498 6.94972 7.66697 6.94976 7.91486 7.19765C8.1628 7.44559 8.16276 7.84758 7.91486 8.09548C7.1361 8.87416 6.70723 9.91034 6.70723 11.0131C6.70723 12.1158 7.1361 13.152 7.91486 13.9306C8.1628 14.1785 8.1628 14.5805 7.91486 14.8285C7.66727 15.0761 7.26531 15.0768 7.01704 14.8285Z" fill="#7AFFE4"/>
<path d="M4.06935 18.6732C4.31728 18.4253 4.31728 18.0233 4.06935 17.7754C2.26396 15.97 1.26973 13.568 1.26973 11.0117H0C0 13.9072 1.12633 16.6281 3.17152 18.6732C3.41937 18.9211 3.82141 18.9212 4.06935 18.6732Z" fill="#00DDC1"/>
<path d="M5.99249 16.7509C6.24038 16.5029 6.24038 16.101 5.99249 15.8531C4.70016 14.5609 3.98848 12.8415 3.98848 11.0117H2.71875C2.71875 13.1807 3.56253 15.2189 5.09466 16.7509C5.34294 16.9992 5.74489 16.9985 5.99249 16.7509Z" fill="#00B4BC"/>
<path d="M7.91486 14.8271C8.1628 14.5792 8.16276 14.1772 7.91486 13.9293C7.1361 13.1506 6.70723 12.1144 6.70723 11.0117H5.4375C5.4375 12.4536 5.99846 13.8086 7.01704 14.8272C7.26527 15.0754 7.66722 15.0747 7.91486 14.8271Z" fill="#00DDC1"/>
<path d="M10.835 13.6857C12.3123 13.6857 13.5099 12.4881 13.5099 11.0108C13.5099 9.53353 12.3123 8.33594 10.835 8.33594C9.35775 8.33594 8.16016 9.53353 8.16016 11.0108C8.16016 12.4881 9.35775 13.6857 10.835 13.6857Z" fill="#00DDC1"/>
<path d="M10.835 13.6866C12.31 13.6866 13.5099 12.4866 13.5099 11.0117H8.16016C8.16016 12.4867 9.36009 13.6866 10.835 13.6866Z" fill="#00B4BC"/>
</g>
<defs>
<clipPath id="clip0_8194_10077">
<rect width="21.67" height="21.67" fill="white" transform="translate(0 0.164062)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -178,7 +178,9 @@ class DeviceManagerBloc extends Bloc<DeviceManagerEvent, DeviceManagerState> {
DeviceType.CeilingSensor,
DeviceType.ThreeGang,
DeviceType.OneGang,
DeviceType.TwoGang
DeviceType.TwoGang,
DeviceType.WH,
DeviceType.FlushMountedSensor,
};
return devices

View File

@ -0,0 +1,178 @@
import 'dart:async';
import 'dart:developer';
import 'package:firebase_database/firebase_database.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:syncrow_app/features/devices/bloc/flush_sensor_bloc/flush_sensor_event.dart';
import 'package:syncrow_app/features/devices/bloc/flush_sensor_bloc/flush_sensor_state.dart';
import 'package:syncrow_app/features/devices/model/device_control_model.dart';
import 'package:syncrow_app/features/devices/model/device_info_model.dart';
import 'package:syncrow_app/features/devices/model/device_model.dart';
import 'package:syncrow_app/features/devices/model/flush_sensor_model.dart';
import 'package:syncrow_app/features/devices/model/status_model.dart';
import 'package:syncrow_app/services/api/devices_api.dart';
class FlushSensorBloc extends Bloc<FlushSensorEvent, FlushSensorState> {
final String deviceId;
late DeviceModel deviceModel;
late FlushSensorModel deviceStatus;
FlushSensorBloc({required this.deviceId}) : super(FlushSensorInitialState()) {
on<FlushSensorInitialEvent>(_fetchFlushSensorStatus);
on<FlushSensorChangeIndicatorEvent>(_changeIndicator);
on<FlushSensorChangeValueEvent>(_changeValue);
on<FlushSensorUpdatedEvent>(_flushSensorUpdated);
on<FlushSensorGetDeviceReportsEvent>(_getDeviceReports);
on<FlushSensorInitialDeviseInfo>(fetchDeviceInfo);
}
void _fetchFlushSensorStatus(
FlushSensorInitialEvent event, Emitter<FlushSensorState> emit) async {
emit(FlushSensorLoadingInitialState());
try {
var response = await DevicesAPI.getDeviceStatus(deviceId);
List<StatusModel> statusModelList = [];
for (var status in response['status']) {
statusModelList.add(StatusModel.fromJson(status));
}
deviceStatus = FlushSensorModel.fromJson(statusModelList);
emit(FlushSensorUpdateState(flushSensorModel: deviceStatus));
_listenToChanges();
} catch (e) {
emit(FlushSensorFailedState(error: e.toString()));
return;
}
}
StreamSubscription<DatabaseEvent>? _streamSubscription;
void _listenToChanges() {
try {
_streamSubscription?.cancel();
DatabaseReference ref =
FirebaseDatabase.instance.ref('device-status/$deviceId');
Stream<DatabaseEvent> stream = ref.onValue;
_streamSubscription = stream.listen((DatabaseEvent event) async {
Map<dynamic, dynamic> usersMap =
event.snapshot.value as Map<dynamic, dynamic>;
List<StatusModel> statusList = [];
usersMap['status'].forEach((element) {
statusList
.add(StatusModel(code: element['code'], value: element['value']));
});
deviceStatus = FlushSensorModel.fromJson(statusList);
if (!isClosed) {
add(FlushSensorUpdatedEvent());
}
});
} catch (_) {
log(
'Error listening to changes',
name: 'FlushMountedPresenceSensorBloc._listenToChanges',
);
}
}
@override
Future<void> close() async {
_streamSubscription?.cancel();
_streamSubscription = null;
return super.close();
}
_flushSensorUpdated(
FlushSensorUpdatedEvent event, Emitter<FlushSensorState> emit) {
emit(FlushSensorUpdateState(flushSensorModel: deviceStatus));
}
void _changeIndicator(FlushSensorChangeIndicatorEvent event,
Emitter<FlushSensorState> emit) async {
emit(FlushSensorLoadingNewSate(flushSensorModel: deviceStatus));
try {
final response = await DevicesAPI.controlDevice(
DeviceControlModel(
deviceId: deviceId, code: 'indicator', value: !event.value),
deviceId);
} catch (e) {
emit(FlushSensorFailedState(error: e.toString()));
return;
}
emit(FlushSensorUpdateState(flushSensorModel: deviceStatus));
}
void _changeValue(
FlushSensorChangeValueEvent event, Emitter<FlushSensorState> emit) async {
emit(FlushSensorLoadingNewSate(flushSensorModel: deviceStatus));
try {
final response = await DevicesAPI.controlDevice(
DeviceControlModel(
deviceId: deviceId, code: event.code, value: event.value),
deviceId);
} catch (e) {
emit(FlushSensorFailedState(error: e.toString()));
return;
}
emit(FlushSensorUpdateState(flushSensorModel: deviceStatus));
}
void _getDeviceReports(FlushSensorGetDeviceReportsEvent event,
Emitter<FlushSensorState> emit) async {
emit(FlushSensorLoadingInitialState());
try {
await DevicesAPI.getReports(deviceId, event.code).then((value) {
emit(FlushSensorDeviceReportsState(
deviceReport: value, code: event.code));
});
} catch (e) {
emit(FlushSensorFailedState(error: e.toString()));
return;
}
}
DeviceInfoModel deviceInfo = DeviceInfoModel(
activeTime: 0,
category: "",
categoryName: "",
createTime: 0,
gatewayId: "",
icon: "",
ip: "",
lat: "",
localKey: "",
lon: "",
model: "",
name: "",
nodeId: "",
online: false,
ownerId: "",
productName: "",
sub: false,
timeZone: "",
updateTime: 0,
uuid: "",
productUuid: "",
productType: "",
permissionType: "",
macAddress: "",
subspace: Subspace(
uuid: "",
createdAt: "",
updatedAt: "",
subspaceName: "",
),
);
static String deviceName = '';
void fetchDeviceInfo(FlushSensorInitialDeviseInfo event,
Emitter<FlushSensorState> emit) async {
try {
emit(FlushSensorLoadingInitialState());
var response = await DevicesAPI.getDeviceInfo(deviceId);
deviceInfo = DeviceInfoModel.fromJson(response);
deviceName = deviceInfo.name;
emit(FlushSensorLoadingDeviceInfo(deviceInfo: deviceInfo));
} catch (e) {
emit(FlushSensorFailedState(error: e.toString()));
}
}
}

View File

@ -0,0 +1,45 @@
import 'package:equatable/equatable.dart';
abstract class FlushSensorEvent extends Equatable {
const FlushSensorEvent();
@override
List<Object> get props => [];
}
class FlushSensorLoadingEvent extends FlushSensorEvent {}
class FlushSensorInitialEvent extends FlushSensorEvent {}
class FlushSensorInitialDeviseInfo extends FlushSensorEvent {}
class FlushSensorUpdatedEvent extends FlushSensorEvent {}
class FlushSensorChangeIndicatorEvent extends FlushSensorEvent {
final bool value;
const FlushSensorChangeIndicatorEvent({required this.value});
@override
List<Object> get props => [value];
}
class FlushSensorChangeValueEvent extends FlushSensorEvent {
final dynamic value;
final String code;
const FlushSensorChangeValueEvent({required this.value, required this.code});
@override
List<Object> get props => [value, code];
}
class FlushSensorGetDeviceReportsEvent extends FlushSensorEvent {
final String deviceUuid;
final String code;
const FlushSensorGetDeviceReportsEvent({
required this.deviceUuid,
required this.code,
});
@override
List<Object> get props => [deviceUuid, code];
}

View File

@ -0,0 +1,52 @@
import 'package:equatable/equatable.dart';
import 'package:syncrow_app/features/devices/model/device_info_model.dart';
import 'package:syncrow_app/features/devices/model/device_report_model.dart';
import 'package:syncrow_app/features/devices/model/flush_sensor_model.dart';
class FlushSensorState extends Equatable {
const FlushSensorState();
@override
List<Object> get props => [];
}
class FlushSensorInitialState extends FlushSensorState {}
class FlushSensorLoadingInitialState extends FlushSensorState {}
class FlushSensorUpdateState extends FlushSensorState {
final FlushSensorModel flushSensorModel;
const FlushSensorUpdateState({required this.flushSensorModel});
@override
List<Object> get props => [flushSensorModel];
}
class FlushSensorLoadingNewSate extends FlushSensorState {
final FlushSensorModel flushSensorModel;
const FlushSensorLoadingNewSate({required this.flushSensorModel});
@override
List<Object> get props => [flushSensorModel];
}
class FlushSensorFailedState extends FlushSensorState {
final String error;
const FlushSensorFailedState({required this.error});
@override
List<Object> get props => [error];
}
class FlushSensorDeviceReportsState extends FlushSensorState {
final DeviceReport deviceReport;
final String code;
const FlushSensorDeviceReportsState(
{required this.deviceReport, required this.code});
}
class FlushSensorLoadingDeviceInfo extends FlushSensorState {
final DeviceInfoModel? deviceInfo;
const FlushSensorLoadingDeviceInfo({this.deviceInfo});
}

View File

@ -77,7 +77,7 @@ class DeviceInfoModel {
uuid: json['uuid'],
productUuid: json['productUuid'],
productType: json['productType'],
permissionType: json['permissionType'],
permissionType: json['permissionType'] ?? '',
macAddress: json['macAddress'],
subspace: Subspace.fromJson(json['subspace']),
);

View File

@ -92,6 +92,8 @@ class DeviceModel {
tempIcon = Assets.sixSceneHomeIcon;
} else if (type == DeviceType.SOS) {
tempIcon = Assets.sosHomeIcon;
} else if (type == DeviceType.FlushMountedSensor) {
tempIcon = Assets.flushIcon;
} else {
tempIcon = Assets.assetsIconsLogo;
}

View File

@ -0,0 +1,100 @@
import 'package:syncrow_app/features/devices/model/status_model.dart';
class FlushSensorModel {
FlushSensorModel({
required this.presenceState,
required this.farDetection,
required this.illuminance,
required this.sensitivity,
required this.occurDistReduce,
required this.noneDelay,
required this.presenceDelay,
required this.nearDetection,
required this.sensiReduce,
required this.checkingResult,
});
static const String codePresenceState = 'presence_state';
static const String codeSensitivity = 'sensitivity';
static const String codeNearDetection = 'near_detection';
static const String codeFarDetection = 'far_detection';
static const String codeCheckingResult = 'checking_result';
static const String codePresenceDelay = 'presence_delay';
static const String codeNoneDelay = 'none_delay';
static const String codeOccurDistReduce = 'occur_dist_reduce';
static const String codeIlluminance = 'illum_value';
static const String codeSensiReduce = 'sensi_reduce';
String presenceState;
int sensitivity;
int nearDetection;
int farDetection;
String checkingResult;
int presenceDelay;
int noneDelay;
int occurDistReduce;
int illuminance;
int sensiReduce;
factory FlushSensorModel.fromJson(List<StatusModel> jsonList) {
String presenceState = 'none';
int sensitivity = 0;
int nearDetection = 0;
int farDetection = 0;
String checkingResult = 'none';
int presenceDelay = 0;
int noneDelay = 0;
int occurDistReduce = 0;
int illuminance = 0;
int sensiReduce = 0;
for (var status in jsonList) {
switch (status.code) {
case codePresenceState:
presenceState = status.value ?? 'presence';
break;
case codeSensitivity:
sensitivity = status.value ?? 0;
break;
case codeNearDetection:
nearDetection = status.value ?? 0;
break;
case codeFarDetection:
farDetection = status.value ?? 0;
break;
case codeCheckingResult:
checkingResult = status.value ?? 'check_success';
break;
case codePresenceDelay:
presenceDelay = status.value ?? 0;
break;
case codeNoneDelay:
noneDelay = status.value ?? 0;
break;
case codeOccurDistReduce:
occurDistReduce = status.value ?? 0;
break;
case codeIlluminance:
illuminance = status.value ?? 0;
break;
case codeSensiReduce:
sensiReduce = status.value ?? 0;
break;
}
}
return FlushSensorModel(
presenceState: presenceState,
sensitivity: sensitivity,
nearDetection: nearDetection,
farDetection: farDetection,
checkingResult: checkingResult,
presenceDelay: presenceDelay,
noneDelay: noneDelay,
occurDistReduce: occurDistReduce,
illuminance: illuminance,
sensiReduce: sensiReduce,
);
}
}

View File

@ -49,44 +49,7 @@ class SettingProfilePage extends StatelessWidget {
},
child: ListView(
children: [
CircleAvatar(
radius: device!.type != "SOS" ? 60 : 52,
backgroundColor: Colors.white,
child: device!.type == "SOS"
? ClipOval(
child: SvgPicture.asset(
Assets.sosHomeIcon,
fit: BoxFit.fitHeight,
height:
MediaQuery.of(context).size.height * 0.13,
))
: CircleAvatar(
radius: 55,
backgroundColor: ColorsManager.graysColor,
child: ClipOval(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Center(
child: SvgPicture.asset(
device!.type == "4S"
? Assets.fourSceneIcon
: Assets.sixSceneIcon,
fit: BoxFit.contain,
height: MediaQuery.of(context)
.size
.height *
0.08,
),
),
],
),
),
),
),
buildDeviceAvatar(context, device!),
const SizedBox(
height: 10,
),
@ -198,4 +161,45 @@ class SettingProfilePage extends StatelessWidget {
),
);
}
Widget buildDeviceAvatar(BuildContext context, DeviceModel device) {
final isSOSDevice = device.type == "SOS";
final assetIcon = isSOSDevice
? Assets.sosHomeIcon
: device.type == 'NCPS'
? Assets.flushIcon
: device.type == '4S'
? Assets.fourSceneIcon
: Assets.sixSceneIcon;
final avatarRadius = isSOSDevice ? 52.0 : 60.0;
final innerAvatarRadius = 55.0;
final assetHeightFactor = isSOSDevice ? 0.13 : 0.08;
return CircleAvatar(
radius: avatarRadius,
backgroundColor: Colors.white,
child: ClipOval(
child: isSOSDevice
? SvgPicture.asset(
assetIcon,
fit: BoxFit.fitHeight,
height: MediaQuery.of(context).size.height * assetHeightFactor,
)
: CircleAvatar(
radius: innerAvatarRadius,
backgroundColor: ColorsManager.graysColor,
child: Center(
child: SvgPicture.asset(
assetIcon,
fit: BoxFit.contain,
height:
MediaQuery.of(context).size.height * assetHeightFactor,
),
),
),
),
);
}
}

View File

@ -130,6 +130,15 @@ class SettingsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
device!.type == 'NCPS'
? SizedBox(
height: 80,
width: 50,
child: SvgPicture.asset(
Assets.flushIcon,
fit: BoxFit.contain,
),
):
device!.type == "SOS"
? ClipOval(
child: SvgPicture.asset(

View File

@ -0,0 +1,135 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:intl/intl.dart';
import 'package:syncrow_app/features/devices/bloc/flush_sensor_bloc/flush_sensor_bloc.dart';
import 'package:syncrow_app/features/devices/bloc/flush_sensor_bloc/flush_sensor_event.dart';
import 'package:syncrow_app/features/devices/bloc/flush_sensor_bloc/flush_sensor_state.dart';
import 'package:syncrow_app/features/devices/model/device_report_model.dart';
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
class FlushPresenceRecords extends StatelessWidget {
final String deviceId;
final String code;
final String title;
const FlushPresenceRecords(
{super.key,
required this.deviceId,
required this.code,
required this.title});
@override
Widget build(BuildContext context) {
return DefaultScaffold(
title: 'Presence Record',
child: BlocProvider(
create: (context) => FlushSensorBloc(deviceId: deviceId)
..add(FlushSensorGetDeviceReportsEvent(
deviceUuid: deviceId, code: code)),
child: BlocBuilder<FlushSensorBloc, FlushSensorState>(
builder: (context, state) {
final Map<String, List<DeviceEvent>> groupedRecords = {};
if (state is FlushSensorLoadingInitialState) {
return const Center(
child: DefaultContainer(
width: 50, height: 50, child: CircularProgressIndicator()),
);
} else if (state is FlushSensorDeviceReportsState) {
for (var record in state.deviceReport.data ?? []) {
final DateTime eventDateTime =
DateTime.fromMillisecondsSinceEpoch(record.eventTime!);
final String formattedDate =
DateFormat('EEEE, dd/MM/yyyy').format(eventDateTime);
// Group by formatted date
if (groupedRecords.containsKey(formattedDate)) {
groupedRecords[formattedDate]!.add(record);
} else {
groupedRecords[formattedDate] = [record];
}
}
}
return groupedRecords.isEmpty
? const Center(
child: Text('No records found'),
)
: ListView.builder(
itemCount: groupedRecords.length,
itemBuilder: (context, index) {
final String date = groupedRecords.keys.elementAt(index);
final List<DeviceEvent> recordsForDate =
groupedRecords[date]!;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(bottom: 5, top: 10),
child: Text(
date,
style: const TextStyle(
color: ColorsManager.grayColor,
fontSize: 13,
fontWeight: FontWeight.w700,
),
),
),
DefaultContainer(
child: Column(
children: [
...recordsForDate.asMap().entries.map((entry) {
final int idx = entry.key;
final DeviceEvent record = entry.value;
final DateTime eventDateTime =
DateTime.fromMillisecondsSinceEpoch(
record.eventTime!);
final String formattedTime =
DateFormat('HH:mm:ss')
.format(eventDateTime);
return Column(
children: [
SizedBox(
child: ListTile(
leading: Icon(
record.value == 'true'
? Icons.radio_button_checked
: Icons.radio_button_unchecked,
color: record.value == 'true'
? Colors.blue
: Colors.grey,
),
title: Text(
record.value == 'true'
? "Opened"
: "Closed",
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
subtitle: Text('$formattedTime'),
),
),
if (idx != recordsForDate.length - 1)
const Divider(
color: ColorsManager.graysColor,
),
],
);
}).toList(),
],
),
),
],
);
},
);
}),
),
);
}
}

View File

@ -0,0 +1,127 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:syncrow_app/features/devices/bloc/flush_sensor_bloc/flush_sensor_bloc.dart';
import 'package:syncrow_app/features/devices/bloc/flush_sensor_bloc/flush_sensor_event.dart';
import 'package:syncrow_app/features/devices/bloc/flush_sensor_bloc/flush_sensor_state.dart';
import 'package:syncrow_app/features/devices/model/device_model.dart';
import 'package:syncrow_app/features/devices/model/flush_sensor_model.dart';
import 'package:syncrow_app/features/devices/view/device_settings/settings_page.dart';
import 'package:syncrow_app/features/devices/view/widgets/device_appbar.dart';
import 'package:syncrow_app/features/devices/view/widgets/flush_sensor/flush_persence_records.dart';
import 'package:syncrow_app/features/devices/view/widgets/flush_sensor/flush_sensor_option.dart';
import 'package:syncrow_app/features/shared_widgets/default_scaffold.dart';
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_medium.dart';
import 'package:syncrow_app/features/shared_widgets/text_widgets/title_medium.dart';
import 'package:syncrow_app/generated/assets.dart';
import 'package:syncrow_app/utils/context_extension.dart';
import 'package:syncrow_app/utils/helpers/misc_string_helpers.dart';
import 'package:syncrow_app/utils/helpers/snack_bar.dart';
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
import 'package:syncrow_app/utils/resource_manager/constants.dart';
import 'package:syncrow_app/utils/resource_manager/font_manager.dart';
part "presence_indicator.dart";
part "flush_sensor_options_list.dart";
part 'flush_sensor_parameter_control_dialog.dart';
class FlushMountedInterface extends StatelessWidget {
const FlushMountedInterface({super.key, required this.deviceModel});
final DeviceModel deviceModel;
@override
Widget build(BuildContext context) {
return BlocProvider(
create: (context) => FlushSensorBloc(deviceId: deviceModel.uuid ?? '')
..add(FlushSensorInitialEvent()),
child: BlocBuilder<FlushSensorBloc, FlushSensorState>(
builder: (context, state) {
final bloc = BlocProvider.of<FlushSensorBloc>(context);
FlushSensorModel flushSensorModel = FlushSensorModel(
presenceState: 'none',
farDetection: 0,
illuminance: 0,
checkingResult: '',
nearDetection: 0,
noneDelay: 0,
occurDistReduce: 0,
presenceDelay: 0,
sensiReduce: 0,
sensitivity: 0);
if (state is FlushSensorUpdateState) {
flushSensorModel = state.flushSensorModel;
} else if (state is FlushSensorLoadingNewSate) {
flushSensorModel = state.flushSensorModel;
}
return AnnotatedRegion(
value: SystemUiOverlayStyle(
statusBarColor: ColorsManager.primaryColor.withOpacity(0.5),
statusBarIconBrightness: Brightness.light,
),
child: DefaultScaffold(
title: FlushSensorBloc.deviceName,
actions: [
InkWell(
onTap: () async {
var val = await Navigator.of(context).push(
MaterialPageRoute(
builder: (context) =>
SettingsPage(device: deviceModel),
),
);
if (val == null) {
bloc.add(FlushSensorInitialDeviseInfo());
bloc.add(FlushSensorInitialEvent());
}
},
child: SvgPicture.asset(Assets.assetsIconsSettings),
),
const SizedBox(width: 10),
],
child: Container(
width: MediaQuery.sizeOf(context).width,
height: MediaQuery.sizeOf(context).height,
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage(
Assets.assetsImagesBackground,
),
fit: BoxFit.cover,
opacity: 0.4,
),
),
child: state is FlushSensorLoadingInitialState
? const Center(
child: RefreshProgressIndicator(),
)
: SafeArea(
child: RefreshIndicator(
onRefresh: () async {
bloc.add(FlushSensorInitialEvent());
},
child: ListView(children: [
SizedBox(
height: MediaQuery.of(context).size.height,
child: Column(children: [
PresenceIndicator(
state: flushSensorModel.presenceState,
),
Expanded(
flex: 2,
child: FlushSensorOptionsList(
bloc: bloc,
flushSensorModel: flushSensorModel,
deviceModel: deviceModel,
),
)
]),
),
]),
),
))));
}),
);
}
}

View File

@ -0,0 +1,47 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
class FlushSensorOption extends StatelessWidget {
final String icon;
final String label;
final VoidCallback onTap;
final String? sliderValue;
final bool withArrow;
const FlushSensorOption({
super.key,
required this.icon,
required this.label,
required this.onTap,
required this.withArrow,
this.sliderValue = '',
});
@override
Widget build(BuildContext context) {
return DefaultContainer(
margin: const EdgeInsets.only(bottom: 5),
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 20),
onTap: onTap,
child: Row(
children: [
SvgPicture.asset(icon),
const SizedBox(width: 25),
Expanded(
child:
Text(label, style: Theme.of(context).textTheme.bodyMedium)),
Text(sliderValue!,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: ColorsManager.grayTextColor,
fontWeight: FontWeight.bold)),
withArrow == true
? const Icon(Icons.arrow_forward_ios,
color: ColorsManager.grayTextColor, size: 15)
: SizedBox(),
],
),
);
}
}

View File

@ -0,0 +1,193 @@
part of "flush_sensor_interface.dart";
class FlushSensorOptionsList extends StatelessWidget {
final FlushSensorModel flushSensorModel;
final DeviceModel deviceModel;
final FlushSensorBloc bloc;
const FlushSensorOptionsList(
{super.key,
required this.flushSensorModel,
required this.bloc,
required this.deviceModel});
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
FlushSensorOption(
withArrow: false,
sliderValue: '${flushSensorModel.illuminance.toString()} Lux',
icon: Assets.assetsIconsPresenceSensorAssetsIlluminanceValue,
label: 'Illuminance Value',
onTap: () {},
),
FlushSensorOption(
withArrow: false,
icon: Assets.assetsIconsPresenceSensorAssetsIlluminanceRecord,
label: 'Presence Record',
onTap: () {
Navigator.of(context).push(MaterialPageRoute(
builder: (_) => FlushPresenceRecords(
deviceId: deviceModel.uuid!,
code: FlushSensorModel.codePresenceState,
title: 'Illuminance Record'),
));
}),
Padding(
padding: const EdgeInsets.symmetric(vertical: 12),
child: Text(
'Configuration',
style: Theme.of(context)
.textTheme
.bodyMedium
?.copyWith(fontWeight: FontWeight.bold),
),
),
FlushSensorOption(
withArrow: true,
sliderValue: flushSensorModel.sensitivity.toString(),
icon: Assets.assetsSensitivityFunction,
label: 'Sensitivity',
onTap: () => _showParameterDialog(
min: 0,
max: 9,
value: flushSensorModel.sensitivity.toDouble(),
context: context,
title: 'Sensitivity',
controlCode: FlushSensorModel.codeSensitivity,
step: 1.0,
),
),
FlushSensorOption(
withArrow: true,
sliderValue: "${flushSensorModel.nearDetection / 100} m",
icon: Assets.detectionDistanceIcon,
label: 'Min Detection Distance',
onTap: () => _showParameterDialog(
min: 0.0,
max: 9.5,
value: flushSensorModel.nearDetection.toDouble() / 100,
context: context,
title: 'Min Detection Distance',
controlCode: FlushSensorModel.codeNearDetection,
step: 0.1,
description: 'm',
),
),
FlushSensorOption(
withArrow: true,
sliderValue: '${flushSensorModel.farDetection / 100} m',
icon: Assets.detectionDistanceIcon,
label: 'Max Detection Distance',
onTap: () => _showParameterDialog(
description: 'm',
min: 0.0,
max: 9.5,
value: flushSensorModel.farDetection / 100,
context: context,
title: 'Max Detection Distance',
controlCode: FlushSensorModel.codeFarDetection,
step: 0.1),
),
FlushSensorOption(
sliderValue: flushSensorModel.sensiReduce.toString(),
withArrow: true,
icon: Assets.triggerLevelIcon,
label: 'Trigger Level',
onTap: () => _showParameterDialog(
min: 0,
max: 3,
value: flushSensorModel.sensiReduce.toDouble(),
context: context,
title: 'Trigger Level',
controlCode: FlushSensorModel.codeSensiReduce,
step: 1),
),
FlushSensorOption(
sliderValue: flushSensorModel.occurDistReduce.toString(),
withArrow: true,
icon: Assets.indentLevelIcon,
label: 'Indent Level',
onTap: () => _showParameterDialog(
min: 0,
max: 3,
value: flushSensorModel.occurDistReduce.toDouble(),
context: context,
title: 'Indent Level',
controlCode: FlushSensorModel.codeOccurDistReduce,
step: 1),
),
FlushSensorOption(
sliderValue: '${flushSensorModel.presenceDelay / 10}',
withArrow: true,
icon: Assets.targetConfirmTimeIcon,
label: 'Target Confirm Time',
onTap: () => _showParameterDialog(
min: 0.0,
max: 0.5,
value: flushSensorModel.presenceDelay.toDouble() / 10,
context: context,
title: 'Target Confirm Time',
controlCode: FlushSensorModel.codePresenceDelay,
step: 0.1),
),
FlushSensorOption(
sliderValue: '${flushSensorModel.noneDelay.toDouble() / 10}',
withArrow: true,
icon: Assets.disappeDelayIcon,
label: 'Disappe Delay',
onTap: () => _showParameterDialog(
min: 20,
max: 300,
value: flushSensorModel.noneDelay.toDouble() / 10,
context: context,
title: 'Disappe Delay',
controlCode: FlushSensorModel.codeNoneDelay,
step: 1),
),
],
);
}
void _showParameterDialog({
required double step,
required BuildContext context,
required String title,
required String controlCode,
required double min,
required double max,
required double value,
String? description = '',
}) async {
var result = await showDialog(
context: context,
builder: (context) {
return FlushParameterControlDialog(
title: title,
sensor: deviceModel,
value: value,
min: min,
max: max,
step: step,
description: description);
},
);
if (result != null) {
if (controlCode == FlushSensorModel.codeNearDetection ||
controlCode == FlushSensorModel.codeFarDetection) {
result = (result * 100).toInt();
}
if (controlCode == FlushSensorModel.codeNoneDelay) {
result = (result * 10).toInt();
}
if (controlCode == FlushSensorModel.codePresenceDelay) {
result = (result * 10).toInt();
}
bloc.add(
FlushSensorChangeValueEvent(value: result, code: controlCode),
);
}
}
}

View File

@ -0,0 +1,177 @@
part of 'flush_sensor_interface.dart';
class FlushParameterControlDialog extends StatefulWidget {
final String title;
final String? description;
final DeviceModel sensor;
final double value;
final double min;
final double max;
final double step;
const FlushParameterControlDialog({
super.key,
required this.title,
required this.sensor,
required this.value,
required this.min,
required this.max,
required this.step,
this.description = '',
});
@override
FlushParameterControlDialogState createState() =>
FlushParameterControlDialogState();
}
class FlushParameterControlDialogState
extends State<FlushParameterControlDialog> {
late double _value;
@override
void initState() {
super.initState();
_value = widget.value;
}
@override
Widget build(BuildContext context) {
final divisions = ((widget.max - widget.min) / widget.step).toInt();
final decimalPlaces = widget.step % 1 == 0 ? 0 : 1;
return Dialog(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
),
padding: const EdgeInsets.only(top: 20),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
BodyMedium(
text: widget.title,
style: context.bodyMedium.copyWith(
color: ColorsManager.primaryColorWithOpacity,
fontWeight: FontsManager.extraBold,
),
),
Padding(
padding: const EdgeInsets.symmetric(
vertical: 15,
horizontal: 50,
),
child: Container(
height: 1,
width: double.infinity,
color: ColorsManager.greyColor,
),
),
Padding(
padding: const EdgeInsets.symmetric(
vertical: 10,
),
child: TitleMedium(
text:
"${_value.toStringAsFixed(decimalPlaces)} ${widget.description}",
style: context.titleMedium.copyWith(
color: Colors.black,
fontWeight: FontsManager.bold,
),
),
),
SizedBox(
width: MediaQuery.sizeOf(context).width,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
IconButton(
onPressed: () {
setState(() {
_value = (_value - widget.step)
.clamp(widget.min, widget.max);
_value =
double.parse(_value.toStringAsFixed(decimalPlaces));
});
},
icon: const Icon(Icons.remove, color: Colors.grey),
),
Flexible(
child: Slider(
value: _value,
onChanged: (value) {
final newValue =
(value / widget.step).round() * widget.step;
setState(() {
_value = newValue.clamp(widget.min, widget.max);
});
},
min: widget.min,
max: widget.max,
divisions: divisions,
label: _value.toStringAsFixed(decimalPlaces),
),
),
IconButton(
onPressed: () {
setState(() {
_value = (_value + widget.step)
.clamp(widget.min, widget.max);
_value =
double.parse(_value.toStringAsFixed(decimalPlaces));
});
},
icon: const Icon(Icons.add, color: Colors.grey),
),
],
),
),
Container(
height: 1,
width: double.infinity,
color: ColorsManager.greyColor,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
InkWell(
onTap: () {
Navigator.pop(context);
},
child: Center(
child: BodyMedium(
text: 'Cancel',
style: context.bodyMedium
.copyWith(color: ColorsManager.greyColor),
),
),
),
Container(
height: 50,
width: 1,
color: ColorsManager.greyColor,
),
InkWell(
onTap: () {
if (widget.sensor.isOnline == null || !widget.sensor.isOnline!) {
CustomSnackBar.displaySnackBar('The device is offline');
return;
}
Navigator.pop(context, _value);
},
child: Center(
child: BodyMedium(
text: 'Confirm',
style: context.bodyMedium.copyWith(
color: ColorsManager.primaryColorWithOpacity),
),
),
),
],
)
],
),
),
);
}
}

View File

@ -0,0 +1,31 @@
part of "flush_sensor_interface.dart";
class PresenceIndicator extends StatelessWidget {
const PresenceIndicator({super.key, required this.state});
final String state;
@override
Widget build(BuildContext context) {
return Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
state.toLowerCase() == 'motion'
? Assets.assetsIconsPresenceSensorAssetsPresenceSensorMotion
: Assets.assetsIconsPresenceSensorAssetsPresence,
width: 100,
height: 100,
),
const SizedBox(
height: 10,
),
BodyMedium(
text: StringHelpers.toTitleCase(state),
style: context.bodyMedium.copyWith(fontWeight: FontsManager.bold),
),
],
),
);
}
}

View File

@ -13,6 +13,7 @@ import 'package:syncrow_app/features/devices/view/widgets/ACs/acs_view.dart';
import 'package:syncrow_app/features/devices/view/widgets/ceiling_sensor/ceiling_sensor_interface.dart';
import 'package:syncrow_app/features/devices/view/widgets/curtains/curtain_view.dart';
import 'package:syncrow_app/features/devices/view/widgets/door_sensor/door_sensor_screen.dart';
import 'package:syncrow_app/features/devices/view/widgets/flush_sensor/flush_sensor_interface.dart';
import 'package:syncrow_app/features/devices/view/widgets/four_scene_switch/four_scene_screen.dart';
import 'package:syncrow_app/features/devices/view/widgets/garage_door/garage_door_screen.dart';
import 'package:syncrow_app/features/devices/view/widgets/gateway/gateway_view.dart';
@ -300,6 +301,13 @@ Future<void> showDeviceInterface(
pageBuilder: (context, animation1, animation2) =>
SosScreen(device: device)));
case DeviceType.FlushMountedSensor:
Navigator.push(
context,
PageRouteBuilder(
pageBuilder: (context, animation1, animation2) =>
FlushMountedInterface(deviceModel: device)));
break;
default:
}

View File

@ -4,6 +4,7 @@ import 'package:syncrow_app/features/auth/bloc/auth_cubit.dart';
import 'package:syncrow_app/features/menu/bloc/menu_cubit.dart';
import 'package:syncrow_app/features/menu/view/widgets/menu_list.dart';
import 'package:syncrow_app/features/menu/view/widgets/profile/profile_tab.dart';
import 'package:syncrow_app/features/shared_widgets/build_number_environment.dart';
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
import 'package:syncrow_app/utils/context_extension.dart';
@ -51,6 +52,7 @@ class MenuView extends StatelessWidget {
],
),
),
buildNumberAndEnvironmentLabel()
],
),
);

View File

@ -107,6 +107,7 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
for (var element in tempTasksList) {
if (element.code == event.deviceControlModel.code) {
var updatedElement = element.copyWith(
deviceType: event.deviceType,
operationName: event.operation,
deviceName: event.deviceName,
icon: event.icon,
@ -134,6 +135,7 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
if (element.deviceId == event.deviceControlModel.deviceId &&
element.code == event.deviceControlModel.code) {
var updatedElement = element.copyWith(
deviceType: event.deviceType,
operationName: event.operation,
deviceName: event.deviceName,
icon: event.icon,
@ -159,6 +161,7 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
// Add new element if it doesn't exist in either list
if (!updated) {
var newElement = SceneStaticFunction(
deviceType: event.deviceType,
operationName: event.operation,
deviceName: event.deviceName,
icon: event.icon,
@ -192,6 +195,7 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
if (element.code == event.deviceControlModel.code) {
// Update the existing function with new values
var updatedElement = element.copyWith(
deviceType: element.deviceType,
operationName: event.operation,
deviceName: event.deviceName,
icon: event.icon,
@ -217,6 +221,7 @@ class CreateSceneBloc extends Bloc<CreateSceneEvent, CreateSceneState>
}
if (!updated) {
var newElement = SceneStaticFunction(
deviceType: event.deviceType,
operationName: event.operation,
deviceName: event.deviceName,
icon: event.icon,

View File

@ -24,6 +24,7 @@ class TempHoldSceneTasksEvent extends CreateSceneEvent {
final String uniqueId;
final bool? isAutomation;
final OperationDialogType operationType;
final String deviceType;
const TempHoldSceneTasksEvent({
required this.deviceControlModel,
@ -34,6 +35,7 @@ class TempHoldSceneTasksEvent extends CreateSceneEvent {
required this.uniqueId,
this.isAutomation,
required this.operationType,
required this.deviceType,
});
@override
@ -46,6 +48,7 @@ class TempHoldSceneTasksEvent extends CreateSceneEvent {
uniqueId,
deviceName,
icon,
deviceType
];
}
@ -149,7 +152,8 @@ class FetchSceneTasksEvent extends CreateSceneEvent {
final String sceneId;
final bool isAutomation;
const FetchSceneTasksEvent({this.isAutomation = false, required this.sceneId});
const FetchSceneTasksEvent(
{this.isAutomation = false, required this.sceneId});
@override
List<Object> get props => [sceneId, isAutomation];

View File

@ -41,6 +41,7 @@ class SmartSceneSelectBloc
.read<CreateSceneBloc>();
createSceneBloc.add(TempHoldSceneTasksEvent(
deviceType:smartSceneEnable!.type ,
deviceControlModel: DeviceControlModel(
deviceId: smartSceneEnable?.entityId ?? '',
code: CreateSceneEnum.smartSceneSelect.name,

View File

@ -9,6 +9,7 @@ class ACFunctionsHelper {
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: 'AC',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
@ -30,6 +31,7 @@ class ACFunctionsHelper {
],
),
SceneStaticFunction(
deviceType: 'AC',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsFreezing,
@ -56,6 +58,7 @@ class ACFunctionsHelper {
],
),
SceneStaticFunction(
deviceType: 'AC',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsTempreture,
@ -72,6 +75,7 @@ class ACFunctionsHelper {
],
),
SceneStaticFunction(
deviceType: 'AC',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsFanSpeed,
@ -103,6 +107,7 @@ class ACFunctionsHelper {
],
),
SceneStaticFunction(
deviceType: 'AC',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsChildLock,
@ -130,6 +135,7 @@ class ACFunctionsHelper {
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: 'AC',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
@ -151,6 +157,7 @@ class ACFunctionsHelper {
],
),
SceneStaticFunction(
deviceType: 'AC',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsFreezing,
@ -177,6 +184,7 @@ class ACFunctionsHelper {
],
),
SceneStaticFunction(
deviceType: 'AC',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsTempreture,
@ -196,6 +204,7 @@ class ACFunctionsHelper {
],
),
SceneStaticFunction(
deviceType: 'AC',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsCurrentTemp,
@ -215,6 +224,7 @@ class ACFunctionsHelper {
],
),
SceneStaticFunction(
deviceType: 'AC',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsFanSpeed,
@ -246,6 +256,7 @@ class ACFunctionsHelper {
],
),
SceneStaticFunction(
deviceType: 'AC',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsChildLock,

View File

@ -8,6 +8,7 @@ class DoorLockHelperFunctions {
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: 'DL',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsIconsDoorLock,
@ -16,8 +17,10 @@ class DoorLockHelperFunctions {
code: 'normal_open_switch',
operationDialogType: OperationDialogType.onOff,
operationalValues: [
SceneOperationalValue(icon: Assets.assetsAcPower, description: "ON", value: true),
SceneOperationalValue(icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
SceneOperationalValue(
icon: Assets.assetsAcPower, description: "ON", value: true),
SceneOperationalValue(
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
],
),
];
@ -28,6 +31,7 @@ class DoorLockHelperFunctions {
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: 'DL',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsFingerprintUnlock,
@ -47,6 +51,7 @@ class DoorLockHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'DL',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsPasswordUnlock,
@ -66,6 +71,7 @@ class DoorLockHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'DL',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsCardUnlock,
@ -85,6 +91,7 @@ class DoorLockHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'DL',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsLockAlarm,
@ -101,6 +108,7 @@ class DoorLockHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'DL',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsRemoteUnlockReq,
@ -120,6 +128,7 @@ class DoorLockHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'DL',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsResidualElectricity,
@ -139,6 +148,7 @@ class DoorLockHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'DL',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsDoubleLock,
@ -160,6 +170,7 @@ class DoorLockHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'DL',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsRemoteUnlockViaApp,
@ -179,6 +190,7 @@ class DoorLockHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'DL',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsHijackAlarm,
@ -200,6 +212,7 @@ class DoorLockHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'DL',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsDoorlockNormalOpen,
@ -221,6 +234,7 @@ class DoorLockHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'DL',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsDoorlockNormalOpen,
@ -242,6 +256,7 @@ class DoorLockHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'DL',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsTempPasswordUnlock,

View File

@ -0,0 +1,247 @@
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
import 'package:syncrow_app/generated/assets.dart';
class FlushFunctionsHelper {
static List<SceneStaticFunction> flushSceneHelperFunctions(
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: 'NCPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsPresenceState,
operationName: 'Presence State',
code: 'presence_state',
functionValue: functionValue,
operationDialogType: OperationDialogType.listOfOptions,
operationalValues: [
SceneOperationalValue(
icon: Assets.nobodyTime, description: "None", value: 'none'),
SceneOperationalValue(
icon: Assets.nobodyTime,
description: "Presence",
value: 'presence',
),
],
),
SceneStaticFunction(
deviceType: 'NCPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.IlluminanceIcon,
operationName: 'Illuminance Value',
code: 'illum_value',
functionValue: functionValue,
operationDialogType: OperationDialogType.integerSteps,
operationalValues: [
SceneOperationalValue(
icon: '',
value: 0.0,
description: "",
minValue: 0.0,
maxValue: 2000.0,
stepValue: 1.0,
),
],
),
];
}
static List<SceneStaticFunction> flushAutomationFunctions(
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: 'NCPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsSensitivityFunction,
operationName: 'Sensitivity',
code: 'sensitivity',
functionValue: functionValue,
operationDialogType: OperationDialogType.listOfOptions,
operationalValues: [
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 1,
description: 1.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 2,
description: 2.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 3,
description: 3.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 4,
description: 4.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 5,
description: 5.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 6,
description: 6.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 7,
description: 7.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 8,
description: 8.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 9,
description: 9.toString(),
),
],
),
SceneStaticFunction(
deviceType: 'NCPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.currentDistanceIcon,
operationName: 'Min Detection Distance',
code: 'near_detection',
functionValue: functionValue,
operationDialogType: OperationDialogType.integerSteps,
operationalValues: [
SceneOperationalValue(
icon: '',
value: 0.0,
description: "m",
minValue: 0.0,
maxValue: 9.5,
stepValue: 0.10,
),
],
),
SceneStaticFunction(
deviceType: 'NCPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.currentDistanceIcon,
operationName: 'Max Detection Distance',
code: 'far_detection',
functionValue: functionValue,
operationDialogType: OperationDialogType.integerSteps,
operationalValues: [
SceneOperationalValue(
icon: '',
value: 0.0,
description: "m",
minValue: 0.0,
maxValue: 9.5,
stepValue: 0.10,
),
],
),
SceneStaticFunction(
deviceType: 'NCPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.levelIcon,
operationName: 'Trigger Level',
code: 'sensi_reduce',
functionValue: functionValue,
operationDialogType: OperationDialogType.listOfOptions,
operationalValues: [
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 1,
description: 1.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 2,
description: 2.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 3,
description: 3.toString(),
),
],
),
SceneStaticFunction(
deviceType: 'NCPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.indentLevelIcon,
operationName: 'Indent Level',
code: 'occur_dist_reduce',
functionValue: functionValue,
operationDialogType: OperationDialogType.listOfOptions,
operationalValues: [
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 1,
description: 1.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 2,
description: 2.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 3,
description: 3.toString(),
),
],
),
SceneStaticFunction(
deviceType: 'NCPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.targetConfirmTimeIcon,
operationName: 'Target Confirm Time',
code: 'presence_delay',
functionValue: functionValue,
operationDialogType: OperationDialogType.integerSteps,
operationalValues: [
SceneOperationalValue(
icon: '',
value: 0.0,
description: "",
minValue: 0.0,
maxValue: 0.5,
stepValue: 0.1,
),
],
),
SceneStaticFunction(
deviceType: 'NCPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.delayIcon,
operationName: 'Disappear Delay',
code: 'none_delay',
functionValue: functionValue,
operationDialogType: OperationDialogType.integerSteps,
operationalValues: [
SceneOperationalValue(
icon: '',
value: 20.0,
description: "",
minValue: 20.0,
maxValue: 300.0,
stepValue: 1.0,
),
],
),
];
}
}

View File

@ -7,6 +7,7 @@ class GatewayHelperFunctions {
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: 'GW',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsSwitchAlarmSound,
@ -22,6 +23,7 @@ class GatewayHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'GW',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsMasterState,
@ -43,6 +45,7 @@ class GatewayHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'GW',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsFactoryReset,

View File

@ -7,6 +7,7 @@ class HumanPresenceHelperFunctions {
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: 'WPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsFarDetection,
@ -66,6 +67,7 @@ class HumanPresenceHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'WPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsMotionDetection,
@ -102,6 +104,7 @@ class HumanPresenceHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'WPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsMotionlessDetection,
@ -143,6 +146,7 @@ class HumanPresenceHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'WPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsIndicator,
@ -164,6 +168,7 @@ class HumanPresenceHelperFunctions {
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: 'WPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsPresenceState,
@ -185,6 +190,7 @@ class HumanPresenceHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'WPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsIconsPresenceSensorAssetsDistance,
@ -204,6 +210,7 @@ class HumanPresenceHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'WPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsIconsPresenceSensorAssetsIlluminanceValue,
@ -223,6 +230,7 @@ class HumanPresenceHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'WPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsIndicator,
@ -238,6 +246,7 @@ class HumanPresenceHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'WPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsIconsPresenceSensorAssetsTime,

View File

@ -7,6 +7,7 @@ class OneGangHelperFunctions {
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: '1G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
@ -22,6 +23,7 @@ class OneGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '1G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsLightCountdown,
@ -40,6 +42,7 @@ class OneGangHelperFunctions {
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: '1G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
@ -55,6 +58,7 @@ class OneGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '1G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsLightCountdown,

View File

@ -7,6 +7,7 @@ class PresenceSensorHelperFunctions {
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: 'CPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsSensitivityFunction,
@ -74,6 +75,7 @@ class PresenceSensorHelperFunctions {
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: 'CPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsIconsSensors,
@ -100,6 +102,7 @@ class PresenceSensorHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'CPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsSensitivityFunction,
@ -119,6 +122,7 @@ class PresenceSensorHelperFunctions {
],
),
SceneStaticFunction(
deviceType: 'CPS',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsSelfTestResult,

View File

@ -7,6 +7,7 @@ class ThreeGangHelperFunctions {
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: '3G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
@ -22,6 +23,7 @@ class ThreeGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '3G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsLightCountdown,
@ -34,6 +36,7 @@ class ThreeGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '3G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
@ -49,6 +52,7 @@ class ThreeGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '3G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsLightCountdown,
@ -61,6 +65,7 @@ class ThreeGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '3G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
@ -76,6 +81,7 @@ class ThreeGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '3G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsLightCountdown,
@ -94,6 +100,7 @@ class ThreeGangHelperFunctions {
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: '3G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
@ -109,6 +116,7 @@ class ThreeGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '3G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsLightCountdown,
@ -128,6 +136,7 @@ class ThreeGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '3G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
@ -143,6 +152,7 @@ class ThreeGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '3G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsLightCountdown,
@ -162,6 +172,7 @@ class ThreeGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '3G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
@ -177,6 +188,7 @@ class ThreeGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '3G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsLightCountdown,

View File

@ -7,6 +7,7 @@ class TowGangHelperFunctions {
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: '2G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
@ -22,6 +23,7 @@ class TowGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '2G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsLightCountdown,
@ -34,6 +36,7 @@ class TowGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '2G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
@ -49,6 +52,7 @@ class TowGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '2G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsLightCountdown,
@ -67,6 +71,7 @@ class TowGangHelperFunctions {
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: '2G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
@ -82,6 +87,7 @@ class TowGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '2G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsLightCountdown,
@ -101,6 +107,7 @@ class TowGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '2G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
@ -116,6 +123,7 @@ class TowGangHelperFunctions {
],
),
SceneStaticFunction(
deviceType: '2G',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsLightCountdown,

View File

@ -0,0 +1,130 @@
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
import 'package:syncrow_app/generated/assets.dart';
class WaterHeaterFunctionsHelper {
static List<SceneStaticFunction> waterHeaterHelperFunctions(
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: 'WH',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
operationName: 'Switch',
code: 'switch_1',
functionValue: functionValue,
operationDialogType: OperationDialogType.onOff,
operationalValues: [
SceneOperationalValue(
icon: Assets.assetsAcPowerOFF,
description: "Power OFF",
value: false),
SceneOperationalValue(
icon: Assets.assetsAcPower,
description: "Power ON",
value: true,
),
],
),
SceneStaticFunction(
deviceType: 'WH',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsLightCountdown,
operationName: 'Timer',
code: 'countdown_1',
functionValue: functionValue,
operationDialogType: OperationDialogType.countdown,
operationalValues: [
SceneOperationalValue(icon: '', value: 0),
],
),
];
}
static List<SceneStaticFunction> waterHeaterAutomationFunctions(
String deviceId, String deviceName, functionValue) {
return [
SceneStaticFunction(
deviceType: 'WH',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.refreshStatusIcon,
operationName: 'Restart Status',
code: 'relay_status',
functionValue: functionValue,
operationDialogType: OperationDialogType.none,
operationalValues: [
SceneOperationalValue(
icon: Assets.assetsAcPowerOFF,
description: "Power OFF",
value: 'off',
),
SceneOperationalValue(
icon: Assets.assetsAcPower,
description: "Power ON",
value: 'on',
),
SceneOperationalValue(
icon: Assets.refreshStatusIcon,
description: "Restart Memory",
value: 'memory',
),
],
),
SceneStaticFunction(
deviceType: 'WH',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsAcPower,
operationName: 'Switch',
code: 'switch_1',
functionValue: functionValue,
operationDialogType: OperationDialogType.onOff,
operationalValues: [
SceneOperationalValue(
icon: Assets.assetsAcPower, description: "ON", value: true),
SceneOperationalValue(
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
],
),
SceneStaticFunction(
deviceType: 'WH',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsLightCountdown,
operationName: 'CountDown',
code: 'countdown_1',
functionValue: functionValue,
operationDialogType: OperationDialogType.integerSteps,
operationalValues: [
SceneOperationalValue(
icon: '',
description: "sec",
value: 0.0,
minValue: 0,
maxValue: 43200,
stepValue: 1,
),
],
),
SceneStaticFunction(
deviceType: 'WH',
deviceId: deviceId,
deviceName: deviceName,
icon: Assets.assetsIndicator,
operationName: 'Backlight Switch',
code: 'switch_backlight',
functionValue: functionValue,
operationDialogType: OperationDialogType.onOff,
operationalValues: [
SceneOperationalValue(
icon: Assets.assetsAcPower, description: "ON", value: true),
SceneOperationalValue(
icon: Assets.assetsAcPowerOFF, description: "OFF", value: false),
],
),
];
}
}

View File

@ -88,6 +88,7 @@ mixin SceneLogicHelper {
final task = actions[index];
if (task.deviceId == 'delay') {
return CreateSceneAction(
productType: task.deviceType,
entityId: actions[index].deviceId,
actionExecutor: 'delay',
executorProperty: CreateSceneExecutorProperty(
@ -99,6 +100,7 @@ mixin SceneLogicHelper {
}
if (task.code == CreateSceneEnum.smartSceneSelect.name) {
return CreateSceneAction(
productType: task.deviceType,
actionType: task.operationName.toLowerCase() == 'automation'
? 'automation'
: 'scene',
@ -107,6 +109,7 @@ mixin SceneLogicHelper {
executorProperty: null);
}
return CreateSceneAction(
productType: task.deviceType,
entityId: task.deviceId,
actionExecutor: 'device_issue',
executorProperty: CreateSceneExecutorProperty(
@ -119,6 +122,20 @@ mixin SceneLogicHelper {
),
],
);
for (var action in createAutomationModel.actions) {
if (action.productType == 'NCPS') {
if (action.executorProperty!.functionCode == 'near_detection' ||
action.executorProperty!.functionCode == 'far_detection') {
action.executorProperty!.functionValue =
(action.executorProperty!.functionValue * 100).round();
} else if (action.executorProperty!.functionCode ==
'presence_delay' ||
action.executorProperty!.functionCode == 'none_delay') {
action.executorProperty!.functionValue =
action.executorProperty!.functionValue * 10;
}
}
}
sceneBloc.add(CreateSceneWithTasksEvent(
createSceneModel: null,
updateScene: updateScene,
@ -139,6 +156,7 @@ mixin SceneLogicHelper {
final task = actions[index];
if (task.deviceId == 'delay') {
return CreateSceneAction(
productType: task.deviceType,
entityId: actions[index].deviceId,
actionExecutor: 'delay',
executorProperty: CreateSceneExecutorProperty(
@ -150,11 +168,14 @@ mixin SceneLogicHelper {
}
if (task.code == CreateSceneEnum.smartSceneSelect.name) {
return CreateSceneAction(
productType: task.deviceType,
entityId: actions[index].deviceId,
actionExecutor: actions[index].functionValue,
executorProperty: null);
}
return CreateSceneAction(
productType: task.deviceType,
entityId: task.deviceId,
actionExecutor: 'device_issue',
executorProperty: CreateSceneExecutorProperty(
@ -167,6 +188,20 @@ mixin SceneLogicHelper {
),
],
);
for (var action in createSceneModel.actions) {
if (action.productType == 'NCPS') {
if (action.executorProperty!.functionCode == 'near_detection' ||
action.executorProperty!.functionCode == 'far_detection') {
action.executorProperty!.functionValue =
action.executorProperty!.functionValue * 100;
} else if (action.executorProperty!.functionCode ==
'presence_delay' ||
action.executorProperty!.functionCode == 'none_delay') {
action.executorProperty!.functionValue =
action.executorProperty!.functionValue * 10;
}
}
}
sceneBloc.add(CreateSceneWithTasksEvent(
createSceneModel: createSceneModel,
createAutomationModel: null,

View File

@ -4,12 +4,14 @@ import 'package:syncrow_app/features/scene/enum/create_scene_enum.dart';
import 'package:syncrow_app/features/scene/enum/operation_dialog_type.dart';
import 'package:syncrow_app/features/scene/helper/functions_per_device/ac_functions.dart';
import 'package:syncrow_app/features/scene/helper/functions_per_device/door_lock_functions.dart';
import 'package:syncrow_app/features/scene/helper/functions_per_device/flush_functions_helper.dart';
import 'package:syncrow_app/features/scene/helper/functions_per_device/gateway_functions.dart';
import 'package:syncrow_app/features/scene/helper/functions_per_device/human_presence_functions.dart';
import 'package:syncrow_app/features/scene/helper/functions_per_device/one_gang_functions.dart';
import 'package:syncrow_app/features/scene/helper/functions_per_device/presence_sensor.dart';
import 'package:syncrow_app/features/scene/helper/functions_per_device/three_gang_functions.dart';
import 'package:syncrow_app/features/scene/helper/functions_per_device/tow_gang_helper_functions.dart';
import 'package:syncrow_app/features/scene/helper/functions_per_device/water_heater_functions.dart';
import 'package:syncrow_app/features/scene/model/scene_details_model.dart';
import 'package:syncrow_app/features/scene/model/scene_static_function.dart';
import 'package:syncrow_app/generated/assets.dart';
@ -17,7 +19,7 @@ import 'package:syncrow_app/utils/resource_manager/constants.dart';
mixin SceneOperationsDataHelper {
final Map<DeviceType,
Function(List<FunctionModel>, String, String, dynamic, bool)>
Function(List<FunctionModel>, String, String, dynamic, bool, String)>
_functionMap = {
DeviceType.LightBulb: lightBulbFunctions,
DeviceType.CeilingSensor: ceilingSensorFunctions,
@ -29,6 +31,8 @@ mixin SceneOperationsDataHelper {
DeviceType.Gateway: gatewayFunctions,
DeviceType.OneGang: oneGangFunctions,
DeviceType.TwoGang: towGangFunctions,
DeviceType.WH: waterHeaterFunctions,
DeviceType.FlushMountedSensor: flushFunctions
};
final Map<DeviceType, String> _titleMap = {
@ -42,15 +46,51 @@ mixin SceneOperationsDataHelper {
DeviceType.Gateway: 'Gateway Functions',
DeviceType.OneGang: '1G Light Switch Conditions',
DeviceType.TwoGang: '2G Light Switch Conditions',
DeviceType.WH: 'Water Heater Conditions',
DeviceType.FlushMountedSensor: 'Flush Presence Sensor Functions'
};
static List<SceneStaticFunction> flushFunctions(
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation,
String productType,
) {
if (isAutomation) {
return FlushFunctionsHelper.flushSceneHelperFunctions(
deviceId, deviceName, functionValue);
}
return FlushFunctionsHelper.flushAutomationFunctions(
deviceId, deviceName, functionValue);
}
static List<SceneStaticFunction> waterHeaterFunctions(
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation,
String productType,
) {
if (isAutomation) {
return WaterHeaterFunctionsHelper.waterHeaterAutomationFunctions(
deviceId, deviceName, functionValue);
}
return WaterHeaterFunctionsHelper.waterHeaterHelperFunctions(
deviceId, deviceName, functionValue);
}
//one gang functions
static List<SceneStaticFunction> oneGangFunctions(
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation) {
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation,
String productType,
) {
if (isAutomation) {
return OneGangHelperFunctions.oneGangAutomationFunctions(
deviceId, deviceName, functionValue);
@ -60,11 +100,13 @@ mixin SceneOperationsDataHelper {
}
static List<SceneStaticFunction> towGangFunctions(
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation) {
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation,
String productType,
) {
if (isAutomation) {
return TowGangHelperFunctions.towGangAutomationFunctions(
deviceId, deviceName, functionValue);
@ -78,13 +120,14 @@ mixin SceneOperationsDataHelper {
required List<FunctionModel> functions,
required String deviceId,
required String deviceName,
required String productType,
required bool isAutomation,
}) {
final functionValue = null;
return _functionMap[type]?.call(
functions, deviceId, deviceName, functionValue, isAutomation) ??
lightBulbFunctions(
functions, deviceId, deviceName, functionValue, isAutomation);
return _functionMap[type]?.call(functions, deviceId, deviceName,
functionValue, isAutomation, productType) ??
lightBulbFunctions(functions, deviceId, deviceName, functionValue,
isAutomation, productType);
}
String getTitle({DeviceType? type}) {
@ -92,11 +135,13 @@ mixin SceneOperationsDataHelper {
}
static List<SceneStaticFunction> ceilingSensorFunctions(
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation) {
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation,
String productType,
) {
if (isAutomation) {
return PresenceSensorHelperFunctions.automationPresenceSensorFunctions(
deviceId, deviceName, functionValue);
@ -106,20 +151,24 @@ mixin SceneOperationsDataHelper {
}
static List<SceneStaticFunction> curtainFunctions(
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation) {
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation,
String productType,
) {
return [];
}
static List<SceneStaticFunction> doorLockFunctions(
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation) {
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation,
String productType,
) {
if (isAutomation) {
return DoorLockHelperFunctions.doorLockAutomationFunctions(
deviceId, deviceName, functionValue);
@ -129,11 +178,13 @@ mixin SceneOperationsDataHelper {
}
static List<SceneStaticFunction> wallSensorFunctions(
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation) {
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation,
String productType,
) {
if (isAutomation) {
return HumanPresenceHelperFunctions.automationHumanPresenceFunctions(
deviceId, deviceName, functionValue);
@ -147,26 +198,31 @@ mixin SceneOperationsDataHelper {
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation) {
bool isAutomation,
String productType) {
return [];
}
static List<SceneStaticFunction> gatewayFunctions(
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation) {
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation,
String productType,
) {
return GatewayHelperFunctions.tabToRunGatewayFunctions(
deviceId, deviceName, functionValue);
}
static List<SceneStaticFunction> threeGangFunctions(
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation) {
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation,
String productType,
) {
if (isAutomation) {
return ThreeGangHelperFunctions.threeGangAutomationFunctions(
deviceId, deviceName, functionValue);
@ -176,11 +232,13 @@ mixin SceneOperationsDataHelper {
}
static List<SceneStaticFunction> acFunctions(
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation) {
List<FunctionModel> functions,
String deviceId,
String deviceName,
dynamic functionValue,
bool isAutomation,
String productType,
) {
if (isAutomation) {
return ACFunctionsHelper.automationAcFunctions(
deviceId, deviceName, functionValue);
@ -195,12 +253,25 @@ mixin SceneOperationsDataHelper {
List<Condition>? conditions,
}) {
List<SceneStaticFunction> functions = [];
for (var action in actions) {
if (action.productType == "NCPS") {
if (action.executorProperty!.functionCode == 'near_detection' ||
action.executorProperty!.functionCode == 'far_detection') {
action.executorProperty!.functionValue =
action.executorProperty!.functionValue / 100;
} else if (action.executorProperty!.functionCode == 'presence_delay' ||
action.executorProperty!.functionCode == 'none_delay') {
action.executorProperty!.functionValue =
(action.executorProperty!.functionValue / 10);
}
}
}
// Handle actions
for (var action in actions) {
if (action.entityId == 'delay') {
functions.add(
SceneStaticFunction(
deviceType: action.productType,
deviceId: action.entityId,
deviceName: 'delay',
deviceIcon: Assets.delay,
@ -222,6 +293,7 @@ mixin SceneOperationsDataHelper {
// Handle smart scenes
functions.add(
SceneStaticFunction(
deviceType: action.productType,
deviceId: action.entityId,
deviceName: action.name.toString(),
deviceIcon: action.type == 'automation'
@ -287,11 +359,9 @@ mixin SceneOperationsDataHelper {
String? uniqueCustomId,
}) {
final executorProperty = action.executorProperty;
final Map<String,
SceneStaticFunction Function(Action, bool, String?, String?)>
functionMap = {
'sensitivity': _createSensitivityFunction,
'normal_open_switch': _createNormalOpenSwitchFunction,
'unlock_fingerprint': _createUnlockFingerprintFunction,
'unlock_password': _createUnlockPasswordFunction,
@ -304,12 +374,21 @@ mixin SceneOperationsDataHelper {
'hijack': _createHijackFunction,
'doorbell': _createDoorbellFunction,
'unlock_temporary': _createUnlockTemporaryFunction,
'far_detection': _createFarDetectionFunction,
'near_detection': _createNearDetectionOptions,
if (action.productType == 'NCPS') ...{
'far_detection': _createFarDetectionOptionsFlush,
'presence_state': _createPresenceStateFunctionFlush,
'illum_value': _createIlluminanceValueFunctionFlush,
'sensitivity': _createSensitivityFunctionFlush,
} else ...{
'far_detection': _createFarDetectionFunction,
'presence_state': _createPresenceStateFunction,
'sensitivity': _createSensitivityFunction,
},
'motion_sensitivity_value': _createMotionSensitivityFunction,
'motionless_sensitivity': _createMotionlessSensitivityFunction,
'indicator': _createIndicatorFunction,
'presence_time': _createPresenceTimeFunction,
'presence_state': _createPresenceStateFunction,
'dis_current': _createDisCurrentFunction,
'illuminance_value': _createIlluminanceValueFunction,
'checking_result': _createCheckingResultFunction,
@ -328,6 +407,12 @@ mixin SceneOperationsDataHelper {
'switch_alarm_sound': _createSwitchAlarmSoundFunction,
'master_state': _createMasterStateFunction,
'factory_reset': _createFactoryResetFunction,
'switch_backlight': _createSwitchFunction,
'relay_status': _relayStatusSwitchFunction,
'sensi_reduce': _createTriggerLevelOptions,
'occur_dist_reduce': _createIndentLevelOptions,
'presence_delay': _createTargetConfirmTime,
'none_delay': _createDisappeDelay
};
final functionCode = executorProperty?.functionCode ?? '';
@ -339,7 +424,7 @@ mixin SceneOperationsDataHelper {
}
}
SceneStaticFunction _createSceneFunction(
static SceneStaticFunction _createSceneFunction(
Action action,
String deviceName,
String icon,
@ -350,8 +435,10 @@ mixin SceneOperationsDataHelper {
String? comparator,
String? uniqueCustomId,
]) {
final productType = action.productType;
final functionValue = action.executorProperty?.functionValue;
return SceneStaticFunction(
deviceType: productType,
uniqueCustomId: uniqueCustomId,
deviceId: action.entityId,
deviceName: deviceName,
@ -422,7 +509,7 @@ mixin SceneOperationsDataHelper {
);
}
List<SceneOperationalValue> _createOnOffOptions() {
static List<SceneOperationalValue> _createOnOffOptions() {
return [
SceneOperationalValue(
icon: Assets.assetsAcPower,
@ -741,13 +828,47 @@ mixin SceneOperationsDataHelper {
SceneStaticFunction _createSwitchFunction(Action action, bool isAutomation,
String? comparator, String? uniqueCustomId) {
switch (action.productType) {
case "AC":
return _createSceneFunction(
action,
action.deviceName,
Assets.assetsIconsAC,
'Switch',
OperationDialogType.onOff,
_createOnOffOptions(),
isAutomation,
comparator,
uniqueCustomId,
);
case "WH":
return _createSceneFunction(
action,
action.deviceName,
Assets.waterHeaterIcon,
'Power',
OperationDialogType.onOff,
_createOnOffOptions(),
isAutomation,
comparator,
uniqueCustomId,
);
default:
throw ArgumentError('Unsupported product type: ${action.productType}');
}
}
SceneStaticFunction _relayStatusSwitchFunction(Action action,
bool isAutomation, String? comparator, String? uniqueCustomId) {
return _createSceneFunction(
action,
action.deviceName,
Assets.assetsIconsAC,
'Power',
OperationDialogType.onOff,
_createOnOffOptions(),
Assets.waterHeaterIcon,
'Restart Status',
OperationDialogType.none,
_createRelayStatusOptions(),
isAutomation,
comparator,
uniqueCustomId,
@ -833,15 +954,41 @@ mixin SceneOperationsDataHelper {
);
}
SceneStaticFunction _createSwitch1Function(Action action, bool isAutomation,
String? comparator, String? uniqueCustomId) {
static SceneStaticFunction _createSwitch1Function(Action action,
bool isAutomation, String? comparator, String? uniqueCustomId) {
switch (action.productType) {
case "AC":
return _createSceneFunction(
action,
action.deviceName,
Assets.acSwitchIcon,
'Switch',
OperationDialogType.onOff,
_createOnOffOptions(),
isAutomation,
comparator,
uniqueCustomId,
);
case "WH":
return _createSceneFunction(
action,
action.deviceName,
Assets.waterHeaterIcon,
'Switch',
OperationDialogType.onOff,
_createOnOffOptions(),
isAutomation,
comparator,
uniqueCustomId,
);
case "3G":
return _createSceneFunction(
action,
action.deviceName,
Assets.assetsIcons3GangSwitch,
'Light 1 Switch',
'L - Light Switch',
OperationDialogType.onOff,
_createOnOffOptions(),
isAutomation,
@ -853,7 +1000,7 @@ mixin SceneOperationsDataHelper {
action,
action.deviceName,
Assets.twoGang,
'Light 1 Switch',
'L - Light Switch',
OperationDialogType.onOff,
_createOnOffOptions(),
isAutomation,
@ -865,7 +1012,31 @@ mixin SceneOperationsDataHelper {
action,
action.deviceName,
Assets.oneGang,
'Light 1 Switch',
'Light Switch',
OperationDialogType.onOff,
_createOnOffOptions(),
isAutomation,
comparator,
uniqueCustomId,
);
case "TwoGang":
return _createSceneFunction(
action,
action.deviceName,
Assets.twoGang,
'L - Light Switch',
OperationDialogType.onOff,
_createOnOffOptions(),
isAutomation,
comparator,
uniqueCustomId,
);
case "ThreeGang":
return _createSceneFunction(
action,
action.deviceName,
Assets.twoGang,
'L - Light Switch',
OperationDialogType.onOff,
_createOnOffOptions(),
isAutomation,
@ -895,7 +1066,7 @@ mixin SceneOperationsDataHelper {
action,
action.deviceName,
Assets.assetsIcons3GangSwitch,
'Light 2 Switch',
'M - Light Switch',
OperationDialogType.onOff,
_createOnOffOptions(),
isAutomation,
@ -907,7 +1078,31 @@ mixin SceneOperationsDataHelper {
action,
action.deviceName,
Assets.twoGang,
'Light 2 Switch',
'R - Light Switch',
OperationDialogType.onOff,
_createOnOffOptions(),
isAutomation,
comparator,
uniqueCustomId,
);
case "TwoGang":
return _createSceneFunction(
action,
action.deviceName,
Assets.twoGang,
'R - Light Switch',
OperationDialogType.onOff,
_createOnOffOptions(),
isAutomation,
comparator,
uniqueCustomId,
);
case "ThreeGang":
return _createSceneFunction(
action,
action.deviceName,
Assets.twoGang,
'M - Light Switch',
OperationDialogType.onOff,
_createOnOffOptions(),
isAutomation,
@ -935,7 +1130,7 @@ mixin SceneOperationsDataHelper {
action,
action.deviceName,
Assets.assetsIcons3GangSwitch,
'Light 3 Switch',
'R - Light Switch',
OperationDialogType.onOff,
_createOnOffOptions(),
isAutomation,
@ -952,7 +1147,7 @@ mixin SceneOperationsDataHelper {
action,
action.deviceName,
Assets.assetsIcons3GangSwitch,
'Light 1 CountDown',
'L - Light CountDown',
isAutomation
? OperationDialogType.integerSteps
: OperationDialogType.countdown,
@ -968,7 +1163,23 @@ mixin SceneOperationsDataHelper {
action,
action.deviceName,
Assets.twoGang,
'Light 1 CountDown',
'L - Light CountDown',
isAutomation
? OperationDialogType.integerSteps
: OperationDialogType.countdown,
isAutomation
? _createAutomationCountDownOptions()
: _createCountdownOptions(),
isAutomation,
comparator,
uniqueCustomId,
);
case "WH":
return _createSceneFunction(
action,
action.deviceName,
Assets.waterHeaterIcon,
'CountDown',
isAutomation
? OperationDialogType.integerSteps
: OperationDialogType.countdown,
@ -984,7 +1195,7 @@ mixin SceneOperationsDataHelper {
action,
action.deviceName,
Assets.oneGang,
'Light CountDown',
'CountDown',
isAutomation
? OperationDialogType.integerSteps
: OperationDialogType.countdown,
@ -1006,7 +1217,7 @@ mixin SceneOperationsDataHelper {
action,
action.deviceName,
Assets.assetsIcons3GangSwitch,
'Light 2 CountDown',
'M - Light CountDown',
isAutomation
? OperationDialogType.integerSteps
: OperationDialogType.countdown,
@ -1022,7 +1233,23 @@ mixin SceneOperationsDataHelper {
action,
action.deviceName,
Assets.twoGang,
'Light 2 CountDown',
'R - Light CountDown',
isAutomation
? OperationDialogType.integerSteps
: OperationDialogType.countdown,
isAutomation
? _createAutomationCountDownOptions()
: _createCountdownOptions(),
isAutomation,
comparator,
uniqueCustomId,
);
case "ThreeGang":
return _createSceneFunction(
action,
action.deviceName,
Assets.twoGang,
'R - Light CountDown',
isAutomation
? OperationDialogType.integerSteps
: OperationDialogType.countdown,
@ -1058,7 +1285,7 @@ mixin SceneOperationsDataHelper {
action,
action.deviceName,
Assets.assetsIcons3GangSwitch,
'Light 3 CountDown',
'R - Light CountDown',
isAutomation
? OperationDialogType.integerSteps
: OperationDialogType.countdown,
@ -1217,6 +1444,21 @@ mixin SceneOperationsDataHelper {
];
}
List<SceneOperationalValue> _createPresenceStateOptionsFlush() {
return [
SceneOperationalValue(
icon: Assets.assetsIconsPresenceSensorAssetsEmpty,
value: 'none',
description: 'None',
),
SceneOperationalValue(
icon: Assets.assetsPresence,
value: 'presence',
description: 'Presence',
),
];
}
List<SceneOperationalValue> _createPresenceStateOptions() {
return [
SceneOperationalValue(
@ -1395,6 +1637,7 @@ mixin SceneOperationsDataHelper {
if (deviceId.contains('delay')) {
return [
SceneStaticFunction(
deviceType: taskItem.deviceType,
uniqueCustomId: taskItem.uniqueCustomId,
deviceId: taskItem.deviceId,
deviceName: 'delay',
@ -1417,6 +1660,7 @@ mixin SceneOperationsDataHelper {
if (taskItem.code == CreateSceneEnum.smartSceneSelect.name) {
return [
SceneStaticFunction(
deviceType: taskItem.deviceType,
uniqueCustomId: taskItem.uniqueCustomId,
deviceId: taskItem.deviceId,
deviceName: taskItem.deviceName.toString(),
@ -1448,8 +1692,8 @@ mixin SceneOperationsDataHelper {
return [
_mapExecutorPropertyToSceneFunction(
Action(
deviceName: taskItem.deviceName,
productType: '',
deviceName: taskItem.deviceName!,
productType: taskItem.deviceType!,
entityId: deviceId,
executorProperty: ExecutorProperty(
functionCode: taskItem.code,
@ -1476,4 +1720,316 @@ mixin SceneOperationsDataHelper {
),
];
}
List<SceneOperationalValue> _createRelayStatusOptions() {
return [
SceneOperationalValue(
icon: Assets.assetsAcPower,
description: "Power ON",
value: 'on',
),
SceneOperationalValue(
icon: Assets.assetsAcPowerOFF,
description: "Power OFF",
value: 'off',
),
SceneOperationalValue(
icon: Assets.refreshStatusIcon,
description: "Restart Memory",
value: 'memory',
),
];
}
SceneStaticFunction _createNearDetectionOptions(Action action,
bool isAutomation, String? comparator, String? uniqueCustomId) {
return _createSceneFunction(
action,
action.deviceName,
Assets.flushIcon,
'Min Detection distance',
OperationDialogType.integerSteps,
_createMinDetection(),
isAutomation,
comparator,
uniqueCustomId,
);
}
SceneStaticFunction _createFarDetectionOptionsFlush(Action action,
bool isAutomation, String? comparator, String? uniqueCustomId) {
return _createSceneFunction(
action,
action.deviceName,
Assets.flushIcon,
'Max Detection distance',
OperationDialogType.integerSteps,
_createFarDetection(),
isAutomation,
comparator,
uniqueCustomId,
);
}
SceneStaticFunction _createTriggerLevelOptions(Action action,
bool isAutomation, String? comparator, String? uniqueCustomId) {
return _createSceneFunction(
action,
action.deviceName,
Assets.flushIcon,
"Trigger Level",
OperationDialogType.listOfOptions,
_createTriggerLevelFunction(),
isAutomation,
comparator,
uniqueCustomId,
);
}
List<SceneOperationalValue> _createTriggerLevelFunction() {
return [
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
description: "1",
value: 1,
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
description: "2",
value: 2,
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
description: "3",
value: 3,
),
];
}
SceneStaticFunction _createIndentLevelOptions(Action action,
bool isAutomation, String? comparator, String? uniqueCustomId) {
return _createSceneFunction(
action,
action.deviceName,
Assets.flushIcon,
'Indent Level',
OperationDialogType.listOfOptions,
_createIndentLevelFunction(),
isAutomation,
comparator,
uniqueCustomId,
);
}
List<SceneOperationalValue> _createIndentLevelFunction() {
return [
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
description: "1",
value: 1,
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
description: "2",
value: 2,
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
description: "3",
value: 3,
),
];
}
SceneStaticFunction _createTargetConfirmTime(Action action, bool isAutomation,
String? comparator, String? uniqueCustomId) {
return _createSceneFunction(
action,
action.deviceName,
Assets.flushIcon,
'Target Confirm Time',
OperationDialogType.integerSteps,
_targetConfirmTimeFun(),
isAutomation,
comparator,
uniqueCustomId,
);
}
SceneStaticFunction _createDisappeDelay(Action action, bool isAutomation,
String? comparator, String? uniqueCustomId) {
return _createSceneFunction(
action,
action.deviceName,
Assets.flushIcon,
'Disappe Delay',
OperationDialogType.integerSteps,
_targetDisappeDelayFun(),
isAutomation,
comparator,
uniqueCustomId,
);
}
List<SceneOperationalValue> _targetDisappeDelayFun() {
return [
SceneOperationalValue(
icon: Assets.flushIcon,
value: 0.0,
description: '',
minValue: 20,
maxValue: 300,
stepValue: 1,
),
];
}
List<SceneOperationalValue> _createFarDetection() {
return [
SceneOperationalValue(
icon: '',
description: "m",
value: 0.0,
minValue: 0.0,
maxValue: 9.5,
stepValue: 1,
),
];
}
List<SceneOperationalValue> _createMinDetection() {
return [
SceneOperationalValue(
icon: '',
description: "m",
value: 0.0,
minValue: 0.0,
maxValue: 9.5,
stepValue: 1,
),
];
}
List<SceneOperationalValue> _targetConfirmTimeFun() {
return [
SceneOperationalValue(
icon: Assets.assetsCelsiusDegrees,
value: 0.0,
description: '',
minValue: 0.0,
maxValue: 0.5,
stepValue: 0.1,
),
];
}
SceneStaticFunction _createPresenceStateFunctionFlush(Action action,
bool isAutomation, String? comparator, String? uniqueCustomId) {
return _createSceneFunction(
action,
action.deviceName,
Assets.flushIcon,
'Presence State',
OperationDialogType.listOfOptions,
_createPresenceStateOptionsFlush(),
isAutomation,
comparator,
uniqueCustomId,
);
}
SceneStaticFunction _createIlluminanceValueFunctionFlush(Action action,
bool isAutomation, String? comparator, String? uniqueCustomId) {
return _createSceneFunction(
action,
action.deviceName,
Assets.flushIcon,
'Illuminance Value',
OperationDialogType.integerSteps,
_createIlluminanceValueOptionsFlush(),
isAutomation,
comparator,
uniqueCustomId,
);
}
List<SceneOperationalValue> _createIlluminanceValueOptionsFlush() {
return [
SceneOperationalValue(
icon: '',
value: 0.0,
description: "Lux",
minValue: 0,
maxValue: 10000,
stepValue: 1,
),
];
}
SceneStaticFunction _createSensitivityFunctionFlush(Action action,
bool isAutomation, String? comparator, String? uniqueCustomId) {
return _createSceneFunction(
action,
action.deviceName,
Assets.flushIcon,
'Sensitivity',
isAutomation
? OperationDialogType.integerSteps
: OperationDialogType.listOfOptions,
_createIntegerStepsOptionsFlush(),
isAutomation,
comparator,
uniqueCustomId,
);
}
List<SceneOperationalValue> _createIntegerStepsOptionsFlush() {
return [
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 1,
description: 1.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 2,
description: 2.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 3,
description: 3.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 4,
description: 4.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 5,
description: 5.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 6,
description: 6.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 7,
description: 7.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 8,
description: 8.toString(),
),
SceneOperationalValue(
icon: Assets.assetsSensitivityOperationIcon,
value: 9,
description: 9.toString(),
),
];
}
}

View File

@ -94,6 +94,8 @@ class CreateSceneModel {
}
class CreateSceneAction {
final String? productType;
String entityId;
String? actionType;
String actionExecutor;
@ -104,15 +106,18 @@ class CreateSceneAction {
required this.entityId,
required this.actionExecutor,
required this.executorProperty,
required this.productType,
});
CreateSceneAction copyWith({
String? productType,
String? actionType,
String? entityId,
String? actionExecutor,
CreateSceneExecutorProperty? executorProperty,
}) {
return CreateSceneAction(
productType: productType,
actionType: actionType,
entityId: entityId ?? this.entityId,
actionExecutor: actionExecutor ?? this.actionExecutor,
@ -126,18 +131,21 @@ class CreateSceneAction {
'entityId': entityId,
'actionExecutor': actionExecutor,
'executorProperty': executorProperty?.toMap(actionExecutor),
// 'productType': productType,
};
} else {
return {
"actionType": actionType,
'entityId': entityId,
'actionExecutor': actionExecutor,
// 'productType': productType,
};
}
}
factory CreateSceneAction.fromMap(Map<String, dynamic> map) {
return CreateSceneAction(
productType: map['productType'] ?? '',
entityId: map['entityId'] ?? '',
actionExecutor: map['actionExecutor'] ?? '',
executorProperty:

View File

@ -75,7 +75,6 @@ class Action {
String? name;
String? type;
final String productType;
final String deviceName;
Action({
@ -91,39 +90,57 @@ class Action {
String toRawJson() => json.encode(toJson());
static Action? fromJson(Map<String, dynamic> json) {
if (json['name'] != null && json['type'] != null) {
return Action(
actionExecutor: json["actionExecutor"] as String,
entityId: json["entityId"] as String,
name: json['name'] as String?,
type: json['type'] as String?,
productType: json['productType'] as String,
deviceName: json['deviceName'] as String,
);
}
if (json["executorProperty"] == null) {
// Safely extract required fields with null checks
final String? actionExecutor = json["actionExecutor"] as String?;
final String? entityId = json["entityId"] as String?;
final String? productType = json['productType'] as String?;
final String? deviceName = json['deviceName'] as String?;
// Skip invalid actions with missing required fields
if (actionExecutor == null ||
entityId == null ||
productType == null ||
deviceName == null) {
return null;
}
return Action(
actionExecutor: json["actionExecutor"] as String,
entityId: json["entityId"] as String,
executorProperty: ExecutorProperty.fromJson(json["executorProperty"]),
productType: json['productType'] as String,
deviceName: json['deviceName'] as String,
);
// Handle actions with 'name' and 'type'
if (json['name'] != null && json['type'] != null) {
return Action(
actionExecutor: actionExecutor,
entityId: entityId,
name: json['name'] as String?,
type: json['type'] as String?,
productType: productType,
deviceName: deviceName,
);
}
// Handle actions with 'executorProperty'
if (json["executorProperty"] != null) {
return Action(
actionExecutor: actionExecutor,
entityId: entityId,
executorProperty: ExecutorProperty.fromJson(json["executorProperty"]),
productType: productType,
deviceName: deviceName,
);
}
return null; // Skip invalid actions
}
Map<String, dynamic> toJson() => {
"actionExecutor": actionExecutor,
"entityId": entityId,
"executorProperty": executorProperty?.toJson(),
// "productType": productType
};
}
class ExecutorProperty {
final String? functionCode;
final dynamic functionValue;
dynamic functionValue;
final dynamic delaySeconds;
ExecutorProperty({

View File

@ -12,10 +12,11 @@ class SceneStaticFunction {
final String deviceId;
final String operationName;
final String? uniqueCustomId;
final dynamic functionValue;
dynamic functionValue;
final String? deviceIcon;
final OperationDialogType operationDialogType;
final String? comparator;
final String? deviceType;
SceneStaticFunction({
required this.icon,
@ -28,6 +29,7 @@ class SceneStaticFunction {
this.deviceIcon,
required this.operationDialogType,
this.comparator,
this.deviceType,
String? uniqueCustomId,
}) : uniqueCustomId = uniqueCustomId ?? const Uuid().v4();
@ -44,6 +46,7 @@ class SceneStaticFunction {
OperationDialogType? operationDialogType,
String? comparator,
String? uniqueCustomId,
String? deviceType,
}) {
return SceneStaticFunction(
icon: icon ?? this.icon,
@ -57,6 +60,7 @@ class SceneStaticFunction {
operationDialogType: operationDialogType ?? this.operationDialogType,
comparator: comparator ?? this.comparator,
uniqueCustomId: uniqueCustomId ?? const Uuid().v4(),
deviceType: deviceType ?? this.deviceType,
);
}
@ -73,6 +77,7 @@ class SceneStaticFunction {
'operationDialogType': operationDialogType.name,
'comparator': comparator,
'uniqueCustomId': uniqueCustomId,
'deviceType': deviceType,
};
}
@ -93,6 +98,7 @@ class SceneStaticFunction {
: OperationDialogType.none,
comparator: map['comparator'],
uniqueCustomId: map['uniqueCustomId'] ?? const Uuid().v4(),
deviceType: map['deviceType'] ?? '',
);
}
@ -103,7 +109,7 @@ class SceneStaticFunction {
@override
String toString() {
return 'SceneStaticFunction(icon: $icon, name: $deviceName, code: $code, operationalValues: $operationalValues, deviceId: $deviceId, operationName: $operationName, functionValue: $functionValue, deviceIcon: $deviceIcon, operationDialogType: $operationDialogType, comparator: $comparator, uniqueCustomId: $uniqueCustomId)';
return 'SceneStaticFunction(icon: $icon, name: $deviceName, code: $code, operationalValues: $operationalValues, deviceId: $deviceId, operationName: $operationName, functionValue: $functionValue, deviceIcon: $deviceIcon, operationDialogType: $operationDialogType, comparator: $comparator, uniqueCustomId: $uniqueCustomId, deviceType: $deviceType)';
}
@override
@ -121,7 +127,8 @@ class SceneStaticFunction {
other.uniqueCustomId == uniqueCustomId &&
other.operationDialogType == operationDialogType &&
listEquals(other.operationalValues, operationalValues) &&
other.deviceId == deviceId;
other.deviceId == deviceId &&
other.deviceType == deviceType;
}
@override
@ -136,7 +143,8 @@ class SceneStaticFunction {
comparator.hashCode ^
uniqueCustomId.hashCode ^
operationDialogType.hashCode ^
operationalValues.hashCode;
operationalValues.hashCode ^
deviceType.hashCode;
}
}

View File

@ -26,20 +26,20 @@ class DeviceFunctionsView extends StatelessWidget
Widget build(BuildContext context) {
final device = (ModalRoute.of(context)?.settings.arguments as Map)['device']
as DeviceModel;
final isAutomation = (ModalRoute.of(context)?.settings.arguments
as Map)['isAutomationDeviceStatus'] as bool;
List<SceneStaticFunction> functions = [];
if (device.functions.isNotEmpty) {
functions = getFunctionsWithIcons(
type: device.productType,
functions: device.functions,
deviceId: device.uuid ?? '',
deviceName: device.name ?? '',
isAutomation: isAutomation,
);
}
// if (device.functions.isNotEmpty) {
functions = getFunctionsWithIcons(
productType: device.type ?? '',
type: device.productType,
functions: device.functions,
deviceId: device.uuid ?? '',
deviceName: device.name ?? '',
isAutomation: isAutomation,
);
// }
return DefaultScaffold(
title: getTitle(type: device.productType),
@ -257,6 +257,7 @@ class DeviceFunctionsView extends StatelessWidget
deviceName: device.name ?? '',
uniqueId: function.uniqueCustomId!,
operationType: function.operationDialogType,
deviceType: function.deviceType!,
));
Navigator.pop(context);
},
@ -297,6 +298,7 @@ class DeviceFunctionsView extends StatelessWidget
return;
}
context.read<CreateSceneBloc>().add(TempHoldSceneTasksEvent(
deviceType: function.deviceType!,
deviceControlModel: DeviceControlModel(
deviceId: device.uuid,
code: function.code,

View File

@ -82,6 +82,7 @@ class RoutinesView extends StatelessWidget {
routines: state.scenes,
loadingStates: state.loadingStates,
loadingSceneId: state.loadingSceneId,
disablePlayButton: false,
),
RoutinesExpansionTile(
title: 'Automation',
@ -90,6 +91,7 @@ class RoutinesView extends StatelessWidget {
routines: state.automationList,
loadingStates: state.loadingStates,
loadingSceneId: state.loadingSceneId,
disablePlayButton: true,
),
const SizedBox(height: 15),
],

View File

@ -7,12 +7,12 @@ import 'package:syncrow_app/utils/context_extension.dart';
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
class AlertDialogSliderSteps extends StatefulWidget {
const AlertDialogSliderSteps({
super.key,
this.functionValue,
required this.taskItem,
required this.isAutomation,
});
const AlertDialogSliderSteps(
{super.key,
this.functionValue,
required this.taskItem,
required this.isAutomation,
});
final dynamic functionValue;
final SceneStaticFunction taskItem;
@ -108,67 +108,69 @@ class _AlertDialogSliderStepsState extends State<AlertDialogSliderSteps> {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
ToggleButtons(
isSelected: [
selectedToggleIndex == 0,
selectedToggleIndex == 1,
selectedToggleIndex == 2
],
onPressed: (index) {
setState(() {
selectedToggleIndex = index;
});
context.read<CreateSceneBloc>().add(
SelectedValueEvent(
value: _deNormalizeValue(groupValue),
code: widget.taskItem.code,
isAutomation: widget.isAutomation,
comparator: _indexToComparator(selectedToggleIndex),
widget.isAutomation
? ToggleButtons(
isSelected: [
selectedToggleIndex == 0,
selectedToggleIndex == 1,
selectedToggleIndex == 2
],
onPressed: (index) {
setState(() {
selectedToggleIndex = index;
});
context.read<CreateSceneBloc>().add(
SelectedValueEvent(
value: _deNormalizeValue(groupValue),
code: widget.taskItem.code,
isAutomation: widget.isAutomation,
comparator: _indexToComparator(selectedToggleIndex),
),
);
},
borderRadius: BorderRadius.circular(30),
selectedColor: Colors.white,
color: ColorsManager.blackColor,
fillColor: ColorsManager.primaryColorWithOpacity,
borderColor: ColorsManager.greyColor,
constraints: BoxConstraints.tight(const Size(70, 30)),
children: [
SizedBox(
width: 70,
height: 30,
child: Container(
color: selectedToggleIndex == 0
? ColorsManager.primaryColorWithOpacity
: ColorsManager.greyColor,
alignment: Alignment.center,
child: const Text("<"),
),
),
);
},
borderRadius: BorderRadius.circular(30),
selectedColor: Colors.white,
color: ColorsManager.blackColor,
fillColor: ColorsManager.primaryColorWithOpacity,
borderColor: ColorsManager.greyColor,
constraints: BoxConstraints.tight(const Size(70, 30)),
children: [
SizedBox(
width: 70,
height: 30,
child: Container(
color: selectedToggleIndex == 0
? ColorsManager.primaryColorWithOpacity
: ColorsManager.greyColor,
alignment: Alignment.center,
child: const Text("<"),
),
),
SizedBox(
width: 70,
height: 30,
child: Container(
color: selectedToggleIndex == 1
? ColorsManager.primaryColorWithOpacity
: ColorsManager.greyColor,
alignment: Alignment.center,
child: const Text("="),
),
),
SizedBox(
width: 70,
height: 30,
child: Container(
color: selectedToggleIndex == 2
? ColorsManager.primaryColorWithOpacity
: ColorsManager.greyColor,
alignment: Alignment.center,
child: const Text(">"),
),
),
],
),
SizedBox(
width: 70,
height: 30,
child: Container(
color: selectedToggleIndex == 1
? ColorsManager.primaryColorWithOpacity
: ColorsManager.greyColor,
alignment: Alignment.center,
child: const Text("="),
),
),
SizedBox(
width: 70,
height: 30,
child: Container(
color: selectedToggleIndex == 2
? ColorsManager.primaryColorWithOpacity
: ColorsManager.greyColor,
alignment: Alignment.center,
child: const Text(">"),
),
),
],
)
: SizedBox(),
const SizedBox(height: 12),
...widget.taskItem.operationalValues.map(
(operation) => BlocBuilder<CreateSceneBloc, CreateSceneState>(

View File

@ -70,7 +70,8 @@ class CustomBottomSheetWidget extends StatelessWidget {
color: ColorsManager.greyColor,
),
onPressed: () {
Navigator.pushNamed(context, Routes.smartAutomationSelectRoute, arguments: sceneId);
Navigator.pushNamed(context, Routes.smartAutomationSelectRoute,
arguments: sceneId);
},
),
SceneListTile(
@ -92,7 +93,8 @@ class CustomBottomSheetWidget extends StatelessWidget {
}
void _onDelayActionPressed(BuildContext context) {
final functionValues = context.read<CreateSceneBloc>().selectedValues['delay'];
final functionValues =
context.read<CreateSceneBloc>().selectedValues['delay'];
final functions = [
SceneStaticFunction(
deviceId: 'delay',
@ -115,8 +117,10 @@ class CustomBottomSheetWidget extends StatelessWidget {
),
title: functions[0].operationName,
onConfirm: () {
final selectedValue = context.read<CreateSceneBloc>().selectedValues['delay'];
final selectedValue =
context.read<CreateSceneBloc>().selectedValues['delay'];
context.read<CreateSceneBloc>().add(TempHoldSceneTasksEvent(
deviceType: '',
deviceControlModel: DeviceControlModel(
deviceId: '',
code: '',
@ -138,7 +142,9 @@ class CustomBottomSheetWidget extends StatelessWidget {
for (var element in tempTaskList) {
if (element.code == functions[0].code) {
context.read<CreateSceneBloc>().add(RemoveTempTaskByIdEvent(code: functions[0].code));
context
.read<CreateSceneBloc>()
.add(RemoveTempTaskByIdEvent(code: functions[0].code));
context
.read<CreateSceneBloc>()
.add(RemoveFromSelectedValueById(code: functions[0].code));

View File

@ -11,6 +11,7 @@ class RoutinesExpansionTile extends StatelessWidget {
required this.emptyRoutinesMessage,
required this.routines,
required this.loadingStates,
required this.disablePlayButton,
this.loadingSceneId,
});
final String title;
@ -18,6 +19,7 @@ class RoutinesExpansionTile extends StatelessWidget {
final List<ScenesModel> routines;
final Map<String, bool> loadingStates;
final String? loadingSceneId;
final bool disablePlayButton;
@override
Widget build(BuildContext context) {
@ -43,7 +45,7 @@ class RoutinesExpansionTile extends StatelessWidget {
child: SceneGrid(
scenes: routines,
loadingSceneId: loadingSceneId,
disablePlayButton: false,
disablePlayButton: disablePlayButton,
loadingStates: loadingStates,
),
),

View File

@ -0,0 +1,16 @@
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:syncrow_app/main.dart';
Widget buildNumberAndEnvironmentLabel() {
String envNAME = dotenv.env['ENV_NAME'] ?? '';
return SizedBox(
child: Center(
child: Text(
'\n$envNAME \nBuild Number $buildNumber',
textAlign: TextAlign.center,
),
),
);
}

View File

@ -1140,11 +1140,25 @@ class Assets {
static const String parlour = 'assets/icons/parlour.svg';
static const String grid = 'assets/images/grid.svg';
static const String toggleSwitchSmall = 'assets/icons/toggleSwitchSmall.svg';
static const String offToggleSwitchSmall = 'assets/icons/offToggleSwitchSmall.svg';
static const String saveRoutinesIcon = 'assets/icons/save_routines_icon.svg';
static const String cancelIcon = 'assets/icons/cancel_icon.svg';
static const String toggleSwitchSmall = 'assets/icons/toggleSwitchSmall.svg';
static const String offToggleSwitchSmall =
'assets/icons/offToggleSwitchSmall.svg';
static const String saveRoutinesIcon = 'assets/icons/save_routines_icon.svg';
static const String cancelIcon = 'assets/icons/cancel_icon.svg';
static const String refreshStatusIcon =
'assets/icons/refresh_status_icon.svg';
static const String detectionDistanceIcon =
'assets/icons/detection_distance_icon.svg';
static const String triggerLevelIcon = 'assets/icons/trigger_level_icon.svg';
static const String indentLevelIcon = 'assets/icons/indent_level_icon.svg';
static const String targetConfirmTimeIcon =
'assets/icons/target_confirm_time_icon.svg';
static const String disappeDelayIcon = 'assets/icons/disappe_delay_icon.svg';
static const String flushIcon = 'assets/icons/flush_icon.svg';
static const String IlluminanceIcon = 'assets/icons/Illuminance_icon.svg';
static const String nobodyTime = "assets/icons/nobody_time.svg";
static const String currentDistanceIcon = 'assets/icons/distance_icon.svg';
static const String delayIcon = 'assets/icons/delay_icon.svg';
static const String levelIcon = 'assets/icons/level_icon.svg';
}

View File

@ -9,6 +9,9 @@ import 'package:syncrow_app/utils/bloc_observer.dart';
import 'package:syncrow_app/utils/helpers/localization_helpers.dart';
import 'my_app.dart';
const String buildNumber = '1.0.30+17';
void main() {
//to observe the state of the blocs in the output console
Bloc.observer = MyBlocObserver();

View File

@ -126,8 +126,7 @@ abstract class ApiEndpoints {
static const String gatewayApi = '/devices/gateway/{gatewayUuid}/devices';
static const String deviceFunctionsStatus =
'/devices/{deviceUuid}/functions/status';
static const String powerClamp =
'/devices/{deviceUuid}/functions/status';
static const String powerClamp = '/devices/{deviceUuid}/functions/status';
///Device Permission Module
//POST
@ -233,4 +232,6 @@ abstract class ApiEndpoints {
static const String getPermission = '/permission/{roleUuid}';
static const String getAllDevices =
'/projects/{projectUuid}/communities/{communityUuid}/spaces/{spaceUuid}/devices';
static const String getReportLogs = '/devices/{uuid}/report-logs?code={code}';
}

View File

@ -102,7 +102,8 @@ class DevicesAPI {
static Future<Map<String, dynamic>> getPowerClampStatus(
String deviceId) async {
final response = await _httpService.get(
path: ApiEndpoints.deviceFunctionsStatus.replaceAll('{deviceUuid}', deviceId),
path: ApiEndpoints.deviceFunctionsStatus
.replaceAll('{deviceUuid}', deviceId),
showServerMessage: false,
expectedResponseModel: (json) {
return json;
@ -144,7 +145,7 @@ class DevicesAPI {
path: ApiEndpoints.deviceScene.replaceAll('{deviceUuid}', deviceId),
showServerMessage: false,
expectedResponseModel: (json) {
return json;
return json['data'];
});
return response;
}
@ -189,7 +190,7 @@ class DevicesAPI {
path: ApiEndpoints.deviceByUuid.replaceAll('{deviceUuid}', deviceId),
showServerMessage: false,
expectedResponseModel: (json) {
return json['data'];
return json['data'] as Map<String, dynamic>;
});
return response;
}
@ -568,6 +569,22 @@ class DevicesAPI {
return response;
}
static Future<DeviceReport> getReports(
String uuid,
String code,
) async {
final response = await HTTPService().get(
path: ApiEndpoints.getReportLogs
.replaceAll('{uuid}', uuid)
.replaceAll('{code}', code),
showServerMessage: false,
expectedResponseModel: (json) {
return DeviceReport.fromJson(json);
},
);
return response;
}
static Future<List<DeviceModel>> getAllDevices({
required String communityUuid,
required String spaceUuid,
@ -592,11 +609,9 @@ class DevicesAPI {
return <DeviceModel>[];
}
final result = <DeviceModel>[];
for (final device in data) {
final mappedDevice = DeviceModel.fromJson(device);
if (mappedDevice.productType?.name != DeviceType.FlushMountedSensor.name) {
result.add(mappedDevice);
}
for (final device in data) {
final mappedDevice = DeviceModel.fromJson(device);
result.add(mappedDevice);
}
return result;
},

View File

@ -36,7 +36,5 @@ abstract class ColorsManager {
static const Color grayButtonColors = Color(0xffCCCCCC);
static const Color blueButton = Color(0xff85BDFF);
static const Color backgroundGrey = Color(0xFFF3F3F3);
static const Color grayTextColor = Color(0xFFC4C4C4);
}
//background: #F5F5F5;background: #85BDFF;

View File

@ -5,7 +5,7 @@ description: This is the mobile application project, developed with Flutter for
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.30+1
version: 1.0.30+16
environment:
sdk: ">=3.0.6 <4.0.0"