feat: 更新代码仓库全部修改
Some checks failed
Build Android APK / 编译 libcore.aar (push) Has been cancelled
Build Android APK / 编译 Android APK (release) (push) Has been cancelled
Build Android APK / 创建 GitHub Release (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Android) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Windows) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (macOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Linux) (push) Has been cancelled
Build Multi-Platform / 构建 Android APK (push) Has been cancelled
Build Multi-Platform / 构建 Windows (push) Has been cancelled
Build Multi-Platform / 构建 macOS (push) Has been cancelled
Build Multi-Platform / 构建 Linux (push) Has been cancelled
Build Multi-Platform / 创建 Release (push) Has been cancelled
Build Windows / build (push) Has been cancelled

This commit is contained in:
speakeloudest 2025-10-30 04:47:53 -07:00
parent 145832093e
commit f42a481452
134 changed files with 8032 additions and 4270 deletions

BIN
android/app/src/main/ic_launcher-playstore.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 24 KiB

BIN
android/app/src/main/res/drawable-hdpi/ic_stat_logo.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
android/app/src/main/res/drawable-ldpi/ic_stat_logo.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
android/app/src/main/res/drawable-ldpi/splash.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
android/app/src/main/res/drawable-mdpi/ic_stat_logo.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
android/app/src/main/res/drawable-mdpi/splash.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
android/app/src/main/res/drawable-v21/background.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 B

After

Width:  |  Height:  |  Size: 844 KiB

View File

@ -1,9 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
<bitmap
android:gravity="fill_horizontal|fill_vertical"
android:src="@drawable/background"
android:tileMode="disabled" />
</item>
<item>
<bitmap android:gravity="center" android:src="@drawable/splash"/>
<bitmap
android:gravity="center"
android:src="@drawable/splash"
android:width="50dp"
android:height="50dp" />
</item>
</layer-list>

BIN
android/app/src/main/res/drawable-xhdpi/ic_stat_logo.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
android/app/src/main/res/drawable-xhdpi/splash.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
android/app/src/main/res/drawable-xxhdpi/ic_stat_logo.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
android/app/src/main/res/drawable-xxhdpi/splash.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
android/app/src/main/res/drawable-xxxhdpi/splash.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
android/app/src/main/res/drawable/background.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 B

After

Width:  |  Height:  |  Size: 844 KiB

BIN
android/app/src/main/res/drawable/splash.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher.webp Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1008 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher.webp Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 794 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -6,7 +6,7 @@
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:windowSplashScreenBackground">#F0F3FA</item>
<item name="android:windowSplashScreenBackground">@drawable/launch_background</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
@ -16,6 +16,6 @@
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
</resources>

View File

@ -0,0 +1,3 @@
<svg width="10" height="11" viewBox="0 0 10 11" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.21003 4.67513C9.84737 5.06517 9.84737 5.99098 9.21003 6.38102L2.2201 10.6588C1.55376 11.0666 0.698099 10.5871 0.698099 9.80586L0.698099 1.25029C0.698099 0.469078 1.55376 -0.0104452 2.2201 0.397347L9.21003 4.67513Z" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 352 B

BIN
assets/images/global-bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

@ -0,0 +1,4 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="24" cy="24" r="24" fill="#ADFF5B"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.3617 23.9999L24.7263 16.3403L27.5745 19.3025L23.058 23.9999L27.5745 28.6966L24.7257 31.6595L17.6446 24.2947L17.3617 23.9999Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 345 B

View File

@ -0,0 +1,5 @@
<svg width="429" height="360" viewBox="0 0 429 360" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M126.397 143.749H206.991L234.774 0H319.122L250.041 360H165.443L192.975 216.502H112.381L84.5986 360H0L59.3191 52.6829L33.0385 0H153.929L126.397 143.749Z" fill="black" style="mix-blend-mode:plus-lighter"/>
<path d="M359.669 360H275.321L324.649 103.108H409.175L359.669 360Z" fill="black" style="mix-blend-mode:plus-lighter"/>
<path d="M413.305 81.7003H328.758L344.401 0.250871H429L413.305 81.7003Z" fill="black" style="mix-blend-mode:plus-lighter"/>
</svg>

After

Width:  |  Height:  |  Size: 563 B

View File

@ -0,0 +1,61 @@
<svg width="247" height="203" viewBox="0 0 247 203" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M239.315 202.151L235.671 202.689L233.39 199.853L237.035 199.316L239.315 202.151ZM234.684 196.003L233.32 199.376L236.964 198.838L238.329 195.465L234.684 196.003ZM233.627 188.839L232.263 192.212L235.907 191.674L237.272 188.301L233.627 188.839ZM246.676 193.989L244.449 191.219L243.116 194.515L245.343 197.285L246.676 193.989ZM232.333 192.69L234.614 195.525L238.258 194.987L235.978 192.152L232.333 192.69ZM240.008 191.313L237.728 188.478L236.363 191.851L238.644 194.686L240.008 191.313ZM239.17 195.341L241.398 198.111L244.958 197.586L242.731 194.816L239.17 195.341ZM242.66 194.338L243.993 191.043L240.432 191.568L239.099 194.863L242.66 194.338ZM241.065 198.477L238.785 195.642L237.42 199.015L239.701 201.85L241.065 198.477Z" fill="white"/>
<path d="M18.1236 3.34464L19.2773 3.14965L20.0189 7.53741C20.1222 8.14874 20.3353 8.56911 20.6712 8.81658C20.9956 9.05586 21.4742 9.1271 22.0954 9.0221C22.7067 8.91877 23.1353 8.69421 23.3729 8.35993C23.599 8.01746 23.6719 7.54876 23.5685 6.93743L22.8269 2.54966L23.9805 2.35467L24.7188 6.72271C24.8738 7.63971 24.7358 8.38311 24.3047 8.95292C23.872 9.51287 23.1922 9.87118 22.2654 10.0278C21.3287 10.1862 20.5689 10.0712 19.9975 9.69109C19.3916 9.28641 19.0169 8.62968 18.8619 7.71268L18.1236 3.34464Z" fill="white"/>
<path d="M28.2917 3.59288C29.57 3.41946 30.3082 4.02572 30.4991 5.43283L30.928 8.59387L29.7983 8.74713L29.3829 5.68518C29.2687 4.84289 28.8257 4.47914 28.0528 4.58399C27.7754 4.62164 27.5411 4.75434 27.3599 4.98075C27.1516 5.23102 27.0559 5.56694 27.0714 5.97859L27.4895 9.06036L26.3598 9.21362L25.6648 4.09055L26.7944 3.93729L26.8751 4.53185C27.041 4.26714 27.2434 4.04794 27.475 3.89542C27.7152 3.73165 27.9845 3.63455 28.2917 3.59288Z" fill="white"/>
<path d="M31.3459 1.21347L32.4794 1.09232L33.2531 8.33109L32.1196 8.45224L31.3459 1.21347Z" fill="white"/>
<path d="M36.3605 2.7097C37.1374 2.63973 37.7872 2.83221 38.312 3.30706C38.8258 3.77284 39.1231 4.39869 39.1949 5.19547C39.2658 5.98228 39.085 6.65119 38.6718 7.19044C38.2403 7.7514 37.6262 8.06776 36.8494 8.13773C36.0626 8.2086 35.4118 8.00616 34.8871 7.53131C34.3741 7.07549 34.0867 6.44874 34.0159 5.66193C33.9441 4.86515 34.1149 4.19714 34.5472 3.64614C34.9687 3.08607 35.5737 2.78057 36.3605 2.7097ZM36.4439 3.63595C35.9659 3.67901 35.6235 3.89058 35.3986 4.29237C35.2082 4.63081 35.1363 5.05899 35.1812 5.55697C35.226 6.05496 35.3723 6.45344 35.6202 6.75241C35.9123 7.0976 36.2879 7.25454 36.766 7.21148C37.2341 7.16932 37.5855 6.9469 37.8113 6.55506C38.0008 6.20666 38.0835 5.78755 38.0396 5.29952C37.9947 4.80154 37.8375 4.394 37.5897 4.09502C37.2967 3.73988 36.912 3.59379 36.4439 3.63595Z" fill="white"/>
<path d="M42.3406 2.27416C43.0096 2.23685 43.5471 2.3571 43.9632 2.63435C44.3904 2.93102 44.6767 3.3958 44.8127 4.03922L43.6845 4.10215C43.5962 3.77656 43.4431 3.54473 43.2345 3.39612C43.0159 3.24806 42.7319 3.18378 42.3924 3.20272C41.973 3.22611 41.6519 3.39425 41.4301 3.72712C41.2077 4.05001 41.1124 4.49601 41.1436 5.05514C41.1754 5.62425 41.3103 6.06743 41.5677 6.37357C41.8046 6.67083 42.143 6.81221 42.5823 6.7877C43.3412 6.74538 43.7393 6.34257 43.7874 5.58873L44.9157 5.52579C44.8349 6.23139 44.5942 6.76562 44.2038 7.12793C43.8228 7.47969 43.2931 7.6795 42.6241 7.71682C41.8254 7.76137 41.1919 7.5363 40.7236 7.04161C40.2664 6.56634 40.0205 5.92904 39.976 5.13028C39.9325 4.35149 40.1066 3.70079 40.4986 3.18816C40.9179 2.62394 41.5319 2.31927 42.3406 2.27416Z" fill="white"/>
<path d="M45.6235 0.138545L46.7631 0.108188L46.8738 4.26671L48.9385 2.16099L50.408 2.12184L48.1758 4.32206L50.7456 7.28468L49.2861 7.32356L47.4155 5.07258L46.9087 5.57625L46.9569 7.38561L45.8173 7.41596L45.6235 0.138545Z" fill="white"/>
<path d="M54.6644 0L55.8043 0.0144245L55.7122 7.29384L54.5723 7.27942L54.6644 0Z" fill="white"/>
<path d="M57.8611 0.0575568C58.081 0.0630011 58.2693 0.137682 58.4157 0.281351C58.5522 0.424773 58.6278 0.606698 58.6223 0.82663C58.6169 1.04656 58.5322 1.23452 58.3788 1.37077C58.2253 1.50701 58.0437 1.57254 57.8237 1.56709C57.6038 1.56165 57.4256 1.48722 57.2791 1.34355C57.1329 1.18988 57.0673 1.0082 57.0728 0.788272C57.0782 0.56834 57.1527 0.390127 57.3061 0.253882C57.4595 0.117637 57.6412 0.0521124 57.8611 0.0575568ZM57.2391 2.15281L58.3787 2.18102L58.2508 7.34943L57.1111 7.32122L57.2391 2.15281Z" fill="white"/>
<path d="M61.9695 2.19733C62.6087 2.2285 63.106 2.50304 63.4602 3.04093L63.4909 2.41168L64.6295 2.4672L64.3938 7.30146C64.3144 8.92952 63.4654 9.7091 61.8474 9.6302C61.1182 9.59465 60.5757 9.42803 60.2088 9.14983C59.8429 8.85165 59.6236 8.42046 59.552 7.83628L60.6907 7.8918C60.7365 8.18438 60.8466 8.38999 61.0305 8.5191C61.2049 8.63774 61.4917 8.71179 61.8912 8.73127C62.7502 8.77315 63.2021 8.33464 63.2469 7.41573L63.2839 6.65664C62.8785 7.1675 62.356 7.41234 61.7167 7.38117C61.0176 7.34708 60.4599 7.0796 60.0528 6.59921C59.6363 6.10833 59.4572 5.46885 59.4952 4.68978C59.5332 3.9107 59.7736 3.29168 60.2365 2.83368C60.6893 2.37519 61.2703 2.16324 61.9695 2.19733ZM62.1045 3.125C61.675 3.10406 61.3381 3.23781 61.0838 3.52577C60.8299 3.80373 60.6901 4.2074 60.6638 4.74676C60.6399 5.23618 60.7113 5.62011 60.8875 5.90903C61.0911 6.24936 61.4324 6.4362 61.9318 6.46055C62.3713 6.48198 62.7182 6.34872 62.9716 6.08074C63.2159 5.7923 63.3552 5.39862 63.3806 4.87924C63.4064 4.34986 63.3065 3.93451 63.0914 3.62366C62.8663 3.31233 62.534 3.14595 62.1045 3.125Z" fill="white"/>
<path d="M66.0453 0.445295L67.1817 0.535318L66.9606 3.32657C67.1729 3.05248 67.4287 2.86209 67.7189 2.74464C67.9784 2.63479 68.2722 2.59788 68.6012 2.62394C69.2292 2.67369 69.6836 2.89024 69.9634 3.28356C70.2248 3.65537 70.3333 4.18559 70.2788 4.87344L70.0261 8.06344L68.8897 7.97342L69.1266 4.98279C69.1613 4.54416 69.0984 4.19812 68.9471 3.95541C68.7675 3.6904 68.4879 3.54787 68.0991 3.51708C67.7402 3.48865 67.4501 3.6061 67.2286 3.86943C66.9971 4.13197 66.8698 4.47298 66.835 4.91161L66.6068 7.79258L65.4704 7.70256L66.0453 0.445295Z" fill="white"/>
<path d="M73.4571 1.53636L73.2803 3.19699L74.4239 3.31869L74.3244 4.25341L73.1808 4.13171L72.8718 7.03531C72.8591 7.15464 72.8695 7.24625 72.9218 7.3222C72.9751 7.38822 73.0514 7.42651 73.1708 7.43921L73.8469 7.51118L73.7475 8.4459L72.8824 8.35383C72.4349 8.3062 72.1194 8.15196 71.936 7.89108C71.7604 7.65115 71.6938 7.33231 71.7382 6.91467L72.0472 4.01106L71.1225 3.91264L71.222 2.97792L72.1467 3.07634L72.2737 1.88308L73.4571 1.53636Z" fill="white"/>
<path d="M77.9568 3.63243C79.236 3.79898 79.7902 4.57704 79.6068 5.98515L79.195 9.14846L78.0645 9.00128L78.4635 5.93714C78.5732 5.09425 78.2407 4.62741 77.4672 4.52671C77.1896 4.49056 76.9288 4.55745 76.6947 4.72866C76.4283 4.91584 76.2482 5.21509 76.1556 5.61649L75.754 8.70046L74.6236 8.55328L75.2911 3.42655L76.4215 3.57373L76.3441 4.16871C76.5734 3.95654 76.826 3.79782 77.0894 3.7111C77.364 3.61576 77.6494 3.59241 77.9568 3.63243Z" fill="white"/>
<path d="M82.1642 2.23026C82.3815 2.26408 82.5585 2.36246 82.6852 2.52386C82.802 2.68372 82.8534 2.87388 82.8196 3.09127C82.7857 3.30865 82.6775 3.48409 82.5077 3.59936C82.338 3.71464 82.1494 3.75613 81.932 3.7223C81.7146 3.68848 81.5475 3.59163 81.4208 3.43023C81.2957 3.25895 81.2542 3.07033 81.288 2.85295C81.3218 2.63556 81.4187 2.46847 81.5884 2.35319C81.7581 2.23792 81.9468 2.19643 82.1642 2.23026ZM81.2765 4.22753L82.4029 4.40281L81.608 9.51133L80.4816 9.33605L81.2765 4.22753Z" fill="white"/>
<path d="M86.4641 4.96713C87.7341 5.19345 88.2512 5.99663 88.0021 7.3946L87.4424 10.5351L86.3201 10.3351L86.8622 7.29305C87.0113 6.45623 86.7011 5.97432 85.9332 5.83748C85.6575 5.78835 85.3939 5.84294 85.152 6.003C84.8772 6.17748 84.6832 6.46795 84.5719 6.86457L84.0262 9.92634L82.9039 9.72633L83.811 4.63652L84.9333 4.83652L84.828 5.42722C85.067 5.22603 85.3268 5.07933 85.594 5.00505C85.8727 4.92268 86.1589 4.91274 86.4641 4.96713Z" fill="white"/>
<path d="M91.7167 5.99079C92.343 6.12222 92.7908 6.47162 93.0559 7.05857L93.1853 6.442L94.301 6.67611L93.3071 11.413C92.9724 13.0082 92.0112 13.6444 90.4257 13.3117C89.7113 13.1618 89.2018 12.9118 88.8833 12.5793C88.5689 12.2273 88.4202 11.7669 88.4415 11.1788L89.5572 11.4129C89.5563 11.709 89.6327 11.9294 89.794 12.0859C89.9476 12.2305 90.2191 12.3488 90.6106 12.4309C91.4522 12.6075 91.9675 12.2456 92.1565 11.3452L92.3125 10.6014C91.8318 11.0421 91.2772 11.2016 90.6509 11.0702C89.9658 10.9264 89.4572 10.5745 89.1308 10.036C88.7967 9.48564 88.7206 8.82594 88.8808 8.06256C89.041 7.29919 89.3758 6.72574 89.905 6.34633C90.4245 5.96486 91.0316 5.84703 91.7167 5.99079ZM91.7039 6.92814C91.2831 6.83984 90.9293 6.91887 90.6328 7.16319C90.3384 7.39773 90.1367 7.77434 90.0258 8.30283C89.9252 8.78239 89.9353 9.17278 90.0637 9.48583C90.2113 9.85397 90.5189 10.0922 91.0082 10.1949C91.4389 10.2853 91.8024 10.2083 92.0948 9.98353C92.3815 9.73716 92.5811 9.37033 92.6879 8.86141C92.7967 8.34271 92.7635 7.9168 92.6 7.57596C92.4267 7.23307 92.1247 7.01645 91.7039 6.92814Z" fill="white"/>
<path d="M94.9432 8.98679L99.8458 10.1977L99.6204 11.1103L94.7178 9.89937L94.9432 8.98679Z" fill="white"/>
<path d="M103.918 7.0673L104.979 7.35634L104.727 8.28261L103.82 8.0356C103.675 7.99619 103.559 8.00588 103.461 8.06205C103.362 8.11821 103.302 8.22611 103.257 8.39014L103.121 8.89186L104.394 9.23872L104.15 10.136L102.876 9.78918L101.762 13.8802L100.662 13.5806L101.776 9.48962L100.667 9.18744L100.911 8.29012L102.021 8.59231L102.165 8.06163C102.281 7.6371 102.489 7.33093 102.796 7.15541C103.095 6.96761 103.474 6.94642 103.918 7.0673Z" fill="white"/>
<path d="M107.422 10.0102C108.149 10.2313 108.639 10.5789 108.873 11.0472C109.083 11.456 109.096 11.9618 108.913 12.5646L107.953 15.7218L106.939 15.4134L107.137 14.7628C106.87 14.9534 106.575 15.0624 106.257 15.112C105.898 15.1595 105.501 15.1226 105.071 14.9916C104.554 14.8345 104.193 14.5784 103.975 14.2299C103.75 13.8689 103.699 13.4875 103.824 13.0761C103.993 12.5212 104.334 12.1546 104.865 11.9919C105.354 11.8271 105.965 11.8456 106.698 12.0476L107.788 12.3477L107.846 12.1564C108.044 11.5058 107.786 11.0824 107.078 10.8671C106.771 10.774 106.518 10.7491 106.301 10.8086C106.053 10.869 105.851 11.0167 105.715 11.2576L104.66 10.8427C104.931 10.3293 105.321 10.009 105.828 9.89115C106.261 9.7721 106.79 9.81815 107.422 10.0102ZM107.549 13.1322L106.536 12.8554C105.659 12.6098 105.136 12.785 104.955 13.3782C104.903 13.5504 104.926 13.7143 105.044 13.8757C105.162 14.037 105.333 14.1622 105.573 14.2349C105.994 14.3629 106.385 14.3462 106.745 14.1943C107.108 14.0329 107.357 13.7637 107.473 13.381L107.549 13.1322Z" fill="white"/>
<path d="M112.541 11.6453C113.83 12.078 114.369 12.8286 114.133 13.9096L113.08 13.5564C113.087 13.2845 113.034 13.0662 112.914 12.9205C112.788 12.7621 112.557 12.6319 112.226 12.5206C111.941 12.4251 111.71 12.3899 111.54 12.4275C111.34 12.4555 111.22 12.5628 111.156 12.7524C111.105 12.9041 111.181 13.0876 111.408 13.2905C111.547 13.4109 111.838 13.6139 112.289 13.9026C112.794 14.2199 113.161 14.5116 113.366 14.7808C113.672 15.1578 113.753 15.5754 113.607 16.0114C113.257 17.0543 112.342 17.3275 110.873 16.8343C109.508 16.3761 108.972 15.5528 109.252 14.3707L110.305 14.7239C110.257 15.0558 110.297 15.312 110.414 15.4989C110.537 15.6667 110.77 15.819 111.131 15.9399C111.889 16.1945 112.338 16.1132 112.472 15.715C112.548 15.4875 112.467 15.2596 112.227 15.0314C112.101 14.9047 111.807 14.7112 111.352 14.432C110.818 14.1051 110.458 13.8261 110.272 13.5949C109.973 13.2306 109.894 12.8351 110.038 12.4085C110.19 11.9535 110.488 11.6632 110.95 11.544C111.409 11.4026 111.934 11.4416 112.541 11.6453Z" fill="white"/>
<path d="M117.73 11.8283L117.163 13.399L118.245 13.7896L117.925 14.6738L116.844 14.2832L115.852 17.0296C115.811 17.1424 115.799 17.2339 115.832 17.3201C115.868 17.3969 115.933 17.4523 116.046 17.4931L116.686 17.724L116.366 18.6081L115.548 18.3126C115.125 18.1598 114.855 17.9349 114.739 17.6378C114.626 17.3629 114.637 17.0374 114.78 16.6424L115.771 13.896L114.897 13.5801L115.216 12.696L116.091 13.0118L116.498 11.8832L117.73 11.8283Z" fill="white"/>
<path d="M118.459 17.7833C118.712 17.8792 118.887 18.0638 118.978 18.3334C119.058 18.5994 119.039 18.9025 118.915 19.2296C118.727 19.725 118.414 20.0982 117.991 20.3654C117.563 20.6198 117.074 20.7229 116.535 20.6784L116.769 20.0615C117.057 20.0639 117.329 19.9961 117.585 19.858C117.829 19.6941 117.995 19.511 118.08 19.2867C118.017 19.2841 117.935 19.2744 117.832 19.2353C117.627 19.1571 117.487 19.0183 117.4 18.8248C117.313 18.6313 117.315 18.4288 117.393 18.2232C117.479 17.9989 117.621 17.8497 117.82 17.7757C118.014 17.6888 118.226 17.6944 118.459 17.7833Z" fill="white"/>
<path d="M126.539 16.9714C127.79 17.5054 128.268 18.2965 127.947 19.3553L126.926 18.9195C126.954 18.6489 126.918 18.4271 126.811 18.2723C126.697 18.1044 126.478 17.9563 126.156 17.8189C125.88 17.7011 125.653 17.6476 125.48 17.6715C125.279 17.6836 125.15 17.7809 125.072 17.9649C125.009 18.112 125.069 18.301 125.28 18.5213C125.409 18.6524 125.682 18.8779 126.109 19.2016C126.588 19.5581 126.93 19.878 127.113 20.1627C127.388 20.5628 127.435 20.9855 127.255 21.4086C126.823 22.4203 125.89 22.6198 124.464 22.0113C123.14 21.4459 122.671 20.5826 123.045 19.4265L124.066 19.8624C123.991 20.1894 124.011 20.4481 124.113 20.6436C124.222 20.8207 124.443 20.9911 124.792 21.1403C125.528 21.4544 125.982 21.4091 126.147 21.0228C126.242 20.8021 126.178 20.5684 125.957 20.3219C125.842 20.1855 125.564 19.9692 125.133 19.6547C124.627 19.2864 124.29 18.9797 124.123 18.7344C123.854 18.3474 123.807 17.947 123.984 17.5331C124.172 17.0916 124.492 16.8259 124.962 16.7439C125.431 16.6395 125.951 16.7202 126.539 16.9714Z" fill="white"/>
<path d="M131.615 19.2266C132.387 19.5823 132.86 20.1087 133.026 20.8238C133.18 21.4676 133.066 22.2185 132.676 23.0632L129.162 21.4435C128.997 21.8961 128.96 22.2866 129.055 22.6057C129.151 22.9248 129.387 23.1768 129.759 23.3484C130.077 23.4949 130.365 23.5394 130.632 23.4862C130.84 23.4393 131.065 23.3113 131.313 23.1066L132.348 23.5837C132.039 23.9694 131.649 24.2413 131.188 24.3813C130.607 24.5429 130.006 24.486 129.379 24.1972C128.68 23.875 128.226 23.4017 128.014 22.7865C127.783 22.1406 127.846 21.4316 128.206 20.6506C128.528 19.9513 128.996 19.4621 129.631 19.1824C130.252 18.8852 130.915 18.9043 131.615 19.2266ZM131.253 20.0838C130.907 19.9247 130.602 19.8942 130.31 20.0019C130.032 20.1048 129.775 20.3277 129.54 20.6708L131.956 21.784C132.216 20.9793 131.979 20.4186 131.253 20.0838Z" fill="white"/>
<path d="M136.906 21.7783C137.504 22.0794 137.91 22.4515 138.133 22.8993C138.355 23.3694 138.372 23.9151 138.169 24.5407L137.16 24.0329C137.245 23.7066 137.228 23.4293 137.121 23.1965C137.006 22.9592 136.791 22.7619 136.488 22.6091C136.112 22.4204 135.75 22.4061 135.392 22.5841C135.038 22.7532 134.733 23.0924 134.482 23.5926C134.226 24.1019 134.122 24.5533 134.192 24.947C134.25 25.3228 134.472 25.614 134.866 25.8118C135.544 26.1533 136.09 26.0025 136.508 25.373L137.517 25.8807C137.096 26.4522 136.621 26.7954 136.102 26.9149C135.596 27.0299 135.037 26.9391 134.439 26.6381C133.724 26.2786 133.287 25.7677 133.128 25.1054C132.968 24.4655 133.073 23.7905 133.432 23.0758C133.783 22.379 134.258 21.9016 134.853 21.6526C135.498 21.3724 136.182 21.4143 136.906 21.7783Z" fill="white"/>
<path d="M139.816 23.4216L140.819 23.9638L139.321 26.7347C139.121 27.1041 139.048 27.406 139.112 27.6676C139.18 27.9203 139.378 28.1415 139.73 28.3318C139.95 28.4507 140.214 28.4681 140.516 28.3928C140.823 28.3086 141.11 28.1344 141.374 27.8565L142.877 25.0769L143.88 25.6192L141.421 30.1668L140.418 29.6246L140.737 29.0352C140.093 29.3009 139.489 29.2816 138.926 28.9771C137.836 28.3873 137.623 27.4766 138.285 26.254L139.816 23.4216Z" fill="white"/>
<path d="M147.139 27.311C147.356 27.4353 147.527 27.5795 147.639 27.7471L147.071 28.736C146.886 28.5373 146.692 28.3918 146.484 28.2724C146.224 28.1232 145.935 28.0842 145.607 28.173C145.23 28.2679 144.943 28.5069 144.724 28.8885L143.361 31.2653L142.381 30.7031L144.953 26.2184L145.933 26.7806L145.565 27.4225C145.816 27.2667 146.054 27.1728 146.289 27.1459C146.583 27.0955 146.862 27.1518 147.139 27.311Z" fill="white"/>
<path d="M150.169 29.1326C150.895 29.5742 151.305 30.1511 151.388 30.8804C151.469 31.5377 151.269 32.2706 150.786 33.0653L147.479 31.055C147.264 31.486 147.183 31.8697 147.241 32.1976C147.299 32.5255 147.505 32.8028 147.855 33.0158C148.154 33.1976 148.435 33.2747 148.706 33.2522C148.919 33.2294 149.156 33.1279 149.426 32.9528L150.401 33.545C150.049 33.8928 149.631 34.1185 149.157 34.2049C148.561 34.2992 147.97 34.1741 147.381 33.8156C146.723 33.4157 146.326 32.8937 146.186 32.2584C146.03 31.5903 146.173 30.8931 146.62 30.1583C147.02 29.5003 147.54 29.0677 148.203 28.8623C148.855 28.638 149.511 28.7327 150.169 29.1326ZM149.711 29.9429C149.387 29.7455 149.087 29.6803 148.785 29.754C148.496 29.8244 148.215 30.0166 147.943 30.3306L150.216 31.7123C150.566 30.9426 150.395 30.3585 149.711 29.9429Z" fill="white"/>
<path d="M157.077 31.1633L158.021 31.8024L156.44 34.1376C157.107 33.901 157.695 33.9607 158.192 34.2971C158.804 34.712 159.133 35.2607 159.187 35.949C159.229 36.5817 159.042 37.2155 158.616 37.8448C158.173 38.4989 157.643 38.925 157.031 39.1148C156.364 39.3153 155.716 39.2024 155.086 38.7764C154.523 38.3951 154.222 37.9131 154.182 37.3304L153.873 37.7858L152.995 37.1915L157.077 31.1633ZM157.452 34.9075C157.146 34.7001 156.813 34.6561 156.446 34.77C156.043 34.8836 155.689 35.175 155.381 35.6305L155.336 35.6967C155.056 36.1107 154.903 36.5146 154.906 36.9029C154.908 37.3273 155.089 37.6669 155.461 37.9192C155.875 38.1996 156.283 38.258 156.683 38.0944C157.009 37.9525 157.333 37.6525 157.647 37.1888C157.961 36.7251 158.105 36.3157 158.102 35.9634C158.094 35.5473 157.875 35.1935 157.452 34.9075Z" fill="white"/>
<path d="M162.963 37.6298C163.166 37.7756 163.321 37.9363 163.415 38.1144L162.75 39.0406C162.586 38.824 162.408 38.6597 162.213 38.5198C161.969 38.3449 161.686 38.2769 161.351 38.3319C160.966 38.388 160.656 38.5966 160.4 38.9541L158.802 41.1802L157.884 40.5214L160.899 36.321L161.817 36.9798L161.385 37.581C161.65 37.4514 161.897 37.3822 162.133 37.3792C162.431 37.359 162.703 37.4433 162.963 37.6298Z" fill="white"/>
<path d="M165.947 39.8617C166.57 40.3315 166.922 40.9105 166.992 41.6147C167.06 42.3049 166.86 42.9683 166.378 43.6069C165.903 44.2376 165.32 44.6119 164.651 44.734C163.955 44.86 163.287 44.6821 162.665 44.2123C162.034 43.7365 161.688 43.1495 161.618 42.4453C161.544 41.7631 161.751 41.1057 162.227 40.4751C162.709 39.8364 163.284 39.4561 163.975 39.3381C164.663 39.206 165.316 39.3859 165.947 39.8617ZM165.387 40.6041C165.004 40.315 164.608 40.2419 164.172 40.3886C163.803 40.5116 163.462 40.7806 163.161 41.1797C162.86 41.5789 162.701 41.9724 162.684 42.3604C162.669 42.8123 162.842 43.1808 163.225 43.4699C163.6 43.753 164.01 43.8242 164.44 43.6854C164.815 43.5545 165.157 43.2994 165.452 42.9083C165.754 42.5091 165.911 42.1016 165.928 41.7136C165.949 41.2537 165.762 40.8872 165.387 40.6041Z" fill="white"/>
<path d="M168.374 41.8756L169.349 42.6737L167.727 46.2822L170.935 43.9721L171.748 44.6372L170.118 48.2393L173.334 45.9356L174.309 46.7336L169.688 49.6323L168.868 48.961L170.465 45.3834L167.266 47.6499L166.446 46.9785L168.374 41.8756Z" fill="white"/>
<path d="M176.414 48.3887C177.438 49.2845 177.646 50.1848 177.012 51.0915L176.177 50.3604C176.288 50.1121 176.323 49.8901 176.268 49.7095C176.213 49.5147 176.05 49.3058 175.787 49.0753C175.561 48.8777 175.362 48.7563 175.19 48.7252C174.995 48.6744 174.842 48.727 174.711 48.8775C174.605 48.9979 174.604 49.1964 174.736 49.4711C174.818 49.6357 175.008 49.9349 175.313 50.3753C175.658 50.8626 175.883 51.2728 175.969 51.6002C176.106 52.0659 176.02 52.4826 175.717 52.8288C174.993 53.6564 174.044 53.5565 172.877 52.5355C171.794 51.587 171.616 50.6209 172.331 49.638L173.166 50.3691C172.993 50.6569 172.932 50.909 172.968 51.1264C173.017 51.3286 173.174 51.5591 173.46 51.8094C174.062 52.3364 174.508 52.4343 174.784 52.1183C174.942 51.9377 174.955 51.696 174.821 51.393C174.753 51.2274 174.557 50.9358 174.245 50.503C173.878 49.9958 173.653 49.5997 173.57 49.3147C173.434 48.8631 173.514 48.468 173.811 48.1294C174.127 47.7682 174.513 47.615 174.986 47.6828C175.464 47.729 175.933 47.9672 176.414 48.3887Z" fill="white"/>
<path d="M180.812 49.6683C180.974 49.8172 181.067 49.9974 181.082 50.2019C181.091 50.3998 181.028 50.5864 180.879 50.7483C180.73 50.9102 180.542 50.9959 180.337 50.9974C180.132 50.9989 179.952 50.9286 179.79 50.7796C179.628 50.6307 179.543 50.4573 179.528 50.2527C179.519 50.0408 179.589 49.8609 179.738 49.699C179.887 49.5371 180.06 49.452 180.266 49.4505C180.471 49.449 180.651 49.5193 180.812 49.6683ZM178.965 50.8353L179.804 51.6071L176.304 55.4122L175.464 54.6404L178.965 50.8353Z" fill="white"/>
<path d="M182.863 54.3209C183.795 55.2129 183.78 56.168 182.799 57.1938L180.593 59.4982L179.769 58.7099L181.906 56.4778C182.494 55.8637 182.502 55.2906 181.939 54.7513C181.737 54.5577 181.487 54.457 181.197 54.4563C180.871 54.4493 180.549 54.5836 180.237 54.8521L178.086 57.0988L177.262 56.3105L180.837 52.5757L181.661 53.364L181.246 53.7974C181.557 53.7624 181.854 53.7842 182.118 53.8703C182.395 53.9562 182.639 54.1065 182.863 54.3209Z" fill="white"/>
<path d="M186.671 58.0899C187.119 58.5469 187.297 59.0861 187.192 59.7215L187.642 59.2804L188.44 60.0944L184.984 63.4829C183.82 64.6241 182.668 64.6199 181.533 63.4632C181.022 62.9419 180.737 62.4512 180.657 61.9978C180.591 61.5305 180.723 61.065 181.067 60.5876L181.865 61.4016C181.7 61.6474 181.641 61.8731 181.688 62.0928C181.736 62.2984 181.896 62.5474 182.176 62.833C182.778 63.4471 183.408 63.4321 184.065 62.788L184.607 62.2559C183.963 62.3556 183.413 62.1805 182.965 61.7235C182.475 61.2237 182.247 60.6487 182.274 60.0196C182.302 59.3764 182.605 58.7853 183.162 58.2393C183.719 57.6932 184.316 57.402 184.966 57.3801C185.61 57.3511 186.181 57.5901 186.671 58.0899ZM186.14 58.8625C185.839 58.5555 185.501 58.4249 185.118 58.4636C184.743 58.4952 184.366 58.6966 183.981 59.0747C183.631 59.4177 183.423 59.748 183.356 60.0797C183.274 60.4679 183.398 60.8368 183.748 61.1938C184.056 61.508 184.401 61.6457 184.769 61.6211C185.144 61.5752 185.514 61.3809 185.885 61.0168C186.264 60.6458 186.472 60.273 186.526 59.8988C186.572 59.5174 186.441 59.1696 186.14 58.8625Z" fill="white"/>
<path d="M191.218 63.063L192.048 64.0108L189.854 67.3026L193.399 65.5529L194.091 66.3427L191.89 69.627L195.442 67.8848L196.272 68.8326L191.236 70.9302L190.538 70.1329L192.703 66.8674L189.174 68.5758L188.476 67.7784L191.218 63.063Z" fill="white"/>
<path d="M198.362 71.168C198.855 71.7721 199.06 72.4182 198.961 73.1189C198.863 73.8055 198.512 74.4026 197.892 74.9086C197.28 75.4083 196.625 75.6336 195.947 75.5936C195.24 75.5508 194.634 75.2195 194.141 74.6154C193.641 74.0035 193.444 73.3511 193.543 72.6504C193.633 71.9701 193.991 71.3808 194.603 70.8811C195.222 70.3751 195.871 70.1421 196.57 70.1912C197.27 70.2263 197.862 70.5561 198.362 71.168ZM197.642 71.7563C197.338 71.3845 196.971 71.2195 196.512 71.2585C196.125 71.2906 195.73 71.471 195.343 71.7873C194.956 72.1036 194.708 72.4481 194.599 72.8209C194.477 73.2563 194.557 73.6553 194.861 74.0271C195.158 74.3911 195.54 74.5575 195.991 74.5249C196.385 74.4865 196.779 74.3201 197.158 74.0102C197.546 73.6939 197.795 73.3353 197.904 72.9625C198.034 72.5207 197.939 72.1203 197.642 71.7563Z" fill="white"/>
<path d="M202.144 75.9451C202.296 76.1433 202.398 76.3421 202.437 76.5397L201.533 77.2343C201.438 76.9794 201.315 76.7708 201.169 76.5805C200.986 76.3426 200.735 76.1955 200.398 76.1514C200.013 76.0939 199.657 76.2041 199.308 76.4721L197.135 78.1416L196.447 77.2455L200.546 74.0956L201.235 74.9916L200.648 75.4425C200.939 75.3951 201.195 75.4001 201.422 75.4654C201.713 75.5321 201.949 75.6913 202.144 75.9451Z" fill="white"/>
<path d="M204.56 75.8771L205.24 76.7922L199.396 81.1335L198.716 80.2183L204.56 75.8771Z" fill="white"/>
<path d="M208.167 80.8876L208.827 81.817L202.892 86.0329L202.278 85.1687L202.727 84.8502C202.143 84.8231 201.655 84.5324 201.261 83.978C200.815 83.3503 200.688 82.7048 200.879 82.0415C201.055 81.4258 201.469 80.8864 202.113 80.4289C202.732 79.9887 203.356 79.7788 203.995 79.8153C204.679 79.845 205.241 80.1697 205.669 80.7729C206.017 81.2621 206.084 81.84 205.868 82.5207L208.167 80.8876ZM205.075 81.5258C204.774 81.1019 204.421 80.8987 204.005 80.9C203.647 80.8967 203.247 81.0584 202.79 81.3827C202.334 81.707 202.035 82.0294 201.907 82.3662C201.746 82.7622 201.814 83.168 202.109 83.5838C202.364 83.9425 202.714 84.1236 203.138 84.1166C203.52 84.1025 203.926 83.9489 204.334 83.6594L204.399 83.6131C204.848 83.2945 205.125 82.9256 205.236 82.5283C205.341 82.1589 205.284 81.8193 205.075 81.5258Z" fill="white"/>
<path d="M207.531 83.6454L208.221 84.6994L205.59 87.6542L209.345 86.4142L209.92 87.2925L207.284 90.239L211.044 89.0074L211.734 90.0614L206.456 91.4388L205.875 90.5521L208.473 87.6192L204.741 88.8206L204.16 87.9339L207.531 83.6454Z" fill="white"/>
<path d="M214.29 90.1779C214.407 90.3648 214.447 90.5631 214.408 90.7644C214.362 90.9572 214.252 91.1201 214.065 91.2362C213.878 91.3523 213.674 91.3845 213.476 91.331C213.278 91.2774 213.124 91.1614 213.008 90.9745C212.892 90.7876 212.856 90.5978 212.896 90.3965C212.944 90.1899 213.06 90.0355 213.247 89.9194C213.434 89.8034 213.624 89.7679 213.822 89.8214C214.02 89.875 214.174 89.991 214.29 90.1779ZM212.197 90.8068L212.799 91.7753L208.407 94.5026L207.805 93.5342L212.197 90.8068Z" fill="white"/>
<path d="M217.228 95.15L217.801 96.1355L211.507 99.7947L210.975 98.8783L211.45 98.6019C210.872 98.5219 210.411 98.1879 210.07 97.6001C209.683 96.9344 209.614 96.28 209.865 95.6368C210.096 95.0397 210.558 94.5401 211.241 94.143C211.898 93.761 212.538 93.6086 213.171 93.7031C213.849 93.7948 214.379 94.1691 214.751 94.8089C215.052 95.3276 215.067 95.9092 214.79 96.5674L217.228 95.15ZM214.091 95.5047C213.83 95.0552 213.497 94.8207 213.082 94.7841C212.726 94.7484 212.313 94.873 211.829 95.1545C211.345 95.436 211.018 95.7299 210.859 96.0536C210.664 96.4334 210.694 96.8437 210.95 97.2846C211.171 97.665 211.503 97.8771 211.926 97.9087C212.308 97.9294 212.727 97.8133 213.159 97.562L213.228 97.5218C213.704 97.2454 214.014 96.9032 214.16 96.5176C214.298 96.1593 214.272 95.8159 214.091 95.5047Z" fill="white"/>
<path d="M217.759 100.153C218.164 100.9 218.228 101.605 217.933 102.277C217.671 102.886 217.129 103.418 216.312 103.862L214.467 100.46C214.064 100.723 213.801 101.014 213.686 101.327C213.571 101.639 213.609 101.983 213.805 102.343C213.972 102.651 214.175 102.859 214.421 102.976C214.616 103.063 214.872 103.095 215.194 103.08L215.737 104.082C215.258 104.205 214.783 104.19 214.331 104.026C213.768 103.807 213.321 103.402 212.992 102.795C212.625 102.118 212.545 101.468 212.744 100.848C212.946 100.192 213.42 99.662 214.176 99.2521C214.853 98.885 215.521 98.7733 216.197 98.9298C216.873 99.064 217.392 99.4763 217.759 100.153ZM216.956 100.623C216.775 100.289 216.549 100.082 216.25 99.993C215.966 99.9085 215.626 99.9332 215.233 100.067L216.501 102.405C217.191 101.917 217.337 101.326 216.956 100.623Z" fill="white"/>
<path d="M220.574 105.827L221.114 106.965L218.105 109.534L221.993 108.817L222.444 109.766L219.43 112.325L223.323 111.618L223.863 112.756L218.446 113.401L217.992 112.444L220.965 109.892L217.104 110.574L216.65 109.616L220.574 105.827Z" fill="white"/>
<path d="M226.391 113.267C226.479 113.469 226.491 113.671 226.423 113.865C226.351 114.049 226.218 114.194 226.016 114.283C225.815 114.371 225.609 114.374 225.42 114.292C225.232 114.211 225.096 114.074 225.007 113.873C224.919 113.671 224.911 113.478 224.979 113.285C225.057 113.087 225.194 112.951 225.395 112.863C225.597 112.774 225.79 112.766 225.978 112.848C226.166 112.929 226.303 113.066 226.391 113.267ZM224.229 113.591L224.686 114.635L219.95 116.707L219.493 115.663L224.229 113.591Z" fill="white"/>
<path d="M227.403 116.772L225.862 117.416L226.306 118.477L225.438 118.84L224.995 117.779L222.301 118.905C222.19 118.951 222.115 119.004 222.073 119.087C222.041 119.165 222.044 119.25 222.09 119.361L222.353 119.989L221.485 120.351L221.15 119.548C220.976 119.133 220.96 118.782 221.1 118.496C221.226 118.227 221.474 118.015 221.861 117.853L224.555 116.727L224.197 115.869L225.064 115.506L225.422 116.364L226.53 115.902L227.403 116.772Z" fill="white"/>
<path d="M228.594 118.523L229.009 119.585L226.4 120.604C226.74 120.675 227.023 120.822 227.255 121.032C227.467 121.218 227.628 121.466 227.748 121.773C227.977 122.36 227.981 122.864 227.749 123.287C227.528 123.684 227.098 124.013 226.456 124.264L223.475 125.428L223.06 124.366L225.855 123.275C226.265 123.115 226.549 122.907 226.701 122.665C226.861 122.388 226.867 122.074 226.726 121.711C226.595 121.376 226.362 121.166 226.029 121.081C225.692 120.988 225.329 121.022 224.919 121.182L222.227 122.233L221.813 121.171L228.594 118.523Z" fill="white"/>
<path d="M231.75 127.363L232.116 128.474L229.286 129.407L230.42 132.845L233.25 131.912L233.616 133.023L226.835 135.259L226.469 134.148L229.47 133.158L228.336 129.721L225.335 130.71L224.969 129.599L231.75 127.363Z" fill="white"/>
<path d="M234.392 135.069C234.455 135.279 234.442 135.482 234.351 135.665C234.256 135.839 234.107 135.967 233.896 136.03C233.685 136.093 233.48 136.07 233.303 135.966C233.126 135.863 233.008 135.71 232.945 135.499C232.882 135.288 232.898 135.096 232.989 134.912C233.09 134.726 233.243 134.607 233.454 134.544C233.665 134.482 233.857 134.497 234.034 134.601C234.211 134.705 234.329 134.858 234.392 135.069ZM232.207 135.124L232.532 136.217L227.577 137.691L227.252 136.598L232.207 135.124Z" fill="white"/>
<path d="M235.364 138.992L235.66 140.052L234.735 140.309L234.483 139.404C234.442 139.259 234.374 139.164 234.276 139.109C234.177 139.053 234.054 139.056 233.89 139.102L233.389 139.242L233.743 140.513L232.847 140.763L232.493 139.491L228.409 140.629L228.103 139.531L232.187 138.393L231.878 137.285L232.774 137.036L233.083 138.143L233.613 137.996C234.037 137.878 234.406 137.899 234.714 138.073C235.029 138.234 235.241 138.549 235.364 138.992Z" fill="white"/>
<path d="M234.639 143.476C234.826 144.213 234.782 144.812 234.501 145.254C234.26 145.645 233.834 145.918 233.223 146.073L230.024 146.882L229.764 145.855L230.423 145.688C230.122 145.558 229.877 145.362 229.67 145.115C229.443 144.832 229.27 144.474 229.16 144.038C229.027 143.514 229.06 143.073 229.246 142.706C229.439 142.327 229.739 142.086 230.155 141.98C230.718 141.838 231.208 141.941 231.621 142.311C232.015 142.644 232.315 143.177 232.521 143.909L232.827 144.997L233.021 144.948C233.68 144.781 233.909 144.342 233.728 143.624C233.649 143.314 233.54 143.084 233.377 142.929C233.197 142.748 232.966 142.651 232.689 142.659L232.499 141.542C233.079 141.509 233.555 141.677 233.917 142.05C234.243 142.359 234.477 142.836 234.639 143.476ZM232.032 145.198L231.746 144.188C231.503 143.31 231.082 142.953 230.481 143.105C230.307 143.149 230.179 143.254 230.101 143.438C230.024 143.623 230.006 143.834 230.067 144.076C230.175 144.503 230.392 144.83 230.708 145.059C231.033 145.286 231.392 145.36 231.78 145.262L232.032 145.198Z" fill="white"/>
<path d="M235.884 148.709C236.178 150.037 235.813 150.886 234.765 151.241L234.525 150.158C234.762 150.023 234.921 149.865 234.984 149.687C235.055 149.497 235.047 149.233 234.971 148.891C234.906 148.598 234.817 148.382 234.697 148.255C234.57 148.099 234.416 148.051 234.221 148.095C234.065 148.129 233.947 148.289 233.89 148.588C233.859 148.769 233.835 149.123 233.82 149.659C233.809 150.255 233.748 150.719 233.623 151.034C233.458 151.49 233.143 151.776 232.693 151.875C231.62 152.113 230.914 151.471 230.578 149.958C230.266 148.552 230.695 147.668 231.852 147.299L232.093 148.382C231.784 148.512 231.585 148.679 231.485 148.876C231.405 149.068 231.395 149.346 231.477 149.717C231.651 150.498 231.952 150.841 232.362 150.75C232.596 150.698 232.749 150.511 232.821 150.187C232.864 150.014 232.879 149.663 232.883 149.129C232.888 148.503 232.941 148.051 233.043 147.772C233.201 147.327 233.499 147.056 233.938 146.959C234.407 146.855 234.809 146.96 235.15 147.295C235.508 147.615 235.745 148.084 235.884 148.709Z" fill="white"/>
<path d="M238.4 153.285L236.76 153.601L236.978 154.731L236.055 154.909L235.837 153.779L232.97 154.333C232.852 154.355 232.768 154.392 232.71 154.464C232.663 154.535 232.649 154.619 232.671 154.737L232.8 155.404L231.877 155.582L231.712 154.728C231.627 154.286 231.682 153.939 231.878 153.688C232.056 153.45 232.342 153.293 232.754 153.213L235.621 152.66L235.445 151.747L236.368 151.569L236.544 152.482L237.723 152.255L238.4 153.285Z" fill="white"/>
<path d="M239.557 158.032L239.745 159.288L234.28 162.089L234.285 162.119L240.331 163.194L240.519 164.45L233.082 162.997L232.873 161.603L239.557 158.032Z" fill="white"/>
<path d="M240.625 165.362L240.954 168.304C241.145 170.013 240.517 170.959 239.066 171.121C237.605 171.285 236.773 170.503 236.579 168.773L236.382 167.014L233.659 167.319L233.529 166.156L240.625 165.362ZM239.761 166.636L237.376 166.903L237.565 168.593C237.623 169.109 237.765 169.476 237.97 169.694C238.186 169.912 238.507 169.997 238.934 169.949C239.362 169.901 239.645 169.738 239.798 169.48C239.96 169.22 240.007 168.833 239.95 168.326L239.761 166.636Z" fill="white"/>
<path d="M241.341 172.036L241.429 173.203L236.558 177.109L236.561 177.149L241.696 176.763L241.785 177.94L234.665 178.475L234.58 177.338L239.517 173.387L239.514 173.347L234.309 173.738L234.221 172.571L241.341 172.036Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.3725 9.75944C9.3725 10.0346 9.32634 10.2987 9.24045 10.5447L11.4706 11.6121C12.3547 10.6218 14 11.251 14 12.5761C14 13.8515 12.4457 14.5165 11.5273 13.5985C11.227 13.2982 11.0658 12.8758 11.1101 12.4306L8.7923 11.3211C8.44873 11.719 7.97955 12.0006 7.44844 12.1064L7.45954 14.0139C8.66375 14.3557 9.07213 15.8783 8.17646 16.7739C7.13702 17.8133 5.35319 17.0731 5.35319 15.6048C5.35319 14.8535 5.85801 14.2061 6.56559 14.011L6.55449 12.1145C5.99532 12.014 5.50043 11.719 5.14635 11.2978L3.38941 12.3254C3.66929 13.7942 1.86971 14.76 0.80337 13.6932C-0.16245 12.7274 0.53518 11.0816 1.88606 11.0816C2.30733 11.0816 2.69588 11.2551 2.97108 11.5344L4.70932 10.5178C4.50423 9.90253 4.55857 9.22831 4.8548 8.65862L3.3637 7.57892C2.08527 8.76379 -7.61807e-08 7.85293 0 6.11012C7.77412e-08 4.33161 2.16005 3.4354 3.41919 4.69389C3.97719 5.25186 4.16064 6.09259 3.86909 6.8387L5.41048 7.95461C6.13676 7.32303 7.17849 7.18516 8.04678 7.6175L9.0465 6.30293C7.95155 5.16422 8.76254 3.25952 10.3425 3.25952C11.9387 3.25952 12.7433 5.19807 11.6133 6.32806C11.1476 6.79371 10.4552 6.97424 9.80952 6.77443L8.75782 8.15793C9.13936 8.58151 9.3725 9.14306 9.3725 9.75944Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -0,0 +1,6 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="24" cy="24" r="24" fill="#ADFF5B"/>
<path d="M14.2979 31.7325C14.2979 32.8204 15.1796 33.7021 16.2675 33.7021H32.0243C33.1122 33.7021 33.9939 32.8204 33.9939 31.7325C33.9939 30.6447 33.1122 29.7629 32.0243 29.7629H16.2675C15.1796 29.7629 14.2979 30.6447 14.2979 31.7325Z" fill="black"/>
<path d="M14.2979 24.5109C14.2979 25.5987 15.1796 26.4805 16.2675 26.4805H32.0243C33.1122 26.4805 33.9939 25.5987 33.9939 24.5109C33.9939 23.423 33.1122 22.5413 32.0243 22.5413H16.2675C15.1796 22.5413 14.2979 23.423 14.2979 24.5109Z" fill="black"/>
<path d="M16.2675 15.3191C15.1796 15.3191 14.2979 16.2008 14.2979 17.2887C14.2979 18.3766 15.1796 19.2583 16.2675 19.2583H32.0243C33.1122 19.2583 33.9939 18.3766 33.9939 17.2887C33.9939 16.2008 33.1122 15.3191 32.0243 15.3191H16.2675Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 902 B

3
assets/images/icon-1.svg Normal file
View File

@ -0,0 +1,3 @@
<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.48608 5.24282C6.7522 5.24282 7.00759 5.28785 7.24546 5.37164L8.27773 3.19599C7.32004 2.33359 7.92855 0.728516 9.21 0.728516C10.4434 0.728516 11.0864 2.24475 10.1988 3.14069C9.90835 3.43367 9.49985 3.59098 9.0693 3.54767L7.99634 5.80882C8.38112 6.14398 8.65345 6.60168 8.75572 7.11981L10.6005 7.10898C10.931 5.93422 12.4035 5.53584 13.2696 6.40959C14.2747 7.42361 13.5589 9.1638 12.139 9.1638C11.4124 9.1638 10.7864 8.67133 10.5977 7.98106L8.76361 7.99189C8.66643 8.53738 8.38111 9.02016 7.97373 9.36558L8.96759 11.0795C10.388 10.8065 11.3219 12.5621 10.2903 13.6023C9.35632 14.5445 7.76467 13.864 7.76467 12.5461C7.76467 12.1352 7.93248 11.7561 8.20254 11.4876L7.21942 9.79193C6.62446 9.99199 5.97244 9.93898 5.42151 9.65L4.37736 11.1046C5.52321 12.3518 4.64235 14.386 2.95693 14.386C1.23698 14.386 0.370281 12.2788 1.58733 11.0505C2.12692 10.5061 2.93998 10.3272 3.66151 10.6116L4.74068 9.10791C4.12989 8.3994 3.99656 7.38316 4.41467 6.5361L3.14339 5.56084C2.04218 6.62901 0.200195 5.83785 0.200195 4.29659C0.200195 2.73935 2.07491 1.95445 3.16769 3.05685C3.618 3.51114 3.79259 4.18658 3.59936 4.81648L4.9373 5.84246C5.34693 5.47025 5.89 5.24282 6.48608 5.24282Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

3
assets/images/icon-2.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.7 KiB

10
assets/images/icon-3.svg Normal file
View File

@ -0,0 +1,10 @@
<svg width="14" height="16" viewBox="0 0 14 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_7_8207)">
<path d="M13.0955 0.715332C13.4845 0.715332 13.7984 1.02021 13.7986 1.39795V11.4146C13.7986 11.7924 13.4846 12.0972 13.0955 12.0972H2.54565C2.02987 12.0972 1.60718 12.5075 1.60718 13.0083C1.60725 13.5091 2.02991 13.9185 2.54565 13.9185H13.0955C13.4846 13.9185 13.7986 14.2242 13.7986 14.6021C13.7984 14.9798 13.4845 15.2847 13.0955 15.2847H2.54565C1.25155 15.2847 0.201002 14.2648 0.200928 13.0083V2.9917C0.200975 1.73514 1.25153 0.715332 2.54565 0.715332H13.0955ZM2.54565 2.08154C2.0299 2.08154 1.60722 2.49092 1.60718 2.9917V10.9233C1.8932 10.8004 2.21274 10.7319 2.54565 10.7319H12.3923V2.08154H2.54565ZM6.50269 8.8833C6.76525 8.62836 7.23892 8.62839 7.49683 8.8833C7.76876 9.1519 7.7734 9.57952 7.49683 9.84814C7.22018 10.1168 6.77465 10.1122 6.50269 9.84814C6.22637 9.57955 6.22628 9.14729 6.50269 8.8833ZM5.64526 3.24268C6.12353 2.85115 6.75603 2.69168 7.37964 2.79639C8.23303 2.94208 8.93174 3.6201 9.08179 4.44873C9.23652 5.31833 8.80996 6.1884 8.02222 6.61182C7.8301 6.71198 7.70784 6.94816 7.70776 7.20752V7.31689C7.70776 7.69478 7.39381 7.9995 7.00464 7.99951C6.61545 7.99951 6.30151 7.69479 6.30151 7.31689V7.20752C6.3016 6.44273 6.70021 5.755 7.34253 5.41357C7.54404 5.30419 7.7597 5.04906 7.69409 4.68506C7.64706 4.41659 7.41202 4.18955 7.1355 4.14404C6.91992 4.10318 6.71359 4.15758 6.54956 4.28955C6.38559 4.42158 6.29663 4.61275 6.29663 4.81299C6.29661 5.19077 5.98255 5.49547 5.59351 5.49561C5.20434 5.49561 4.89041 5.19086 4.89038 4.81299C4.89038 4.2029 5.16699 3.63423 5.64526 3.24268Z" fill="#0F2C53"/>
</g>
<defs>
<clipPath id="clip0_7_8207">
<rect width="13.598" height="14.5693" fill="white" transform="translate(0.200928 0.715332)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

3
assets/images/icon-4.svg Normal file
View File

@ -0,0 +1,3 @@
<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2.96265 11.3523C3.78265 11.3523 4.44975 12.0196 4.44995 12.8396V13.6902C4.44977 14.0426 4.16566 14.3267 3.81323 14.3269H0.838623C0.486039 14.3269 0.201112 14.0427 0.200928 13.6902V12.8396C0.201128 12.0196 0.868226 11.3523 1.68823 11.3523H2.96265ZM12.3113 11.3523C13.1313 11.3523 13.7984 12.0196 13.7986 12.8396V13.6902C13.7984 14.0426 13.5143 14.3267 13.1619 14.3269H10.1873C9.83467 14.3269 9.54974 14.0427 9.54956 13.6902V12.8396C9.54976 12.0196 10.2169 11.3523 11.0369 11.3523H12.3113ZM6.99976 8.37769C7.3524 8.37769 7.63737 8.66275 7.63745 9.01538V10.8767L8.72534 11.9646C8.97586 12.2152 8.97571 12.6143 8.72534 12.865C8.47463 13.1157 8.07469 13.1157 7.82397 12.865L6.99976 12.0408L6.17554 12.865C5.92482 13.1157 5.52586 13.1157 5.27515 12.865C5.02444 12.6143 5.02444 12.2153 5.27515 11.9646L6.36206 10.8767V9.01538C6.36214 8.66281 6.64719 8.37778 6.99976 8.37769ZM1.68823 12.6277C1.56938 12.6277 1.47554 12.725 1.47534 12.8396V13.0525H3.17554V12.8396C3.17534 12.725 3.0815 12.6277 2.96265 12.6277H1.68823ZM11.0369 12.6277C10.918 12.6277 10.8242 12.725 10.824 12.8396V13.0525H12.5242V12.8396C12.524 12.725 12.4301 12.6277 12.3113 12.6277H11.0369ZM2.32593 7.31616C3.26485 7.31633 4.02507 8.07644 4.02515 9.01538C4.02515 9.95439 3.2649 10.7154 2.32593 10.7156C1.38682 10.7156 0.625732 9.95449 0.625732 9.01538C0.625813 8.07634 1.38687 7.31616 2.32593 7.31616ZM11.6746 7.31616C12.6135 7.31633 13.3737 8.07644 13.3738 9.01538C13.3738 9.95439 12.6135 10.7154 11.6746 10.7156C10.7354 10.7156 9.97437 9.95449 9.97437 9.01538C9.97445 8.07634 10.7355 7.31616 11.6746 7.31616ZM2.32593 8.59058C2.09226 8.59058 1.9012 8.78173 1.90112 9.01538C1.90112 9.2491 2.09221 9.44019 2.32593 9.44019C2.5595 9.44001 2.75073 9.24899 2.75073 9.01538C2.75065 8.78184 2.55945 8.59075 2.32593 8.59058ZM11.6746 8.59058C11.4409 8.59058 11.2498 8.78173 11.2498 9.01538C11.2498 9.2491 11.4408 9.44019 11.6746 9.44019C11.9081 9.44001 12.0994 9.24899 12.0994 9.01538C12.0993 8.78184 11.9081 8.59075 11.6746 8.59058ZM8.27515 4.55347C9.09503 4.55369 9.76235 5.22087 9.76245 6.04077V7.10327C9.76245 7.45592 9.47739 7.74089 9.12476 7.74097H4.87476C4.52228 7.74071 4.23804 7.45581 4.23804 7.10327V6.04077C4.23814 5.22073 4.90528 4.55347 5.72534 4.55347H8.27515ZM5.72534 5.82886C5.60643 5.82886 5.51256 5.92612 5.51245 6.04077V6.46558H8.48706V6.04077C8.48695 5.92625 8.39387 5.82908 8.27515 5.82886H5.72534ZM6.99976 0.729248C7.93887 0.729248 8.69995 1.49033 8.69995 2.42944C8.69971 3.36835 7.93872 4.12866 6.99976 4.12866C6.06087 4.12857 5.30078 3.36829 5.30054 2.42944C5.30054 1.49039 6.06072 0.729342 6.99976 0.729248ZM6.99976 2.00366C6.76612 2.00376 6.57495 2.19579 6.57495 2.42944C6.57519 2.6629 6.76627 2.85415 6.99976 2.85425C7.23332 2.85425 7.42432 2.66296 7.42456 2.42944C7.42456 2.19573 7.23347 2.00366 6.99976 2.00366Z" fill="#0F2C53"/>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

10
assets/images/icon-5.svg Normal file
View File

@ -0,0 +1,10 @@
<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_7_8212)">
<path d="M13.1619 0.616089C13.5144 0.616273 13.7986 0.9012 13.7986 1.25378V9.75183C13.7986 10.1044 13.5144 10.3893 13.1619 10.3895H4.92651L1.28882 14.0272C0.889453 14.4265 0.201204 14.1462 0.200928 13.577V1.25378C0.200928 0.901086 0.485925 0.616089 0.838623 0.616089H13.1619ZM1.47534 12.038L4.21265 9.30164C4.33161 9.1828 4.49298 9.11511 4.66284 9.11511H12.5242V1.8905H1.47534V12.038ZM6.36206 5.078C6.36206 4.23663 7.63745 4.23663 7.63745 5.078V7.83972C7.63745 8.19242 7.35245 8.47742 6.99976 8.47742C6.64714 8.47732 6.36206 8.19236 6.36206 7.83972V5.078ZM6.54956 2.72839C6.78327 2.49043 7.21198 2.49045 7.44995 2.72839C7.70066 2.97911 7.69641 3.38232 7.44995 3.62878C7.20347 3.8751 6.80022 3.87945 6.54956 3.62878C6.30316 3.38237 6.299 2.97911 6.54956 2.72839Z" fill="#0F2C53"/>
</g>
<defs>
<clipPath id="clip0_7_8212">
<rect width="13.598" height="13.598" fill="white" transform="translate(0.200928 0.616089)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,3 @@
<svg width="38" height="45" viewBox="0 0 38 45" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M24.9375 26.0625H33.75V30.2812H23.75V45H14.6562V30.2812H4.71875V26.0625H13.4688L10.0625 19.25H3.40625V15H8L0.5 0.28125H11.0938L19.4062 19.75L27.3125 0.28125H37.4688L30.3438 15H34.8125V19.25H28.2812L24.9375 26.0625Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 343 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="12" cy="12" r="11" stroke="white" stroke-width="2"/>
<path d="M10.784 13.888C10.7307 13.4613 10.7627 13.088 10.88 12.768C11.008 12.448 11.184 12.16 11.408 11.904C11.6427 11.648 11.8987 11.4133 12.176 11.2C12.464 10.9867 12.7307 10.7787 12.976 10.576C13.232 10.3733 13.44 10.1653 13.6 9.952C13.76 9.73867 13.84 9.504 13.84 9.248C13.84 8.928 13.76 8.656 13.6 8.432C13.44 8.208 13.2053 8.03733 12.896 7.92C12.5973 7.80267 12.2347 7.744 11.808 7.744C11.3173 7.744 10.8693 7.85067 10.464 8.064C10.0587 8.27733 9.65867 8.592 9.264 9.008L7.952 7.792C8.464 7.20533 9.06667 6.736 9.76 6.384C10.464 6.02133 11.2373 5.84 12.08 5.84C12.8587 5.84 13.5467 5.95733 14.144 6.192C14.752 6.42667 15.2267 6.784 15.568 7.264C15.92 7.73333 16.096 8.32533 16.096 9.04C16.096 9.43467 16.0107 9.78133 15.84 10.08C15.68 10.368 15.4667 10.6293 15.2 10.864C14.944 11.088 14.672 11.3067 14.384 11.52C14.096 11.7227 13.8293 11.936 13.584 12.16C13.3387 12.384 13.1467 12.6347 13.008 12.912C12.8693 13.1893 12.816 13.5147 12.848 13.888H10.784ZM11.824 18.144C11.4187 18.144 11.0827 18.0107 10.816 17.744C10.5493 17.4773 10.416 17.1413 10.416 16.736C10.416 16.32 10.5493 15.9787 10.816 15.712C11.0827 15.4453 11.4187 15.312 11.824 15.312C12.2293 15.312 12.5653 15.4453 12.832 15.712C13.0987 15.9787 13.232 16.32 13.232 16.736C13.232 17.1413 13.0987 17.4773 12.832 17.744C12.5653 18.0107 12.2293 18.144 11.824 18.144Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,4 @@
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.3059 0.5C15.6341 0.5 19.9426 4.75964 19.9426 10C19.9426 15.2404 15.6341 19.5 10.3059 19.5C4.97781 19.4998 0.670166 15.2403 0.670166 10C0.670166 4.75975 4.97781 0.500167 10.3059 0.5Z" stroke="#ADFF5B"/>
<ellipse cx="10.3063" cy="10" rx="5.06803" ry="5" fill="#ADFF5B"/>
</svg>

After

Width:  |  Height:  |  Size: 385 B

View File

@ -0,0 +1,3 @@
<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.3059 0.5C15.6341 0.5 19.9426 4.75964 19.9426 10C19.9426 15.2404 15.6341 19.5 10.3059 19.5C4.97781 19.4998 0.670166 15.2403 0.670166 10C0.670166 4.75975 4.97781 0.500167 10.3059 0.5Z" stroke="#D1D1D6"/>
</svg>

After

Width:  |  Height:  |  Size: 318 B

View File

@ -0,0 +1,4 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.6063 12.0678L17.8354 7.93408C18.3746 7.47107 18.3813 6.63935 17.8526 6.163L13.6159 1.87779C13.2282 1.5291 12.6108 1.80443 12.6108 2.32651V3.16774C12.6108 3.70889 12.1716 4.14807 11.6305 4.14807H10.5815H9.99846C6.76687 4.14807 4.14502 6.76993 4.14502 10.0015C4.14502 13.0017 6.40103 15.4701 9.30873 15.813C7.62053 15.552 6.36494 13.9838 6.61834 12.1736C6.84318 10.574 8.27223 9.41739 9.88603 9.41739H11.6295C12.1706 9.41739 12.6098 9.8566 12.6098 10.3977V11.6124C12.6098 12.1298 13.2148 12.4051 13.6073 12.0688L13.6063 12.0678Z" fill="white"/>
<path d="M19.0235 11.2048C18.4843 11.2048 18.048 11.6411 18.048 12.1804V16.3561C18.048 17.2897 17.2896 18.049 16.355 18.049L3.64401 18.0481C2.71036 18.0481 1.95105 17.2897 1.95105 16.3551V3.64411C1.95105 2.71046 2.70941 1.95115 3.64401 1.95115H8.55139C9.09062 1.95115 9.52697 1.5148 9.52697 0.975574C9.52697 0.43635 9.09062 0 8.55139 0H3.64401C1.63475 0 0 1.63389 0 3.64401V16.356C0 18.3653 1.63389 20 3.64401 20H16.356C18.3653 20 20 18.3661 20 16.356V12.1803C20 11.6411 19.5637 11.2047 19.0244 11.2047L19.0235 11.2048Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,18 @@
<svg width="285" height="96" viewBox="0 0 285 96" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M176.535 45.7856L175.285 24.9401H180.142L180.774 35.588L185.2 24.9401H190.057L181.392 45.7856H176.535Z" fill="#ADFF5B"/>
<path d="M187.528 45.7856L191.509 24.9401H196.351C197.803 24.9546 199.527 25.0708 201.137 25.5793C201.942 25.8262 202.674 26.2039 203.335 26.6978C204.657 27.7001 205.52 29.2835 205.52 31.7385C205.52 33.7286 204.772 35.7042 203.062 37.244C201.338 38.7838 198.636 39.7716 194.728 39.7716H193.521L192.385 45.7856H187.528ZM195.978 29.1528H195.547L194.325 35.5589H195.532C198.205 35.5589 200.979 34.5421 200.979 31.8837C200.979 29.1818 198.09 29.1528 195.978 29.1528Z" fill="#ADFF5B"/>
<path d="M204.456 45.7856L208.437 24.9401H213.294L216.269 35.5299L218.295 24.9401H223.152L219.171 45.7856H214.314L211.325 35.2103L209.313 45.7856H204.456Z" fill="#ADFF5B"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M113.687 25.0194L120.385 25.9368L116.552 45.7856H126.225L126.883 42.2829L130.419 45.7856L145.116 35.611L158.07 45.7856L164.879 38.8635L152.714 29.9816H166.705L168.034 21.3499H164.879L167.411 6.21316H154.582L155.745 0H145.656L144.286 6.21316H137.311L136.439 10.0078L133.231 8.46491L134.82 0H125.395L123.714 8.70296H118.638L113.687 25.0194ZM138.017 29.9816L128.033 36.1531L129.192 29.9816H138.017ZM141.421 21.3499H130.812L131.337 18.5561L134.82 20.2658L138.93 14.5113H142.957L141.421 21.3499ZM156.284 14.5113H153.005L151.634 21.3499H155.039L156.284 14.5113Z" fill="#ADFF5B"/>
<path d="M76.7128 18.2823H87.2724L90.9124 6.31438e-06H101.964L92.9129 45.7856H81.8286L85.4359 27.5352H74.8764L71.2363 45.7856H60.152L67.9241 6.70034L64.4808 6.31438e-06H80.3201L76.7128 18.2823Z" fill="#ADFF5B" style="mix-blend-mode:plus-lighter"/>
<path d="M107.276 45.7856H96.225L102.688 13.1135H113.763L107.276 45.7856Z" fill="#ADFF5B" style="mix-blend-mode:plus-lighter"/>
<path d="M114.304 10.3908H103.226L105.276 0.0319126H116.36L114.304 10.3908Z" fill="#ADFF5B" style="mix-blend-mode:plus-lighter"/>
<path d="M11.776 84.904C11.008 83.688 10.24 82.504 9.472 81.352C8.416 84.168 7.168 86.6 5.728 88.648L3.616 86.024C5.088 83.784 6.304 81.16 7.264 78.216C5.984 76.488 4.64 74.792 3.296 73.16V92.36H0V63.752H26.304V88.776C26.304 91.016 25.184 92.136 22.976 92.136H19.776L18.944 88.904L21.888 89.064C22.624 89.064 23.008 88.712 23.008 88.008V84.392L20.928 86.472C20.096 85 19.264 83.56 18.368 82.152C17.216 84.968 15.872 87.368 14.336 89.416L12.224 86.792C13.824 84.488 15.168 81.864 16.256 78.856C14.976 76.968 13.632 75.144 12.256 73.352L14.304 71.368C15.232 72.456 16.256 73.736 17.344 75.272C17.888 73.192 18.336 70.984 18.688 68.648L21.824 69.192C21.28 72.648 20.544 75.816 19.648 78.632C20.736 80.264 21.856 82.056 23.008 83.976V66.952H3.296V72.808L5.184 70.984C6.144 72.008 7.168 73.224 8.256 74.632C8.704 72.712 9.088 70.664 9.376 68.552L12.448 69.096C11.968 72.296 11.36 75.176 10.624 77.8C11.712 79.272 12.832 80.904 13.984 82.696L11.776 84.904Z" fill="#ADFF5B"/>
<path d="M40.512 77.256H47.392V71.752H50.784V77.256H58.112V80.52H50.784V88.008H59.488V91.272H39.36V88.008H47.392V80.52H40.512V77.256ZM34.912 80.456C34.048 81.288 33.152 82.088 32.224 82.888L30.08 80.104C33.664 77.128 36.544 73.736 38.688 69.96H31.232V66.696H40.288C40.896 65.288 41.408 63.848 41.856 62.376L45.312 62.792C44.928 64.136 44.48 65.416 44 66.696H59.488V69.96H42.528C41.312 72.392 39.872 74.664 38.208 76.776V92.424H34.912V80.456Z" fill="#ADFF5B"/>
<path d="M77.504 77.256V80.648C75.808 81.224 74.048 81.736 72.192 82.216V88.712C72.192 90.824 71.072 91.912 68.832 91.912H65.216L64.48 88.744C65.6 88.872 66.656 88.936 67.68 88.936C68.416 88.936 68.8 88.552 68.8 87.848V83.016C66.944 83.4 65.056 83.752 63.072 84.072L62.592 80.712C64.768 80.392 66.848 80.008 68.8 79.592V74.088H62.56V70.888H68.8V67.912C67.264 68.232 65.696 68.488 64.032 68.712L63.328 65.544C67.744 65.064 71.712 64.136 75.168 62.728L76.32 65.864C75.008 66.344 73.632 66.76 72.192 67.144V70.888H78.752C78.56 68.424 78.496 65.704 78.496 62.76H81.856C81.888 65.832 81.984 68.52 82.176 70.888H91.744V74.088H82.432C82.624 76.168 82.912 77.864 83.264 79.208C83.392 79.72 83.52 80.168 83.648 80.616C84.96 78.984 86.112 77.16 87.072 75.176L89.952 76.712C88.544 79.592 86.848 82.12 84.896 84.232C85.216 85 85.568 85.672 85.92 86.184C86.816 87.592 87.52 88.296 87.968 88.296C88.32 88.296 88.672 86.664 89.056 83.464L92.032 85.032C91.2 89.608 90.016 91.912 88.448 91.912C87.04 91.912 85.568 90.952 84.064 89.064C83.488 88.328 82.944 87.496 82.464 86.536C80.288 88.328 77.856 89.736 75.2 90.76L73.344 87.912C76.288 86.824 78.88 85.288 81.088 83.304C80.736 82.28 80.416 81.224 80.128 80.136C79.648 78.408 79.296 76.392 79.04 74.088H72.192V78.824C74.048 78.344 75.84 77.832 77.504 77.256ZM85.376 63.048C87.616 64.456 89.536 65.864 91.136 67.272L88.736 69.672C87.424 68.264 85.568 66.792 83.136 65.192L85.376 63.048Z" fill="#ADFF5B"/>
<path d="M104.512 77.256H111.392V71.752H114.784V77.256H122.112V80.52H114.784V88.008H123.488V91.272H103.36V88.008H111.392V80.52H104.512V77.256ZM98.912 80.456C98.048 81.288 97.152 82.088 96.224 82.888L94.08 80.104C97.664 77.128 100.544 73.736 102.688 69.96H95.232V66.696H104.288C104.896 65.288 105.408 63.848 105.856 62.376L109.312 62.792C108.928 64.136 108.48 65.416 108 66.696H123.488V69.96H106.528C105.312 72.392 103.872 74.664 102.208 76.776V92.424H98.912V80.456Z" fill="#ADFF5B"/>
<path d="M131.36 84.168C132.224 84.168 132.96 84.52 133.536 85.224C134.08 85.928 134.368 86.856 134.368 87.976C134.368 89.672 133.856 91.144 132.896 92.424C131.904 93.672 130.56 94.536 128.896 95.016V92.904C129.76 92.584 130.496 92.072 131.104 91.368C131.648 90.6 131.936 89.864 131.936 89.096C131.744 89.16 131.488 89.224 131.136 89.224C130.432 89.224 129.856 88.968 129.376 88.488C128.896 88.008 128.672 87.4 128.672 86.696C128.672 85.928 128.928 85.32 129.44 84.872C129.92 84.392 130.56 84.168 131.36 84.168Z" fill="#ADFF5B"/>
<path d="M171.776 84.904C171.008 83.688 170.24 82.504 169.472 81.352C168.416 84.168 167.168 86.6 165.728 88.648L163.616 86.024C165.088 83.784 166.304 81.16 167.264 78.216C165.984 76.488 164.64 74.792 163.296 73.16V92.36H160V63.752H186.304V88.776C186.304 91.016 185.184 92.136 182.976 92.136H179.776L178.944 88.904L181.888 89.064C182.624 89.064 183.008 88.712 183.008 88.008V84.392L180.928 86.472C180.096 85 179.264 83.56 178.368 82.152C177.216 84.968 175.872 87.368 174.336 89.416L172.224 86.792C173.824 84.488 175.168 81.864 176.256 78.856C174.976 76.968 173.632 75.144 172.256 73.352L174.304 71.368C175.232 72.456 176.256 73.736 177.344 75.272C177.888 73.192 178.336 70.984 178.688 68.648L181.824 69.192C181.28 72.648 180.544 75.816 179.648 78.632C180.736 80.264 181.856 82.056 183.008 83.976V66.952H163.296V72.808L165.184 70.984C166.144 72.008 167.168 73.224 168.256 74.632C168.704 72.712 169.088 70.664 169.376 68.552L172.448 69.096C171.968 72.296 171.36 75.176 170.624 77.8C171.712 79.272 172.832 80.904 173.984 82.696L171.776 84.904Z" fill="#ADFF5B"/>
<path d="M201.888 67.272H207.2V62.76H210.464V67.272H217.248V76.84H219.328V80.104H211.488C213.376 83.944 216.288 87.112 220.192 89.544L217.92 92.2C214.016 89.352 211.072 85.864 209.088 81.704C207.552 86.376 204.8 89.864 200.768 92.168L198.72 89.416C202.496 87.464 204.992 84.36 206.24 80.104H200.608V76.84H206.912C207.104 75.56 207.2 74.216 207.2 72.808V70.376H201.888V67.272ZM210.464 70.376V72.072C210.464 73.736 210.336 75.336 210.144 76.84H214.048V70.376H210.464ZM191.168 69.032L193.728 69.224C193.664 72.424 193.312 75.464 192.736 78.344L190.048 77.576C190.688 74.888 191.072 72.04 191.168 69.032ZM200.064 68.2C200.896 70.248 201.664 72.616 202.304 75.272L199.648 75.944C199.168 73.704 198.56 71.528 197.792 69.448V92.232H194.496V62.792H197.792V68.936L200.064 68.2Z" fill="#ADFF5B"/>
<path d="M237.504 77.256V80.648C235.808 81.224 234.048 81.736 232.192 82.216V88.712C232.192 90.824 231.072 91.912 228.832 91.912H225.216L224.48 88.744C225.6 88.872 226.656 88.936 227.68 88.936C228.416 88.936 228.8 88.552 228.8 87.848V83.016C226.944 83.4 225.056 83.752 223.072 84.072L222.592 80.712C224.768 80.392 226.848 80.008 228.8 79.592V74.088H222.56V70.888H228.8V67.912C227.264 68.232 225.696 68.488 224.032 68.712L223.328 65.544C227.744 65.064 231.712 64.136 235.168 62.728L236.32 65.864C235.008 66.344 233.632 66.76 232.192 67.144V70.888H238.752C238.56 68.424 238.496 65.704 238.496 62.76H241.856C241.888 65.832 241.984 68.52 242.176 70.888H251.744V74.088H242.432C242.624 76.168 242.912 77.864 243.264 79.208C243.392 79.72 243.52 80.168 243.648 80.616C244.96 78.984 246.112 77.16 247.072 75.176L249.952 76.712C248.544 79.592 246.848 82.12 244.896 84.232C245.216 85 245.568 85.672 245.92 86.184C246.816 87.592 247.52 88.296 247.968 88.296C248.32 88.296 248.672 86.664 249.056 83.464L252.032 85.032C251.2 89.608 250.016 91.912 248.448 91.912C247.04 91.912 245.568 90.952 244.064 89.064C243.488 88.328 242.944 87.496 242.464 86.536C240.288 88.328 237.856 89.736 235.2 90.76L233.344 87.912C236.288 86.824 238.88 85.288 241.088 83.304C240.736 82.28 240.416 81.224 240.128 80.136C239.648 78.408 239.296 76.392 239.04 74.088H232.192V78.824C234.048 78.344 235.84 77.832 237.504 77.256ZM245.376 63.048C247.616 64.456 249.536 65.864 251.136 67.272L248.736 69.672C247.424 68.264 245.568 66.792 243.136 65.192L245.376 63.048Z" fill="#ADFF5B"/>
<path d="M265.888 67.272H271.2V62.76H274.464V67.272H281.248V76.84H283.328V80.104H275.488C277.376 83.944 280.288 87.112 284.192 89.544L281.92 92.2C278.016 89.352 275.072 85.864 273.088 81.704C271.552 86.376 268.8 89.864 264.768 92.168L262.72 89.416C266.496 87.464 268.992 84.36 270.24 80.104H264.608V76.84H270.912C271.104 75.56 271.2 74.216 271.2 72.808V70.376H265.888V67.272ZM274.464 70.376V72.072C274.464 73.736 274.336 75.336 274.144 76.84H278.048V70.376H274.464ZM255.168 69.032L257.728 69.224C257.664 72.424 257.312 75.464 256.736 78.344L254.048 77.576C254.688 74.888 255.072 72.04 255.168 69.032ZM264.064 68.2C264.896 70.248 265.664 72.616 266.304 75.272L263.648 75.944C263.168 73.704 262.56 71.528 261.792 69.448V92.232H258.496V62.792H261.792V68.936L264.064 68.2Z" fill="#ADFF5B"/>
</svg>

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
assets/images/tray_icon.ico Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
assets/images/tray_icon.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -1,6 +1,6 @@
{
"login": {
"welcome": "Welcome to BearVPN!",
"welcome": "Welcome to Hi快VPN!",
"verifyPhone": "Verify Your Phone Number",
"verifyEmail": "Verify Your Email",
"codeSent": "A 6-digit code has been sent to {account}. Please enter it within 30 minutes.",
@ -201,7 +201,6 @@
"myInviteCode": "My Invite Code",
"inviteCodeCopied": "Invite code copied to clipboard",
"close": "Close",
"pleaseLoginFirst": "Please login first to view invitation code",
"saveQRCode": "Save QR Code",
"qrCodeSaved": "QR Code saved",
"copiedToClipboard": "Copied to clipboard",
@ -276,13 +275,13 @@
"title": "Processing Payment",
"description": "Please wait while we process your payment"
},
"backToHome": "Back to Home",
"viewSubscription": "View Subscription",
"remainingTime": "Remaining Time",
"timeoutMessage": "Order has timed out, please place a new order"
"backToHome": "返回首页",
"viewSubscription": "查看订阅",
"remainingTime": "剩余时间",
"timeoutMessage": "订单已超时,请重新下单"
},
"home": {
"welcome": "Welcome to BearVPN",
"welcome": "Welcome to Hi快VPN",
"disconnected": "Disconnected",
"connecting": "Connecting",
"connected": "Connected",
@ -363,7 +362,7 @@
}
},
"splash": {
"appName": "BearVPN",
"appName": "Hi快VPN",
"slogan": "Enjoy Global High-Speed Network",
"initializing": "Initializing...",
"networkConnectionFailure": "Network connection failed, please check and retry",

View File

@ -1,6 +1,6 @@
{
"login": {
"welcome": "¡Bienvenido a BearVPN!",
"welcome": "¡Bienvenido a Hi快VPN!",
"verifyPhone": "Verifica tu número de teléfono",
"verifyEmail": "Verifica tu correo electrónico",
"codeSent": "Se ha enviado un código de 6 dígitos a {account}. Por favor, ingrésalo en los próximos 30 minutos.",
@ -195,7 +195,7 @@
"promotion": "Mensajes promocionales"
},
"home": {
"welcome": "Bienvenido a BearVPN",
"welcome": "Bienvenido a Hi快VPN",
"disconnected": "Desconectado",
"connecting": "Conectando",
"connected": "Conectado",
@ -328,10 +328,10 @@
"title": "Procesando Pago",
"description": "Por favor espere mientras procesamos su pago"
},
"backToHome": "Volver al Inicio",
"viewSubscription": "Ver Suscripción",
"remainingTime": "Tiempo Restante",
"timeoutMessage": "El pedido ha expirado, por favor realice un nuevo pedido"
"backToHome": "返回首页",
"viewSubscription": "查看订阅",
"remainingTime": "剩余时间",
"timeoutMessage": "订单已超时,请重新下单"
},
"dialog": {
"confirm": "Confirmar",
@ -368,7 +368,7 @@
}
},
"splash": {
"appName": "BearVPN",
"appName": "Hi快VPN",
"slogan": "Red global de alta velocidad",
"initializing": "Inicializando...",
"networkConnectionFailure": "Error de conexión de red, verifique e intente nuevamente",

View File

@ -1,6 +1,6 @@
{
"login": {
"welcome": "¡Bienvenido a BearVPN!",
"welcome": "¡Bienvenido a Hi快VPN!",
"verifyPhone": "Verifica tu número de teléfono",
"verifyEmail": "Verifica tu correo electrónico",
"codeSent": "Se ha enviado un código de 6 dígitos a {account}. Por favor, ingrésalo en los próximos 30 minutos.",
@ -191,7 +191,7 @@
"promotion": "Mensajes promocionales"
},
"home": {
"welcome": "Bienvenido a BearVPN",
"welcome": "Bienvenido a Hi快VPN",
"disconnected": "Desconectado",
"connecting": "Conectando",
"connected": "Conectado",
@ -324,7 +324,7 @@
"iKnow": "Lo entiendo"
},
"splash": {
"appName": "BearVPN",
"appName": "Hi快VPN",
"slogan": "Red global de alta velocidad",
"initializing": "Inicializando...",
"networkConnectionFailure": "Error de conexión de red, verifique e intente nuevamente",

View File

@ -1,6 +1,6 @@
{
"login": {
"welcome": "Tere tulemast BearVPN-i!",
"welcome": "Tere tulemast Hi快VPN-i!",
"verifyPhone": "Kinnita oma telefoninumber",
"verifyEmail": "Kinnita oma e-post",
"codeSent": "6-kohaline kood on saadetud aadressile {account}. Palun sisesta see 30 minuti jooksul.",
@ -272,13 +272,13 @@
"title": "Makset töödeldakse",
"description": "Palun oodake, kui töötleme teie makset"
},
"backToHome": "Tagasi avalehele",
"viewSubscription": "Vaata tellimust",
"remainingTime": "Järelejäänud aeg",
"timeoutMessage": "Tellimus on aegunud, palun tehke uus tellimus"
"backToHome": "返回首页",
"viewSubscription": "查看订阅",
"remainingTime": "剩余时间",
"timeoutMessage": "订单已超时,请重新下单"
},
"home": {
"welcome": "Tere tulemast BearVPN-i",
"welcome": "Tere tulemast Hi快VPN-i",
"disconnected": "Ühendus katkestatud",
"connecting": "Ühendumine",
"connected": "Ühendatud",
@ -359,7 +359,7 @@
}
},
"splash": {
"appName": "BearVPN",
"appName": "Hi快VPN",
"slogan": "Kiire globaalne võrgustik",
"initializing": "Initsialiseerimine...",
"networkConnectionFailure": "Võrguühenduse viga, kontrollige ja proovige uuesti",

View File

@ -1,6 +1,6 @@
{
"login": {
"welcome": "Tere tulemast BearVPN-i!",
"welcome": "Tere tulemast Hi快VPN-i!",
"verifyPhone": "Kinnita oma telefoninumber",
"verifyEmail": "Kinnita oma e-post",
"codeSent": "6-kohaline kood on saadetud aadressile {account}. Palun sisesta see 30 minuti jooksul.",
@ -262,7 +262,7 @@
}
},
"home": {
"welcome": "Tere tulemast BearVPN-i",
"welcome": "Tere tulemast Hi快VPN-i",
"disconnected": "Ühendus katkestatud",
"connecting": "Ühendumine",
"connected": "Ühendatud",
@ -314,7 +314,7 @@
"ok": "OK"
},
"splash": {
"appName": "BearVPN",
"appName": "Hi快VPN",
"slogan": "Kiire globaalne võrgustik",
"initializing": "Initsialiseerimine...",
"networkConnectionFailure": "Võrguühenduse viga, kontrollige ja proovige uuesti",

View File

@ -1,6 +1,6 @@
{
"login": {
"welcome": "BearVPNへようこそ",
"welcome": "Hi快VPNへようこそ",
"verifyPhone": "電話番号を認証",
"verifyEmail": "メールアドレスを認証",
"codeSent": "{account}に6桁のコードを送信しました。30分以内に入力してください。",
@ -289,13 +289,13 @@
"title": "支払い処理中",
"description": "支払い処理中です。お待ちください"
},
"backToHome": "ホームに戻る",
"viewSubscription": "サブスクリプションを表示",
"remainingTime": "残り時間",
"timeoutMessage": "注文がタイムアウトしました。新しい注文を行ってください"
"backToHome": "返回首页",
"viewSubscription": "查看订阅",
"remainingTime": "剩余时间",
"timeoutMessage": "订单已超时,请重新下单"
},
"home": {
"welcome": "BearVPNへようこそ",
"welcome": "Hi快VPNへようこそ",
"disconnected": "未接続",
"connecting": "接続中",
"connected": "接続済み",
@ -376,7 +376,7 @@
}
},
"splash": {
"appName": "BearVPN",
"appName": "Hi快VPN",
"slogan": "高速グローバルネットワーク",
"initializing": "初期化中...",
"networkConnectionFailure": "ネットワーク接続エラー、確認して再試行してください",

View File

@ -1,6 +1,6 @@
{
"login": {
"welcome": "BearVPNへようこそ",
"welcome": "Hi快VPNへようこそ",
"verifyPhone": "電話番号を認証",
"verifyEmail": "メールアドレスを認証",
"codeSent": "{account}に6桁のコードを送信しました。30分以内に入力してください。",
@ -279,7 +279,7 @@
}
},
"home": {
"welcome": "BearVPNへようこそ",
"welcome": "Hi快VPNへようこそ",
"disconnected": "未接続",
"connecting": "接続中",
"connected": "接続済み",
@ -332,7 +332,7 @@
"iKnow": "分かりました"
},
"splash": {
"appName": "BearVPN",
"appName": "Hi快VPN",
"slogan": "高速グローバルネットワーク",
"initializing": "初期化中...",
"networkConnectionFailure": "ネットワーク接続エラー、確認して再試行してください",

View File

@ -1,6 +1,6 @@
{
"login": {
"welcome": "Добро пожаловать в BearVPN!",
"welcome": "Добро пожаловать в Hi快VPN!",
"verifyPhone": "Подтвердите номер телефона",
"verifyEmail": "Подтвердите email",
"codeSent": "6-значный код отправлен на {account}. Введите его в течение 30 минут.",
@ -290,13 +290,13 @@
"title": "Обработка оплаты",
"description": "Пожалуйста, подождите, пока мы обрабатываем вашу оплату"
},
"backToHome": "Вернуться на главную",
"viewSubscription": "Просмотреть подписку",
"remainingTime": "Оставшееся время",
"timeoutMessage": "Время заказа истекло, пожалуйста, оформите новый заказ"
"backToHome": "返回首页",
"viewSubscription": "查看订阅",
"remainingTime": "剩余时间",
"timeoutMessage": "订单已超时,请重新下单"
},
"home": {
"welcome": "Добро пожаловать в BearVPN",
"welcome": "Добро пожаловать в Hi快VPN",
"disconnected": "Не подключено",
"connecting": "Подключение",
"connected": "Подключено",
@ -459,7 +459,7 @@
"exit_app": "Выйти из приложения"
},
"splash": {
"appName": "BearVPN",
"appName": "Hi快VPN",
"slogan": "Высокоскоростная глобальная сеть",
"initializing": "Инициализация...",
"networkConnectionFailure": "Ошибка подключения к сети, проверьте и повторите попытку",

View File

@ -1,6 +1,6 @@
{
"login": {
"welcome": "Добро пожаловать в BearVPN!",
"welcome": "Добро пожаловать в Hi快VPN!",
"verifyPhone": "Подтвердите номер телефона",
"verifyEmail": "Подтвердите email",
"codeSent": "6-значный код отправлен на {account}. Введите его в течение 30 минут.",
@ -280,7 +280,7 @@
}
},
"home": {
"welcome": "Добро пожаловать в BearVPN",
"welcome": "Добро пожаловать в Hi快VPN",
"disconnected": "Не подключено",
"connecting": "Подключение",
"connected": "Подключено",
@ -415,7 +415,7 @@
"exit_app": "Выйти из приложения"
},
"splash": {
"appName": "BearVPN",
"appName": "Hi快VPN",
"slogan": "Высокоскоростная глобальная сеть",
"initializing": "Инициализация...",
"networkConnectionFailure": "Ошибка подключения к сети, проверьте и повторите попытку",

View File

@ -1,6 +1,6 @@
{
"home": {
"welcome": "欢迎使用 BearVPN",
"welcome": "欢迎使用 Hi快VPN",
"disconnected": "未连接",
"connecting": "正在连接",
"connected": "已连接",
@ -47,7 +47,7 @@
"selected": "已选择"
},
"login": {
"welcome": "欢迎使用 BearVPN!",
"welcome": "欢迎使用 Hi快VPN!",
"verifyPhone": "验证您的手机号",
"verifyEmail": "验证您的邮箱",
"codeSent": "已向 {account} 发送6位数代码。请在接下来的 30 分钟内输入。",
@ -59,7 +59,7 @@
"reenterPassword": "请再次输入密码",
"forgotPassword": "忘记密码",
"codeLogin": "验证码登录",
"passwordLogin": "密码登录",
"passwordLogin": "登录",
"agreeTerms": "登录/创建账户,即表示我同意",
"termsOfService": "服务条款",
"privacyPolicy": "隐私政策",
@ -71,7 +71,7 @@
"sendCode": "发送验证码",
"codeSentCountdown": "验证码已发送 {seconds}s",
"and": "和",
"enterInviteCode": "请输入邀请码(选填)",
"enterInviteCode": "请输入邀请码",
"registerSuccess": "注册成功"
},
"failure": {
@ -264,7 +264,6 @@
"myInviteCode": "我的邀请码",
"inviteCodeCopied": "邀请码已复制到剪贴板",
"close": "关闭",
"pleaseLoginFirst": "请先登录后查看邀请码",
"saveQRCode": "保存二维码",
"qrCodeSaved": "二维码已保存",
"copiedToClipboard": "已复制到剪贴板",
@ -379,7 +378,7 @@
}
},
"splash": {
"appName": "BearVPN",
"appName": "Hi快VPN",
"slogan": "畅享全球高速网络",
"initializing": "正在初始化...",
"networkConnectionFailure": "网络连接失败,请检查并重试",
@ -390,7 +389,7 @@
"network": {
"status": {
"connected": "已连接",
"disconnected": "连接",
"disconnected": "点击连接",
"connecting": "正在连接...",
"disconnecting": "正在断开...",
"reconnecting": "正在重新连接...",

View File

@ -1,6 +1,6 @@
{
"login": {
"welcome": "歡迎使用 BearVPN!",
"welcome": "歡迎使用 Hi快VPN!",
"verifyPhone": "驗證您的手機號",
"verifyEmail": "驗證您的郵箱",
"codeSent": "已向 {account} 發送6位數代碼。請在接下來的 30 分鐘內輸入。",
@ -242,7 +242,7 @@
}
},
"home": {
"welcome": "歡迎使用 BearVPN",
"welcome": "歡迎使用 Hi快VPN",
"disconnected": "已斷開連接",
"connecting": "正在連接",
"connected": "已連接",
@ -362,10 +362,10 @@
"title": "支付中",
"description": "請稍候,正在處理您的支付"
},
"backToHome": "返回首",
"viewSubscription": "查看訂閱",
"remainingTime": "剩餘時間",
"timeoutMessage": "訂單已超時,請重新下單"
"backToHome": "返回首",
"viewSubscription": "查看订阅",
"remainingTime": "剩余时间",
"timeoutMessage": "订单已超时,请重新下单"
},
"country": {
"cn": "中國",
@ -443,7 +443,7 @@
"exit_app": "退出應用"
},
"splash": {
"appName": "BearVPN",
"appName": "Hi快VPN",
"slogan": "暢享全球高速網絡",
"initializing": "正在初始化...",
"networkConnectionFailure": "網絡連接失敗,請檢查並重試",

View File

@ -1,6 +1,6 @@
{
"login": {
"welcome": "歡迎使用 BearVPN!",
"welcome": "歡迎使用 Hi快VPN!",
"verifyPhone": "驗證您的手機號",
"verifyEmail": "驗證您的郵箱",
"codeSent": "已向 {account} 發送6位數代碼。請在接下來的 30 分鐘內輸入。",
@ -230,7 +230,7 @@
"confirmPurchaseDesc": "您確定要購買此套餐嗎?"
},
"home": {
"welcome": "歡迎使用 BearVPN",
"welcome": "歡迎使用 Hi快VPN",
"disconnected": "已斷開連接",
"connecting": "正在連接",
"connected": "已連接",
@ -399,7 +399,7 @@
"exit_app": "退出應用"
},
"splash": {
"appName": "BearVPN",
"appName": "Hi快VPN",
"slogan": "暢享全球高速網絡",
"initializing": "正在初始化...",
"networkConnectionFailure": "網絡連接失敗,請檢查並重試",

View File

@ -1,6 +1,6 @@
{
"login": {
"welcome": "歡迎使用 BearVPN!",
"welcome": "歡迎使用 Hi快VPN!",
"verifyPhone": "驗證您的手機號",
"verifyEmail": "驗證您的郵箱",
"codeSent": "已向 {account} 發送6位數代碼。請在接下來的 30 分鐘內輸入。",
@ -231,7 +231,7 @@
"confirmPurchaseDesc": "您確定要購買此套餐嗎?"
},
"home": {
"welcome": "歡迎使用 BearVPN",
"welcome": "歡迎使用 Hi快VPN",
"disconnected": "已斷開連接",
"connecting": "正在連接",
"connected": "已連接",
@ -400,7 +400,7 @@
"exit_app": "退出應用"
},
"splash": {
"appName": "BearVPN",
"appName": "Hi快VPN",
"slogan": "暢享全球高速網絡",
"initializing": "正在初始化...",
"networkConnectionFailure": "網絡連接失敗,請檢查並重試",

View File

@ -16,7 +16,7 @@ import 'package:flutter/foundation.dart';
class KRProtocol {
static const String kr_https = "https";
static const String kr_http = "http";
static const String kr_ws = "ws";
static const String kr_ws = "wss";
}
///
@ -26,25 +26,27 @@ class KRDomain {
static const String kr_domainKey = "kr_base_domain";
static const String kr_domainsKey = "kr_domains_list";
static List<String> kr_baseDomains = ["api.maodag.top","api.maodag.top"];
static String kr_currentDomain = "api.maodag.top";
// static List<String> kr_baseDomains = ["apicn.bearvpn.top","apibear.nsdsox.com"];
// static String kr_currentDomain = "apicn.bearvpn.top";
// static List<String> kr_baseDomains = ["api.kkmen.cc"];
// static String kr_currentDomain = "api.kkmen.cc";
static List<String> kr_baseDomains = ["api.hifast.biz",];
static String kr_currentDomain = "api.hifast.biz";
//
static List<String> kr_backupDomainUrls = [
"https://ppp2.oss-cn-hongkong.aliyuncs.com/bear1.txt",
"https://xgp3.oss-ap-northeast-1.aliyuncs.com/bear1.txt",
"https://xpp4.oss-ap-northeast-2.aliyuncs.com/bear1.txt",
"https://xpp5.oss-ap-southeast-1.aliyuncs.com/bear1.txt",
// "https://bear-1347601445.cos.ap-guangzhou.myqcloud.com/bear.txt",
// "https://getbr.oss-cn-shanghai.aliyuncs.com/bear.txt",
// "https://gitee.com/karelink/getbr/raw/master/README.en.md",
// "https://configfortrans.oss-cn-guangzhou.aliyuncs.com/bear/bear.txt",
];
// 使
static List<String> kr_localBackupDomains = [
"p1.maoayi.top",
"p2.maoayi.top",
"p3.maoayi.top",
// "api.omntech.com",
// "api6.omntech.com",
// "api7.omntech.com",
// "apicn.bearvpn.top",
// "apibear.nsdsox.com",
];
static final _storage = KRSecureStorage();
@ -365,10 +367,10 @@ class KRDomain {
///
static Future<void> kr_preCheckDomains() async {
// Debug
if (kDebugMode) {
KRLogUtil.kr_i('🐛 Debug 模式,跳过域名预检测', tag: 'KRDomain');
return;
}
// if (kDebugMode) {
// KRLogUtil.kr_i('🐛 Debug 模式,跳过域名预检测', tag: 'KRDomain');
// return;
// }
KRLogUtil.kr_i('🚀 开始预检测域名可用性', tag: 'KRDomain');
@ -1055,23 +1057,22 @@ class AppConfig {
///
/// url
///
// static String baseUrl = "http://103.112.98.72:8088";
///
///
String get baseUrl {
if (kDebugMode) {
return "http://154.12.35.103:8080";
}
// if (kDebugMode) {
// return "http://192.168.0.113:8082";
// }
return "${KRProtocol.kr_https}://${KRDomain.kr_api}";
}
/// WebSocket 使
@Deprecated('wsBaseUrl has been deprecated')
String get wsBaseUrl {
if (kDebugMode) {
return "ws://192.168.0.113";
}
// if (kDebugMode) {
// return "ws://192.168.0.113";
// }
return "${KRProtocol.kr_ws}://${KRDomain.kr_ws}";
}
@ -1095,22 +1096,6 @@ class AppConfig {
/// ID
String kr_website_id = "";
///
///
/// /v1/app/user/info
///
///
///
/// 00.00
static const int kr_userBalance = 0;
///
///
static const String kr_userReferCode = "";
///
///
bool kr_is_daytime = true;
@ -1151,15 +1136,17 @@ class AppConfig {
_isInitializing = true;
try {
// Debug 使
if (kDebugMode) {
KRLogUtil.kr_i('🐛 Debug 模式,使用固定 API 地址,跳过配置请求', tag: 'AppConfig');
if (onSuccess != null) {
await onSuccess();
}
return;
// if (kDebugMode) {
// KRLogUtil.kr_i('🐛 Debug 模式,使用固定 API 地址,跳过配置请求', tag: 'AppConfig');
// if (onSuccess != null) {
// await onSuccess();
// }
// return;
// }
if (onSuccess != null) {
await onSuccess();
}
await _startAutoRetry(onSuccess);
// await _startAutoRetry(onSuccess);
} finally {
_isInitializing = false;
}

View File

@ -1,6 +1,7 @@
import 'dart:convert';
import 'dart:async';
import 'package:flutter/widgets.dart';
import 'package:get/get.dart';
import 'package:kaer_with_panels/app/common/app_config.dart';
@ -9,12 +10,19 @@ import 'package:kaer_with_panels/app/modules/kr_main/controllers/kr_main_control
import 'package:kaer_with_panels/app/services/kr_socket_service.dart';
import 'package:kaer_with_panels/app/utils/kr_secure_storage.dart';
import 'package:kaer_with_panels/app/services/kr_device_info_service.dart';
import 'package:kaer_with_panels/app/routes/app_pages.dart';
import 'package:kaer_with_panels/app/utils/kr_log_util.dart';
import '../services/api_service/kr_api.user.dart';
import '../services/kr_announcement_service.dart';
import '../services/singbox_imp/kr_sing_box_imp.dart';
import '../utils/kr_event_bus.dart';
import '../../singbox/model/singbox_status.dart';
import 'package:kaer_with_panels/app/widgets/dialogs/hi_dialog.dart';
import 'package:kaer_with_panels/app/services/api_service/kr_auth_api.dart';
import 'package:kaer_with_panels/app/services/kr_subscribe_service.dart';
class KRAppRunData {
static final KRAppRunData _instance = KRAppRunData._internal();
@ -42,6 +50,9 @@ class KRAppRunData {
///
KRLoginType? kr_loginType;
/// ID
String? deviceId;
///
String? kr_areaCode;
@ -56,10 +67,11 @@ class KRAppRunData {
return _instance;
}
///
bool isDeviceLogin() {
// "device_设备ID"
return kr_account.value != null && kr_account.value!.startsWith('device_');
return kr_account.value != null && kr_account.value!.startsWith('9000');
}
/// JWT token中解析userId
@ -118,23 +130,24 @@ class KRAppRunData {
KRLogUtil.kr_i('开始保存用户信息', tag: 'AppRunData');
try {
//
kr_token = token;
kr_account.value = account;
kr_loginType = loginType;
kr_areaCode = areaCode;
// JWT token中解析userId
kr_userId.value = _kr_parseUserIdFromToken(token);
KRLogUtil.kr_i('从JWT解析userId: ${kr_userId.value}', tag: 'AppRunData');
final accountText = account.startsWith('device_') ? '9000${kr_userId}' : account;
//
kr_token = token;
kr_account.value = accountText;
kr_loginType = loginType;
kr_areaCode = areaCode;
final Map<String, dynamic> userInfo = {
'token': token,
'account': account,
'account': accountText,
'loginType': loginType.value,
'areaCode': areaCode ?? "",
};
// _kr_connectSocket(kr_userId.value.toString());
KRLogUtil.kr_i('准备保存用户信息到存储', tag: 'AppRunData');
await KRSecureStorage().kr_saveData(
@ -144,6 +157,7 @@ class KRAppRunData {
//
final savedData = await KRSecureStorage().kr_readData(key: _keyUserInfo);
KRLogUtil.kr_i('用户信息-kr_readData$savedData', tag: 'AppRunData');
if (savedData == null || savedData.isEmpty) {
KRLogUtil.kr_e('数据保存后无法读取,保存失败', tag: 'AppRunData');
kr_isLogin.value = false;
@ -154,18 +168,12 @@ class KRAppRunData {
//
kr_isLogin.value = true;
KRLogUtil.kr_i('用户信息-kr_isLogin$kr_isLogin', tag: 'AppRunData');
// 🔧 refer_code
KRLogUtil.kr_i('🔍 [AppRunData] 检查登录模式: account=$account', tag: 'AppRunData');
final isDevice = isDeviceLogin();
KRLogUtil.kr_i('🔍 [AppRunData] isDeviceLogin: $isDevice', tag: 'AppRunData');
if (!isDevice) {
KRLogUtil.kr_i('✅ [AppRunData] 正常登录模式,开始获取用户详细信息', tag: 'AppRunData');
await _fetchUserInfo();
} else {
KRLogUtil.kr_i('⏭️ [AppRunData] 设备登录模式,跳过用户信息接口调用', tag: 'AppRunData');
}
await _fetchUserInfo();
} catch (e) {
KRLogUtil.kr_e('保存用户信息失败: $e', tag: 'AppRunData');
@ -175,29 +183,122 @@ class KRAppRunData {
}
}
/// 退
/// 退()
Future<void> kr_loginOut() async {
// false
kr_isLogin.value = false;
HIDialog.show(
message: '当前登录已过期,请重新登录',
preventBackDismiss: true,
confirmText: '确定',
autoClose: false,
onConfirm: () async{
// false
kr_isLogin.value = false;
KRLogUtil.kr_i('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', tag: 'AppRunData');
KRLogUtil.kr_i('开始重新进行设备登录', tag: 'AppRunData');
KRLogUtil.kr_i('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', tag: 'AppRunData');
// === VPN ===
try {
// SingBox
if (KRSingBoxImp.instance.kr_status.value is SingboxStarted) {
await KRSingBoxImp.instance.kr_stop();
KRLogUtil.kr_i('VPN 服务已停止', tag: 'Logout');
}
} catch (e) {
KRLogUtil.kr_e('停止 VPN 服务失败: $e', tag: 'Logout');
}
// Socket
await _kr_disconnectSocket();
// Socket
await _kr_disconnectSocket();
//
kr_token = null;
kr_account.value = null;
kr_userId.value = null;
kr_loginType = null;
kr_areaCode = null;
//
kr_token = null;
kr_account.value = null;
kr_userId.value = null;
kr_loginType = null;
kr_areaCode = null;
//
await KRSecureStorage().kr_deleteData(key: _keyUserInfo);
//
await KRSecureStorage().kr_deleteData(key: _keyUserInfo);
//
KRAnnouncementService().kr_reset();
//
KRAnnouncementService().kr_reset();
// 5
final success = await kr_checkAndPerformDeviceLogin();
//
Get.find<KRMainController>().kr_setPage(0);
if (!success) {
//
HIDialog.show(
message: '设备登录失败,请检查网络或重试',
confirmText: '重试',
preventBackDismiss: true,
onConfirm: () async {
await kr_loginOut(); //
},
);
return; //
}
//
await Future.delayed(const Duration(milliseconds: 300));
//
KRLogUtil.kr_i('🔄 开始刷新订阅信息...', tag: 'DeviceManagement');
try {
await KRSubscribeService().kr_refreshAll();
KRLogUtil.kr_i('✅ 订阅信息刷新成功', tag: 'DeviceManagement');
} catch (e) {
KRLogUtil.kr_e('订阅信息刷新失败: $e', tag: 'DeviceManagement');
}
Get.offAllNamed(Routes.KR_HOME);
}
);
}
///
Future<bool> kr_checkAndPerformDeviceLogin() async {
try {
print('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
print('🔍 开始执行设备登录...');
print('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
//
await KRDeviceInfoService().initialize();
KRLogUtil.kr_i('🔐 开始执行设备登录', tag: 'SplashController');
//
final authApi = KRAuthApi();
final result = await authApi.kr_deviceLogin();
return await result.fold(
(error) {
print('❌ 设备登录失败: ${error.msg}');
KRLogUtil.kr_e('❌ 设备登录失败: ${error.msg}', tag: 'SplashController');
return false;
},
(token) async {
print('✅ 设备登录成功Token: $token');
KRLogUtil.kr_i('✅ 设备登录成功', tag: 'SplashController');
final deviceId = KRDeviceInfoService().deviceId ?? 'unknown';
await kr_saveUserInfo(
token,
'device_$deviceId', //
KRLoginType.kr_email,
null, //
);
kr_isLogin.value = true;
print('✅ 已标记为登录状态');
return true;
},
);
} catch (e, stackTrace) {
print('❌ 设备登录检查异常: $e');
print('📚 堆栈跟踪: $stackTrace');
KRLogUtil.kr_e('❌ 设备登录检查异常: $e', tag: 'SplashController');
return false;
}
}
///
@ -205,6 +306,8 @@ class KRAppRunData {
KRLogUtil.kr_i('开始初始化用户信息', tag: 'AppRunData');
try {
deviceId = KRDeviceInfoService().deviceId ?? 'unknown';
final String? userInfoString =
await KRSecureStorage().kr_readData(key: _keyUserInfo);
@ -258,7 +361,7 @@ class KRAppRunData {
}
/// Socket
/// wsBaseUrl 使
/// /// wsBaseUrl 使
Future<void> _kr_connectSocket(String userId) async {
// Socket
KRLogUtil.kr_i('Socket 连接已遗弃', tag: 'AppRunData');
@ -310,19 +413,27 @@ class KRAppRunData {
final result = await KRUserApi.kr_getUserInfo();
result.fold(
(error) {
(error) {
KRLogUtil.kr_e('❌ [AppRunData] 获取用户信息失败: ${error.msg} (code: ${error.code})', tag: 'AppRunData');
},
(userInfo) {
(userInfo) {
final authType = userInfo.authMethods.isNotEmpty
? userInfo.authMethods[0].authType
: null;
final authIdentifier = userInfo.authMethods.isNotEmpty
? userInfo.authMethods[0].authIdentifier
: null;
KRLogUtil.kr_i('✅ [AppRunData] 获取用户信息成功', tag: 'AppRunData');
KRLogUtil.kr_i('📋 [AppRunData] refer_code: "${userInfo.referCode}"', tag: 'AppRunData');
KRLogUtil.kr_i('💰 [AppRunData] balance: ${userInfo.balance}', tag: 'AppRunData');
KRLogUtil.kr_i('💵 [AppRunData] commission: ${userInfo.commission}', tag: 'AppRunData');
KRLogUtil.kr_i('📧 [AppRunData] email: ${userInfo.email}', tag: 'AppRunData');
KRLogUtil.kr_i('📧 [AppRunData] 登录类型: ${authType}', tag: 'AppRunData');
KRLogUtil.kr_i('📧 [AppRunData] email: ${authIdentifier}', tag: 'AppRunData');
KRLogUtil.kr_i('🆔 [AppRunData] id: ${userInfo.id}', tag: 'AppRunData');
//
kr_referCode.value = userInfo.referCode;
kr_account.value = authType == 'device' ? '9000${userInfo.id}' : authIdentifier;
kr_balance.value = userInfo.balance;
kr_commission.value = userInfo.commission;

View File

@ -51,11 +51,11 @@ class KRLanguageUtils {
if (lastLanguage != null) {
final language = KRLanguage.values.firstWhere(
(lang) => lang.countryCode == lastLanguage,
orElse: () => KRLanguage.ru,
orElse: () => KRLanguage.zh,
);
return _getLocaleFromLanguage(language);
}
return Locale('ru');
return Locale('zh', 'CN');
}
//

View File

@ -11,7 +11,7 @@ class KRAlreadySubscribe {
factory KRAlreadySubscribe.fromJson(Map<String, dynamic> json) {
return KRAlreadySubscribe(
subscribeId: json['subscribe_id'] ?? 0,
userSubscribeId: json['user_subscribe_id'] ?? 0,
userSubscribeId: json['id'] ?? 0,
);
}
}
@ -22,7 +22,7 @@ class KRAlreadySubscribeList {
KRAlreadySubscribeList({required this.list});
factory KRAlreadySubscribeList.fromJson(Map<String, dynamic> json) {
final List<dynamic> data = json['data'] ?? [];
final List<dynamic> data = json['list'] ?? [];
return KRAlreadySubscribeList(
list: data.map((item) => KRAlreadySubscribe.fromJson(item)).toList(),
);

View File

@ -185,9 +185,9 @@ class KRPackageListItem {
//
final List<KRDiscount> discounts = List.from(originalDiscounts);
if (!discounts.any((discount) => discount.kr_quantity == 1)) {
discounts.add(baseDiscount);
}
// if (!discounts.any((discount) => discount.kr_quantity == 1)) {
// discounts.add(baseDiscount);
// }
//
final descriptionJson = json['description'];
@ -252,18 +252,18 @@ class KRPackageListItem {
}
// 1
final bool hasBaseDiscount = kr_discount.any((discount) => discount.kr_quantity == 1);
// final bool hasBaseDiscount = kr_discount.any((discount) => discount.kr_quantity == 1);
//
final List<KRDiscount> completeList = List.from(kr_discount);
// 1
if (!hasBaseDiscount) {
completeList.add(baseDiscount);
}
// if (!hasBaseDiscount) {
// completeList.add(baseDiscount);
// }
//
completeList.sort((a, b) => a.kr_quantity.compareTo(b.kr_quantity));
// completeList.sort((a, b) => a.kr_quantity.compareTo(b.kr_quantity));
return completeList;
}
@ -310,7 +310,7 @@ class KRDiscount {
//
final int kr_quantity;
//
final int kr_discount;
final double kr_discount;
KRDiscount({
required this.kr_quantity,
@ -320,7 +320,7 @@ class KRDiscount {
// JSON数据创建KRDiscount实例
factory KRDiscount.fromJson(Map<String, dynamic> json) {
// 0-100
int discount = json['discount'] ?? 100;
double discount = json['discount'] ?? 100.00;
if (discount < 0) discount = 0;
if (discount > 100) discount = 100;

View File

@ -1,3 +1,23 @@
class KRAuthMethod {
final String authIdentifier;
final String authType;
final bool verified;
KRAuthMethod({
required this.authIdentifier,
required this.authType,
required this.verified,
});
factory KRAuthMethod.fromJson(Map<String, dynamic> json) {
return KRAuthMethod(
authIdentifier: json['auth_identifier'] ?? '',
authType: json['auth_type'] ?? '',
verified: json['verified'] ?? false,
);
}
}
class KRUserInfo {
final int id;
final String email;
@ -12,6 +32,9 @@ class KRUserInfo {
final bool onlyFirstPurchase;
final int giftAmount;
// auth_methods
final List<KRAuthMethod> authMethods;
KRUserInfo({
required this.id,
required this.email,
@ -25,6 +48,7 @@ class KRUserInfo {
this.referralPercentage = 0,
this.onlyFirstPurchase = false,
this.giftAmount = 0,
this.authMethods = const [],
});
factory KRUserInfo.fromJson(Map<String, dynamic> json) {
@ -41,6 +65,10 @@ class KRUserInfo {
referralPercentage: json['referral_percentage'] ?? 0,
onlyFirstPurchase: json['only_first_purchase'] ?? false,
giftAmount: json['gift_amount'] ?? 0,
authMethods: (json['auth_methods'] as List<dynamic>?)
?.map((e) => KRAuthMethod.fromJson(e))
.toList() ??
[],
);
}
}

View File

@ -0,0 +1,12 @@
import 'package:get/get.dart';
import '../controllers/hi_help_controller.dart';
class HIHelpBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut<HIHelpController>(
() => HIHelpController(),
);
}
}

View File

@ -0,0 +1,139 @@
import 'package:get/get.dart';
import 'package:easy_refresh/easy_refresh.dart';
import '../../../services/api_service/kr_api.user.dart';
import '../../../utils/kr_common_util.dart';
class KRMessage {
final String title;
final List<String> content; // content
KRMessage({required this.title, required this.content});
}
class HIHelpController extends GetxController {
final KRUserApi kr_userApi = KRUserApi();
//
final RxList<KRMessage> kr_messages = <KRMessage>[
KRMessage(
title: '客户端下载问题',
content: [
'iOS设备下载客户端需要使用除中国大陆以外的Apple ID[link]点击这里[/link]获取海外Apple ID注册教程。',
'Mac OS设备下载客户端可以直接前往Hi快VPN官网下载dmg格式文件安装。',
'Android设备下载客户端可以直接前往Hi快VPN官网下载apk格式文件安装。',
'PC设备下载客户端可以直接前往Hi快VPN官网下载exe格式文件安装。',
],
),
KRMessage(
title: '套餐支付问题',
content: [
'支付页面无法打开尝试更换网络或检查并断开连接其它VPN软件。',
'支付页面无法正确显示:请退出客户端重新进入,如仍无法正确显示,请截图并联系在线客服。',
'支付成功但套餐未正确激活:请退出客户端后五分钟重新进入,如仍未正确激活,请截图您的支付记录,与在线客服联系,核实后会帮您手动激活。',
],
),
KRMessage(
title: '账号问题',
content: [
'每部设备在安装客户端后会自动生成一个账号,购买套餐后可以正常使用,如需登陆其他设备使用,则需要绑定邮箱。更换设备前建议先绑定邮箱。',
'注销账号后会自动清除您已经购买的套餐信息,无法找回,请谨慎对待您的账号。',
'无法收到邮箱验证码:请检查营销邮件箱或垃圾邮件箱。',
],
),
KRMessage(
title: '连接相关问题',
content: [
'无法连接:请检查设备网络是否畅通,如仍无法连接,请退出客户端并重新启动设备。',
'连接后速度慢,无法打开页面:请进入菜单-节点列表,手动切换节点或选择自动匹配最快网络。',
'连接后无法打开本地页面:请进入菜单-节点列表切换为智能模式即可绕过本地ip但会暴露您的ip地址。选择全局模式则可以保证您始终处于隐私ip状态。',
],
),
KRMessage(
title: '线路相关问题',
content: [
'Hi快VPN所有线路均为IEPL专线最大程度保证线路纯净与连接速度。',
'Hi快VPN所有线路均不限流量不限带宽请放心使用。',
'Hi快VPN所有线路均不保存任何用户网络日志最大程度保障用户的隐私安全。',
],
),
KRMessage(
title: '设备与绑定问题',
content: [
'在绑定新设备之前请先添加您的邮箱。',
'Hi快VPN支持最多两台设备同时在线包括一台iOS设备或Android加一台Mac或PC。',
'如超出设备数量限制,最早登陆的同类设备将会自动下线,需要重新登陆,设备限制为系统固定设定,不支持调整。',
],
),
KRMessage(
title: '邀请用户相关问题',
content: [
'邀请用户请进入菜单-邀请好友页面,点击“我的邀请码”分享链接,直接分享至任意平台。受邀好友在根据流程安装好客户端后,进入菜单-邀请好友页面贴入邀请码保存后购买任一套餐您和好友将会同时获得3天免费使用时长。',
'请务必先行让受邀好友填写邀请码后再购买套餐,否则将无法激活免费时长。',
],
),
KRMessage(
title: '闪连功能相关问题',
content: [
'闪连功能可以为您提供最便捷的VPN使用体验在设置好您的使用偏好并开启闪连功能后未来只需要点击打开客户端软件即自动连接无需再点击任意按钮。',
'在后台关闭客户端后,连接自动断开。如未在后台关闭,则连接不会断开。如长时间设备锁屏并没有任何操作,连接会自动断开。',
],
),
].obs;
final RxBool kr_isLoading = false.obs;
final RxBool kr_hasMore = true.obs;
int kr_page = 1;
final int kr_size = 10;
final EasyRefreshController refreshController = EasyRefreshController();
@override
void onInit() {
super.onInit();
//
// kr_getMessageList();
}
//
Future<void> kr_onRefresh() async {
kr_page = 1;
kr_hasMore.value = true;
kr_messages.clear();
await kr_getMessageList();
refreshController.finishRefresh();
}
//
Future<void> kr_onLoadMore() async {
if (!kr_hasMore.value || kr_isLoading.value) {
refreshController.finishLoad(IndicatorResult.noMore);
return;
}
kr_page++;
await kr_getMessageList();
refreshController.finishLoad(kr_hasMore.value ? IndicatorResult.success : IndicatorResult.noMore);
}
Future<void> kr_getMessageList() async {
if (kr_isLoading.value) return;
kr_isLoading.value = true;
final either = await kr_userApi.kr_getMessageList(kr_page, kr_size);
either.fold(
(error) {
KRCommonUtil.kr_showToast(error.msg);
if (kr_page > 1) kr_page--;
},
(list) {
},
);
kr_isLoading.value = false;
}
@override
void onClose() {
refreshController.dispose();
super.onClose();
}
}

View File

@ -0,0 +1,89 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import '../../../model/response/kr_message_list.dart';
import '../controllers/hi_help_controller.dart';
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
import 'package:kaer_with_panels/app/localization/app_translations.dart';
import 'package:kaer_with_panels/app/widgets/hi_base_scaffold.dart';
import 'package:kaer_with_panels/app/widgets/hi_collapsible_list.dart';
import 'package:kaer_with_panels/app/widgets/hi_fixed_scrollbar.dart';
import 'package:kaer_with_panels/app/modules/hi_menu/widgets/hi_menu_list_item.dart';
import '../../../routes/app_pages.dart';
class HIHelpView extends GetView<HIHelpController> {
const HIHelpView({super.key});
@override
Widget build(BuildContext context) {
final ScrollController scrollController = ScrollController();
return HIBaseScaffold(
child: Column(
children: [
Expanded(
child: Obx(
() => EasyRefresh(
// controller: controller.refreshController,
// onRefresh: controller.kr_onRefresh,
// onLoad: controller.kr_onLoadMore,
// header: const DeliveryHeader(
// triggerOffset: 50.0,
// springRebound: true,
// ),
// footer: const DeliveryFooter(
// triggerOffset: 50.0,
// springRebound: true,
// ),
onRefresh: null, // null
onLoad: null, // null
child: Padding(
padding: EdgeInsets.only(right: 0.w), //
child: HiFixedScrollbar(
controller: scrollController,
child: ListView.builder(
controller: scrollController,
padding: EdgeInsets.symmetric(horizontal: 40.w),
itemCount: controller.kr_messages.length,
itemBuilder: (context, index) {
final message = controller.kr_messages[index];
final collapsibleItemData = HICollapsibleItem(
title: message.title,
content: message.content,
);
return Padding(
padding: EdgeInsets.only(bottom: 10.w),
child: HICollapsibleItemWidget(item: collapsibleItemData),
);
},
),
),
),
),
),
),
SizedBox(height: 60.w),
// 线
Padding(
padding: EdgeInsets.symmetric(horizontal: 40.w),
child: MenuListItem(
// 2. MenuItem
item: MenuItem(
iconName: 'icon-5',
title: '在线客服',
// 3. 使 onTap
onTap: () {
Get.toNamed(Routes.KR_CRISP);
},
),
),
),
SizedBox(height: 30.w)
],
),
);
}
}

View File

@ -0,0 +1,12 @@
import 'package:get/get.dart';
import '../controllers/hi_menu_controller.dart';
class HIMenuBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut<HIMenuController>(
() => HIMenuController(),
);
}
}

View File

@ -0,0 +1,27 @@
import 'package:get/get.dart';
import 'package:easy_refresh/easy_refresh.dart';
import 'package:kaer_with_panels/app/utils/kr_log_util.dart';
import '../../../services/api_service/kr_api.user.dart';
import '../../../utils/kr_common_util.dart';
import '../../../common/app_run_data.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:kaer_with_panels/app/services/kr_subscribe_service.dart';
class HIMenuController extends GetxController {
///
final KRSubscribeService kr_subscribeService = KRSubscribeService();
//
final RxString kr_version = ''.obs;
@override
void onInit() {
super.onInit();
_kr_getVersion();
}
//
Future<void> _kr_getVersion() async {
final PackageInfo packageInfo = await PackageInfo.fromPlatform();
kr_version.value = packageInfo.version;
}
}

View File

@ -0,0 +1,119 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:kaer_with_panels/app/widgets/hi_base_scaffold.dart';
import '../../../routes/app_pages.dart';
import '../controllers/hi_menu_controller.dart';
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
import 'package:kaer_with_panels/app/localization/app_translations.dart';
import 'package:flutter/services.dart';
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
import 'package:kaer_with_panels/app/modules/kr_home/views/hi_subscription_corner_button.dart';
import 'package:kaer_with_panels/app/common/app_run_data.dart';
import 'package:kaer_with_panels/app/modules/hi_menu/widgets/hi_menu_list_item.dart';
import 'package:kaer_with_panels/app/modules/hi_menu/widgets/user_info_card.dart';
class HIMenuView extends GetView<HIMenuController> {
const HIMenuView({super.key});
@override
Widget build(BuildContext context) {
return HIBaseScaffold(
child: Stack(
fit: StackFit.expand,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 60.h),
Padding(
// 5. 41.w
padding: EdgeInsets.symmetric(horizontal: 41.w),
child: Column(
mainAxisSize: MainAxisSize.min, // Column
children: [
Obx(() {
final account = KRAppRunData.getInstance().kr_account.value ?? '未登录';
return UserInfoCard(
controller: controller,
userId: account,
);
}),
SizedBox(height: 10.h), //
// ListView.separated Padding
ListView.separated(
shrinkWrap: true, // ListView
physics: const NeverScrollableScrollPhysics(), // Stack
itemCount: _menuItems.length,
//
itemBuilder: (context, index) {
return MenuListItem(item: _menuItems[index]);
},
//
separatorBuilder: (context, index) {
return SizedBox(height: 10.h);
},
),
],
),
),
],
),
//
Obx((){
// 1. Obx return Widget
return Positioned(
bottom: 40.0,
left: 0,
right: 0,
child: Text(
'当前版本:${controller.kr_version.value}',
textAlign: TextAlign.center,
style: TextStyle(
// 2. 使
color: Theme.of(context).primaryColor,
fontSize: 10.w,
),
),
);
}),
],
),
);
}
}
const List<MenuItem> _menuItems = [
MenuItem(
iconName: 'icon-1',
title: '节点列表',
route: Routes.HI_NODE_LIST,
),
MenuItem(
iconName: 'icon-2',
title: '消息中心',
route: Routes.KR_MESSAGE,
),
MenuItem(
iconName: 'icon-3',
title: '常见问题',
route: Routes.HI_HELP,
),
MenuItem(
iconName: 'icon-4',
title: '邀请好友',
route: Routes.KR_INVITE,
),
MenuItem(
iconName: 'icon-5',
title: '在线客服',
route: Routes.KR_CRISP,
),
];

View File

@ -0,0 +1,80 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
// 1. MenuItem
class MenuItem {
final String iconName;
final String title;
final String? route; //
final VoidCallback? onTap; //
const MenuItem({
required this.iconName,
required this.title,
this.route,
this.onTap,
}) : assert(route != null || onTap != null,
'Either route or onTap must be provided.');
// 使 assert route onTap
}
// 2. MenuListItem
class MenuListItem extends StatelessWidget {
const MenuListItem({
super.key,
required this.item,
});
final MenuItem item;
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () {
// onTap
if (item.onTap != null) {
item.onTap!();
}
// onTap route
else if (item.route != null) {
Get.toNamed(item.route!);
}
},
child: Container(
height: 50,
padding: EdgeInsets.fromLTRB(20.w, 7, 18.w, 7),
decoration: BoxDecoration(
color: Theme.of(context).primaryColor, // 使
borderRadius: BorderRadius.circular(1000.r), //
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
KrLocalImage(
imageName: item.iconName,
imageType: ImageType.svg,
),
SizedBox(width: 8.w),
Expanded(
child: Text(
item.title,
style: TextStyle(
color: Colors.black,
fontSize: 16.sp,
fontWeight: FontWeight.w600,
),
),
),
KrLocalImage(
imageName: 'arrow-right-icon',
imageType: ImageType.svg,
color: Colors.black,
),
],
),
),
);
}
}

View File

@ -0,0 +1,127 @@
// lib/app/modules/hi_menu/widgets/user_info_card.dart
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:kaer_with_panels/app/modules/hi_menu/controllers/hi_menu_controller.dart';
import 'package:kaer_with_panels/app/routes/app_pages.dart';
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
/// Widget
///
/// ID和套餐到期时间
class UserInfoCard extends StatelessWidget {
const UserInfoCard({
super.key,
required this.controller,
required this.userId,
});
final HIMenuController controller;
final String userId;
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () {
//
Get.toNamed(Routes.HI_USER_INFO);
},
//
behavior: HitTestBehavior.opaque,
child: Container(
padding: EdgeInsets.fromLTRB(7.w, 4, 18.w, 4),
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(35.5.r),
border: Border.all(
color: Colors.white,
width: 2.0, // 👇 : 2.0
),
),
child: Row(
children: [
CircleAvatar(
radius: 18.r,
backgroundColor: Colors.white,
child: KrLocalImage(
imageName: 'hi-home-logo',
imageType: ImageType.svg,
width: 16.w,
height: 16.h,
),
),
SizedBox(width: 12.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'ID: $userId',
style: TextStyle(
color: Colors.white,
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
),
Obx(() {
final currentSubscribe =
controller.kr_subscribeService.kr_currentSubscribe.value;
String expiryText;
if (currentSubscribe == null) {
expiryText = '尚未购买套餐';
} else {
final now = DateTime.now();
DateTime? expireDateTime;
try {
expireDateTime =
DateTime.parse(currentSubscribe.expireTime);
} catch (e) {
expireDateTime = null;
}
if (expireDateTime == null) {
expiryText = '套餐信息无效';
} else if (expireDateTime.isBefore(now)) {
final formattedExpireDate =
'${expireDateTime.year}/${expireDateTime.month.toString().padLeft(2, '0')}/${expireDateTime.day.toString().padLeft(2, '0')}';
expiryText = '已于 $formattedExpireDate 到期';
} else {
final year = expireDateTime.year;
final month = expireDateTime.month.toString().padLeft(2, '0');
final day = expireDateTime.day.toString().padLeft(2, '0');
final hour = expireDateTime.hour.toString().padLeft(2, '0');
final minute = expireDateTime.minute.toString().padLeft(2, '0');
final second = expireDateTime.second.toString().padLeft(2, '0');
// 2.
final formattedDateTime = '$year/$month/$day $hour:$minute:$second';
expiryText = '到期时间:$formattedDateTime';
}
}
return Text(
expiryText,
style: TextStyle(
color: Colors.white,
fontSize: 12.sp,
),
);
}),
],
),
),
SizedBox(width: 8.w),
const KrLocalImage(
imageName: 'arrow-right-icon',
imageType: ImageType.svg,
color: Colors.white,
),
],
),
),
);
}
}

View File

@ -0,0 +1,12 @@
import 'package:get/get.dart';
import '../controllers/hi_node_list_controller.dart';
class HiNodeListBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut<HINodeListController>(
() => HINodeListController(),
);
}
}

View File

@ -0,0 +1,144 @@
import 'package:get/get.dart';
import 'package:kaer_with_panels/app/utils/kr_log_util.dart';
import 'package:kaer_with_panels/app/services/kr_subscribe_service.dart';
import 'package:kaer_with_panels/app/services/singbox_imp/kr_sing_box_imp.dart';
import '../../../localization/app_translations.dart';
import 'package:kaer_with_panels/app/modules/kr_home/controllers/kr_home_controller.dart';
class HINodeListController extends GetxController {
///
final KRSubscribeService kr_subscribeService = KRSubscribeService();
///
final KRHomeController homeController = Get.find<KRHomeController>();
///
String kr_getConnectionTypeString() {
final connectionType = KRSingBoxImp.instance.kr_connectionType.value;
switch (connectionType) {
case KRConnectionType.global:
return AppTranslations.kr_setting.connectionTypeGlobal;
case KRConnectionType.rule:
return AppTranslations.kr_setting.connectionTypeRule;
}
}
///
void kr_updateConnectionType(KRConnectionType type) {
KRSingBoxImp.instance.kr_updateConnectionType(type);
KRLogUtil.kr_i('连接类型已更新为: $type', tag: 'HINodeListController');
//
if (homeController.currentSelectedCountry.isNotEmpty) {
KRLogUtil.kr_i('连接类型更新后,检查是否需要重选节点', tag: 'HINodeListController');
//
Future.delayed(const Duration(milliseconds: 500), () {
homeController.checkCountryReselection(KRSingBoxImp.instance.kr_activeGroups);
});
}
}
///
void kr_selectFastestNodeByCountry(String country) {
KRLogUtil.kr_i('开始为国家 $country 选择最快节点', tag: 'HINodeListController');
// kr_home当前选择的国家
homeController.setCurrentSelectedCountry(country);
//
final countryGroup = kr_subscribeService.countryOutboundList
.firstWhereOrNull((group) => group.country == country);
if (countryGroup == null) {
KRLogUtil.kr_w('未找到国家分组: $country', tag: 'HINodeListController');
return;
}
if (countryGroup.outboundList.isEmpty) {
KRLogUtil.kr_w('国家 $country 的节点列表为空', tag: 'HINodeListController');
return;
}
//
String? fastestNodeTag;
int minDelay = 65535;
int validNodeCount = 0;
for (var node in countryGroup.outboundList) {
final delay = node.urlTestDelay.value;
//
if (delay < 65535 && delay > 0) {
validNodeCount++;
//
if (delay < minDelay) {
minDelay = delay;
fastestNodeTag = node.tag;
}
}
}
KRLogUtil.kr_i('国家 $country 内有 $validNodeCount 个有效节点可供切换', tag: 'HINodeListController');
//
final selectedTag = fastestNodeTag ?? countryGroup.outboundList.first.tag;
KRLogUtil.kr_i('选择节点: $selectedTag (延迟: ${minDelay == 65535 ? "未知" : "${minDelay}ms"})',
tag: 'HINodeListController');
// homeController的选择节点方法
homeController.kr_selectNode(selectedTag);
}
///
List<String> getValidNodesInCurrentCountry() {
final country = homeController.currentSelectedCountry.value;
if (country.isEmpty) {
return [];
}
final countryGroup = kr_subscribeService.countryOutboundList
.firstWhereOrNull((group) => group.country == country);
if (countryGroup == null) {
return [];
}
return countryGroup.outboundList
.where((node) => node.urlTestDelay.value < 65535 && node.urlTestDelay.value > 0)
.map((node) => node.tag)
.toList();
}
///
void manualReselection() {
final country = homeController.currentSelectedCountry.value;
if (country.isEmpty) {
KRLogUtil.kr_w('没有选择国家,无法进行重选', tag: 'HINodeListController');
return;
}
KRLogUtil.kr_i('用户手动触发国家内重选', tag: 'HINodeListController');
homeController.performCountryReselection(country);
}
/// homeController
Map<String, dynamic> getCurrentCountryLatencyStats() {
return homeController.getCurrentCountryNodeStats();
}
/// /homeController
void setDynamicReselectionEnabled(bool enabled) {
homeController.setCountryReselectionEnabled(enabled);
}
///
Map<String, dynamic> getDynamicReselectionStatus() {
return {
'enabled': homeController.isCountryReselectionEnabled.value,
'currentCountry': homeController.currentSelectedCountry.value,
'latencyThreshold': homeController.countryReselectionLatencyThreshold,
};
}
}

View File

@ -0,0 +1,433 @@
// hi_node_list_view.dart
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kaer_with_panels/app/localization/app_translations.dart';
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
import 'package:kaer_with_panels/app/widgets/kr_country_flag.dart';
import '../../../model/business/kr_outbound_item.dart';
import '../../../utils/kr_log_util.dart';
import '../controllers/hi_node_list_controller.dart';
import 'package:kaer_with_panels/app/modules/kr_home/models/kr_home_views_status.dart';
import 'package:kaer_with_panels/app/services/singbox_imp/kr_sing_box_imp.dart';
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
///
///
///
class HINodeListView extends GetView<HINodeListController> {
const HINodeListView({super.key});
//
static const Color krModernGreen = Color(0xFF4CAF50);
static const Color krModernGreenLight = Color(0xFF81C784);
// UI展示
static final Map<String, int> _fakeDelays = {};
///
int _getDisplayDelay(HINodeListController controller, KROutboundItem item) {
if (controller.homeController.kr_isConnected.value) {
return item.urlTestDelay.value;
}
if (!_fakeDelays.containsKey(item.tag)) {
final random = Random();
_fakeDelays[item.tag] = 30 + random.nextInt(71); // 30-100ms
}
return _fakeDelays[item.tag] ?? 0;
}
@override
Widget build(BuildContext context) {
// 1. 使 Material InkWell
//
return Material(
color: Colors.transparent,
// child: _buildSubscribeList(context)
child: _kr_buildRegionList(context)
);
}
/// /
Widget _kr_buildRegionList(BuildContext context) {
return Obx(() {
return _kr_buildListContainer(
context,
child: ListView(
padding: EdgeInsets.symmetric(vertical: 8.w),
// 2. 使 children
children: [
if (controller.kr_subscribeService.countryOutboundList.isEmpty)
_buildEmptyListPlaceholder(context, AppTranslations.kr_home.noRegions)
else ...[
InkWell(
onTap: () {
controller.homeController.kr_selectNode('auto');
controller.homeController.kr_currentListStatus.value =
KRHomeViewsListStatus.kr_none;
controller.homeController.kr_coutryText.value = 'auto';
},
child: Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.white.withOpacity(0.3),
width: 1.0,
),
),
),
padding: EdgeInsets.symmetric(vertical: 12.w, horizontal: 16.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 32.w,
height: 22.w,
decoration: BoxDecoration(
// 2.
color: Theme.of(context).primaryColor,
),
// 4. 使 Center
child: Center(
child: KrLocalImage(
imageName: "hi-home-logo",
width: 14.w,
height: 14.h,
),
),
),
SizedBox(width: 8.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'自动匹配最快网络', //
style: KrAppTextStyle(
fontSize: 14,
color: Colors.white,
fontWeight: FontWeight.w600, // 600
),
),
// 2. Text: "根据网络IP自动匹配最快线路"
Text(
'根据网络IP自动匹配最快线路', //
style: KrAppTextStyle(
fontSize: 10,
color: Colors.white,
),
),
],
),
),
Obx(() => controller.homeController.kr_coutryText.value == 'auto'
? KrLocalImage(
imageName: 'radio-active-icon',
imageType: ImageType.svg,
width: 16.w, // SVG
height: 16.h,
)
: KrLocalImage(
imageName: 'radio-icon',
imageType: ImageType.svg,
width: 16.w, // SVG
height: 16.h,
)),
],
),
),
),
...controller.kr_subscribeService.countryOutboundList.map((country) {
return InkWell(
onTap: () {
//
controller.homeController.kr_coutryText.value = country.country;
//
controller.kr_selectFastestNodeByCountry(country.country);
},
child: _kr_buildCountryListItem(context, country: country),
);
}).toList(),
]
] //
),
);
});
}
///
Widget _buildSubscribeList(BuildContext context) {
return Obx(() {
//
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!controller.homeController.kr_isConnected.value && !controller.homeController.kr_isLatency.value) {
KRLogUtil.kr_i('🔄 节点列表显示 - 自动触发延迟测试', tag: 'HINodeListView');
controller.homeController.kr_urlTest();
}
});
return _kr_buildListContainer(
context,
child: ListView(
padding: EdgeInsets.symmetric(vertical: 8.w),
// 2. 使 children
children: [
if (controller.kr_subscribeService.allList.isEmpty)
_buildEmptyListPlaceholder(context, AppTranslations.kr_home.noNodes)
else ...[
InkWell(
onTap: () {
controller.homeController.kr_selectNode('auto');
controller.homeController.kr_currentListStatus.value =
KRHomeViewsListStatus.kr_none;
},
child: Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.white.withOpacity(0.3),
width: 1.0,
),
),
),
padding: EdgeInsets.symmetric(vertical: 12.w, horizontal: 16.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 32.w,
height: 22.w,
decoration: BoxDecoration(
// 2.
color: Theme.of(context).primaryColor,
),
// 4. 使 Center
child: Center(
child: KrLocalImage(
imageName: "hi-home-logo",
width: 14.w,
height: 14.h,
),
),
),
SizedBox(width: 8.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'自动匹配最快网络', //
style: KrAppTextStyle(
fontSize: 14,
color: Colors.white,
fontWeight: FontWeight.w600, // 600
),
),
// 2. Text: "根据网络IP自动匹配最快线路"
Text(
'根据网络IP自动匹配最快线路', //
style: KrAppTextStyle(
fontSize: 10,
color: Colors.white,
),
),
],
),
),
Obx(() => controller.homeController.kr_cutTag.value == 'auto'
? KrLocalImage(
imageName: 'radio-active-icon',
imageType: ImageType.svg,
width: 16.w, // SVG
height: 16.h,
)
: KrLocalImage(
imageName: 'radio-icon',
imageType: ImageType.svg,
width: 16.w, // SVG
height: 16.h,
)),
],
),
),
),
...controller.kr_subscribeService.allList.map((item) {
return InkWell(
onTap: () => _onNodeSelected(item),
child: _kr_buildNodeListItem(context, item: item),
);
}).toList(),
]
] //
),
);
});
}
///
Widget _buildEmptyListPlaceholder(BuildContext context, String text) {
return Container(
height: 400.w, //
alignment: Alignment.center,
child: Text(
text,
style: KrAppTextStyle(fontSize: 14, color: Theme.of(context).textTheme.bodySmall?.color),
),
);
}
///
Widget _kr_buildListContainer(BuildContext context, {required Widget child}) {
return Container(
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(12.w),
),
child: child,
);
}
///
void _onNodeSelected(KROutboundItem item) {
KRLogUtil.kr_i('Node selected: ${item.tag}');
KRSingBoxImp.instance.kr_selectOutbound(item.tag);
controller.homeController.kr_selectNode(item.tag);
//
controller.homeController.kr_currentListStatus.value = KRHomeViewsListStatus.kr_none;
}
/// UI
Widget _kr_buildNodeListItem(BuildContext context, {required KROutboundItem item}) {
return Container(
key: ValueKey(item.id),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
// 2. 30%
color: Colors.white.withOpacity(0.3),
width: 1.0, // 1px
),
),
),
padding: EdgeInsets.symmetric(vertical: 12.w, horizontal: 16.w),
child: Row(
children: [
KRCountryFlag(countryCode: item.country, width: 30.w, height: 20.w, isCircle: false, maintainSize: false),
SizedBox(width: 12.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Flexible(
child: Text(
controller.homeController.kr_getCountryFullName(item.country),
style: KrAppTextStyle(fontSize: 14, color: Colors.white),
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
),
Obx(() => controller.homeController.kr_cutTag.value == item.tag
? Container(
margin: EdgeInsets.only(left: 4.w),
padding: EdgeInsets.symmetric(horizontal: 4.w, vertical: 1.w),
decoration: BoxDecoration(
color: krModernGreenLight.withOpacity(0.1),
borderRadius: BorderRadius.circular(4.w),
),
child: Text(
AppTranslations.kr_home.selected,
style: KrAppTextStyle(fontSize: 10, color: krModernGreen, fontWeight: FontWeight.w500),
),
)
: const SizedBox.shrink()),
],
),
SizedBox(height: 2.w),
Obx(() {
// 2.
final int delay = _getDisplayDelay(controller, item);
// 3.
// if (delay <= 0) {
// // 0
// return const SizedBox.shrink();
// }
// 4. "ms"
return Text(
'${delay}ms',
style: KrAppTextStyle(
fontSize: 10,
color: krModernGreen,
fontWeight: FontWeight.w500,
),
);
}),
Text(
item.city,
style: KrAppTextStyle(fontSize: 12, color: Theme.of(context).textTheme.bodySmall?.color),
),
],
),
),
Obx(() => controller.homeController.kr_cutTag.value == item.tag
? KrLocalImage(
imageName: 'radio-active-icon',
imageType: ImageType.svg,
width: 16.w, // SVG
height: 16.h,
)
: KrLocalImage(
imageName: 'radio-icon',
imageType: ImageType.svg,
width: 16.w, // SVG
height: 16.h,
)),
],
),
);
}
/// UI
Widget _kr_buildCountryListItem(BuildContext context, {required country}) {
return Container(
key: ValueKey(country),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
// 2. 30%
color: Colors.white.withOpacity(0.3),
width: 1.0, // 1px
),
),
),
padding: EdgeInsets.symmetric(vertical: 12.w, horizontal: 16.w),
child: Row(
children: [
KRCountryFlag(countryCode: country.country, width: 30.w, height: 20.w, isCircle: false, maintainSize: false),
SizedBox(width: 12.w),
Expanded(
child: Text(
controller.homeController.kr_getCountryFullName(country.country),
style: KrAppTextStyle(fontSize: 16, fontWeight: FontWeight.w500, color: Colors.white),
),
),
Obx(() => controller.homeController.kr_coutryText.value == country.country
? KrLocalImage(
imageName: 'radio-active-icon',
imageType: ImageType.svg,
width: 16.w, // SVG
height: 16.h,
)
: KrLocalImage(
imageName: 'radio-icon',
imageType: ImageType.svg,
width: 16.w, // SVG
height: 16.h,
)),
],
),
);
}
}

View File

@ -0,0 +1,189 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import './hi_node_list_view.dart';
import '../controllers/hi_node_list_controller.dart';
import 'package:kaer_with_panels/app/localization/app_translations.dart';
import 'package:flutter/services.dart';
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
import 'package:kaer_with_panels/app/services/singbox_imp/kr_sing_box_imp.dart';
import 'package:kaer_with_panels/app/widgets/dialogs/hi_dialog.dart';
import 'package:kaer_with_panels/app/widgets/hi_help_entrance.dart';
import 'package:kaer_with_panels/app/widgets/hi_base_scaffold.dart';
import 'package:easy_refresh/easy_refresh.dart';
class HINodePageView extends GetView<HINodeListController> {
const HINodePageView({super.key});
@override
Widget build(BuildContext context) {
return HIBaseScaffold(
child: Stack(
children: [
//
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
//
Padding(
padding: EdgeInsets.only(left: 100.w, right: 60.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// 2. SizedBox Expanded
Expanded(
child: Container(
padding: EdgeInsets.all(4.w),
decoration: BoxDecoration(
border: Border.all(
color: Theme.of(context).primaryColor,
width: 2.0,
),
borderRadius: BorderRadius.circular(100.r),
),
child: Obx(() => Row(
children: [
// 3.
_buildModeButton(
context,
title: AppTranslations.kr_setting.connectionTypeRule,
isSelected: KRSingBoxImp().kr_connectionType.value == KRConnectionType.rule,
onTap: () => controller.kr_updateConnectionType(KRConnectionType.rule),
),
_buildModeButton(
context,
title: AppTranslations.kr_setting.connectionTypeGlobal,
isSelected: KRSingBoxImp().kr_connectionType.value == KRConnectionType.global,
onTap: () => controller.kr_updateConnectionType(KRConnectionType.global),
),
],
)),
),
),
SizedBox(width: 12.w),
GestureDetector(
onTap: () {
HIDialog.show(
customMessageWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 0.w, vertical: 0.w),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text.rich(
TextSpan(
children: [
TextSpan(
text: '${AppTranslations.kr_setting.connectionTypeRule}',
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.sp, color: Colors.black),
),
TextSpan(
text: AppTranslations.kr_setting.connectionTypeRuleRemark,
style: TextStyle(fontSize: 14.sp, color: Colors.black54),
),
],
),
),
SizedBox(height: 12.w),
Text.rich(
TextSpan(
children: [
TextSpan(
text: '${AppTranslations.kr_setting.connectionTypeGlobal}',
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.sp, color: Colors.black),
),
TextSpan(
text: AppTranslations.kr_setting.connectionTypeGlobalRemark,
style: TextStyle(fontSize: 14.sp, color: Colors.black54),
),
],
),
),
],
),
),
);
},
child: KrLocalImage(
imageName: 'question-icon',
imageType: ImageType.svg,
width: 30.w,
height: 30.w,
color: Colors.white,
),
),
],
),
),
SizedBox(height: 16.w),
// 4. Expanded 使HIHelpEntrance预留空间
Expanded(
child: Padding(
padding: EdgeInsets.only(left: 60.w, right: 60.w, bottom: 90.w), // HIHelpEntrance预留空间
// 2. Padding 使 EasyRefresh
child: EasyRefresh(
// 3. onRefresh
onRefresh: controller.kr_subscribeService.kr_refreshAll,
// 4. Header
header: ClassicHeader(
dragText: '下拉刷新',
armedText: '释放刷新',
readyText: '正在刷新...',
processingText: '正在刷新...',
processedText: '刷新成功',
failedText: '刷新失败',
messageText: '最后更新于 %T',
textStyle: TextStyle(color: Colors.white.withOpacity(0.7)),
messageStyle: TextStyle(color: Colors.white.withOpacity(0.5), fontSize: 12.sp),
iconTheme: IconThemeData(color: Colors.white.withOpacity(0.7)),
),
// 5. HINodeListView child
child: HINodeListView(),
),
),
),
],
),
//
const HIHelpEntrance(),
],
),
);
}
Widget _buildModeButton(
BuildContext context, {
required String title,
required bool isSelected,
required VoidCallback onTap,
}) {
return Expanded(
child: GestureDetector(
onTap: onTap,
child: AnimatedContainer(
duration: const Duration(milliseconds: 200),
padding: EdgeInsets.symmetric(vertical: 4.w),
decoration: BoxDecoration(
// 3.
color: isSelected
? Theme.of(context).primaryColor //
: Colors.transparent, //
borderRadius: BorderRadius.circular(100.r),
),
child: Center(
child: Text(
title,
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.w600,
color: isSelected
? Colors.black //
: Theme.of(context).primaryColor, //
),
),
),
),
),
);
}
}

View File

@ -0,0 +1,12 @@
import 'package:get/get.dart';
import '../controllers/hi_user_info_controller.dart';
class HIUserInfoBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut<HIUserInfoController>(
() => HIUserInfoController(),
);
}
}

View File

@ -0,0 +1,261 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:kaer_with_panels/app/utils/kr_log_util.dart';
import 'package:kaer_with_panels/app/services/api_service/kr_api.user.dart';
import 'package:kaer_with_panels/app/widgets/dialogs/kr_dialog.dart';
import 'package:kaer_with_panels/app/common/app_run_data.dart';
import 'package:kaer_with_panels/app/services/api_service/kr_auth_api.dart';
import 'package:kaer_with_panels/app/services/kr_site_config_service.dart';
import 'package:kaer_with_panels/app/services/kr_device_info_service.dart';
import 'package:kaer_with_panels/app/services/kr_subscribe_service.dart';
import 'package:kaer_with_panels/app/model/enum/kr_request_type.dart';
import 'package:kaer_with_panels/app/localization/app_translations.dart';
import 'dart:io';
import 'dart:math';
import 'package:kaer_with_panels/utils/snackbar_util.dart';
import 'package:kaer_with_panels/app/routes/app_pages.dart';
class HIUserInfoController extends GetxController {
///
final KRSubscribeService kr_subscribeService = KRSubscribeService();
//
final RxList<Map<String, dynamic>> devices = <Map<String, dynamic>>[].obs;
//
final RxBool isLoading = true.obs;
// ID
String? currentDeviceId;
@override
void onInit() {
super.onInit();
_initDeviceId();
loadDeviceList();
}
/// ID
Future<void> _initDeviceId() async {
try {
currentDeviceId = KRDeviceInfoService().deviceId ?? 'unknown';
KRLogUtil.kr_i('当前设备ID: $currentDeviceId', tag: 'DeviceManagement');
} catch (e) {
KRLogUtil.kr_e('获取设备ID失败: $e', tag: 'DeviceManagement');
}
}
///
Future<void> loadDeviceList() async {
try {
isLoading.value = true;
KRLogUtil.kr_i('开始加载设备列表', tag: 'DeviceManagement');
// API获取设备列表
final result = await KRUserApi().kr_getUserDevices();
result.fold(
(error) {
KRLogUtil.kr_e('加载设备列表失败: ${error.msg}', tag: 'DeviceManagement');
KRSnackBarUtil.show(AppTranslations.kr_dialog.error, error.msg);
},
(deviceList) {
KRLogUtil.kr_i('获取到 ${deviceList.length} 个设备', tag: 'DeviceManagement');
//
devices.value = deviceList.map((device) {
final identifier = device['identifier']?.toString() ?? '';
final isCurrent = identifier == currentDeviceId;
return {
'id': device['id']?.toString() ?? '',
'identifier': identifier,
'device_name': device['user_agent'] ?? '未知设备',
'ip': device['ip'] ?? '',
'last_login': device['updated_at'] ?? device['created_at'] ?? '',
'is_current': isCurrent,
'enabled': device['enabled'] ?? true,
'online': device['online'] ?? false,
};
}).toList()
..sort((a, b) {
if (a['is_current'] == true) return -1;
if (b['is_current'] == true) return 1;
return 0;
});
},
);
} catch (e, stackTrace) {
KRLogUtil.kr_e('加载设备列表异常: $e', tag: 'DeviceManagement');
KRLogUtil.kr_e('堆栈跟踪: $stackTrace', tag: 'DeviceManagement');
KRSnackBarUtil.show(AppTranslations.kr_dialog.error, AppTranslations.kr_deviceManagement.loadDeviceListFailed);
} finally {
isLoading.value = false;
}
}
///
Future<bool> deleteDevice(String id) async {
try {
final device = devices.firstWhere(
(d) => d['id'] == id,
orElse: () => {},
);
if (device.isEmpty) return false;
final isCurrent = device['is_current'] ?? false;
KRLogUtil.kr_i('开始解绑设备 - id: $id, isCurrent: $isCurrent', tag: 'DeviceManagement');
final result = await KRUserApi().kr_unbindUserDevice(id);
bool success = false;
result.fold(
(error) {
KRLogUtil.kr_e('删除设备失败: ${error.msg}', tag: 'DeviceManagement');
KRSnackBarUtil.show(AppTranslations.kr_dialog.error, AppTranslations.kr_deviceManagement.deleteFailed(error.msg));
},
(_) async {
KRLogUtil.kr_i('设备删除成功', tag: 'DeviceManagement');
success = true;
if (isCurrent) {
//
KRLogUtil.kr_i('本机设备已删除,准备重新登录', tag: 'DeviceManagement');
//
await _reloginWithDevice();
} else {
devices.removeWhere((device) => device['id'] == id);
KRSnackBarUtil.show(AppTranslations.kr_dialog.success, AppTranslations.kr_deviceManagement.deleteSuccess);
}
},
);
return success;
} catch (e, stackTrace) {
KRLogUtil.kr_e('删除设备异常: $e', tag: 'DeviceManagement');
KRLogUtil.kr_e('堆栈跟踪: $stackTrace', tag: 'DeviceManagement');
KRSnackBarUtil.show(AppTranslations.kr_dialog.error, AppTranslations.kr_deviceManagement.deleteFailed(e.toString()));
return false;
}
}
/// 使
Future<void> _reloginWithDevice() async {
try {
KRLogUtil.kr_i('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', tag: 'DeviceManagement');
KRLogUtil.kr_i('开始重新进行设备登录', tag: 'DeviceManagement');
KRLogUtil.kr_i('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', tag: 'DeviceManagement');
// kr_loginOut
final appRunData = KRAppRunData.getInstance();
appRunData.kr_isLogin.value = false;
appRunData.kr_token = null;
appRunData.kr_account.value = null;
appRunData.kr_userId.value = null;
KRLogUtil.kr_i('设备登录已启用,开始调用设备登录接口', tag: 'DeviceManagement');
//
await KRDeviceInfoService().initialize();
//
final authApi = KRAuthApi();
final result = await authApi.kr_deviceLogin();
result.fold(
(error) {
//
KRLogUtil.kr_e('设备登录失败: ${error.msg}', tag: 'DeviceManagement');
KRSnackBarUtil.show(AppTranslations.kr_dialog.error, AppTranslations.kr_deviceManagement.reloginFailed(error.msg));
// 退
appRunData.kr_loginOut();
},
(token) async {
//
KRLogUtil.kr_i('✅ 设备登录成功!', tag: 'DeviceManagement');
KRLogUtil.kr_i('🎫 Token: ${token.substring(0, min(20, token.length))}...', tag: 'DeviceManagement');
//
final deviceId = KRDeviceInfoService().deviceId ?? 'unknown';
await appRunData.kr_saveUserInfo(
token,
'device_$deviceId',
KRLoginType.kr_email,
null,
);
KRLogUtil.kr_i('✅ 设备重新登录成功,已更新用户信息', tag: 'DeviceManagement');
//
await Future.delayed(const Duration(milliseconds: 300));
//
KRLogUtil.kr_i('🔄 开始刷新订阅信息...', tag: 'DeviceManagement');
try {
await KRSubscribeService().kr_refreshAll();
KRLogUtil.kr_i('✅ 订阅信息刷新成功', tag: 'DeviceManagement');
} catch (e) {
KRLogUtil.kr_e('订阅信息刷新失败: $e', tag: 'DeviceManagement');
}
KRSnackBarUtil.show(AppTranslations.kr_dialog.success, '退出登录成功');
Get.offAllNamed(Routes.KR_HOME);
},
);
} catch (e, stackTrace) {
KRLogUtil.kr_e('设备重新登录异常: $e', tag: 'DeviceManagement');
KRLogUtil.kr_e('堆栈跟踪: $stackTrace', tag: 'DeviceManagement');
KRSnackBarUtil.show(AppTranslations.kr_dialog.error, AppTranslations.kr_deviceManagement.reloginFailedGeneric);
// 退
await KRAppRunData.getInstance().kr_loginOut();
}
}
///
Map<String, dynamic> getDeviceTypeInfo(String userAgent) {
String deviceType = AppTranslations.kr_deviceManagement.deviceTypeUnknown;
String iconName = 'devices';
if (userAgent.contains('Android') || userAgent.toLowerCase().contains('android')) {
deviceType = AppTranslations.kr_deviceManagement.deviceTypeAndroid;
iconName = 'phone_android';
} else if (userAgent.contains('iOS') || userAgent.contains('iPhone') || userAgent.toLowerCase().contains('ios')) {
deviceType = AppTranslations.kr_deviceManagement.deviceTypeIos;
iconName = 'phone_iphone';
} else if (userAgent.contains('iPad')) {
deviceType = AppTranslations.kr_deviceManagement.deviceTypeIpad;
iconName = 'tablet';
} else if (userAgent.contains('macOS') || userAgent.contains('Mac') || userAgent.toLowerCase().contains('mac')) {
deviceType = AppTranslations.kr_deviceManagement.deviceTypeMacos;
iconName = 'desktop_mac';
} else if (userAgent.contains('Windows') || userAgent.toLowerCase().contains('windows')) {
deviceType = AppTranslations.kr_deviceManagement.deviceTypeWindows;
iconName = 'computer';
} else if (userAgent.contains('Linux') || userAgent.toLowerCase().contains('linux')) {
deviceType = AppTranslations.kr_deviceManagement.deviceTypeLinux;
iconName = 'computer';
}
return {
'type': deviceType,
'icon': iconName,
};
}
@override
void onReady() {
super.onReady();
}
@override
void onClose() {
super.onClose();
}
}

View File

@ -0,0 +1,593 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import '../../../model/response/kr_message_list.dart';
import '../controllers/hi_user_info_controller.dart';
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
import 'package:kaer_with_panels/app/localization/app_translations.dart';
import 'package:kaer_with_panels/app/widgets/hi_base_scaffold.dart';
import 'package:kaer_with_panels/app/widgets/hi_collapsible_list.dart';
import 'package:kaer_with_panels/app/widgets/hi_fixed_scrollbar.dart';
import 'package:kaer_with_panels/app/modules/hi_menu/widgets/hi_menu_list_item.dart';
import '../../../routes/app_pages.dart';
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
import 'package:kaer_with_panels/app/widgets/hi_help_entrance.dart';
import 'package:kaer_with_panels/app/common/app_run_data.dart';
import 'package:kaer_with_panels/app/modules/kr_home/controllers/kr_home_controller.dart';
import 'package:kaer_with_panels/app/widgets/dialogs/hi_dialog.dart';
class HIUserInfoView extends GetView<HIUserInfoController> {
const HIUserInfoView({super.key});
@override
Widget build(BuildContext context) {
final isDeviceLogin = KRAppRunData.getInstance().isDeviceLogin();
return HIBaseScaffold(
child: Stack(
children: [
// 👇 1: 使 Column
Column(
children: [
// 👇 2: 使 Expanded 使
Expanded(
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 40.w),
child: Column(
children: [
SizedBox(height: 20.w),
// he
Padding(
padding: EdgeInsets.symmetric(horizontal: 0.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 60.w,
height: 60.w,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(18.r),
),
alignment: Alignment.center,
child: KrLocalImage(
imageName: 'hi-home-logo',
imageType: ImageType.svg,
width: 30.w,
height: 30.w,
color: Colors.black,
),
),
SizedBox(width: 13.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Obx(() {
final account = KRAppRunData.getInstance().kr_account.value;
return Text(
(account != null && account.isNotEmpty) ? account : '未绑定',
style: TextStyle(
color: Colors.white,
fontSize: 20.sp,
fontWeight: FontWeight.bold,
height: 0.9,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
);
}),
Obx(() {
final userId = KRAppRunData.getInstance().kr_userId.value;
return Text(
'ID: ${(userId != null && userId.toString().isNotEmpty) ? userId : ''}',
style: TextStyle(
color: Colors.white.withOpacity(0.85),
fontSize: 14.sp,
fontWeight: FontWeight.w500,
),
);
}),
Obx(() {
final currentSubscribe =
controller.kr_subscribeService.kr_currentSubscribe.value;
String expiryText;
if (currentSubscribe == null) {
expiryText = '尚未购买套餐';
} else {
final now = DateTime.now();
DateTime? expireDateTime;
try {
expireDateTime =
DateTime.parse(currentSubscribe.expireTime);
} catch (e) {
expireDateTime = null;
}
if (expireDateTime == null) {
expiryText = '套餐信息无效';
} else if (expireDateTime.isBefore(now)) {
final formattedExpireDate =
'${expireDateTime.year}/${expireDateTime.month.toString().padLeft(2, '0')}/${expireDateTime.day.toString().padLeft(2, '0')}';
expiryText = '已于 $formattedExpireDate 到期';
} else {
final year = expireDateTime.year;
final month = expireDateTime.month.toString().padLeft(2, '0');
final day = expireDateTime.day.toString().padLeft(2, '0');
final hour = expireDateTime.hour.toString().padLeft(2, '0');
final minute = expireDateTime.minute.toString().padLeft(2, '0');
final second = expireDateTime.second.toString().padLeft(2, '0');
// 2.
final formattedDateTime = '$year/$month/$day $hour:$minute:$second';
expiryText = '到期时间:$formattedDateTime';
}
}
return Text(
expiryText,
style: TextStyle(
color: Colors.white,
fontSize: 12.sp,
),
);
}),
],
),
),
],
),
),
SizedBox(height: 12.w),
//
Obx(() {
final isDeviceLogin = KRAppRunData.getInstance().isDeviceLogin();
if (!isDeviceLogin) return SizedBox.shrink();
return InkWell(
onTap: () {
if (isDeviceLogin) {
Get.toNamed(
Routes.MR_LOGIN,
arguments: {'entry': 'bind_email'},
);
} else {
Get.toNamed(
Routes.MR_LOGIN,
arguments: {'entry': 'forget_psd'},
);
}
},
child: Container(
margin: EdgeInsets.symmetric(horizontal: 0.w).copyWith(bottom: 10.w), //
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 10.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(22.w),
border: Border.all(color: Colors.white, width: 2),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
isDeviceLogin ? '绑定邮箱' : '修改密码',
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.w600,
),
),
const KrLocalImage(
imageName: 'arrow-right-icon',
imageType: ImageType.svg,
color: Colors.white,
),
],
),
),
);
}),
//
Obx(() {
if (controller.isLoading.value) {
// 使 Padding
return Padding(
padding: EdgeInsets.only(top: 20.w),
child: const Center(
child: CircularProgressIndicator(),
),
);
}
return Padding(
padding: EdgeInsets.symmetric(horizontal: 0.w),
child: GridView.builder(
// 1. GridView SingleChildScrollView
physics: const NeverScrollableScrollPhysics(),
// 2. GridView
shrinkWrap: true,
// 3.
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2, //
crossAxisSpacing: 10.w, //
mainAxisSpacing: 10.w, //
childAspectRatio: 1.5, //
),
// 4. itemCount itemBuilder
itemCount: controller.devices.length + 1,
// 5.
itemBuilder: (context, index) {
if (index < controller.devices.length) {
// _buildDeviceCard Map<String, dynamic>
return _buildDeviceCard(
context: context,
device: controller.devices[index],
onDelete: (id) {
HIDialog.show(
customMessageWidget: Padding(
padding: EdgeInsets.only(top: 16.w),
child: Text(
'请确认是否移除此设备?',
style: KrAppTextStyle(
color:
Theme.of(context).textTheme.bodyMedium?.color,
fontSize: 14.sp,
fontWeight: FontWeight.w600,
),
),
),
cancelText: '确认',
confirmText: '返回',
onConfirm: () {
//
},
onCancel: () {
controller.deleteDevice(id);
}
);
},
);
} else {
//
return _buildAddDeviceCard();
}
},
),
);
}),
//
SizedBox(height: 20.w),
],
),
),
),
),
// 👇 3: Expanded
Padding(
padding: EdgeInsets.symmetric(horizontal: 40.w),
child: Column(
children: [
GestureDetector(
onTap: () {
//
HIDialog.show(
customMessageWidget: Padding(
padding: EdgeInsets.only(top: 16.w),
child: Text(
'注销账号后,所有此账号内的剩余套餐和账户数据将被清空,无法找回。', // 1.
textAlign: TextAlign.left, //
style: KrAppTextStyle(
color: Theme.of(context).textTheme.bodyMedium?.color,
fontSize: 14.sp,
fontWeight: FontWeight.w600,
),
),
),
cancelText: '注销', // 2. 使
confirmText: '返回',
// 3. onCancel
onCancel: () {
//
Get.toNamed(Routes.KR_DELETE_ACCOUNT);
},
// 4. onConfirm
onConfirm: () {
},
);
},
child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(vertical: 12.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(24.w),
border: Border.all(color: const Color(0xFFFF2ED1), width: 2),
),
alignment: Alignment.center,
child: Text(
'注销账户',
style: TextStyle(
color: const Color(0xFFFF2ED1),
fontSize: 16.sp,
fontWeight: FontWeight.w700,
),
),
),
),
SizedBox(height: 10.w),
Obx(() {
return !(KRAppRunData.getInstance().kr_account.value != null &&
KRAppRunData.getInstance().kr_account.value!.startsWith('9000'))
?
GestureDetector(
onTap: () {
HIDialog.show(
customMessageWidget: Padding(
padding: EdgeInsets.only(top: 16.w),
child: Text(
'确认要退出您的账号?', // 1.
textAlign: TextAlign.center, //
style: KrAppTextStyle(
color: Theme.of(context).textTheme.bodyMedium?.color,
fontSize: 14.sp,
fontWeight: FontWeight.w600,
),
),
),
cancelText: '确认',
confirmText: '返回',
onCancel: () async {
final currentDevice = controller.devices.firstWhere(
(device) => device['is_current'] == true,
);
final deviceId = currentDevice['id'] as String;
await controller.deleteDevice(deviceId);
},
onConfirm: () {
},
);
},
child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(vertical: 12.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(24.w),
border: Border.all(color: Colors.white, width: 2),
),
alignment: Alignment.center,
child: Text(
'退出登录',
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.w700,
),
),
),
)
: SizedBox.shrink();
})
],
),
),
// HIHelpEntrance
SizedBox(height: 100.h),
],
),
// HIHelpEntrance Stack
const HIHelpEntrance(),
],
),
);
}
///
Widget _buildDeviceCard({
required BuildContext context,
required Map<String, dynamic> device,
required void Function(String) onDelete,
}) {
final identifier = device['identifier'] ?? '';
final isCurrentDevice = device['is_current'] ?? false;
return Stack( // 使 Stack
children: [
//
Container(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 14.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(24.w), //
border: Border.all(color: Colors.white, width: 2),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, //
children: [
Row(
children: [
Icon(Icons.smartphone, color: Colors.white, size: 18.w),
SizedBox(width: 6.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
_extractDeviceModel(device['device_name']),
style: TextStyle(
color: Colors.white,
fontSize: 10.sp, //
fontWeight: FontWeight.w600),
),
SizedBox(height: 4.h),
Text(
'ID$identifier',
style: TextStyle(
color: Colors.white.withOpacity(0.9),
fontSize: 10.sp,
fontWeight: FontWeight.w500),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
),
),
],
),
//
// if (device.isCurrentDevice)
// Padding(
// padding: EdgeInsets.only(top: 0.h),
// child: Text(
// '本机设备',
// style: TextStyle(
// color: Theme.of(context).primaryColor,
// fontSize: 12.sp,
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
],
),
),
//
if (!isCurrentDevice)
Positioned(
top: 8.w, //
right: 8.w,
child: GestureDetector(
onTap: () {
final deviceId = device['id'];
onDelete(deviceId);
},
child: Container(
padding: EdgeInsets.all(4.w),
child: Icon(
Icons.close,
color: Colors.white,
size: 16.w,
),
),
),
),
],
);
}
///
Widget _buildAddDeviceCard() {
return GestureDetector(
onTap: () {
print('可用设备 2222');
print('可用设备 ${controller.kr_subscribeService.kr_currentSubscribe}');
//
HIDialog.show(
customMessageWidget: Padding(
padding: EdgeInsets.only(top: 16.w, bottom: 16.w),
child: Column(
mainAxisSize: MainAxisSize.min, // Column
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// 2. Text
Text(
'请使用邮箱登录新设备',
style: KrAppTextStyle(
color: Colors.black, // 使
fontSize: 14.sp,
fontWeight: FontWeight.w600,
),
),
SizedBox(height: 20.w),
Obx(() {
final current = controller.kr_subscribeService.kr_currentSubscribe.value;
// current null 0
final deviceLimit = current?.deviceLimit ?? 0;
return Text(
'每个账号最多允许同时使用$deviceLimit台设备同时在线',
style: KrAppTextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: FontWeight.w600,
),
);
}),
],
),
),
);
},
child: Container(
//
decoration: BoxDecoration(
color: Theme.of(Get.context!).primaryColor,
borderRadius: BorderRadius.circular(24.w),
),
// 使 Align
alignment: Alignment.centerLeft,
// 使 Padding 24px
child: Padding(
padding: EdgeInsets.only(left: 24.w),
// 1. 使 Row
child: Row(
mainAxisSize: MainAxisSize.min, // Row
children: [
// 2.
Text(
'+',
style: TextStyle(
color: Colors.black,
fontSize: 18.sp, //
fontWeight: FontWeight.w900, //
),
),
SizedBox(width: 4.w), // 3.
// 4. RichText
RichText(
text: TextSpan(
style: TextStyle(
fontSize: 10.sp,
color: Colors.black, //
),
children: <TextSpan>[
TextSpan(
text: '设备:',
style: TextStyle(
fontWeight: FontWeight.w600,
),
),
TextSpan(
text: '可添加',
style: TextStyle(
fontWeight: FontWeight.w400,
),
),
],
),
),
],
),
),
),
);
}
String _extractDeviceModel(String deviceName) {
// 2. 使
final RegExp regExp = RegExp(r'\((.*?)\)');
// 3.
final Match? match = regExp.firstMatch(deviceName);
// 4.
if (match != null && match.groupCount >= 1) {
// group(1)
return match.group(1) ?? deviceName;
} else {
//
return deviceName;
}
}
}

View File

@ -4,6 +4,7 @@ import 'package:kaer_with_panels/app/common/app_config.dart';
import 'package:kaer_with_panels/app/common/app_run_data.dart';
import 'package:kaer_with_panels/app/localization/kr_language_utils.dart';
import 'dart:io' show Platform;
import 'package:kaer_with_panels/app/services/kr_site_config_service.dart';
import 'dart:async';
import '../../../services/kr_device_info_service.dart';
@ -77,6 +78,13 @@ class KRCrispController extends GetxController {
if (_kr_isDisposed) return;
final websiteId = AppConfig.getInstance().kr_website_id;
if (websiteId.isEmpty) {
//
print('Crisp 初始化失败website_id 未配置');
return;
}
// Crisp
crispController = CrispController(
websiteId: AppConfig.getInstance().kr_website_id,

View File

@ -6,6 +6,9 @@ import '../controllers/kr_crisp_controller.dart';
import 'package:kaer_with_panels/app/localization/app_translations.dart';
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
import '../../../widgets/kr_simple_loading.dart';
import 'package:kaer_with_panels/app/widgets/hi_base_scaffold.dart';
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
/// Crisp
class KRCrispView extends GetView<KRCrispController> {
@ -30,46 +33,60 @@ class KRCrispView extends GetView<KRCrispController> {
///
PreferredSizeWidget _kr_buildAppBar(BuildContext context) {
return AppBar(
backgroundColor: Theme.of(context).cardColor,
backgroundColor: Colors.transparent,
toolbarHeight: 0.0,
elevation: 0,
title: Text(
AppTranslations.kr_userInfo.customerService,
style: KrAppTextStyle(
color: Theme.of(context).textTheme.bodyMedium?.color,
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
leading: IconButton(
icon: Icon(
Icons.arrow_back_ios,
size: 20.sp,
color: Theme.of(context).textTheme.bodyMedium?.color,
),
onPressed: () => _kr_handleBack(),
),
automaticallyImplyLeading: false, // 1. leading
// title: Text(
// AppTranslations.kr_userInfo.customerService,
// style: KrAppTextStyle(
// color: Theme.of(context).textTheme.bodyMedium?.color,
// fontSize: 16,
// fontWeight: FontWeight.w500,
// ),
// ),
);
}
///
Widget _kr_buildBody(BuildContext context) {
return Container(
color: Theme.of(context).scaffoldBackgroundColor,
child: Obx(() {
if (controller.kr_isLoading.value) {
return _kr_buildLoadingView(context, '正在初始化客服系统...');
}
return Stack(
children: [
// --- WebView ---
// Obx CrispView
Obx(() {
if (controller.kr_isLoading.value) {
return _kr_buildLoadingView(context, '正在初始化客服系统...');
}
if (controller.kr_isInitialized.value && controller.crispController != null) {
return CrispView(
crispController: controller.crispController!,
clearCache: true,
onSessionIdReceived: _kr_onSessionIdReceived,
);
}
if (controller.kr_isInitialized.value && controller.crispController != null) {
return CrispView(
crispController: controller.crispController!,
clearCache: true,
onSessionIdReceived: _kr_onSessionIdReceived,
);
}
return _kr_buildErrorView(context);
}),
return _kr_buildErrorView(context);
}),
// --- ---
Positioned(
// 4. 使 MediaQuery UI重叠
top: 40.w,
left: 20.w,
child: GestureDetector(
onTap: () => _kr_handleBack(),
behavior: HitTestBehavior.translucent,
child: KrLocalImage(
imageName: 'hi-back-icon',
width: 48.w,
height: 48.w,
imageType: ImageType.svg,
),
),
),
],
);
}
@ -80,7 +97,7 @@ class KRCrispView extends GetView<KRCrispController> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
KRSimpleLoading(
color: Colors.blue,
color: Theme.of(context).primaryColor,
size: 50.0,
),
if (message.isNotEmpty) SizedBox(height: 16.sp),

View File

@ -5,10 +5,13 @@ import 'package:kaer_with_panels/app/common/app_run_data.dart';
import 'package:kaer_with_panels/app/model/enum/kr_request_type.dart';
import 'package:kaer_with_panels/app/services/api_service/kr_auth_api.dart';
import 'package:kaer_with_panels/app/utils/kr_common_util.dart';
import 'package:kaer_with_panels/app/services/kr_subscribe_service.dart';
import '../../../localization/app_translations.dart';
class KRDeleteAccountController extends GetxController {
///
final KRSubscribeService kr_subscribeService = KRSubscribeService();
//
final TextEditingController kr_codeController = TextEditingController();

View File

@ -2,137 +2,64 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:kaer_with_panels/app/common/app_run_data.dart';
import 'package:kaer_with_panels/app/widgets/hi_base_scaffold.dart';
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
import '../controllers/kr_delete_account_controller.dart';
import 'package:kaer_with_panels/app/localization/app_translations.dart';
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
class KRDeleteAccountView extends GetView<KRDeleteAccountController> {
const KRDeleteAccountView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: true,
appBar: AppBar(
title: Text(
AppTranslations.kr_userInfo.myAccount,
style: TextStyle(
fontSize: 16.sp,
fontWeight: FontWeight.w500,
color: Theme.of(context).textTheme.bodyMedium?.color,
),
),
centerTitle: true,
backgroundColor: Colors.white,
elevation: 0,
leading: IconButton(
icon: Icon(
Icons.arrow_back,
color: Theme.of(context).textTheme.bodyMedium?.color,
),
onPressed: () {
//
FocusScope.of(context).unfocus();
//
Get.until((route) => route.isFirst);
},
),
),
body: SingleChildScrollView(
return HIBaseScaffold(
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.all(16.w),
padding: EdgeInsets.all(40.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 20.w),
KrLocalImage(
imageName: 'delete_account',
width: 150.w,
height: 150.w,
imageType: ImageType.png,
),
SizedBox(height: 20.w),
Text(
'${AppTranslations.kr_userInfo.myAccount} ${KRAppRunData.getInstance().kr_account}\n${AppTranslations.kr_userInfo.willBeDeleted}',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 18.sp,
fontWeight: FontWeight.bold,
color: Theme.of(context).textTheme.bodyMedium?.color,
),
),
SizedBox(height: 20.w),
Text(
AppTranslations.kr_userInfo.deleteAccountWarning,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14.sp,
color: Theme.of(context).textTheme.bodySmall?.color,
),
),
SizedBox(height: 20.w),
_buildUserInfoSection(),
SizedBox(height: 12.w),
//
Container(
width: double.infinity,
height: 52.w,
decoration: ShapeDecoration(
color: Theme.of(context).cardColor,
shape: RoundedRectangleBorder(
side: BorderSide(width: 0.5, color: const Color(0xFFD2D2D2)),
borderRadius: BorderRadius.circular(10.r),
),
ConstrainedBox(
constraints: BoxConstraints(
minHeight: 250.h, // 2. 300 (使 .h )
),
child: Row(
// 3. 使 Column MainAxisAlignment.center 使
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(left: 12.w),
child: Icon(
Icons.lock_outline,
size: 20.w,
color: Theme.of(context).textTheme.bodyMedium?.color,
),
),
SizedBox(width: 8.w),
Expanded(
child: TextField(
controller: controller.kr_codeController,
keyboardType: TextInputType.number,
decoration: InputDecoration(
hintText: 'login.enterCode'.tr,
hintStyle: Theme.of(context).textTheme.bodySmall?.copyWith(
fontSize: 14.sp,
fontFamily: 'AlibabaPuHuiTi-Regular',
),
border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(vertical: 16.w),
),
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
fontSize: 14.sp,
fontFamily: 'AlibabaPuHuiTi-Regular',
),
),
),
if (controller.kr_codeHasText.value)
GestureDetector(
onTap: () {
controller.kr_codeController.clear();
},
child: Container(
height: double.infinity,
padding: EdgeInsets.symmetric(horizontal: 8.w),
child: Icon(
Icons.close,
size: 20.w,
color: Theme.of(context).textTheme.bodyMedium?.color,
),
),
),
_buildSendCodeButton(context),
_buildVerificationCodeField(), // 4.
],
),
),
SizedBox(height: 20.w),
SizedBox(
GestureDetector(
onTap: () {
controller.requestDeleteAccount();
},
child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(vertical: 12.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(24.w),
border: Border.all(color: const Color(0xFFFF2ED1), width: 2),
),
alignment: Alignment.center,
child: Text(
'注销账户',
style: TextStyle(
color: const Color(0xFFFF2ED1),
fontSize: 16.sp,
fontWeight: FontWeight.w700,
),
),
),
),
/*SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: controller.requestDeleteAccount,
@ -151,7 +78,7 @@ class KRDeleteAccountView extends GetView<KRDeleteAccountController> {
),
),
),
),
),*/
SizedBox(height: 20.w),
],
),
@ -160,7 +87,185 @@ class KRDeleteAccountView extends GetView<KRDeleteAccountController> {
);
}
Widget _buildSendCodeButton(BuildContext context) {
Widget _buildUserInfoSection() {
return Row(
children: [
Container(
width: 60.w,
height: 60.w,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(18.r),
),
alignment: Alignment.center,
child: KrLocalImage(
imageName: 'hi-home-logo',
imageType: ImageType.svg,
width: 30.w,
height: 30.w,
color: Colors.black,
),
),
SizedBox(width: 12.w),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Obx(() {
final _ = KRAppRunData.getInstance().kr_isLogin.value;
final email = KRAppRunData.getInstance().kr_account.value ?? '';
return Text(
email.isNotEmpty ? email : '',
style: TextStyle(
color: Colors.white,
fontSize: 20.sp,
fontWeight: FontWeight.bold,
height: 0.9,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
);
}),
Obx(() {
final _ = KRAppRunData.getInstance().kr_isLogin.value;
final userId = (KRAppRunData.getInstance().kr_userId.value ?? '').toString();
final deviceId = KRAppRunData.getInstance().deviceId ?? '';
return Text(
'ID: ${userId.isNotEmpty ? userId : deviceId}',
style: TextStyle(
color: Colors.white.withOpacity(0.85),
fontSize: 14.sp,
fontWeight: FontWeight.w500,
),
);
}),
Obx(() {
final currentSubscribe =
controller.kr_subscribeService.kr_currentSubscribe.value;
String expiryText;
if (currentSubscribe == null) {
expiryText = '尚未购买套餐';
} else {
final now = DateTime.now();
DateTime? expireDateTime;
try {
expireDateTime =
DateTime.parse(currentSubscribe.expireTime);
} catch (e) {
expireDateTime = null;
}
if (expireDateTime == null) {
expiryText = '套餐信息无效';
} else if (expireDateTime.isBefore(now)) {
final formattedExpireDate =
'${expireDateTime.year}/${expireDateTime.month.toString().padLeft(2, '0')}/${expireDateTime.day.toString().padLeft(2, '0')}';
expiryText = '已于 $formattedExpireDate 到期';
} else {
expiryText = '到期时间:${expireDateTime}';final year = expireDateTime.year;
final month = expireDateTime.month.toString().padLeft(2, '0');
final day = expireDateTime.day.toString().padLeft(2, '0');
final hour = expireDateTime.hour.toString().padLeft(2, '0');
final minute = expireDateTime.minute.toString().padLeft(2, '0');
final second = expireDateTime.second.toString().padLeft(2, '0');
// 2.
final formattedDateTime = '$year/$month/$day $hour:$minute:$second';
expiryText = '到期时间:$formattedDateTime';
}
}
return Text(
expiryText,
style: TextStyle(
color: Colors.white,
fontSize: 12.sp,
),
);
}),
],
),
),
],
);
}
///
Widget _buildVerificationCodeField() {
return SizedBox(
height: 50.w, //
child: TextField(
controller: controller.kr_codeController,
keyboardType: TextInputType.number,
style: KrAppTextStyle(
fontSize: 16,
color: Colors.white,
),
decoration: InputDecoration(
hintText: '验证码',
hintStyle: KrAppTextStyle(
fontSize: 16,
color: const Color(0xFFA6A6A6),
fontWeight: FontWeight.w600,
),
contentPadding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 10.w),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(25.w),
borderSide: BorderSide(color: Colors.white, width: 2),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(25.w),
borderSide: BorderSide(color: Colors.white, width: 2),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(25.w),
borderSide: BorderSide(color: Colors.white, width: 2),
),
isDense: true,
suffixIconConstraints: BoxConstraints(
maxHeight: 50.w, //
),
suffixIcon: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.w, vertical: 5.w),
child: Obx(() {
return GestureDetector(
onTap: controller.kr_canSendCode.value ? controller.kr_sendCode : null,
child: Container(
width: 100.w,
alignment: Alignment.center,
decoration: BoxDecoration(
color: controller.kr_canSendCode.value
? Theme.of(Get.context!).primaryColor
: const Color(0xFFD5D5D5),
borderRadius: BorderRadius.circular(100.r), //
),
child: Text(
controller.kr_canSendCode.value
? AppTranslations.kr_login.sendCode
: '${controller.kr_countdown}s',
style: KrAppTextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: controller.kr_canSendCode.value
? Colors.black
: const Color(0xFF464655) ,
),
),
),
);
}),
),
),
),
);
}
/*Widget _buildSendCodeButton(BuildContext context) {
return Obx(() => GestureDetector(
onTap: controller.kr_canSendCode.value ? controller.kr_sendCode : null,
child: Container(
@ -191,5 +296,5 @@ class KRDeleteAccountView extends GetView<KRDeleteAccountController> {
),
),
));
}
}*/
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,278 @@
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:kaer_with_panels/app/modules/kr_home/controllers/kr_home_controller.dart';
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
import 'package:kaer_with_panels/app/widgets/dialogs/hi_dialog.dart';
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
import 'package:kaer_with_panels/app/services/global_overlay_service.dart';
///
class HIAnimatedConnectButton extends GetView<KRHomeController> {
final VoidCallback? onTriggerSubscriptionAnimation;
const HIAnimatedConnectButton({
Key? key,
this.onTriggerSubscriptionAnimation,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Obx(() {
final isConnected = controller.kr_isConnected.value;
final delay = controller.kr_currentNodeLatency.value;
final isShow = delay == -1 || isConnected;
final Color buttonColor = Theme.of(context).primaryColor;
final double screenWidth = Get.width;
final double screenHeight = Get.height;
final double buttonSize = 340;
final double currentButtonSize = isShow ? 270 : buttonSize;
return Stack(
children: [
AnimatedPositioned(
duration: const Duration(milliseconds: 400),
curve: Curves.linear,
left: isShow ? (screenWidth - currentButtonSize) / 2 : -60,
bottom: isShow ? screenHeight * 0.2 : -40,
child: Stack(
alignment: Alignment.center,
clipBehavior: Clip.none,
children: [
///
if (isShow)
Positioned.fill(
child: OverflowBox(
maxWidth: buttonSize * 3,
maxHeight: buttonSize * 3,
child: ContinuousRippleEffect(
color: Theme.of(context).primaryColor
),
),
),
if (!isShow)
Positioned(
top: -20, // 10.w
left: 115, // 10.w
child: KrLocalImage(
imageName: "hi-home-slogan",
imageType: ImageType.svg,
),
),
///
Material(
shape: const CircleBorder(),
color: isShow ? Colors.transparent : Theme.of(context).primaryColor,
clipBehavior: Clip.antiAlias,
child: InkWell(
onTap: () {
final hasValidSubscription =
controller.kr_subscribeService.kr_availableSubscribes.isNotEmpty;
if (hasValidSubscription) {
controller.kr_toggleSwitch(!controller.kr_isConnected.value);
} else {
HIDialog.show(
customMessageWidget: Padding(
padding: EdgeInsets.only(top: 16.w),
child: Text(
'尚未购买套餐,请前往购买页面下单后即可开始极速网络体验',
textAlign: TextAlign.left,
style: KrAppTextStyle(
color: Theme.of(context).textTheme.bodyMedium?.color,
fontSize: 14.sp,
fontWeight: FontWeight.w600,
),
),
),
cancelText: '取消',
confirmText: '前往',
onConfirm: () {
GlobalOverlayService.instance.triggerSubscriptionAnimation();
},
);
}
},
child: SizedBox(
width: currentButtonSize,
height: currentButtonSize,
child: Stack(
alignment: Alignment.center,
children: [
if (isShow)
/// isShow = true
Stack(
alignment: Alignment.center,
children: [
Align(
alignment: Alignment.center,
child: KrLocalImage(
imageName: "hi-home-logo",
width: 186,
imageType: ImageType.svg,
),
),
Positioned(
bottom: 5,
left: 0,
right: 0,
child: Text(
controller.kr_connectText.value == '已连接'
? '已连接\n点击断开'
: controller.kr_connectText.value,
key: ValueKey(controller.kr_connectText.value),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontSize: 18,
fontWeight: FontWeight.bold,
height: 1
),
),
),
],
)
else
/// isShow = false
Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
KrLocalImage(
imageName: "hi-home-logo",
width: 104,
imageType: ImageType.svg,
),
SizedBox(height: 2.h),
Text(
controller.kr_connectText.value == '已连接'
? '已连接\n点击断开'
: controller.kr_connectText.value,
key: ValueKey(controller.kr_connectText.value),
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontSize: 18.sp,
fontWeight: FontWeight.bold,
),
),
],
),
],
),
),
),
),
],
),
),
],
);
});
}
}
/// 270270~47910%
/// 270~470
class ContinuousRippleEffect extends StatefulWidget {
final Color color;
const ContinuousRippleEffect({
super.key,
this.color = Colors.greenAccent,
});
@override
State<ContinuousRippleEffect> createState() => _ContinuousRippleEffectState();
}
class _ContinuousRippleEffectState extends State<ContinuousRippleEffect>
with TickerProviderStateMixin {
final int _layerCount = 4;
final List<AnimationController> _controllers = [];
final List<Animation<double>> _animations = [];
final List<double> _opacities = [0.4, 0.6, 0.8, 1.0];
@override
void initState() {
super.initState();
//
for (int i = 0; i < _layerCount; i++) {
//
final duration = Duration(milliseconds: 3000 + i * 1200);
final controller =
AnimationController(vsync: this, duration: duration)..repeat(reverse: true);
final curved = CurvedAnimation(parent: controller, curve: Curves.easeInOutSine);
_controllers.add(controller);
_animations.add(curved);
}
}
@override
void dispose() {
for (final c in _controllers) {
c.dispose();
}
super.dispose();
}
@override
Widget build(BuildContext context) {
const double minDiameter = 270.0; //
const double maxDiameter = 470.0; //
const double motionRange = (maxDiameter - minDiameter) / 2; // = 100
const double centerDiameter = (maxDiameter + minDiameter) / 2; // 370
return IgnorePointer(
child: SizedBox(
width: maxDiameter * 1.5,
height: maxDiameter * 1.5,
child: Stack(
alignment: Alignment.center,
clipBehavior: Clip.none,
children: List.generate(_layerCount, (i) {
final opacity = _opacities[i];
final anim = _animations[i];
return AnimatedBuilder(
animation: anim,
builder: (context, _) {
double diameter;
if (i == _layerCount - 1) {
//
diameter = minDiameter;
} else {
// 270~470
final value = anim.value;
// 370 ± 100 * sin()
diameter = minDiameter + (maxDiameter - minDiameter) * value;
}
return Center(
child: Container(
width: diameter,
height: diameter,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: widget.color.withOpacity(opacity),
),
),
);
},
);
}),
),
),
);
}
}

View File

@ -0,0 +1,188 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:kaer_with_panels/app/modules/kr_purchase_membership/views/kr_purchase_membership_view.dart';
import 'package:kaer_with_panels/app/modules/kr_purchase_membership/bindings/kr_purchase_membership_binding.dart';
import 'package:kaer_with_panels/app/modules/kr_purchase_membership/controllers/kr_purchase_membership_controller.dart';
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../controllers/kr_home_controller.dart';
import '../../../routes/app_pages.dart';
import 'package:kaer_with_panels/app/services/global_overlay_service.dart';
// ======================= 1. Circular Clipper () =======================
class CircularClipper extends CustomClipper<Path> {
final double fraction;
final Offset centerOffset;
CircularClipper(this.fraction, this.centerOffset);
@override
Path getClip(Size size) {
final double maxDistance = _calculateMaxDistance(size, centerOffset);
final double currentRadius = maxDistance * fraction;
return Path()..addOval(Rect.fromCircle(center: centerOffset, radius: currentRadius));
}
double _calculateMaxDistance(Size size, Offset center) {
final List<Offset> corners = [
Offset(0, 0),
Offset(size.width, 0),
Offset(0, size.height),
Offset(size.width, size.height)
];
double maxDist = 0;
for (var corner in corners) {
final dist = (corner - center).distance;
if (dist > maxDist) maxDist = dist;
}
return maxDist;
}
@override
bool shouldReclip(CircularClipper oldClipper) {
return oldClipper.fraction != fraction || oldClipper.centerOffset != centerOffset;
}
}
// ======================= 2. () =======================
class CustomCircleRoute extends PageRouteBuilder {
final Widget child;
final Offset startOffset;
final Color transitionColor;
final Duration customDuration;
CustomCircleRoute({
required this.child,
required this.startOffset,
required this.transitionColor,
this.customDuration = const Duration(milliseconds: 1500),
}) : super(
opaque: false,
transitionDuration: customDuration,
pageBuilder: (context, animation, secondaryAnimation) => child,
transitionsBuilder: (context, animation, secondaryAnimation, child) {
final curvedAnimation = CurvedAnimation(
parent: animation,
curve: Curves.easeOutCubic,
);
return ClipPath(
clipper: CircularClipper(curvedAnimation.value, startOffset),
child: Container(
color: transitionColor,
child: child,
),
);
},
);
}
// ======================= 3. () =======================
// 3.1. StatelessWidget StatefulWidget
class HISubscriptionCornerButton extends StatefulWidget {
final double size;
final double topOffset;
final double rightOffset;
final Color color;
final Function(VoidCallback)? onSetAnimationTrigger;
const HISubscriptionCornerButton({
super.key,
required this.size,
required this.topOffset,
required this.rightOffset,
required this.color,
this.onSetAnimationTrigger,
});
@override
State<HISubscriptionCornerButton> createState() => _HISubscriptionCornerButtonState();
}
// 3.2. State
class _HISubscriptionCornerButtonState extends State<HISubscriptionCornerButton> {
// 3.3. State GlobalKey
final GlobalKey _buttonKey = GlobalKey();
@override
void initState() {
super.initState();
print('🔥 HISubscriptionCornerButton initState 被调用');
// Overlay Service
GlobalOverlayService.instance.registerAnimationTrigger(() {
if (mounted) {
print('🔥 通过全局服务触发动画');
_startCircularTransition(context);
}
});
}
//
Offset _getButtonCenterOffset(BuildContext context) {
final RenderBox? renderBox = _buttonKey.currentContext?.findRenderObject() as RenderBox?;
if (renderBox == null) {
final screenWidth = MediaQuery.of(context).size.width;
// 使 widget. 访 StatefulWidget
return Offset(screenWidth - widget.rightOffset - widget.size / 2, widget.topOffset + widget.size / 2);
}
final Offset position = renderBox.localToGlobal(Offset.zero);
return Offset(position.dx + widget.size / 2, position.dy + widget.size / 2);
}
//
void _startCircularTransition(BuildContext context) {
print('🔥 _startCircularTransition 开始执行');
// 使 GetX
final currentRoute = Get.currentRoute;
if(currentRoute.isEmpty) return
print('🔥 当前路由: $currentRoute');
if (currentRoute == Routes.KR_PURCHASE_MEMBERSHIP) {
print('🔥 已经在 KRPurchaseMembership 页面,无需跳转');
return; //
}
//
GlobalOverlayService.instance.updateSubscriptionButtonColor(Colors.transparent);
final Offset startOffset = _getButtonCenterOffset(context);
final Color transitionColor = widget.color; // 使 widget.color
print('🔥 startOffset: $startOffset, transitionColor: $transitionColor');
// 👉 Controller
if (Get.isRegistered<KRPurchaseMembershipController>()) {
Get.delete<KRPurchaseMembershipController>(force: true);
print('🔥 已删除旧的 KRPurchaseMembershipController');
}
//
KRPurchaseMembershipBinding().dependencies();
print('🔥 开始导航到购买页面');
Navigator.of(context).push(
CustomCircleRoute(
child: KRPurchaseMembershipView(),
startOffset: startOffset,
transitionColor: transitionColor,
customDuration: const Duration(milliseconds: 1500),
),
).then((_) {
//
GlobalOverlayService.instance.updateSubscriptionButtonColor(null);
});
}
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => _startCircularTransition(context),
child: Container(
key: _buttonKey, // GlobalKey
width: widget.size,
height: widget.size,
decoration: BoxDecoration(
color: widget.color, // 使 widget.color
shape: BoxShape.circle,
),
),
);
}
}

View File

@ -1,9 +1,13 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kaer_with_panels/app/modules/hi_menu/views/hi_menu_view.dart';
import 'package:kaer_with_panels/app/modules/kr_login/views/kr_login_view.dart';
import 'package:kaer_with_panels/app/common/app_run_data.dart';
import 'package:kaer_with_panels/app/routes/app_pages.dart';
import 'package:kaer_with_panels/app/widgets/hi_base_scaffold.dart';
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
// import 'package:kaer_with_panels/app/widgets/kr_subscription_corner_button.dart';
import 'package:kaer_with_panels/app/widgets/dialogs/hi_dialog.dart';
import '../../../services/kr_subscribe_service.dart';
import '../controllers/kr_home_controller.dart';
import '../models/kr_home_views_status.dart';
@ -11,320 +15,210 @@ import '../widgets/kr_home_map_view.dart';
import '../widgets/kr_subscribe_selector_view.dart';
import 'kr_home_bottom_panel.dart';
import 'kr_home_subscription_view.dart';
import './hi_animated_connect_button.dart';
import 'package:kaer_with_panels/app/services/global_overlay_service.dart';
// 绿
const Color krModernGreen = Color(0xFF00E52B);
const Color krModernGreenLight = Color(0xFF66FF85);
const Color krModernGreenDark = Color(0xFF00B322);
class KRHomeView extends GetView<KRHomeController> {
class KRHomeView extends StatefulWidget {
const KRHomeView({super.key});
@override
State<KRHomeView> createState() => _KRHomeViewState();
}
class _KRHomeViewState extends State<KRHomeView> {
late KRHomeController controller;
@override
void initState() {
super.initState();
controller = Get.find<KRHomeController>();
}
@override
Widget build(BuildContext context) {
return Obx(() {
if (controller.kr_currentViewStatus.value ==
KRHomeViewsStatus.kr_notLoggedIn) {
return Scaffold(
body: Stack(
children: [
//
const KRHomeMapView(),
//
Align(
alignment: Alignment.bottomCenter,
child: ConstrainedBox(
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 0.8,
),
child: Container(
width: double.infinity,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(
color: Theme.of(context).cardColor,
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(20),
topRight: Radius.circular(20),
WidgetsBinding.instance.addPostFrameCallback((_) {
// build overlay/UI
if (Get.isRegistered<GlobalOverlayService>()) {
GlobalOverlayService.instance.updateSubscriptionButtonColor(null);
}
});
return Stack(
fit: StackFit.expand,
children: [
HIBaseScaffold(
showMenuButton: true,
topContentAreaHeight: 80,
child: Stack(
fit: StackFit.expand,
children: [
Align(
alignment: Alignment.topLeft,
child:
SafeArea(
child: Padding(
padding: EdgeInsets.fromLTRB(40.w, 8.w, 0, 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Text(
'Hi快VPN-网在我在,网快我快',
style: TextStyle(
color: Colors.white,
fontSize: 14.sp,
fontWeight: FontWeight.w600,
),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.1),
spreadRadius: 0,
blurRadius: 10,
offset: const Offset(0, -2),
),
],
),
child: const KRLoginView(),
),
//
Obx(() {
// 1.
final currentSubscribe =
controller.kr_subscribeService.kr_currentSubscribe.value;
// 2. Widget
Widget content;
// --- ---
final textStyle = TextStyle(
color: Colors.white,
fontSize: 12.sp,
fontWeight: FontWeight.w600,
height: 1.2, //
);
// 3.
if (currentSubscribe == null) {
// --- 1: ---
content = Text(
'尚未购买套餐',
style: textStyle,
);
} else {
// --- 2: ---
final now = DateTime.now();
DateTime? expireDateTime;
try {
expireDateTime = DateTime.parse(currentSubscribe.expireTime);
} catch (e) {
//
}
if (expireDateTime != null && expireDateTime.isBefore(now)) {
// --- 2.1: ---
final formattedExpireDate =
'${expireDateTime.year}/${expireDateTime.month.toString().padLeft(2, '0')}/${expireDateTime.day.toString().padLeft(2, '0')}';
// 使 \n Text
content = Text(
'您的套餐已于 $formattedExpireDate 到期\n请前往购买新套餐',
style: textStyle,
);
} else {
// --- 2.2: ---
final difference = expireDateTime?.difference(now);
final remainingDaysText = (difference?.inDays ?? 0) > 0
? '${difference!.inDays}'
: '不足一天';
// 使 \n Text
content = Text(
'套餐剩余:$remainingDaysText\n${controller.kr_isConnected.value ? '当前线路:${controller.kr_getRealConnectedNodeCountry()}' : '未连接'}',
style: textStyle,
);
}
}
// 4. Container
return Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(top: 8.h),
child: content,
);
}),
SizedBox(height: 8.h), //
// --- Checkbox ---
Obx(() {
return Row(
mainAxisSize: MainAxisSize.min, // Row
children: [
// --- Checkbox ---
GestureDetector(
//
onTap: () => controller.toggleQuickConnect(!controller.isQuickConnectEnabled.value),
child: AbsorbPointer(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
// 1. Checkbox
Container(
width: 20.w,
height: 20.w,
decoration: BoxDecoration(
color: controller.isQuickConnectEnabled.value
? Theme.of(context).primaryColor
: Colors.transparent,
border: Border.all(
color: Theme.of(context).primaryColor,
width: 1.5,
),
borderRadius: BorderRadius.circular(4.r),
),
child: controller.isQuickConnectEnabled.value
? Icon(
Icons.check,
size: 14.w,
fontWeight: FontWeight.w900,
color: Colors.black,
)
: null,
),
SizedBox(width: 8.w),
// 2.
Text(
'闪连',
style: TextStyle(
color: Colors.white,
fontSize: 20.sp,
fontWeight: FontWeight.w600,
),
),
],
),
),
),
// --- ---
SizedBox(width: 6.w), //
GestureDetector(
onTap: () {
HIDialog.show(
title: '*闪连功能',
message: '开启后,每次打开软件默认自动连接,无需点击连接按钮\n在后台关闭软件后,软件将自动断开',
);
},
child: KrLocalImage(
imageName: 'question-icon', //
imageType: ImageType.svg, //
width: 24.w,
height: 24.w,
color: Colors.white, //
),
),
],
);
}),
],
),
),
],
),
),
);
}
return Scaffold(
backgroundColor: Theme.of(context).primaryColor,
body: Stack(
children: [
//
const KRHomeMapView(),
//
Positioned(
top: MediaQuery.of(context).padding.top + 16,
left: 16,
right: 16,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
//
Flexible(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Container(
padding: const EdgeInsets.symmetric(
horizontal: 12, vertical: 4),
height: 32,
decoration: BoxDecoration(
color: Theme.of(context).brightness ==
Brightness.light
? Theme.of(context).cardColor
: Theme.of(context).cardColor.withOpacity(0.8),
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.1),
blurRadius: 10,
offset: const Offset(0, 2),
),
],
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Container(
width: 6,
height: 6,
decoration: BoxDecoration(
color: krModernGreen,
shape: BoxShape.circle,
),
),
const SizedBox(width: 8),
Obx(() {
return Text(
controller.kr_connectText.value,
style: TextStyle(
color: Theme.of(context).brightness ==
Brightness.light
? Colors.black
: Colors.white,
fontSize: 12,
),
);
}),
],
),
),
//
Obx(() {
if (!KRAppRunData().kr_isLogin.value) {
return const SizedBox.shrink();
}
final currentSubscribe = controller
.kr_subscribeService.kr_currentSubscribe.value;
if (currentSubscribe == null) {
return const SizedBox.shrink();
}
return Expanded(
child: GestureDetector(
onTap: () {
if (KRSubscribeService()
.kr_currentStatus
.value ==
KRSubscribeServiceStatus.kr_loading) {
return;
}
showDialog(
context: context,
barrierDismissible: false,
builder: (context) => Dialog(
backgroundColor: Colors.transparent,
child: KRSubscribeSelectorView(),
),
);
},
child: Container(
margin:
const EdgeInsets.only(left: 12, right: 12),
height: 32,
decoration: BoxDecoration(
color: Theme.of(context).brightness ==
Brightness.light
? Theme.of(context).cardColor
: Theme.of(context)
.cardColor
.withOpacity(0.8),
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.1),
blurRadius: 10,
offset: const Offset(0, 2),
),
],
),
child: const KRHomeSubscriptionView(),
),
),
);
}),
],
),
),
//
Row(
mainAxisSize: MainAxisSize.min,
children: [
//
Obx(() {
if (!KRAppRunData().kr_isLogin.value) {
return const SizedBox.shrink();
}
return Container(
width: 32,
height: 32,
margin: const EdgeInsets.only(right: 8),
decoration: BoxDecoration(
color: Theme.of(context).brightness ==
Brightness.light
? Theme.of(context).cardColor
: Theme.of(context).cardColor.withOpacity(0.8),
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.1),
blurRadius: 10,
offset: const Offset(0, 2),
),
],
),
child: IconButton(
onPressed: () {
Get.toNamed(Routes.KR_MESSAGE);
},
icon: Icon(
Icons.notifications_outlined,
color: Theme.of(context).brightness ==
Brightness.light
? Colors.blue
: Theme.of(context)
.textTheme
.bodyMedium
?.color
?.withOpacity(0.8),
size: 16,
),
padding: EdgeInsets.zero,
constraints: const BoxConstraints(),
),
);
}),
//
Obx(() {
if (!KRAppRunData().kr_isLogin.value) {
return const SizedBox.shrink();
}
return Container(
width: 32,
height: 32,
decoration: BoxDecoration(
color: Theme.of(context).brightness ==
Brightness.light
? Theme.of(context).cardColor
: Theme.of(context).cardColor.withOpacity(0.8),
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.1),
blurRadius: 10,
offset: const Offset(0, 2),
),
],
),
child: IconButton(
onPressed: () {
controller.kr_refreshAll();
},
icon: Icon(
Icons.refresh,
color: Theme.of(context).brightness ==
Brightness.light
? Colors.blue
: Theme.of(context)
.textTheme
.bodyMedium
?.color
?.withOpacity(0.8),
size: 16,
),
padding: EdgeInsets.zero,
constraints: const BoxConstraints(),
),
);
}),
],
),
],
),
),
//
Positioned(
left: 0,
right: 0,
bottom: 0,
child: Obx(() {
return AnimatedContainer(
duration: const Duration(milliseconds: 300),
curve: Curves.easeInOut,
height: controller.kr_bottomPanelHeight.value.w,
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(20),
topRight: Radius.circular(20),
),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.1),
spreadRadius: 0,
blurRadius: 10,
offset: const Offset(0, -2),
),
],
),
child: const KRHomeBottomPanel(),
);
}),
),
],
),
);
});
}
Color _getTrafficColor(double percentage) {
if (percentage >= 0.9) {
return Colors.red;
} else if (percentage >= 0.7) {
return Colors.orange;
} else {
return krModernGreen;
}
],
),
),
// HIAnimatedConnectButton HIBaseScaffold SafeArea
HIAnimatedConnectButton(),
],
);
}
}

View File

@ -297,13 +297,13 @@ return GetBuilder<KRHomeController>(
controller.kr_selectNode(node.tag);
// 30%
if (controller.kr_sheetController.isAttached) {
controller.kr_sheetController.animateTo(
0.3,
duration: const Duration(milliseconds: 300),
curve: Curves.easeOut,
);
}
// if (controller.kr_sheetController.isAttached) {
// controller.kr_sheetController.animateTo(
// 0.3,
// duration: const Duration(milliseconds: 300),
// curve: Curves.easeOut,
// );
// }
} catch (e) {
KRLogUtil.kr_e('处理标记点击失败: $e', tag: 'HomeMapView');
}

View File

@ -0,0 +1,94 @@
import 'package:flutter/material.dart';
class RippleAnimation extends StatefulWidget {
final Widget child;
final Duration delay;
final Duration duration;
final double? maxRadius;
final double startScale;
const RippleAnimation({
Key? key,
required this.child,
this.delay = Duration.zero,
this.duration = const Duration(milliseconds: 1800),
this.maxRadius,
this.startScale = 0.0,
}) : super(key: key);
@override
_RippleAnimationState createState() => _RippleAnimationState();
}
// 线 startScale
class _StartScaleCurve extends Curve {
final double startScale;
_StartScaleCurve(this.startScale);
@override
double transformInternal(double t) {
// t [0.0, 1.0]
// [startScale, 1.0]
return startScale + (1.0 - startScale) * t;
}
}
class _RippleAnimationState extends State<RippleAnimation>
with TickerProviderStateMixin {
late AnimationController _controller;
late Animation<double> _scaleAnimation;
late Animation<double> _fadeAnimation;
@override
void initState() {
super.initState();
_controller = AnimationController(
duration: widget.duration,
vsync: this,
);
// 使线
_scaleAnimation = _controller.drive(
CurveTween(curve: _StartScaleCurve(widget.startScale)),
);
//
_fadeAnimation = Tween<double>(begin: 1.0, end: 0.0).animate(
CurvedAnimation(parent: _controller, curve: const Interval(0.5, 1.0)),
);
Future.delayed(widget.delay, () {
if (mounted) {
_controller.repeat();
}
});
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return AnimatedBuilder(
animation: _controller,
builder: (context, child) {
return Transform.scale(
scale: _scaleAnimation.value,
child: Opacity(
opacity: _fadeAnimation.value,
child: SizedBox.fromSize(
size: widget.maxRadius != null
? Size.square(widget.maxRadius! * 2)
: null,
child: widget.child,
),
),
);
},
);
}
}

View File

@ -13,7 +13,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
import 'package:kaer_with_panels/app/modules/kr_main/controllers/kr_main_controller.dart';
import 'package:easy_refresh/easy_refresh.dart';
import 'package:kaer_with_panels/app/widgets/dialogs/kr_dialog.dart';
import 'package:kaer_with_panels/app/common/app_run_data.dart';
///
class KRInviteProgress {
@ -47,23 +47,15 @@ class KRInviteController extends GetxController {
final kr_isLoading = false.obs;
final count = 0.obs;
final EasyRefreshController refreshController = EasyRefreshController();
//
bool _hasShownDialog = false;
final otherInviteCodeController = TextEditingController();
@override
void onInit() {
super.onInit();
final appRunData = KRAppRunData.getInstance();
//
ever(appRunData.kr_isLogin, (value) {
//
if (value && !appRunData.isDeviceLogin()) {
ever(KRAppRunData.getInstance().kr_isLogin, (value) {
if (value) {
_kr_fetchUserInfo();
_kr_fetchAffiliateCount();
_hasShownDialog = false; //
} else {
kr_progress.value = KRInviteProgress(
pending: 0,
@ -76,68 +68,12 @@ class KRInviteController extends GetxController {
kr_referCode.value = '';
}
});
//
if (appRunData.kr_isLogin.value && !appRunData.isDeviceLogin()) {
if (KRAppRunData.getInstance().kr_isLogin.value) {
_kr_fetchUserInfo();
_kr_fetchAffiliateCount();
}
}
///
void kr_onPageEnter() {
final appRunData = KRAppRunData.getInstance();
final isDeviceLogin = appRunData.isDeviceLogin();
KRLogUtil.kr_i('📄 [InviteController] 页面进入', tag: 'InviteController');
KRLogUtil.kr_i(' - kr_isLogin: ${appRunData.kr_isLogin.value}', tag: 'InviteController');
KRLogUtil.kr_i(' - isDeviceLogin: $isDeviceLogin', tag: 'InviteController');
KRLogUtil.kr_i(' - _hasShownDialog: $_hasShownDialog', tag: 'InviteController');
//
if ((!appRunData.kr_isLogin.value || isDeviceLogin) && !_hasShownDialog) {
_hasShownDialog = true; //
KRLogUtil.kr_i('🔒 [InviteController] 未登录或设备登录,显示绑定提示对话框', tag: 'InviteController');
//
Future.delayed(const Duration(milliseconds: 100), () {
KRLogUtil.kr_i('💬 [InviteController] 准备显示对话框...', tag: 'InviteController');
try {
KRDialog.show(
title: AppTranslations.kr_dialog.deviceLoginBindingTitle,
message: AppTranslations.kr_dialog.deviceLoginBindingMessage,
confirmText: AppTranslations.kr_dialog.kr_ok,
cancelText: AppTranslations.kr_dialog.kr_cancel,
onConfirm: () {
KRLogUtil.kr_i('✅ [InviteController] 用户点击确定,跳转到登录页', tag: 'InviteController');
Get.back(); //
//
Future.delayed(const Duration(milliseconds: 300), () {
//
Get.find<KRMainController>().kr_setPage(0);
Future.delayed(const Duration(milliseconds: 100), () {
Get.toNamed(Routes.MR_LOGIN);
});
});
},
onCancel: () {
KRLogUtil.kr_i('❌ [InviteController] 用户点击取消,返回首页', tag: 'InviteController');
Get.back(); //
//
Future.delayed(const Duration(milliseconds: 100), () {
Get.find<KRMainController>().kr_setPage(0);
});
},
);
KRLogUtil.kr_i('✅ [InviteController] 对话框已显示', tag: 'InviteController');
} catch (e) {
KRLogUtil.kr_e('❌ [InviteController] 显示对话框失败: $e', tag: 'InviteController');
}
});
}
}
// kr_getUserInfo
// AppRunData
Future<void> _kr_fetchUserInfo() async {
@ -171,9 +107,7 @@ class KRInviteController extends GetxController {
}
Future<bool> kr_checkLoginStatus() async {
final appRunData = KRAppRunData.getInstance();
//
return appRunData.kr_isLogin.value && !appRunData.isDeviceLogin();
return KRAppRunData.getInstance().kr_isLogin.value;
}
///
@ -351,6 +285,30 @@ class KRInviteController extends GetxController {
await _kr_copyToClipboard(kr_referCode.value);
}
///
Future<void> kr_handleBindInviteCode() async {
final text = otherInviteCodeController.text;
print('输入的邀请码是: $text');
if (text.isEmpty) {
KRCommonUtil.kr_showToast('请输入邀请码');
return;
}
try {
final either = await KRUserApi().hi_inviteCode(text);
either.fold(
(error) => KRCommonUtil.kr_showToast(error.msg),
(affiliateCount) {
KRCommonUtil.kr_showToast('绑定成功: $text');
otherInviteCodeController.text = '';
},
);
} catch (e) {
KRCommonUtil.kr_showToast(e.toString());
}
}
///
Future<void> _kr_fetchAffiliateCount() async {
try {
@ -374,13 +332,11 @@ class KRInviteController extends GetxController {
}
Future<void> kr_onRefresh() async {
final appRunData = KRAppRunData.getInstance();
//
if (!appRunData.kr_isLogin.value || appRunData.isDeviceLogin()) {
if (!KRAppRunData.getInstance().kr_isLogin.value) {
refreshController.finishRefresh();
return;
}
try {
await _kr_fetchUserInfo();
await _kr_fetchAffiliateCount();

View File

@ -1,468 +1,206 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kaer_with_panels/app/common/app_config.dart';
import 'package:kaer_with_panels/app/common/app_run_data.dart';
import 'package:kaer_with_panels/app/localization/app_translations.dart';
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
import '../controllers/kr_invite_controller.dart';
import 'package:flutter/services.dart';
import 'package:kaer_with_panels/app/utils/kr_common_util.dart';
import 'package:easy_refresh/easy_refresh.dart';
class _KRSliverPersistentHeaderDelegate extends SliverPersistentHeaderDelegate {
final Widget child;
final double maxHeight;
final double minHeight;
_KRSliverPersistentHeaderDelegate({
required this.child,
required this.maxHeight,
required this.minHeight,
});
@override
Widget build(
BuildContext context, double shrinkOffset, bool overlapsContent) {
return SizedBox.expand(child: child);
}
@override
double get maxExtent => maxHeight;
@override
double get minExtent => minHeight;
@override
bool shouldRebuild(_KRSliverPersistentHeaderDelegate oldDelegate) {
return maxHeight != oldDelegate.maxHeight ||
minHeight != oldDelegate.minHeight ||
child != oldDelegate.child;
}
}
import 'package:kaer_with_panels/app/widgets/hi_base_scaffold.dart';
import 'package:kaer_with_panels/app/widgets/hi_help_entrance.dart';
class KRInviteView extends GetView<KRInviteController> {
const KRInviteView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Theme.of(context).primaryColor,
body: Obx(() {
// 使 Obx
final appRunData = KRAppRunData.getInstance();
final isDeviceLogin = appRunData.isDeviceLogin();
final isLoggedIn = appRunData.kr_isLogin.value && !isDeviceLogin;
if (!isLoggedIn) {
//
// 使 WidgetsBinding
WidgetsBinding.instance.addPostFrameCallback((_) {
controller.kr_onPageEnter();
});
return Container(); //
}
final isKeyboardVisible = MediaQuery.of(context).viewInsets.bottom > 0;
//
return EasyRefresh(
controller: controller.refreshController,
onRefresh: controller.kr_onRefresh,
header: DeliveryHeader(
triggerOffset: 50.0,
springRebound: true,
),
child: CustomScrollView(
physics: const BouncingScrollPhysics(),
slivers: [
SliverAppBar(
expandedHeight: 150.w,
floating: false,
pinned: true,
stretch: true,
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
flexibleSpace: FlexibleSpaceBar(
background: Stack(
fit: StackFit.expand,
children: [
Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Colors.blue,
Colors.blue.shade400,
Colors.blue.shade200,
Theme.of(context).primaryColor,
],
stops: const [0.0, 0.3, 0.7, 1.0],
),
),
),
Positioned(
bottom: -50.w,
child: KrLocalImage(
imageName: "invite_top_bg",
width: 344.w,
height: 233.w,
fit: BoxFit.contain,
imageType: ImageType.png,
),
),
Positioned(
top: MediaQuery.of(context).padding.top + 16.w,
left: 16.w,
child: Text(
AppTranslations.kr_invite.title,
style: KrAppTextStyle(
color: Colors.white,
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
),
],
),
),
),
SliverPersistentHeader(
delegate: _KRSliverPersistentHeaderDelegate(
maxHeight: 120.w,
minHeight: 120.w,
child: Container(
color: Theme.of(context).primaryColor,
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: _kr_buildProgressCard(context),
),
),
pinned: true,
),
SliverToBoxAdapter(
child: SingleChildScrollView(
child: Container(
color: Theme.of(context).primaryColor,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_kr_buildInviteSteps(context),
_kr_buildShareButtons(context),
_kr_buildInviteRules(context),
SizedBox(height: 20.w),
],
),
),
),
),
],
),
);
}), // Obx
);
}
Widget _kr_buildProgressCard(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 12.w),
decoration: BoxDecoration(
color: Theme.of(context).cardColor,
borderRadius: BorderRadius.circular(12.w),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
blurRadius: 8.w,
offset: Offset(0, 2.w),
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
return HIBaseScaffold(
resizeToAvoidBottomInset: true,
// 1. child 使 Stack HIHelpEntrance
child: Stack(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
AppTranslations.kr_invite.inviteStats,
style: KrAppTextStyle(
fontSize: 15,
fontWeight: FontWeight.w500,
color: Theme.of(context).textTheme.bodyMedium?.color,
),
),
Container(
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.w),
decoration: BoxDecoration(
color: Colors.blue.withOpacity(0.1),
borderRadius: BorderRadius.circular(4.w),
),
child: Obx(() => Text(
controller.kr_progress.value.registers.toString(),
style: KrAppTextStyle(
fontSize: 13,
fontWeight: FontWeight.w500,
color: Colors.blue,
),
)),
),
],
),
SizedBox(height: 12.w),
Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
AppTranslations.kr_invite.registers,
style: KrAppTextStyle(
fontSize: 13,
color: Theme.of(context).textTheme.bodySmall?.color,
),
SingleChildScrollView(
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
physics: const AlwaysScrollableScrollPhysics(),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 40.w),
// 3. 使 Column
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// 🟢
Container(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.w),
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(25.r),
),
SizedBox(height: 4.w),
Obx(() => Text(
controller.kr_progress.value.registers.toString(),
style: KrAppTextStyle(
fontSize: 17,
fontWeight: FontWeight.w600,
color: Theme.of(context).textTheme.bodyMedium?.color,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min, //
children: [
KrLocalImage(
imageName: 'hi-home-logo',
imageType: ImageType.svg,
width: 54.w,
color: Colors.black,
),
SizedBox(width: 16.w),
Flexible(
child: Text(
'受邀用户首次付款时他将与您分别获得3天免费使用时长',
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: FontWeight.w500,
),
),
)),
],
),
),
SizedBox(width: 16.w),
Expanded(
child: Visibility(
visible: AppConfig().kr_is_daytime,
child: Column(
),
],
),
),
SizedBox(height: 26.w),
// 🟢
Container(
padding: EdgeInsets.symmetric(horizontal: 4.w, vertical: 2.w),
decoration: BoxDecoration(
border: Border.all(color: Colors.white, width: 2.0),
borderRadius: BorderRadius.circular(1000.r),
),
child: Obx(
() => Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
width: 100.w,
height: 40.w,
alignment: Alignment.center,
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(1000.r),
),
child: Text(
'邀请码',
style: TextStyle(
color: Colors.black,
fontSize: 16.sp,
fontWeight: FontWeight.w600,
),
),
),
Expanded(
child: Text(
controller.kr_referCode.value,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 20.sp,
fontWeight: FontWeight.bold,
),
),
),
IconButton(
icon: const KrLocalImage(
imageName: 'share-icon',
imageType: ImageType.svg,
color: Colors.white,
),
onPressed: () {
if (controller.kr_referCode.value.isNotEmpty) {
Clipboard.setData(
ClipboardData(text: controller.kr_referCode.value),
);
KRCommonUtil.kr_showToast(
AppTranslations.kr_invite.inviteCodeCopied,
);
}
},
),
],
),
),
),
SizedBox(height: 160.w),
// 🟢
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
AppTranslations.kr_invite.totalCommission,
style: KrAppTextStyle(
fontSize: 13,
color: Theme.of(context).textTheme.bodySmall?.color,
'接受他人邀请',
style: TextStyle(
color: Colors.white,
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 4.w),
Text(
controller.kr_progress.value.totalCommission.toString(),
style: KrAppTextStyle(
fontSize: 17,
fontWeight: FontWeight.w600,
color: Colors.blue,
SizedBox(height: 8.h),
TextField(
controller: controller.otherInviteCodeController,
textAlign: TextAlign.center,
style: const TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
decoration: InputDecoration(
hintText: '填入邀请人邀请码兑换免费时长...',
hintStyle: const TextStyle(color: Color(0xFFA6A6A6)),
filled: true,
fillColor: Colors.transparent,
contentPadding: EdgeInsets.symmetric(horizontal: 22.w),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(1000.r),
borderSide: const BorderSide(color: Colors.white, width: 2.0),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(1000.r),
borderSide: const BorderSide(color: Colors.white, width: 2.0),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(1000.r),
borderSide: const BorderSide(color: Colors.white, width: 2.0),
),
constraints: BoxConstraints(maxHeight: 50.h),
),
),
SizedBox(height: 10.w),
SizedBox(
width: double.infinity,
height: 50.w,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(context).primaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(1000.r),
),
),
onPressed: () {
controller.kr_handleBindInviteCode();
},
child: Text(
'保存',
style: TextStyle(
color: Colors.black,
fontSize: 16.sp,
fontWeight: FontWeight.bold,
),
),
),
),
],
),
),
// 4. HIHelpEntrance
SizedBox(height: 80.w), // HIHelpEntrance
],
),
],
),
),
],
),
);
}
Widget _kr_buildInviteSteps(BuildContext context) {
return Padding(
padding: EdgeInsets.fromLTRB(16.w, 32.w, 16.w, 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
AppTranslations.kr_invite.steps,
style: KrAppTextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Theme.of(context).textTheme.bodyMedium?.color,
),
),
],
),
SizedBox(height: 16.w),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
_kr_buildStepCard(context, Icons.person_add, AppTranslations.kr_invite.inviteFriend),
_kr_buildStepCard(context, Icons.mail, AppTranslations.kr_invite.acceptInvite),
_kr_buildStepCard(context, Icons.card_giftcard, AppTranslations.kr_invite.getReward),
],
),
// 5. HIHelpEntrance Stack
if (!isKeyboardVisible)
const HIHelpEntrance(),
],
),
);
}
Widget _kr_buildStepCard(BuildContext context, IconData icon, String text) {
return Container(
width: 100.w,
padding: EdgeInsets.all(12.r),
decoration: BoxDecoration(
color: Theme.of(context).cardColor,
borderRadius: BorderRadius.circular(12.r),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
blurRadius: 10.r,
offset: Offset(0, 2.w),
),
],
),
child: Column(
children: [
Container(
width: 48.r,
height: 48.r,
decoration: BoxDecoration(
color: Colors.blue.withOpacity(0.1),
shape: BoxShape.circle,
),
child: Icon(icon, color: Colors.blue, size: 24.r),
),
SizedBox(height: 8.w),
Text(
text,
textAlign: TextAlign.center,
style: KrAppTextStyle(
fontSize: 12,
fontWeight: FontWeight.w500,
color: Theme.of(context).textTheme.bodyMedium?.color,
),
),
],
),
);
}
Widget _kr_buildShareButtons(BuildContext context) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.w),
child: Column(
children: [
Row(
children: [
Expanded(
child: ElevatedButton.icon(
onPressed: controller.kr_handleLinkShare,
icon: Icon(Icons.link, size: 20.r, color: Colors.white),
label: FittedBox(
fit: BoxFit.scaleDown,
child: Text(
AppTranslations.kr_invite.shareLink,
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: FontWeight.w500,
),
),
),
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF2196F3),
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 12.w),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(24.r),
),
),
),
),
SizedBox(width: 16.w),
Expanded(
child: ElevatedButton.icon(
onPressed: controller.kr_handleQRShare,
icon: Icon(Icons.qr_code, size: 20.r, color: Colors.white),
label: FittedBox(
fit: BoxFit.scaleDown,
child: Text(
AppTranslations.kr_invite.shareQR,
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: FontWeight.w500,
),
),
),
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF2196F3),
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 12.w),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(24.r),
),
),
),
),
],
),
SizedBox(height: 16.w),
Obx(() {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'${AppTranslations.kr_invite.myInviteCode}: ${controller.kr_referCode.value}',
style: KrAppTextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Theme.of(context).textTheme.bodyMedium?.color,
),
),
IconButton(
icon: Icon(Icons.copy, size: 20.r, color: Colors.blue),
onPressed: () {
Clipboard.setData(ClipboardData(text: controller.kr_referCode.value));
KRCommonUtil.kr_showToast(
AppTranslations.kr_invite.inviteCodeCopied,
);
},
),
],
);
}),
],
),
);
}
Widget _kr_buildInviteRules(BuildContext context) {
return Padding(
padding: EdgeInsets.all(16.r),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
AppTranslations.kr_invite.rules,
style: KrAppTextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Theme.of(context).textTheme.bodyMedium?.color,
),
),
SizedBox(height: 16.w),
Text(
AppTranslations.kr_invite.rule1,
style: KrAppTextStyle(
fontSize: 12,
fontWeight: FontWeight.w400,
color: Theme.of(context).textTheme.bodySmall?.color,
),
),
SizedBox(height: 8.w),
Text(
AppTranslations.kr_invite.rule2,
style: KrAppTextStyle(
fontSize: 12,
fontWeight: FontWeight.w400,
color: Theme.of(context).textTheme.bodySmall?.color,
),
),
],
),
);
}
}
}

View File

@ -12,6 +12,8 @@ import 'package:kaer_with_panels/app/utils/kr_event_bus.dart';
import 'package:kaer_with_panels/app/services/kr_site_config_service.dart';
import '../../../localization/kr_language_utils.dart';
import 'package:kaer_with_panels/app/services/kr_subscribe_service.dart';
import 'package:kaer_with_panels/app/modules/hi_user_info/controllers/hi_user_info_controller.dart';
///
enum KRLoginProgressStatus {
@ -60,6 +62,9 @@ extension KRLoginTypeExt on KRLoginProgressStatus {
class KRLoginController extends GetxController
with GetSingleTickerProviderStateMixin {
///
final KRSubscribeService kr_subscribeService = KRSubscribeService();
///
RxBool kr_isRegistered = false.obs;
@ -67,7 +72,7 @@ class KRLoginController extends GetxController
var kr_loginType = KRLoginType.kr_email.obs;
///
var kr_loginStatus = KRLoginProgressStatus.kr_check.obs;
var kr_loginStatus = KRLoginProgressStatus.kr_registerSendCode.obs;
///
var _countdown = 60; //
@ -138,7 +143,7 @@ class KRLoginController extends GetxController
case KRLoginProgressStatus.kr_registerSendCode:
return AppTranslations.kr_login.next;
case KRLoginProgressStatus.kr_registerSetPsd:
return AppTranslations.kr_login.registerNow;
return AppTranslations.kr_login.passwordLogin;
case KRLoginProgressStatus.kr_forgetPsdSendCode:
return AppTranslations.kr_login.next;
case KRLoginProgressStatus.kr_forgetPsdSetPsd:
@ -149,7 +154,25 @@ class KRLoginController extends GetxController
@override
void onInit() {
super.onInit();
// 1.
if (Get.arguments != null && Get.arguments is Map<String, dynamic>) {
final String? entry = Get.arguments['entry'];
print('entry: $entry');
// 2. entry kr_loginStatus
if (entry == 'forget_psd') {
// -
kr_loginStatus.value = KRLoginProgressStatus.kr_forgetPsdSendCode;
} else if (entry == 'bind_email') {
// -
kr_loginStatus.value = KRLoginProgressStatus.kr_registerSetPsd;
}else if (entry == 'login') {
//
kr_loginStatus.value = KRLoginProgressStatus.kr_loginByPsd;
}
// entry kr_loginByPsd
}
//
_timer = Timer(Duration.zero, () {});
@ -244,12 +267,12 @@ class KRLoginController extends GetxController
});
//
ever(KRLanguageUtils.kr_language, (_) {
/*ever(KRLanguageUtils.kr_language, (_) {
if (kr_canSendCode.value) {
kr_countdownText.value = "";
kr_countdownText.value = AppTranslations.kr_login.sendCode;
}
});
});*/
kr_initFocus();
}
@ -280,9 +303,13 @@ class KRLoginController extends GetxController
void kr_sendCode() async {
final either = await KRAuthApi().kr_sendCode(
accountController.text,
kr_loginStatus.value == KRLoginProgressStatus.kr_registerSendCode
2
); // 3
/*
*
* kr_loginStatus.value == KRLoginProgressStatus.kr_registerSendCode
? 2 // 2
: 3); // 3
: 3*/
either.fold((l) {
KRCommonUtil.kr_showToast(l.msg);
}, (r) async {
@ -316,25 +343,25 @@ class KRLoginController extends GetxController
return;
}
if (psdController.text.isEmpty) {
KRCommonUtil.kr_showToast(AppTranslations.kr_login.enterPassword);
return;
}
if (agPsdController.text.isEmpty) {
KRCommonUtil.kr_showToast(AppTranslations.kr_login.reenterPassword);
return;
}
if (psdController.text != agPsdController.text) {
KRCommonUtil.kr_showToast(AppTranslations.kr_login.passwordMismatch);
return;
}
// if (psdController.text.isEmpty) {
// KRCommonUtil.kr_showToast(AppTranslations.kr_login.enterPassword);
// return;
// }
// if (agPsdController.text.isEmpty) {
// KRCommonUtil.kr_showToast(AppTranslations.kr_login.reenterPassword);
// return;
// }
// if (psdController.text != agPsdController.text) {
// KRCommonUtil.kr_showToast(AppTranslations.kr_login.passwordMismatch);
// return;
// }
//
final siteConfig = KRSiteConfigService();
final needVerification = siteConfig.isEmailVerificationEnabled() ||
siteConfig.isRegisterVerificationEnabled();
// final siteConfig = KRSiteConfigService();
// final needVerification = siteConfig.isEmailVerificationEnabled() ||
// siteConfig.isRegisterVerificationEnabled();
if (needVerification && codeController.text.isEmpty) {
if (codeController.text.isEmpty) {
KRCommonUtil.kr_showToast(AppTranslations.kr_login.enterCode);
return;
}
@ -348,7 +375,8 @@ class KRLoginController extends GetxController
KRCommonUtil.kr_showToast(l.msg);
}, (r) async {
_saveLoginData(r);
KRCommonUtil.kr_showToast(AppTranslations.kr_login.registerSuccess);
// KRCommonUtil.kr_showToast(AppTranslations.kr_login.registerSuccess);
KRCommonUtil.kr_showToast('登录成功');
});
}
@ -460,7 +488,8 @@ class KRLoginController extends GetxController
Future.delayed(Duration(milliseconds: 100), () {
KREventBus().kr_sendMessage(KRMessageType.kr_payment);
});
final controller = Get.find<HIUserInfoController>();
controller.loadDeviceList();
//
Get.back();
}

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More