Compare commits

10 Commits
Author SHA1 Message Date
jakob.scheidandGitea 7a68e5fde8 test(settings): add describe to settingsValidator test 2026-07-28 19:38:02 +02:00
jakob.scheidandGitea 38b70b6f15 test(i18n): add describe to LanguageSwitchButton test 2026-07-28 19:38:02 +02:00
jakob.scheidandGitea 4c4a662901 test(i18n): add describe to currentLanguage test 2026-07-28 19:38:02 +02:00
jakob.scheidandGitea a62d38cdb1 test(style): add describe to cssDimensions test 2026-07-28 19:38:02 +02:00
jakob.scheidandGitea 1b7b7cbc68 Merge pull request 'Chore(licenses): add scripts to generate the license files' (#146) from chore/scripts-to-generate-license-files into main
Deploy on dev / Deploy on dev (push) Successful in 35s
Reviewed-on: #146
Reviewed-by: Jakob Gregory
2026-07-28 19:37:01 +02:00
jakob.scheidandGitea 3bcd71d60c chore(licenses): update third-party licenses
Updated the third-party licenses using the new license files script.
2026-07-28 19:36:43 +02:00
jakob.scheidandGitea cc7a562887 docs(readme): add reference to the license script 2026-07-28 19:36:43 +02:00
jakob.scheidandGitea 3f40e2142c chore(licenses): add script to generate the license files
Added a script to generate the license files for the development
dependencies and the production dependencies.
2026-07-28 19:36:43 +02:00
jakob.scheidandGitea 2917d04ffe Merge pull request 'Refactor: merge two rules for #app-wrapper into one' (#151) from refactor/merge-two-app-wrapper-css-rules into main
Deploy on dev / Deploy on dev (push) Successful in 38s
Reviewed-on: #151
Reviewed-by: Jakob Gregory
2026-07-28 19:36:03 +02:00
jakob.scheid f1430622dd refactor: merge two rules for #app-wrapper
Merged the two CSS rules for #app-wrapper into one rule.
2026-07-28 18:51:38 +02:00
9 changed files with 9047 additions and 1925 deletions
+4
View File
@@ -5,3 +5,7 @@ The frontend of the search engine Seekra.
## Setup
Please execute the setup script in `scripts/` for your platform when cloning the repository.
## Legal
After each update to the dependencies, please run the script `scripts/generate-license-files.js` to regenerate the third-party license files.
+3 -1072
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+58
View File
@@ -0,0 +1,58 @@
#!/usr/bin/env node
/*
Copyright 2026 Seekra
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import fs from 'node:fs/promises';
import { generateLicenseFile } from 'generate-license-file';
const packageJson = './package.json';
const packageJsonBackup = `${packageJson}~`;
await generateLicenseFile(
packageJson,
'THIRD_PARTY_LICENSES'
);
const pkg = JSON.parse(
await fs.readFile(packageJson, 'utf-8')
);
await fs.rename(packageJson, packageJsonBackup);
const devPackage = {
...pkg,
dependencies: pkg.devDependencies ?? {},
devDependencies: {}
};
/*
The file including the dependencies for the current license file has
to be always package.json due to a bug of generate-license file. See
https://github.com/TobyAndToby/generate-license-file/issues/752
*/
await fs.writeFile(
packageJson,
JSON.stringify(devPackage)
);
await generateLicenseFile(
packageJson,
'./THIRD_PARTY_LICENSES_DEV'
);
await fs.rename(packageJsonBackup, packageJson);
+5 -8
View File
@@ -46,6 +46,11 @@ watch(colorScheme, val => updateColorScheme(val))
--main-content-padding-x: 30px;
--main-content-padding-y: 40px;
--main-content-padding: var(--main-content-padding-y) var(--main-content-padding-x);
min-height: 100vh;
display: flex;
flex-direction: column;
background-color: var(--light-bg);
color: var(--dark);
}
.main-content {
@@ -57,12 +62,4 @@ watch(colorScheme, val => updateColorScheme(val))
--main-content-padding-x: 15px;
}
}
#app-wrapper {
min-height: 100vh;
display: flex;
flex-direction: column;
background-color: var(--light-bg);
color: var(--dark);
}
</style>
@@ -39,7 +39,7 @@ vi.mock('@/features/icons/components/Icon.vue', () => ({
}
}));
describe('LanguageSwitchButton.vue', () => {
describe('LanguageSwitchButton', () => {
beforeEach(() => {
vi.clearAllMocks();
localStorage.clear();
@@ -17,6 +17,7 @@ limitations under the License.
import { describe, test, expect } from 'vitest';
import { validateSettingsConfig, validateEntry, validateSelectionOptions, assertType, assertString } from '../settingsValidator';
describe('settingsValidator', () => {
describe('validateSettingsConfig', () => {
test.for([
{ raw: false, expected: false },
@@ -756,3 +757,4 @@ describe('assertString', () => {
expect(() => assertString(value)).throws(Error);
});
});
});
+3 -1
View File
@@ -14,9 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { expect, test } from 'vitest';
import { describe, expect, test } from 'vitest';
import { ensureUnit } from '../cssDimensions';
describe('cssDimensions', () => {
test.for([
{ dimension: null, expected: '0px' },
{ dimension: undefined, expected: '0px' },
@@ -120,3 +121,4 @@ test.for([
])('ensureUnit returns $expected with input $dimension', ({ dimension, expected }) => {
expect(ensureUnit(dimension)).toBe(expected);
});
});
+5 -5
View File
@@ -14,10 +14,11 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { expect, test } from 'vitest';
import { describe, expect, test } from 'vitest';
import getCurrentLanguage from '../currentLanguage';
const locales = [
describe('currentLanguage', () => {
test.for([
{ navigatorLanguage: 'en', localStorageLanguage: null, expected: 'en'},
{ navigatorLanguage: 'de', localStorageLanguage: null, expected: 'de'},
{ navigatorLanguage: 'fr', localStorageLanguage: null, expected: 'fr'},
@@ -45,9 +46,7 @@ const locales = [
{ navigatorLanguage: 'de-de', localStorageLanguage: 'en', expected: 'en'},
{ navigatorLanguage: 'zh-Hans-CN', localStorageLanguage: 'fr', expected: 'fr'},
{ navigatorLanguage: 'en-US-u-ca-gregory', localStorageLanguage: 'zh', expected: 'zh'}
];
test.for(locales)('returns the language $expected (navigator: $navigatorLanguage; local storage: $localStorageLanguage)', ({ navigatorLanguage, localStorageLanguage, expected }) => {
])('returns the language $expected (navigator: $navigatorLanguage; local storage: $localStorageLanguage)', ({ navigatorLanguage, localStorageLanguage, expected }) => {
Object.defineProperty(navigator, 'language', {
value: navigatorLanguage,
configurable: true
@@ -59,3 +58,4 @@ test.for(locales)('returns the language $expected (navigator: $navigatorLanguage
expect(getCurrentLanguage()).toBe(expected);
});
});