From 2f5ae72f9edbcea0de15299b3fc9fdb8392dd672 Mon Sep 17 00:00:00 2001 From: Alex Poryadin Date: Thu, 5 Jun 2025 14:31:28 +0300 Subject: [PATCH 1/6] add submit button (enter) to login/signup forms --- frontend/src/modules/LoginForm/index.tsx | 9 +++++++-- frontend/src/modules/RegisterForm/index.tsx | 13 +++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/frontend/src/modules/LoginForm/index.tsx b/frontend/src/modules/LoginForm/index.tsx index 9a575a07..255ba2e2 100644 --- a/frontend/src/modules/LoginForm/index.tsx +++ b/frontend/src/modules/LoginForm/index.tsx @@ -28,8 +28,13 @@ const LoginForm: FC = () => { Auth.login(login, password), ); + const handleSubmit = (event: React.FormEvent) => { + event.preventDefault(); + loginHandler(null, () => customNavigate(prevPage ?? '/')); + }; + return ( - + { sx={{ my: 1 }} variant="contained" size="large" - onClick={() => loginHandler(null, () => customNavigate(prevPage ?? '/'))} + type="submit" loading={loading} > Sign In diff --git a/frontend/src/modules/RegisterForm/index.tsx b/frontend/src/modules/RegisterForm/index.tsx index bb68951c..29ef76c5 100644 --- a/frontend/src/modules/RegisterForm/index.tsx +++ b/frontend/src/modules/RegisterForm/index.tsx @@ -29,8 +29,15 @@ const RegisterForm: FC = () => { Auth.register({ firstName, lastName, login, password }), ); + const handleSubmit = (event: React.FormEvent) => { + event.preventDefault(); + if (remPassword === password) { + registerHandler(null, () => customNavigate(prevPage ?? '/')); + } + }; + return ( - + { disabled={remPassword !== password} variant="contained" size="large" - onClick={() => - registerHandler(null, () => customNavigate(prevPage ?? '/')) - } + type="submit" loading={loading} > Sign Up From c1fddc40947eabd48ced39c677537ec43daf0b1f Mon Sep 17 00:00:00 2001 From: Alex Poryadin Date: Thu, 5 Jun 2025 14:45:10 +0300 Subject: [PATCH 2/6] fix typo --- frontend/src/modules/RegisterForm/index.tsx | 2 +- services/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/modules/RegisterForm/index.tsx b/frontend/src/modules/RegisterForm/index.tsx index 29ef76c5..219c4663 100644 --- a/frontend/src/modules/RegisterForm/index.tsx +++ b/frontend/src/modules/RegisterForm/index.tsx @@ -68,7 +68,7 @@ const RegisterForm: FC = () => { setRemPassword(e.target.value)} value={remPassword} /> diff --git a/services/README.md b/services/README.md index c960cfbb..78028114 100644 --- a/services/README.md +++ b/services/README.md @@ -23,9 +23,9 @@ ### Сервисы управляющие своими vpn соеденениями, имеющие общее версионируемое `vpn-api`: -1. **WireguardVpn - `wireguard-vpn-service`** - vpn-сервис на **GO**, работающий на протаколе **WireGuard**. +1. **WireguardVpn - `wireguard-vpn-service`** - vpn-сервис на **GO**, работающий на протоколе **WireGuard**. -2. **AmneziaWgVpn - `amneziawg-vpn-service`** - vpn-сервис на **GO**, работающий на протаколе **AmneziaWG** (улучшенный WireGuard). +2. **AmneziaWgVpn - `amneziawg-vpn-service`** - vpn-сервис на **GO**, работающий на протоколе **AmneziaWG** (улучшенный WireGuard). ### Таблица потдержки версий `vpn-api`: From b407cc094485b53d24455d5dda7a67905ae045a2 Mon Sep 17 00:00:00 2001 From: Nikita Kostin Date: Fri, 27 Jun 2025 17:51:05 +0300 Subject: [PATCH 3/6] refactor logic for update dp to correctly EF --- .../UpdateDynamicPageCommandHandler.cs | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/backend/src/EasyVPN.Application/DynamicPages/Commands/UpdateDynamicPage/UpdateDynamicPageCommandHandler.cs b/backend/src/EasyVPN.Application/DynamicPages/Commands/UpdateDynamicPage/UpdateDynamicPageCommandHandler.cs index 2c919baf..870dafbf 100644 --- a/backend/src/EasyVPN.Application/DynamicPages/Commands/UpdateDynamicPage/UpdateDynamicPageCommandHandler.cs +++ b/backend/src/EasyVPN.Application/DynamicPages/Commands/UpdateDynamicPage/UpdateDynamicPageCommandHandler.cs @@ -1,7 +1,6 @@ using EasyVPN.Application.Common.Interfaces.Persistence; using EasyVPN.Application.Common.Interfaces.Services; using EasyVPN.Domain.Common.Errors; -using EasyVPN.Domain.Entities; using ErrorOr; using MediatR; @@ -25,23 +24,20 @@ public async Task> Handle(UpdateDynamicPageCommand command, Can if (_dynamicPageRepository.Get(command.Route) is not { } page) return Errors.DynamicPage.NotFound; - var newPage = new DynamicPage - { - Route = command.NewRoute, - Title = command.Title, - Content = command.Content, - Created = page.Created, - LastModified = _dateTimeProvider.UtcNow, - }; - - if (page.Route == newPage.Route) + page.Title = command.Title; + page.Content = command.Content; + page.LastModified = _dateTimeProvider.UtcNow; + + if (page.Route == command.NewRoute) { - _dynamicPageRepository.Update(newPage); + _dynamicPageRepository.Update(page); } else { _dynamicPageRepository.Remove(page.Route); - _dynamicPageRepository.Add(newPage); + + page.Route = command.NewRoute; + _dynamicPageRepository.Add(page); } return Result.Updated; From f427497a6b606fa56e28c21044dbd298df468fa1 Mon Sep 17 00:00:00 2001 From: Nikita Kostin Date: Fri, 27 Jun 2025 18:04:52 +0300 Subject: [PATCH 4/6] fix formating --- .../UpdateDynamicPage/UpdateDynamicPageCommandHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/EasyVPN.Application/DynamicPages/Commands/UpdateDynamicPage/UpdateDynamicPageCommandHandler.cs b/backend/src/EasyVPN.Application/DynamicPages/Commands/UpdateDynamicPage/UpdateDynamicPageCommandHandler.cs index 870dafbf..5ab847c6 100644 --- a/backend/src/EasyVPN.Application/DynamicPages/Commands/UpdateDynamicPage/UpdateDynamicPageCommandHandler.cs +++ b/backend/src/EasyVPN.Application/DynamicPages/Commands/UpdateDynamicPage/UpdateDynamicPageCommandHandler.cs @@ -35,7 +35,7 @@ public async Task> Handle(UpdateDynamicPageCommand command, Can else { _dynamicPageRepository.Remove(page.Route); - + page.Route = command.NewRoute; _dynamicPageRepository.Add(page); } From a2def9bc45e925315b143797e2d8e56b29e0ceff Mon Sep 17 00:00:00 2001 From: Nikita Kostin Date: Fri, 27 Jun 2025 18:11:20 +0300 Subject: [PATCH 5/6] chore(release): increment global version to 1.1.1 --- VERSION | 2 +- backend/src/EasyVPN.Api/EasyVPN.Api.csproj | 2 +- backend/src/EasyVPN.Application/EasyVPN.Application.csproj | 2 +- backend/src/EasyVPN.Contracts/EasyVPN.Contracts.csproj | 2 +- backend/src/EasyVPN.Domain/EasyVPN.Domain.csproj | 2 +- .../src/EasyVPN.Infrastructure/EasyVPN.Infrastructure.csproj | 2 +- .../EasyVPN.Application.UnitTests.csproj | 2 +- frontend/package-lock.json | 4 ++-- frontend/package.json | 2 +- init/init.sh | 2 +- services/AmneziaWgVpn/cmd/config.yml | 2 +- services/TelegramBot/pyproject.toml | 2 +- services/WireguardVpn/cmd/config.yml | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/VERSION b/VERSION index 9084fa2f..524cb552 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.0 +1.1.1 diff --git a/backend/src/EasyVPN.Api/EasyVPN.Api.csproj b/backend/src/EasyVPN.Api/EasyVPN.Api.csproj index 01f7ca0b..3e9e7eae 100644 --- a/backend/src/EasyVPN.Api/EasyVPN.Api.csproj +++ b/backend/src/EasyVPN.Api/EasyVPN.Api.csproj @@ -3,7 +3,7 @@ net8.0 enable enable - 1.1.0 + 1.1.1 true $(NoWarn);1591 diff --git a/backend/src/EasyVPN.Application/EasyVPN.Application.csproj b/backend/src/EasyVPN.Application/EasyVPN.Application.csproj index 42bd3aa2..8c689cef 100644 --- a/backend/src/EasyVPN.Application/EasyVPN.Application.csproj +++ b/backend/src/EasyVPN.Application/EasyVPN.Application.csproj @@ -3,7 +3,7 @@ net8.0 enable enable - 1.1.0 + 1.1.1 diff --git a/backend/src/EasyVPN.Contracts/EasyVPN.Contracts.csproj b/backend/src/EasyVPN.Contracts/EasyVPN.Contracts.csproj index 2b001995..8d380da2 100644 --- a/backend/src/EasyVPN.Contracts/EasyVPN.Contracts.csproj +++ b/backend/src/EasyVPN.Contracts/EasyVPN.Contracts.csproj @@ -3,6 +3,6 @@ net8.0 enable enable - 1.1.0 + 1.1.1 \ No newline at end of file diff --git a/backend/src/EasyVPN.Domain/EasyVPN.Domain.csproj b/backend/src/EasyVPN.Domain/EasyVPN.Domain.csproj index 103c16de..b74937c5 100644 --- a/backend/src/EasyVPN.Domain/EasyVPN.Domain.csproj +++ b/backend/src/EasyVPN.Domain/EasyVPN.Domain.csproj @@ -3,7 +3,7 @@ net8.0 enable enable - 1.1.0 + 1.1.1 diff --git a/backend/src/EasyVPN.Infrastructure/EasyVPN.Infrastructure.csproj b/backend/src/EasyVPN.Infrastructure/EasyVPN.Infrastructure.csproj index 2867978c..f601833a 100644 --- a/backend/src/EasyVPN.Infrastructure/EasyVPN.Infrastructure.csproj +++ b/backend/src/EasyVPN.Infrastructure/EasyVPN.Infrastructure.csproj @@ -3,7 +3,7 @@ net8.0 enable enable - 1.1.0 + 1.1.1 diff --git a/backend/tests/UnitTests/EasyVPN.Application.UnitTests/EasyVPN.Application.UnitTests.csproj b/backend/tests/UnitTests/EasyVPN.Application.UnitTests/EasyVPN.Application.UnitTests.csproj index e7ba2ca0..b4c1ed9c 100644 --- a/backend/tests/UnitTests/EasyVPN.Application.UnitTests/EasyVPN.Application.UnitTests.csproj +++ b/backend/tests/UnitTests/EasyVPN.Application.UnitTests/EasyVPN.Application.UnitTests.csproj @@ -5,7 +5,7 @@ enable false true - 1.1.0 + 1.1.1 diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 83486333..2bd4c307 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "easy-vpn-frontend", - "version": "1.1.0", + "version": "1.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "easy-vpn-frontend", - "version": "1.1.0", + "version": "1.1.1", "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", diff --git a/frontend/package.json b/frontend/package.json index 87d02918..a262e604 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "easy-vpn-frontend", - "version": "1.1.0", + "version": "1.1.1", "private": true, "dependencies": { "@emotion/react": "^11.13.3", diff --git a/init/init.sh b/init/init.sh index 176e7bde..e1671684 100755 --- a/init/init.sh +++ b/init/init.sh @@ -1,5 +1,5 @@ #!/bin/sh -VERSION=1.1.0 +VERSION=1.1.1 echo "" echo "🔧 Data Initialization Script" diff --git a/services/AmneziaWgVpn/cmd/config.yml b/services/AmneziaWgVpn/cmd/config.yml index 9e9ed8cf..01dae7c7 100644 --- a/services/AmneziaWgVpn/cmd/config.yml +++ b/services/AmneziaWgVpn/cmd/config.yml @@ -1,6 +1,6 @@ service: name: 'wireguard-vpn' - version: '1.1.0' + version: '1.1.1' api: port: "8010" vpn: diff --git a/services/TelegramBot/pyproject.toml b/services/TelegramBot/pyproject.toml index b1953647..1f5c676e 100644 --- a/services/TelegramBot/pyproject.toml +++ b/services/TelegramBot/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "easy-vpn-telegram-bot" -version = "1.1.0" +version = "1.1.1" description = "Telegram Notification Bot for Easy VPN" authors = ["Alex Poryadin (sw1pr0g) "] license = "MIT" diff --git a/services/WireguardVpn/cmd/config.yml b/services/WireguardVpn/cmd/config.yml index 99b6d041..7e24b485 100644 --- a/services/WireguardVpn/cmd/config.yml +++ b/services/WireguardVpn/cmd/config.yml @@ -1,6 +1,6 @@ service: name: 'wireguard-vpn' - version: '1.1.0' + version: '1.1.1' api: port: "8000" vpn: From 59b19328cdb44fce7692ea17189ee043edc1a725 Mon Sep 17 00:00:00 2001 From: Nikita Kostin Date: Fri, 27 Jun 2025 18:14:11 +0300 Subject: [PATCH 6/6] update CHANGELOG --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbd22ccc..5247ce63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## `1.1.1` (2025-06-27) + +### Fixes + +- frontend: Fix login on press enter +- backend: Fix error 405 on update dynamic pages + ## `1.1.0` (2025-05-22) ### Features