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 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/DynamicPages/Commands/UpdateDynamicPage/UpdateDynamicPageCommandHandler.cs b/backend/src/EasyVPN.Application/DynamicPages/Commands/UpdateDynamicPage/UpdateDynamicPageCommandHandler.cs index 2c919baf..5ab847c6 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; 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/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..219c4663 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 ( - + { setRemPassword(e.target.value)} value={remPassword} /> @@ -70,9 +77,7 @@ const RegisterForm: FC = () => { disabled={remPassword !== password} variant="contained" size="large" - onClick={() => - registerHandler(null, () => customNavigate(prevPage ?? '/')) - } + type="submit" loading={loading} > Sign Up 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/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`: 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: