Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DMED-119 - Spike: direktes Einbinden der edu-sharing-Suchumgebung in den "Lern-Store" der SVS #2933

Open
wants to merge 118 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
809a67f
DMED-119 - use iFrame to incorporate edu-sharing search environment
bergatco Nov 29, 2023
732215c
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Nov 29, 2023
5447ebc
DMED-119 - add CSP exceptions for edu-sharing search env
bergatco Nov 29, 2023
04579e3
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Jan 4, 2024
a2477fc
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Jan 5, 2024
84cdc0d
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Jan 9, 2024
6553556
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Jan 9, 2024
a992fb5
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Jan 11, 2024
5fc0edd
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Jan 16, 2024
5d24415
DMED-119 - add edu-sharing repo path to `img-src` in CSP
bergatco Jan 16, 2024
f3a0254
Revert "DMED-119 - add edu-sharing repo path to `img-src` in CSP"
bergatco Jan 16, 2024
b4e552b
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Jan 19, 2024
0197e35
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Jan 29, 2024
ce53db9
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Mar 1, 2024
550aece
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Mar 7, 2024
5fedcda
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Mar 11, 2024
8265e7f
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Mar 14, 2024
0b09fe0
DMED-119 - add edu-sharing search via web component
bergatco Mar 15, 2024
acb6670
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Mar 15, 2024
cdff7b9
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Mar 15, 2024
f733737
DMED-119 - point edu-sharing web component to our own test instance
bergatco Mar 18, 2024
92e31b1
DMED-119 - remove `edu-sharing-app` temporarily for testing purposes
bergatco Mar 19, 2024
01b1ad6
DMED-119 - remove search field temporarily for testing purposes
bergatco Mar 19, 2024
bc7181d
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Mar 19, 2024
e9d3306
DMED-119 - rename `EduSharingApp` to `EduSharingWrapper` in order to …
bergatco Mar 19, 2024
03031bc
DMED-119 - add `connect-src` to CSP for edu-sharing test instance
bergatco Mar 19, 2024
0645315
DMED-119-integration-of-search-environment (this time the right way)
bergatco Mar 19, 2024
4c2d004
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Mar 20, 2024
4f41e78
DMED-119 - add `img-src` to CSP for edu-sharing test instance
bergatco Mar 20, 2024
749f198
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Mar 20, 2024
f1ef6e8
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Mar 25, 2024
2343856
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Mar 27, 2024
6584536
BC-6896 - Save default title on column board title blur (#3176)
bischofmax Mar 27, 2024
5241bbd
BC-5513 - new folder structure (#3165)
odalys-dataport Mar 28, 2024
8c55e78
BC-6794 Add check if column board has drawing as its child (#3159)
blazejpass Mar 28, 2024
35adf46
removed HPI occurrence from readme (#3182)
Loki-Afro Apr 3, 2024
8bee07a
BC-7000 - fix date function (#3179)
virgilchiriac Apr 3, 2024
22679d4
N21-1836 generates api (#3186)
arnegns Apr 5, 2024
8e15be5
BC-6674-Replace-language-keys-for-tldraw (#3128)
VikDavydiuk Apr 5, 2024
a275e4f
BC-5334 - migrate deletion of systems from schools endpoint to v3 (#3…
SevenWaysDP Apr 5, 2024
68b96d8
BC-6842 - Adjust design system (#3170)
NFriedo Apr 8, 2024
0b70d0f
BC-5374 - add endpoint /v3/courses/:id/userPermissions (#3184)
EzzatOmar Apr 8, 2024
9224521
N21 1835 show migrated user bug fix (#3189)
mrikallab Apr 8, 2024
d4ea623
N21-1774 Create synced course (#3155)
MarvinOehlerkingCap Apr 8, 2024
7fd8248
N21-1833 Generate API (#3187)
MarvinOehlerkingCap Apr 8, 2024
d8cd17a
BC-6898 Add option to delete column board in 3-dot menu + set to the …
KalliSfak Apr 9, 2024
3d4db0b
BC-6849 - Implement BoardStore with Pinia (#3178)
muratmerdoglu-dp Apr 9, 2024
9dd6a0e
BC-6928 - implement new sidebar (#3181)
odalys-dataport Apr 10, 2024
470cfae
BC-7081 Set max-width for school logo (#3191)
dyedwiper Apr 10, 2024
55ca55f
fix publishing and changing the title issues (#3195)
muratmerdoglu-dp Apr 11, 2024
72cb29d
BC-6910 - Adjustments in board and course page (#3185)
MartinSchuhmacher Apr 11, 2024
0874654
N21-1821 migration wizard show class column (#3198)
MBergCap Apr 12, 2024
89d1a96
N21-1337 removes deprecated ctl versioning (#3203)
arnegns Apr 15, 2024
ef87093
N21-1851 fixes the ui of school administration (#3207)
arnegns Apr 16, 2024
cc2cf48
N21-1859 Prevent Login and Migration for multipe users (#3197)
mrikallab Apr 16, 2024
4f40417
N21-1883 show all school external tools on school administration page…
IgorCapCoder Apr 17, 2024
da5f813
N21-1830 generates api (#3202)
arnegns Apr 17, 2024
eef6574
N21-1831 Media shelf frontend (#3204)
MarvinOehlerkingCap Apr 17, 2024
b01521d
BC- 7030 - new sidebar (#3193)
odalys-dataport Apr 18, 2024
51b8098
N21-1832 Media shelf tool launch (#3211)
MarvinOehlerkingCap Apr 18, 2024
e6cc322
N21-1858 prevent migration to same login system (#3208)
MBergCap Apr 19, 2024
b955141
EW-828: Control option for "Spaltenboards" (#3210)
mkreuzkam-cap Apr 19, 2024
e9a6032
N21-1705 class page tabs to wireframe (#3213)
arnegns Apr 19, 2024
18e9c84
N21-1783 Remove unused lti message type (#3214)
MarvinOehlerkingCap Apr 19, 2024
28b73e5
N21-1785-do not show wizard button when migration is finished (#3215)
IgorCapCoder Apr 22, 2024
be2958f
BC-6770 - Create a list board (#3199)
MartinSchuhmacher Apr 22, 2024
e7e49b8
BC-3577 Add texteditor element to column board (FE) (#3192)
KalliSfak Apr 22, 2024
0c6f800
N21-1631 change ctl error handling (#3216)
MBergCap Apr 24, 2024
f8c3f49
N21-1904 Fix media board ghost line title (#3222)
MarvinOehlerkingCap Apr 25, 2024
2f364c0
BC-6757 - Delete etherpad (#3217)
bischofmax Apr 25, 2024
b6596dc
BC-5268 move alert api to nest (#3205)
wiaderwek Apr 29, 2024
0f471bc
N21-1837 ui improvements (#3225)
arnegns Apr 29, 2024
ad0b9ef
N21-1381 Add composables for context external tools (#3226)
MarvinOehlerkingCap Apr 29, 2024
c27cae3
BC-6867 - Optimize list board (#3218)
MartinSchuhmacher Apr 30, 2024
dda73b8
N21-1934 Fix launching on the media shelf during drag and drop (#3227)
MarvinOehlerkingCap Apr 30, 2024
437c1bb
BC-7020- Hint "Editable for all users" (#3220)
KalliSfak Apr 30, 2024
3c60c6f
BC-6850 - Implementation column board actions (#3194)
muratmerdoglu-dp Apr 30, 2024
7540a51
N21-1862 add data-testids (#3223)
MBergCap May 3, 2024
825adbb
N21-1887 Generate API (#3231)
MarvinOehlerkingCap May 3, 2024
e758c03
N21-1943 Fix creation of context external tools with error (#3233)
MarvinOehlerkingCap May 3, 2024
299dba6
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco May 6, 2024
23de68b
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco May 16, 2024
ed41e4e
DMED-119 - add working example of `web-component-vue`
bergatco May 16, 2024
ba7bb7a
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco May 23, 2024
3fedbbc
Merge branch 'DMED-119-integration-of-search-environment' of https://…
bergatco May 23, 2024
2fb1d9b
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco May 23, 2024
75c2b91
DMED-119 - fix serving of web component files
bergatco May 24, 2024
ba8d88c
DMED-119 - make `EDU_SHARING__API_URL` available via `envConfigModule`
bergatco May 24, 2024
bc7d392
DMED-119 - refactor: update EDU_SHARING_API_URL to include "/rest"
bergatco May 28, 2024
bf0ad60
DMED-119 - update CSP to allow connection to local API endpoint
bergatco May 28, 2024
0f19bbf
DMED-119 - update CSP to allow connection to test repo
bergatco May 28, 2024
6e13b8b
DMED-119 - update CSP to allow connection to test repo and local API …
bergatco May 28, 2024
21b94f4
DMED-119 - add test repo as `image-src` to csp
bergatco May 28, 2024
cdca079
DMED-119 - update base path of EduSharingApiInterface to include "/v3"
bergatco May 28, 2024
2aa37bf
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco May 29, 2024
1d06bb5
DMED-119 - add `EDU_SHARING_CONNECT_SRC_URLS` and `EDU_SHARING_IMG_SR…
bergatco May 29, 2024
9bd221f
DMED-119 - update `EduSharingApi`
bergatco May 29, 2024
3be1441
DMED-119 - replace dev build of web component by production build
bergatco May 30, 2024
bf2219f
DMED-119 - remove `vendor.js` from `EduSharingWrapper` as it is no lo…
bergatco May 30, 2024
ece563f
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco May 30, 2024
dd9ce6e
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Jul 1, 2024
30f365f
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Jul 1, 2024
8774d1c
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Jul 2, 2024
1c055e0
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Jul 2, 2024
c350394
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Jul 8, 2024
2d955d9
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Aug 26, 2024
579a385
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Aug 26, 2024
de4936b
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Sep 4, 2024
8144ecc
DMED-119 - update search input styling and layout
bergatco Sep 4, 2024
c2485c1
DMED-119 - use new npm package instead of external files
bergatco Sep 5, 2024
6e66c5d
DMED-119 - fix wrong pathes in webpack config
bergatco Sep 5, 2024
f663dc5
DMED-119 - add copying of web component files to Dockerfile
bergatco Sep 5, 2024
eb3c683
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Sep 5, 2024
2da05f3
DMED-119 - fix handling of web component files
bergatco Sep 5, 2024
1c07aac
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Sep 9, 2024
b0a4edb
DMED-119 - fix import statement for `mdiMagnify` in `EduSharingWrapper`
bergatco Sep 9, 2024
02df50a
Merge branch 'main' into DMED-119-integration-of-search-environment
bergatco Sep 16, 2024
7c2540d
DMED-119 - update CSP to include YouTube embeds
bergatco Sep 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ __snapshots__

# IntelliJ
.idea/

# exclude the public/content directory
public/content
2 changes: 1 addition & 1 deletion config/docker/nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ server {
listen 4000;
server_name localhost;

set $csp "default-src 'self'; base-uri 'self'; script-src 'nonce-$request_id' 'strict-dynamic' 'unsafe-inline' https:; object-src 'none'; font-src 'self' data:; img-src 'self' data:; style-src 'self' 'unsafe-inline'; frame-src 'self' ${H5P_FRAME_SRC_URLS} https://docs.dbildungscloud.de/";
set $csp "default-src 'self'; base-uri 'self'; script-src 'nonce-$request_id' 'strict-dynamic' 'unsafe-inline' https:; object-src 'none'; font-src 'self' data:; img-src 'self' data: ${EDU_SHARING_IMG_SRC_URLS}; style-src 'self' 'unsafe-inline'; frame-src 'self' ${H5P_FRAME_SRC_URLS} https://docs.dbildungscloud.de/ https://www.youtube-nocookie.com/; connect-src 'self' ${EDU_SHARING_CONNECT_SRC_URLS}";

set $h5pcsp "default-src 'self'; base-uri 'self'; script-src ${H5P_SCRIPT_SRC_URLS} 'unsafe-inline' https:; object-src 'none'; font-src 'self' data:; img-src 'self' ${H5P_IMG_SRC_URLS} data:; style-src 'self' 'unsafe-inline'; frame-src 'self' ${H5P_FRAME_SRC_URLS}";

Expand Down
43 changes: 41 additions & 2 deletions config/webpack/dev-server-config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
const { createProxyMiddleware } = require("http-proxy-middleware");
const { isVueClient } = require("../../src/router/vue-client-route");
const {
isServer,
isEduSharing,
isEduSharingRepo,
isFileStorage,
isH5pEditor,
isServer,
} = require("../../src/router/server-route");
const url = require("url");
const path = require("path");

const createLegacyClientProxy = () => {
const legacyClientProxy = createProxyMiddleware({
Expand All @@ -23,6 +26,14 @@ const createServerProxy = () => {
return serverProxy;
};

const createEduSharingProxy = () => {
const eduSharingProxy = createProxyMiddleware({
target: "http://localhost:4450",
changeOrigin: true,
});
return eduSharingProxy;
};

const createFileStorageProxy = () => {
const fileStorageProxy = createProxyMiddleware({
target: "http://localhost:4444",
Expand All @@ -39,15 +50,25 @@ const createH5pEditorProxy = () => {
return h5pEditorProxy;
};

const createEduSharingRepoProxy = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warum benötigt man ein eduSharingProxy und ein eduSharingRepoProxy? Was ist der Unterschied zwischen beiden?

const eduSharingRepoProxy = createProxyMiddleware({
target: "http://localhost:8100",
changeOrigin: true,
});
return eduSharingRepoProxy;
};

const createDevServerConfig = () => {
const legacyClientProxy = createLegacyClientProxy();
const serverProxy = createServerProxy();
const eduSharingProxy = createEduSharingProxy();
const eduSharingRepoProxy = createEduSharingRepoProxy();
const fileStorageProxy = createFileStorageProxy();
const h5pEditorProxy = createH5pEditorProxy();

const devServerConfig = {
port: 4000,
historyApiFallback: true,
port: 4000,

setupMiddlewares: (middlewares, devServer) => {
if (!devServer) {
Expand All @@ -63,6 +84,10 @@ const createDevServerConfig = () => {
fileStorageProxy(req, res, next);
} else if (isH5pEditor(path)) {
h5pEditorProxy(req, res, next);
} else if (isEduSharing(path)) {
eduSharingProxy(req, res, next);
} else if (isEduSharingRepo(path)) {
eduSharingRepoProxy(req, res, next);
} else if (isServer(path)) {
serverProxy(req, res, next);
} else if (isVueClient(path)) {
Expand All @@ -73,6 +98,20 @@ const createDevServerConfig = () => {
},
});

// Copy assets before the dev server starts
const __base = path.resolve(__dirname, "../..");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Es wäre super wenn der Code dafür noch unter einer Funktion mit bezeichnenden Namen geclustert wird. Ehrlich gesagt müsste ich aber noch mal über das warum es notwendig ist nachdenken. Bzw. hier wäre drüber reden hilfreich.

Sind die ganzen Änderung potentiel etwas das hinter ein feature flag liegen sollten?


const fs = require("fs-extra");
const source = path.resolve(
__base,
"node_modules/ngx-edu-sharing-app-as-web-component"
);
const destination = path.resolve(
__base,
"public/content/vendor/edu-sharing"
);
fs.copySync(source, destination);

return middlewares;
},
allowedHosts: "all",
Expand Down
11 changes: 10 additions & 1 deletion config/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,20 @@ module.exports = {
"**/.DS_Store",
path.resolve(__base, "public/index.html"),
path.resolve(__base, "public/themes/**/*"),
path.resolve(__base, "public/content/**/*"),
],
},
info: {
minimized: true,
},
},
{
from: path.resolve(
__base,
"node_modules/ngx-edu-sharing-app-as-web-component"
),
to: path.resolve(__base, "dist/content/vendor/edu-sharing"),
},
],
}),

Expand Down Expand Up @@ -224,7 +232,8 @@ module.exports = {
loader: "vue-loader",
options: {
compilerOptions: {
isCustomElement: (tag) => tag.startsWith("h5p-"),
isCustomElement: (tag) =>
tag.startsWith("h5p-") || tag === "edu-sharing-app",
},
},
},
Expand Down
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ const config = {
globals: {
"vue-jest": {
compilerOptions: {
isCustomElement: (tag) => tag.startsWith("h5p-"),
isCustomElement: (tag) =>
tag.startsWith("h5p-") || tag === "edu-sharing-app",
},
},
},
Expand Down
4 changes: 4 additions & 0 deletions openapitools-for-edu-sharing.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"supportsES6": true,
"withInterfaces": true
}
31 changes: 27 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"lint": "npx eslint 'src/**/*.{ts,js,vue}'",
"lint:fix": "npx eslint 'src/**/*.{ts,js,vue}' --fix",
"generate-client:server": "node generate-client.js -c openapitools-for-server.json",
"generate-client:edu-sharing": "node generate-client.js -u 'http://localhost:4450/api/v3/docs-json/' -p 'src/eduSharingApi/v3' -c 'openapitools-for-edu-sharing.json'",
"generate-client:filestorage": "node generate-client.js -u 'http://localhost:4444/api/v3/docs-json/' -p 'src/fileStorageApi/v3' -c 'openapitools-for-file-storage.json'",
"generate-client:h5p-editor": "node generate-client.js -u 'http://localhost:4448/api/v3/docs-json/' -p 'src/h5pEditorApi/v3' -c 'openapitools-for-h5p-editor.json'"
},
Expand All @@ -30,6 +31,7 @@
"kjua": "^0.9.0",
"maska": "^2.1.10",
"mobile-drag-drop": "^3.0.0-rc.0",
"ngx-edu-sharing-app-as-web-component": "^9.1.0",
"object-hash": "^3.0.0",
"pinia": "^2.1.7",
"socket.io-client": "^4.7.5",
Expand Down Expand Up @@ -77,6 +79,7 @@
"eslint-plugin-schulcloud": "file:lib/eslint-plugin-schulcloud",
"eslint-webpack-plugin": "^4.1.0",
"fishery": "^2.2.2",
"fs-extra": "^11.2.0",
"html-webpack-plugin": "^5.6.0",
"http-proxy-middleware": "^2.0.6",
"jest": "^29.7.0",
Expand Down
114 changes: 114 additions & 0 deletions src/components/edu-sharing/EduSharingWrapper.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<template>
<main class="main-container">
<form class="search-form" :onsubmit="onSubmit">
<v-text-field
class="search-input"
density="comfortable"
flat
:hide-details="true"
name="searchString"
single-line
type="outlined"
placeholder="Search"
:prepend-inner-icon="mdiMagnify"
variant="solo"
/>
</form>
<edu-sharing-app />
</main>
</template>

<script>
import { envConfigModule } from "@/store";
import { mdiMagnify } from "@icons/material";
import { useEduSharingApi } from "../../composables/edu-sharing-api.composable";

export default {
name: "EduSharingWrapper",
components: {},
data() {
return {
mdiMagnify,
};
},
mounted() {
// Provide the backend URL for edu-sharing to the web component.
window.__env = {
EDU_SHARING_API_URL:
envConfigModule.getEnv.EDU_SHARING__API_URL + "/rest",
};

const runtime = document.createElement("script");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createElement
setAttribut
appendChild
etc.. in einer vue Komponente klinkt nicht nach state of the art.

runtime.setAttribute("src", "/content/vendor/edu-sharing/runtime.js");
runtime.setAttribute("type", "module");
document.body.appendChild(runtime);

const polyfills = document.createElement("script");
polyfills.setAttribute("src", "/content/vendor/edu-sharing/polyfills.js");
polyfills.setAttribute("type", "module");
document.body.appendChild(polyfills);

// <!-- Alternatively to loading `scripts.js`, provide your own versions of jQuery. -->
const scripts = document.createElement("script");
scripts.setAttribute("src", "/content/vendor/edu-sharing/scripts.js");
scripts.setAttribute("defer", "");
document.body.appendChild(scripts);

const main = document.createElement("script");
main.setAttribute("src", "/content/vendor/edu-sharing/main.js");
main.setAttribute("type", "module");
document.body.appendChild(main);

const styles = document.createElement("link");
styles.setAttribute("href", "/content/vendor/edu-sharing/styles.css");
styles.setAttribute("rel", "stylesheet");
document.body.appendChild(styles);

// retrieve the valid session ticket
(async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ich kann dir nicht sagen wie es aussehen muss. Aber die api zur Komponente zu importieren und beim mount ein async einzubauen klinkt erstmal nicht richtig.

const { getTicketForUser } = useEduSharingApi();
const ticket = await getTicketForUser();
const eduSharingApp = document.getElementsByTagName("edu-sharing-app")[0];
eduSharingApp.setAttribute("ticket", ticket);
})();
},
methods: {
onSubmit(event) {
event.preventDefault();
const data = new FormData(event.target);
const searchString = data.get("searchString");
const eduSharingApp = document.getElementsByTagName("edu-sharing-app")[0];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

document.getElementsByTagName("edu-sharing-app")[0] = erstes Element von irgendwas externen klinkt jetzt erstmal nicht nach Langzeit Maintaince save.

eduSharingApp.setAttribute("search-string", searchString);
},
},
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.main-container {
min-height: 0;
flex-grow: 1;
display: flex;
flex-direction: column;
gap: 20px;
}
.search-form {
height: 64px;
flex-shrink: 0;
padding: 10px 16px;
background: #f3f5f7;
}
.search-input {
width: 500px;
border-radius: 2px;
border: 1px solid var(--Secondary-v-secondary-base, #54616e);
background: var(--shades---v-white-base, #fff);
}
edu-sharing-app {
flex-grow: 1;
}
:deep(.v-field) {
height: 44px;
}
Comment on lines +88 to +113
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

muss so viel custom css sein?

Comment on lines +89 to +113
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warum so viel eigene styles?

</style>
Loading
Loading