Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c99debe88 | ||
|
|
bb30935f73 | ||
|
|
f486ae4fb2 | ||
|
|
9171b9f5c8 | ||
|
|
d68ec3b15b | ||
|
|
bac95ebb39 |
@@ -12,7 +12,7 @@ jobs:
|
|||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
IMAGE: nexus.ksv741.keenetic.pro/wealthledger/frontend
|
IMAGE: nexus.personal.ksv741.ru/docker-hosted/wealthledger/frontend
|
||||||
RELEASE_TAG: ${{ gitea.ref_name }}
|
RELEASE_TAG: ${{ gitea.ref_name }}
|
||||||
REVISION: ${{ gitea.sha }}
|
REVISION: ${{ gitea.sha }}
|
||||||
DOCKER_CONFIG: ${{ runner.temp }}/wealthledger-frontend-docker
|
DOCKER_CONFIG: ${{ runner.temp }}/wealthledger-frontend-docker
|
||||||
@@ -40,7 +40,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
test -n "$REGISTRY_USERNAME" && test -n "$REGISTRY_TOKEN"
|
test -n "$REGISTRY_USERNAME" && test -n "$REGISTRY_TOKEN"
|
||||||
install -d -m 700 "$DOCKER_CONFIG"
|
install -d -m 700 "$DOCKER_CONFIG"
|
||||||
printf '%s' "$REGISTRY_TOKEN" | docker login nexus.ksv741.keenetic.pro --username "$REGISTRY_USERNAME" --password-stdin
|
printf '%s' "$REGISTRY_TOKEN" | docker login nexus.personal.ksv741.ru --username "$REGISTRY_USERNAME" --password-stdin
|
||||||
- name: Publish immutable release tag
|
- name: Publish immutable release tag
|
||||||
run: |
|
run: |
|
||||||
VERSION="${RELEASE_TAG#v}"
|
VERSION="${RELEASE_TAG#v}"
|
||||||
|
|||||||
@@ -1,5 +1,23 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [0.3.0](https://git.personal.ksv741.ru/WealthLedger/frontend/compare/v0.2.3...v0.3.0) (2026-09-20)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add installable PWA [#30](https://git.personal.ksv741.ru/WealthLedger/frontend/issues/30) ([bb30935](https://git.personal.ksv741.ru/WealthLedger/frontend/commit/bb30935f73bfcbb77c10663cf6c683d8f0caca85))
|
||||||
|
|
||||||
|
## [0.2.3](https://git.personal.ksv741.ru/WealthLedger/frontend/compare/v0.2.2...v0.2.3) (2026-09-19)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* correct Nexus routing and SonarQube host ([9171b9f](https://git.personal.ksv741.ru/WealthLedger/frontend/commit/9171b9f5c8e0b694a2310e5a200fa2f8d3f28a61))
|
||||||
|
|
||||||
|
## [0.2.2](https://git.personal.ksv741.ru/WealthLedger/frontend/compare/v0.2.1...v0.2.2) (2026-09-19)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* update Nexus registry host ([bac95eb](https://git.personal.ksv741.ru/WealthLedger/frontend/commit/bac95ebb392febb667a9fc2f1fa4f06fa110d685))
|
||||||
|
|
||||||
## [0.2.1](https://git.personal.ksv741.ru/WealthLedger/frontend/compare/v0.2.0...v0.2.1) (2026-09-18)
|
## [0.2.1](https://git.personal.ksv741.ru/WealthLedger/frontend/compare/v0.2.0...v0.2.1) (2026-09-18)
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ docker build --target production -t wealthledger-frontend:production .
|
|||||||
Gitea `image.yml` запускается на защищённом release tag `vX.Y.Z`, проверяет
|
Gitea `image.yml` запускается на защищённом release tag `vX.Y.Z`, проверяет
|
||||||
package/lock version и canonical gates. Runner `ubuntu-latest` должен иметь
|
package/lock version и canonical gates. Runner `ubuntu-latest` должен иметь
|
||||||
Docker/buildx. Образы хранятся в Nexus:
|
Docker/buildx. Образы хранятся в Nexus:
|
||||||
`nexus.ksv741.keenetic.pro/wealthledger/frontend`. Пользователь `wealthledger-ci`
|
`nexus.personal.ksv741.ru/docker-hosted/wealthledger/frontend`. Пользователь `wealthledger-ci`
|
||||||
задаётся Actions secrets `NEXUS_USERNAME`/`NEXUS_PASSWORD`; эта же учётная
|
задаётся Actions secrets `NEXUS_USERNAME`/`NEXUS_PASSWORD`; эта же учётная
|
||||||
запись используется сервером для загрузки образов. Docker endpoint и token realm должны использовать
|
запись используется сервером для загрузки образов. Docker endpoint и token realm должны использовать
|
||||||
HTTPS; в `docker-hosted` включается запрет redeploy. Прежние Gitea secrets
|
HTTPS; в `docker-hosted` включается запрет redeploy. Прежние Gitea secrets
|
||||||
@@ -51,6 +51,25 @@ Compose topology принадлежит workspace, эксплуатационн
|
|||||||
Проверка публикации требует настроенного registry/runner; локальный build
|
Проверка публикации требует настроенного registry/runner; локальный build
|
||||||
не доказывает package permissions.
|
не доказывает package permissions.
|
||||||
|
|
||||||
|
## Установка как приложение (PWA)
|
||||||
|
|
||||||
|
Production-сборка поддерживает установку WealthLedger в отдельное окно через
|
||||||
|
`vite-plugin-pwa`. Нужен HTTPS или localhost. В Chrome/Edge выберите «Установить
|
||||||
|
WealthLedger» в меню браузера или значок установки в адресной строке; на iPhone
|
||||||
|
и iPad — Safari → «Поделиться» → «На экран Домой». Доступность установки зависит
|
||||||
|
от браузера и ОС.
|
||||||
|
|
||||||
|
Service worker кеширует только статическую оболочку, включая страницы SPA.
|
||||||
|
Вход, финансовые данные и сохранение изменений требуют сети: API, токены и
|
||||||
|
ответы API не сохраняются в Cache Storage. Это не автономный финансовый
|
||||||
|
клиент. Новая версия загружается в фоне и применяется после закрытия всех
|
||||||
|
вкладок и окон WealthLedger и повторного открытия; открытые формы автоматически
|
||||||
|
не перезагружаются.
|
||||||
|
|
||||||
|
Локальная проверка: `nvm use --silent`, `npm run build`, `npm run preview`.
|
||||||
|
В DevTools → Application проверьте Manifest, Service Workers и Cache Storage.
|
||||||
|
В режиме `npm run dev` и в Storybook service worker не включается.
|
||||||
|
|
||||||
## Проверка
|
## Проверка
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -105,7 +124,7 @@ PR и остальные ветки проходят обычные провер
|
|||||||
Отрицательный Quality Gate или ошибка scanner завершает `verify` с ошибкой.
|
Отрицательный Quality Gate или ошибка scanner завершает `verify` с ошибкой.
|
||||||
|
|
||||||
Runner должен поддерживать Docker actions и иметь HTTPS-доступ к
|
Runner должен поддерживать Docker actions и иметь HTTPS-доступ к
|
||||||
`https://sonarqube.ksv741.keenetic.pro`, GitHub и Docker Hub. Docker action
|
`https://sonarqube.personal.ksv741.ru`, GitHub и Docker Hub. Docker action
|
||||||
SonarSource закреплён на commit версии 2.3.0; scanner запускается отдельно от
|
SonarSource закреплён на commit версии 2.3.0; scanner запускается отдельно от
|
||||||
Node 24, используемого для сборки. `tsconfig.sonar.json` содержит совместимые
|
Node 24, используемого для сборки. `tsconfig.sonar.json` содержит совместимые
|
||||||
со старым анализатором TS настройки; приложение проверяется штатным TypeScript
|
со старым анализатором TS настройки; приложение проверяется штатным TypeScript
|
||||||
|
|||||||
+3
-1
@@ -1,8 +1,10 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="ru">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
||||||
|
<meta name="theme-color" content="#ffffff" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>WealthLedger</title>
|
<title>WealthLedger</title>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Generated
+4573
-2
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "wealth-ledger-frontend",
|
"name": "wealth-ledger-frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.2.1",
|
"version": "0.3.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "24.21.0"
|
"node": "24.21.0"
|
||||||
@@ -82,6 +82,7 @@
|
|||||||
"storybook": "10.6.0",
|
"storybook": "10.6.0",
|
||||||
"typescript": "5.9.3",
|
"typescript": "5.9.3",
|
||||||
"vite": "8.3.0",
|
"vite": "8.3.0",
|
||||||
|
"vite-plugin-pwa": "1.3.0",
|
||||||
"vitest": "5.0.0"
|
"vitest": "5.0.0"
|
||||||
},
|
},
|
||||||
"allowScripts": {
|
"allowScripts": {
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
@@ -1,6 +1,6 @@
|
|||||||
sonar.projectKey=wealthledger-frontend
|
sonar.projectKey=wealthledger-frontend
|
||||||
sonar.projectName=WealthLedger frontend
|
sonar.projectName=WealthLedger frontend
|
||||||
sonar.host.url=https://sonarqube.ksv741.keenetic.pro
|
sonar.host.url=https://sonarqube.personal.ksv741.ru
|
||||||
sonar.sourceEncoding=UTF-8
|
sonar.sourceEncoding=UTF-8
|
||||||
|
|
||||||
sonar.sources=src
|
sonar.sources=src
|
||||||
|
|||||||
+46
-1
@@ -2,10 +2,55 @@ import { fileURLToPath, URL } from "node:url";
|
|||||||
import babel from "@rolldown/plugin-babel";
|
import babel from "@rolldown/plugin-babel";
|
||||||
import react, { reactCompilerPreset } from "@vitejs/plugin-react";
|
import react, { reactCompilerPreset } from "@vitejs/plugin-react";
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
|
import { VitePWA } from "vite-plugin-pwa";
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react(), babel({ presets: [reactCompilerPreset()] })],
|
plugins: [
|
||||||
|
react(),
|
||||||
|
babel({ presets: [reactCompilerPreset()] }),
|
||||||
|
VitePWA({
|
||||||
|
injectRegister: "script-defer",
|
||||||
|
// Let the waiting worker activate after all app windows close.
|
||||||
|
registerType: "prompt",
|
||||||
|
includeAssets: ["favicon.svg", "icons.svg", "apple-touch-icon.png"],
|
||||||
|
manifest: {
|
||||||
|
id: "/",
|
||||||
|
name: "WealthLedger",
|
||||||
|
short_name: "WealthLedger",
|
||||||
|
description: "Личные финансы и инвестиции",
|
||||||
|
lang: "ru",
|
||||||
|
start_url: "/",
|
||||||
|
scope: "/",
|
||||||
|
display: "standalone",
|
||||||
|
theme_color: "#ffffff",
|
||||||
|
background_color: "#ffffff",
|
||||||
|
icons: [
|
||||||
|
{ src: "/pwa-192x192.png", sizes: "192x192", type: "image/png" },
|
||||||
|
{ src: "/pwa-512x512.png", sizes: "512x512", type: "image/png" },
|
||||||
|
{
|
||||||
|
src: "/pwa-512x512.png",
|
||||||
|
sizes: "512x512",
|
||||||
|
type: "image/png",
|
||||||
|
purpose: "maskable",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
workbox: {
|
||||||
|
globPatterns: ["**/*.{js,css,html,woff2}"],
|
||||||
|
// Only the static shell is cached; API requests always use the network.
|
||||||
|
navigateFallbackDenylist: [/^\/api(?:\/|$)/],
|
||||||
|
},
|
||||||
|
integration: {
|
||||||
|
configureOptions(config, options) {
|
||||||
|
// Storybook loads this Vite config but must not install an app worker.
|
||||||
|
options.disable = config.plugins.some((plugin) =>
|
||||||
|
plugin.name.startsWith("storybook:"),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
resolve: { alias: { "@": fileURLToPath(new URL("./src", import.meta.url)) } },
|
resolve: { alias: { "@": fileURLToPath(new URL("./src", import.meta.url)) } },
|
||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
|
|||||||
Reference in New Issue
Block a user