From 8875eab9223e5901d4d7e2688a2cdf82dbc785c1 Mon Sep 17 00:00:00 2001 From: sonic16x Date: Sat, 23 Nov 2024 02:20:05 +0700 Subject: [PATCH 1/2] Fix styles --- .nojekyll | 0 README.md | 2 +- src/colors.scss | 59 ++++++++----------- src/components/Controls/Controls.scss | 4 ++ .../Pages/CommunityPage/CommunityPage.tsx | 6 +- src/components/ResultsCard/ResultsCard.scss | 2 +- src/store.ts | 6 +- src/sw.ts | 3 +- webpack.config.dev.js | 4 +- webpack.config.prod.js | 2 +- 10 files changed, 38 insertions(+), 50 deletions(-) delete mode 100644 .nojekyll diff --git a/.nojekyll b/.nojekyll deleted file mode 100644 index e69de29bb..000000000 diff --git a/README.md b/README.md index 59b545e52..a9debb643 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Recommended to use and install as PWA (Progressive Web App): For start local development install dependencies ``` -npm i +npm ci ``` then run generate dictionary diff --git a/src/colors.scss b/src/colors.scss index e501ea16a..54b3d962f 100644 --- a/src/colors.scss +++ b/src/colors.scss @@ -1,7 +1,24 @@ +body { + --gray-1: #111; + --gray-2: #222; + --gray-3: #333; + --gray-4: #444; + --gray-5: #555; + --gray-6: #666; + --gray-7: #777; + --gray-8: #888; + --gray-9: #999; + --gray-a: #aaa; + --gray-b: #bbb; + --gray-c: #ccc; + --gray-d: #ddd; + --gray-e: #eee; +} + .color-theme--light { --primary-color: #1E88E5; --primary-color-fg: #fff; - --muted-text-color: #6c757d; + --muted-text-color: #9E9E9E; --light-gray-color: #999; --valid-color: #43A047; --invalid-color: #E53935; @@ -14,33 +31,18 @@ --table-border-color: var(--gray-9); --overlay-color: #000; --tips-font-color: #122f80; - --tips-background-color: #e4f1fc; --main-background-color: #FAFAFA; + --status-badge-color: #fff; --dark: #212121; --light: #fff; --transperent: rgba(1, 1, 1, 0); - - --gray-1: #111; - --gray-2: #222; - --gray-3: #333; - --gray-4: #444; - --gray-5: #555; - --gray-6: #666; - --gray-7: #777; - --gray-8: #888; - --gray-9: #999; - --gray-a: #aaa; - --gray-b: #bbb; - --gray-c: #ccc; - --gray-d: #ddd; - --gray-e: #eee; } .color-theme--dark { - --primary-color: #1E88E5; + --primary-color: #42A5F5; --primary-color-fg: #fff; - --muted-text-color: #6c757d; + --muted-text-color: #BDBDBD; --light-gray-color: #999; --valid-color: #43A047; --invalid-color: #E53935; @@ -49,29 +51,14 @@ --input-border-color: #444; --shadow: 0 8px 16px rgba(0, 0, 0, .05); --border: 1px solid var(--input-border-color); - --table-highlighted-cell: #0288D1; + --table-highlighted-cell: #1976D2; --table-border-color: var(--gray-9); --overlay-color: #000; --tips-font-color: #122f80; - --tips-background-color: #e4f1fc; --main-background-color: #262626; + --status-badge-color: #fff; --dark: #fff; --light: #212121; --transperent: rgba(1, 1, 1, 0); - - --gray-1: #111; - --gray-2: #222; - --gray-3: #333; - --gray-4: #444; - --gray-5: #555; - --gray-6: #666; - --gray-7: #777; - --gray-8: #888; - --gray-9: #999; - --gray-a: #aaa; - --gray-b: #bbb; - --gray-c: #ccc; - --gray-d: #ddd; - --gray-e: #eee; } diff --git a/src/components/Controls/Controls.scss b/src/components/Controls/Controls.scss index 98ade29e6..674b8775d 100644 --- a/src/components/Controls/Controls.scss +++ b/src/components/Controls/Controls.scss @@ -28,6 +28,10 @@ margin-right: var(--gap-size); } + .pos-selector { + padding-bottom: 2px; + } + .search-type-selector, .pos-selector, .flavorisation-selector { diff --git a/src/components/Pages/CommunityPage/CommunityPage.tsx b/src/components/Pages/CommunityPage/CommunityPage.tsx index ce3f503eb..c20f7b5aa 100644 --- a/src/components/Pages/CommunityPage/CommunityPage.tsx +++ b/src/components/Pages/CommunityPage/CommunityPage.tsx @@ -83,10 +83,8 @@ export const CommunityPage = () => { setFbAvailable(true); } }); - } catch (err) { - // eslint-disable-next-line no-console - console.error(err) - } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (err) {} }, [setFbAvailable]); useEffect(() => { diff --git a/src/components/ResultsCard/ResultsCard.scss b/src/components/ResultsCard/ResultsCard.scss index 428d4d9c3..e82259e72 100644 --- a/src/components/ResultsCard/ResultsCard.scss +++ b/src/components/ResultsCard/ResultsCard.scss @@ -61,7 +61,7 @@ top: 5px; right: 5px; background: var(--invalid-color); - color: var(--light); + color: var(--status-badge-color); font-weight: 700; font-size: var(--text-xs); line-height: var(--text-xs-line); diff --git a/src/store.ts b/src/store.ts index 6f4df3c20..6cffcef43 100644 --- a/src/store.ts +++ b/src/store.ts @@ -90,10 +90,8 @@ function getInitialState(): IMainState { page: getPageFromPath(), ...savedState, }; - } catch (err) { - // eslint-disable-next-line no-console - console.error(err) - } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (err) {} setLang(state.interfaceLang); Dictionary.setIsvSearchLetters(state.isvSearchLetters); diff --git a/src/sw.ts b/src/sw.ts index e41a9acda..9857f8c3e 100644 --- a/src/sw.ts +++ b/src/sw.ts @@ -6,11 +6,12 @@ const cacheUrls = [ 'data/basic.json', 'data/translateStatistic.json', ...addLangs.map((lang) => `data/${lang}.json`), - 'manifest.json', 'grammarComponent.js', + 'communityComponent.js', 'index.js', 'sw.js', 'styles/grammarComponent.css', + 'styles/communityComponent.css', 'styles/index.css', ]; diff --git a/webpack.config.dev.js b/webpack.config.dev.js index 26c890f23..a3f83bc1f 100644 --- a/webpack.config.dev.js +++ b/webpack.config.dev.js @@ -74,14 +74,14 @@ module.exports = { template: path.join(srcPath, 'index.html.ejs'), filename: 'index.html', path: outputPath, - excludeChunks: ['sw', 'grammarComponent', 'viewerComponent'], + excludeChunks: ['sw', 'grammarComponent', 'viewerComponent', 'communityComponent'], env: { BASE_URL: baseUrl, }, }), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('development'), - SW: false, + SW: true, IS_COM: true, CLIENT: true, BASE_URL: JSON.stringify(baseUrl), diff --git a/webpack.config.prod.js b/webpack.config.prod.js index 0a749155b..100d0ef91 100644 --- a/webpack.config.prod.js +++ b/webpack.config.prod.js @@ -85,7 +85,7 @@ module.exports = { template: path.join(srcPath, 'index.html.ejs'), filename: 'index.html', path: outputPath, - excludeChunks: ['sw', 'grammarComponent', 'viewerComponent'], + excludeChunks: ['sw', 'grammarComponent', 'viewerComponent', 'communityComponent'], env: { BASE_URL: baseUrl, }, From 42554bfa2a8b7b7bdaf80de28b6a2950cc02644e Mon Sep 17 00:00:00 2001 From: sonic16x Date: Sat, 23 Nov 2024 02:25:32 +0700 Subject: [PATCH 2/2] Up version --- package-lock.json | 4 ++-- package.json | 2 +- webpack.config.dev.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0afa66255..55b411231 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "interslavic", - "version": "1.23.1", + "version": "1.23.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "interslavic", - "version": "1.23.1", + "version": "1.23.2", "license": "MIT", "dependencies": { "@ag-grid-community/client-side-row-model": "25.2.0", diff --git a/package.json b/package.json index 7516d277f..784ad1673 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "interslavic", - "version": "1.23.1", + "version": "1.23.2", "description": "Interslavic Dictionary", "license": "MIT", "author": { diff --git a/webpack.config.dev.js b/webpack.config.dev.js index a3f83bc1f..e0d3fd564 100644 --- a/webpack.config.dev.js +++ b/webpack.config.dev.js @@ -81,7 +81,7 @@ module.exports = { }), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('development'), - SW: true, + SW: false, IS_COM: true, CLIENT: true, BASE_URL: JSON.stringify(baseUrl),