Skip to content

Commit bd7d4fc

Browse files
committed
Merge remote-tracking branch 'upstream/r/18.x' into r/19.x
2 parents 2513192 + 146bf9e commit bd7d4fc

32 files changed

+878
-778
lines changed

.github/assets/index.css

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
/*This contains Css for the generated index.html*/
2+
@media (prefers-color-scheme: light) {
3+
:root {
4+
--header-color: #575757;
5+
--bg-color: #F3F3F3;
6+
--text-color: #0F0F0F;
7+
--container-color: #fefefe;
8+
--boxShadow-color: #0000004d;
9+
--item-color: #fefefe;
10+
--item-border: #d6cbc9;
11+
--item-hover: #f3f3f3;
12+
--item-boxShadow-color: #96969626;
13+
}
14+
}
15+
16+
@media (prefers-color-scheme: dark) {
17+
:root {
18+
--header-color: #2E2E2E;
19+
--bg-color: #1E1E1E;
20+
--text-color: #FFF;
21+
--container-color: #171717;
22+
--boxShadow-color: #0000004d;
23+
--item-color: #171717;
24+
--item-border: #151515;
25+
--item-hover: #2e2e2e;
26+
--item-boxShadow-color: #0000004d;
27+
}
28+
}
29+
30+
body {
31+
margin: 0px;
32+
background: var(--bg-color, #F3F3F3);
33+
font-family: Roboto Flex Variable, Roboto, -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
34+
}
35+
36+
/* Text Container */
37+
.text-container {
38+
/* Layout */
39+
margin: 3% auto;
40+
max-width: 75%;
41+
padding: 10px 15px 10px 15px;
42+
43+
/* Styling */
44+
border-radius: 5px;
45+
background: var(--container-color, #fefefe);
46+
box-shadow: 0 1px 3px 1px var(--boxShadow-color, #0000004d);
47+
}
48+
.text-container > p {
49+
color: var(--text-color, #0F0F0F);
50+
text-align: center;
51+
font-size: 20px;
52+
font-weight: 400;
53+
}
54+
55+
/* Header */
56+
.head-container {
57+
width: 100%;
58+
height: 45px;
59+
background: var(--header-color, #575757);
60+
}
61+
.head-container > img {
62+
/*Image Style*/
63+
width: 180px;
64+
height: 40px;
65+
padding: 4px 10px 4px;
66+
}
67+
68+
/* Version-List */
69+
ul {
70+
list-style-type: none;
71+
display: flex;
72+
justify-content: center;
73+
align-items: center;
74+
flex-wrap: wrap;
75+
column-gap: 20px;
76+
row-gap: 10px;
77+
}
78+
79+
li {
80+
width: 160px;
81+
text-align: center;
82+
padding: 15px 10px;
83+
border-radius: 4px;
84+
border: 1px solid var(--item-border, #d6cbc9);
85+
background: var(--item-color, #fefefe);
86+
box-shadow: 0px 5px 10px 0px var(--item-boxShadow-color, #96969626);
87+
}
88+
89+
li:hover {
90+
background-color: var(--item-hover, #f3f3f3);
91+
}
92+
93+
li > a {
94+
color: var(--text-color, #0F0F0F);
95+
font-size: 18px;
96+
font-weight: 400;
97+
text-decoration: none;
98+
padding:15px 50px;
99+
}

.github/workflows/crowdin-download-translations.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
2828
run: |
2929
crowdin download --config .crowdin.yaml -b main
30-
31-
- name: Update language list
32-
working-directory: src/i18n/locales
33-
run: $GITHUB_WORKSPACE/.github/generate-lngs.sh > ../lngs-generated.ts
30+
# TODO: Find a way to generate only languages that are above a certain threshold
31+
# - name: Update language list
32+
# working-directory: src/i18n/locales
33+
# run: $GITHUB_WORKSPACE/.github/generate-lngs.sh > ../lngs-generated.ts
3434

3535
- name: Add new translations
3636
run: |

.github/workflows/deploy-main-branches.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- name: Determine the correct test server
2525
id: test-server
26-
run: echo "server=https://`./.github/get-release-server.sh ${{ github.ref_name }}`" >> $GITHUB_OUTPUT
26+
run: echo "server=`./.github/get-release-server.sh ${{ github.ref_name }}`" >> $GITHUB_OUTPUT
2727

2828
- name: Determine branch name
2929
id: branch-name
@@ -77,7 +77,7 @@ jobs:
7777
rm -rf $BRANCH
7878
mv build $BRANCH
7979
#Generate an index, in case anyone lands at the root of the test domain
80-
echo '<html><body><ul>' > index.html
80+
echo $'<html><head><link rel=stylesheet type=text/css href=assets/index.css /></head><body><div class="head-container"><img src=assets/opencast-white.svg /></div><div class="navbar-container"></div><div class="text-container"><p>Deployment for the latest development versions of the Opencast editor.The branches listed here correspond to Opencast\'s own branches.</br><b>Please select a version.</b></p></div><ul>' > index.html
8181
find . -mindepth 1 -maxdepth 1 -type d \
8282
| grep '[0-9]*.x\|develop' \
8383
| sort -r \
@@ -88,5 +88,14 @@ jobs:
8888
env:
8989
BRANCH: ${{needs.detect-repo-owner.outputs.branch}}
9090

91+
- name: update CSS and other assets
92+
if: github.ref == 'refs/heads/develop'
93+
run: |
94+
rm -rf assets
95+
mv assets_temp assets
96+
git add assets
97+
git diff --staged --quiet || git commit --amend -m "Build $(date)"
98+
99+
91100
- name: Push updates
92101
run: git push origin gh-pages --force

.github/workflows/pr-deploy-test-branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
- name: Determine the correct test server
2828
id: test-server
29-
run: echo "server=https://`./.github/get-release-server.sh ${{ github.ref_name }}`" >> $GITHUB_OUTPUT
29+
run: echo "server=`./.github/get-release-server.sh ${{ github.ref_name }}`" >> $GITHUB_OUTPUT
3030

3131
- name: Determine branch name
3232
id: branch-name

eslint.config.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ export default [
1212
rules: {
1313
// // TODO: We want to turn these on eventually
1414
"@typescript-eslint/no-floating-promises": "off",
15-
"@typescript-eslint/no-unsafe-argument": "off",
16-
"@typescript-eslint/no-unsafe-assignment": "off",
17-
"@typescript-eslint/no-unsafe-call": "off",
18-
"@typescript-eslint/no-unsafe-member-access": "off",
19-
"@typescript-eslint/no-unsafe-return": "off",
20-
"@typescript-eslint/restrict-template-expressions": "off",
2115
},
2216
},
2317
];

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"react-dom": "^18.3.1",
3030
"react-draggable": "^4.5.0",
3131
"react-final-form": "^6.5.9",
32-
"react-hotkeys-hook": "^5.1.0",
33-
"react-i18next": "^15.5.3",
32+
"react-hotkeys-hook": "^5.2.1",
33+
"react-i18next": "^15.4.0",
3434
"react-icons": "^5.5.0",
3535
"react-indiana-drag-scroll": "^2.2.1",
3636
"react-player": "git+https://arnei@github.com/Arnei/react-player.git#b441d7aafe9b98745318103d9c93872a3ffc5da9",

src/config.ts

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/* eslint-disable @typescript-eslint/no-unsafe-return */
2+
/* eslint-disable @typescript-eslint/no-explicit-any */
3+
/* eslint-disable @typescript-eslint/no-unsafe-argument */
4+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
5+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
16
/**
27
* Loads config values from
38
* - a settings file
@@ -158,7 +163,6 @@ export const init = async () => {
158163
urlParams.forEach((value, key) => {
159164
// Create empty objects for full path (if the key contains ".") and set
160165
// the value at the end.
161-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
162166
let obj: { [k: string]: any; } = rawUrlSettings;
163167
if (key.startsWith("opencast.") || key === "allowedCallbackPrefixes") {
164168
return;
@@ -207,7 +211,7 @@ const loadContextSettings = async () => {
207211
// Construct path to settings file. If the `VITE_APP_SETTINGS_PATH` is
208212
// given and starts with "/", it is interpreted as absolute path from the
209213
// server root.
210-
const settingsPath = import.meta.env.VITE_APP_SETTINGS_PATH || CONTEXT_SETTINGS_FILE;
214+
const settingsPath: string = import.meta.env.VITE_APP_SETTINGS_PATH || CONTEXT_SETTINGS_FILE;
211215
const base = settingsPath.startsWith("/") ? "" : basepath;
212216
const url = new URL(base.concat(settingsPath), window.location.origin);
213217
let response;
@@ -239,7 +243,7 @@ const loadContextSettings = async () => {
239243
return parse(await response.text());
240244
} catch (e) {
241245
console.error(`Could not parse "${settingsPath}" as TOML: `, e);
242-
throw new SyntaxError(`Could not parse "${settingsPath}" as TOML: ${e}`);
246+
throw new SyntaxError(`Could not parse "${settingsPath}" as TOML: ${String(e)}`);
243247
}
244248

245249
};
@@ -251,11 +255,9 @@ const loadContextSettings = async () => {
251255
* `srcDescription` is just a string for error messages specifying where `obj`
252256
* comes from.
253257
* */
254-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
255258
const validate = (obj: Record<string, any> | null, allowParse: boolean, src: string, sourceDescription: string) => {
256259
// Validates `obj` with `schema`. `path` is the current path used for error
257260
// messages.
258-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
259261
const validate = (schema: any, obj: Record<string, any> | null, path: string) => {
260262
if (typeof schema === "function") {
261263
return validateValue(schema, obj, path);
@@ -267,9 +269,7 @@ const validate = (obj: Record<string, any> | null, allowParse: boolean, src: str
267269
// Validate a settings value with a validation function. Returns the final
268270
// value of the setting or `null` if it should be ignored.
269271
const validateValue = (
270-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
271272
validation: (arg0: any, arg1: boolean, arg2: string) => any,
272-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
273273
value: Record<string, any> | null,
274274
path: string,
275275
) => {
@@ -279,19 +279,17 @@ const validate = (obj: Record<string, any> | null, allowParse: boolean, src: str
279279
} catch (e) {
280280
console.warn(
281281
`Validation of setting "${path}" (${sourceDescription}) with value "${JSON.stringify(value)}" failed: `
282-
+ `${e}. Ignoring.`,
282+
+ `${String(e)}. Ignoring.`,
283283
);
284284
return null;
285285
}
286286
};
287287

288288
// Validate a settings object/namespace. `schema` and `obj` need to be
289289
// objects.
290-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
291290
const validateObj = (schema: any, obj: Record<string, any> | null, path: string) => {
292291
// We iterate through all keys of the given settings object, checking if
293292
// each key is valid and recursively validating the value of that key.
294-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
295293
const out: { [k: string]: any; } = {};
296294
for (const key in obj) {
297295
const newPath = path ? `${path}.${key}` : key;
@@ -319,13 +317,11 @@ const validate = (obj: Record<string, any> | null, allowParse: boolean, src: str
319317

320318
// Validation functions for different types.
321319
const types = {
322-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
323320
"string": (v: string, _allowParse: any) => {
324321
if (typeof v !== "string") {
325322
throw new Error("is not a string, but should be");
326323
}
327324
},
328-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
329325
"boolean": (v: string, allowParse: any) => {
330326
if (typeof v === "boolean") {
331327
return;
@@ -343,7 +339,6 @@ const types = {
343339
throw new Error("is not a boolean");
344340
}
345341
},
346-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
347342
"array": (v: string | [], _allowParse: any) => {
348343
if (!Array.isArray(v)) {
349344
throw new Error("is not an array, but should be");
@@ -355,7 +350,6 @@ const types = {
355350
}
356351
}
357352
},
358-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
359353
"map": (v: { [k: string]: string }, _allowParse: any) => {
360354
for (const key in v) {
361355
if (typeof key !== "string") {
@@ -366,7 +360,6 @@ const types = {
366360
}
367361
}
368362
},
369-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
370363
"objectsWithinObjects": (v: any, _allowParse: any) => {
371364
for (const catalogName in v) {
372365
if (typeof catalogName !== "string") {
@@ -443,5 +436,4 @@ const merge = (a: iSettings, b: iSettings) => {
443436
return deepmerge(a, b, { arrayMerge });
444437
};
445438
merge.all = (array: object[]) => deepmerge.all(array, { arrayMerge });
446-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
447439
const arrayMerge = (_destinationArray: any, sourceArray: any, _options: any) => sourceArray;

src/cssStyles.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,12 @@ export const ariaLive = css({
166166
overflow: "hidden",
167167
});
168168

169-
type MyOptionType = {
169+
export type MyOptionType = {
170170
label: string;
171171
value: string;
172172
};
173173

174-
type IsMulti = false;
175-
176-
export function selectFieldStyle(theme: Theme): StylesConfig<MyOptionType, IsMulti> {
174+
export function selectFieldStyle<IsMulti extends boolean, >(theme: Theme): StylesConfig<MyOptionType, IsMulti> {
177175
return {
178176
control: (provided, state) => ({
179177
...provided,

src/globalKeys.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ export const KEYMAP: IKeyMap = {
8989
},
9090
zoomIn: {
9191
name: "cuttingActions.zoomIn",
92-
key: "Shift;Alt;z, +",
92+
key: "Shift;Alt;r, +",
9393
splitKey: ";",
9494
},
9595
zoomOut: {
9696
name: "cuttingActions.zoomOut",
97-
key: "Shift+Alt+t, -",
97+
key: "Shift+Alt+e, -",
9898
},
9999
},
100100
timeline: {

0 commit comments

Comments
 (0)