diff --git a/src/web/components/ClientOverviewPage.jsx b/src/web/components/ClientOverviewPage.jsx
index e79bae0..d59ca1c 100644
--- a/src/web/components/ClientOverviewPage.jsx
+++ b/src/web/components/ClientOverviewPage.jsx
@@ -74,12 +74,27 @@ function DurationPart({ name, children }) {
}
function HarborBrand({ isGateway, gatewayAvailable, gatewayDirect, busy, onSetGatewayAuto }) {
+ const [modeAnimating, setModeAnimating] = useState(false);
+ const stopModeAnimationRef = useRef(false);
const product = isGateway ? 'Gateway' : 'Connect';
const switchable = !isGateway && gatewayAvailable;
const label = gatewayDirect
? 'Игнорировать Harbor Gateway и использовать локальный VPN'
: 'Использовать обнаруженный Harbor Gateway';
+ function startModeAnimation() {
+ stopModeAnimationRef.current = false;
+ setModeAnimating(true);
+ }
+
+ function finishModeAnimation() {
+ if (matchMedia('(prefers-reduced-motion: reduce)').matches) {
+ setModeAnimating(false);
+ return;
+ }
+ stopModeAnimationRef.current = true;
+ }
+
const content =