diff --git a/.github/workflows/deploy-workers.yml b/.github/workflows/deploy-workers.yml index 444c17cb8..bf9d2811c 100644 --- a/.github/workflows/deploy-workers.yml +++ b/.github/workflows/deploy-workers.yml @@ -54,6 +54,6 @@ jobs: context: ./${{ matrix.module }} pull: true push: true - build-args: version=${{ steps.vars.outputs.sha_short }} + build-args: version=${{ github.ref_name }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/web/assets/css/home.css b/web/assets/css/home.css index 6803a68cd..057a8f7b4 100644 --- a/web/assets/css/home.css +++ b/web/assets/css/home.css @@ -414,4 +414,4 @@ label:has(~ .tum-live-input) { .tum-live-markdown a { border-bottom: 1px solid black; -} +} \ No newline at end of file diff --git a/web/template/admin/admin_tabs/course-import.gohtml b/web/template/admin/admin_tabs/course-import.gohtml index c80efb37a..41a8219e0 100644 --- a/web/template/admin/admin_tabs/course-import.gohtml +++ b/web/template/admin/admin_tabs/course-import.gohtml @@ -1,6 +1,7 @@ {{define "course-import"}}

Course Import

+
-
-
-
- -
- - Structuring lectures into sections makes lectures more rewatchable. +
Attach files or URL to files by Drag & Drop in the description field. -
- -
-
-
- -
- - Attachments allow students to download (additional) material directly from this TUMLive-stream. - -
-
-
-
-
+
diff --git a/web/ts/custom-elements/elements.ts b/web/ts/custom-elements/elements.ts new file mode 100644 index 000000000..805851b87 --- /dev/null +++ b/web/ts/custom-elements/elements.ts @@ -0,0 +1,6 @@ +import * as help from "./help-icon"; + +export function defineElements() { + customElements.define("help-icon", help.HelpIcon); + console.log("Defined custom elements"); +} diff --git a/web/ts/custom-elements/help-icon.ts b/web/ts/custom-elements/help-icon.ts new file mode 100644 index 000000000..8da9a0c53 --- /dev/null +++ b/web/ts/custom-elements/help-icon.ts @@ -0,0 +1,31 @@ +export class HelpIcon extends HTMLElement { + private text: string; + constructor() { + super(); + } + + connectedCallback() { + this.text = this.getAttribute("text") ?? "No help available"; + this.innerHTML = ` + + + +
+ ${this.text} +
+
+ `; + this.className = "m-0 p-0 text-xs"; + this.style.textRendering = ""; + } +} diff --git a/web/ts/global.ts b/web/ts/global.ts index a0069080a..05bf772a0 100644 --- a/web/ts/global.ts +++ b/web/ts/global.ts @@ -1,9 +1,11 @@ import { StatusCodes } from "http-status-codes"; +import { defineElements } from "./custom-elements/elements"; export * from "./notifications"; export * from "./user-settings"; export * from "./start-page"; export * from "./utilities/time"; +export * from "./custom-elements/elements"; export async function getData(url = "") { return await fetch(url); @@ -304,6 +306,7 @@ export type Section = { window.onload = function () { initHiddenCourses(); + defineElements(); }; export function cloneEvents(srcElem: HTMLElement, destElem: HTMLElement, events: string[]) { diff --git a/web/tsconfig.json b/web/tsconfig.json index a3b556434..5f1c8273c 100644 --- a/web/tsconfig.json +++ b/web/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "module": "es6", - "target": "es5", + "target": "es6", "sourceMap": true, "outDir": "assets/ts-dist", "noImplicitAny": false,