Skip to content
Snippets Groups Projects
Commit 93eb37cd authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Use welcome page from app-shell

parent f4a91046
No related branches found
No related tags found
No related merge requests found
Pipeline #9936 passed with warnings
...@@ -8,12 +8,11 @@ ...@@ -8,12 +8,11 @@
"en": "Signatureservice" "en": "Signatureservice"
}, },
"description": { "description": {
"de": "", "de": "Mit dieser Applikation können Sie, sofern Sie dazu berechtigt sind, PDF Dateien im Namen der TU Graz signieren",
"en": "" "en": "With this application you can, provided you are authorized to do so, sign PDF files in the name of the TU Graz"
}, },
"routing_name": "signature", "routing_name": "signature",
"activities": [ "activities": [
{"path": "vpu-welcome.metadata.json"},
{"path": "vpu-signature-pdf-upload.metadata.json"} {"path": "vpu-signature-pdf-upload.metadata.json"}
], ],
"attributes": [] "attributes": []
......
{
"element": "vpu-welcome",
"module_src": "vpu-welcome.js",
"routing_name": "welcome",
"name": {
"de": "Willkommen",
"en": "Welcome"
},
"short_name": {
"de": "Willkommen",
"en": "Welcome"
},
"description": {
"de": "",
"en": ""
}
}
\ No newline at end of file
...@@ -143,7 +143,6 @@ export default { ...@@ -143,7 +143,6 @@ export default {
input: (build != 'test') ? [ input: (build != 'test') ? [
'src/vpu-signature.js', 'src/vpu-signature.js',
'src/vpu-signature-pdf-upload.js', 'src/vpu-signature-pdf-upload.js',
'src/vpu-welcome.js',
] : glob.sync('test/**/*.js'), ] : glob.sync('test/**/*.js'),
output: { output: {
dir: 'dist', dir: 'dist',
......
...@@ -13,10 +13,6 @@ ...@@ -13,10 +13,6 @@
"re-upload-all-button": "Alle erneut hochladen", "re-upload-all-button": "Alle erneut hochladen",
"re-upload-all-button-title": "Alle fehlgeschlagen Uploads erneut hochladen" "re-upload-all-button-title": "Alle fehlgeschlagen Uploads erneut hochladen"
}, },
"welcome": {
"headline": "Willkommen beim Signaturservice der TU Graz",
"description": "Mit dieser Applikation können Sie, sofern Sie dazu berechtigt sind, PDF Dateien im Namen der TU Graz signieren"
},
"error-summary": "Ein Fehler ist aufgetreten", "error-summary": "Ein Fehler ist aufgetreten",
"error-permission-message": "Sie müssen das Recht auf Amtssignaturen besitzen um diese Funktion nutzen zu können!", "error-permission-message": "Sie müssen das Recht auf Amtssignaturen besitzen um diese Funktion nutzen zu können!",
"error-login-message": "Sie müssen eingeloggt sein um diese Funktion nutzen zu können!" "error-login-message": "Sie müssen eingeloggt sein um diese Funktion nutzen zu können!"
......
...@@ -13,10 +13,6 @@ ...@@ -13,10 +13,6 @@
"re-upload-all-button": "Upload all", "re-upload-all-button": "Upload all",
"re-upload-all-button-title": "Upload all failed uploads again" "re-upload-all-button-title": "Upload all failed uploads again"
}, },
"welcome": {
"headline": "Welcome to the signature service of the TU Graz",
"description": "With this application you can, provided you are authorized to do so, sign PDF files in the name of the TU Graz"
},
"error-summary": "An error occurred", "error-summary": "An error occurred",
"error-permission-message": "You need have permissions to use the official signature to use this function!", "error-permission-message": "You need have permissions to use the official signature to use this function!",
"error-login-message": "You need to be logged in to use this function!" "error-login-message": "You need to be logged in to use this function!"
......
import {createI18nInstance} from './i18n.js';
import {css, html, LitElement} from 'lit-element';
import * as commonUtils from 'vpu-common/utils';
import * as commonStyles from 'vpu-common/styles';
import 'vpu-person-profile';
const i18n = createI18nInstance();
class SignatureWelcome extends LitElement {
constructor() {
super();
this.lang = i18n.language;
this.metadata = {};
}
static get properties() {
return {
lang: { type: String },
metadata: { type: Object, attribute: false },
};
}
setMetaData(metaData, headline, subHeadline) {
this.headline = headline || "Welcome";
this.subHeadline = subHeadline || "";
this.metadata = metaData;
}
update(changedProperties) {
changedProperties.forEach((oldValue, propName) => {
if (propName === "lang") {
i18n.changeLanguage(this.lang);
}
});
super.update(changedProperties);
}
static get styles() {
// language=css
return css`
${commonStyles.getThemeCSS()}
${commonStyles.getGeneralCSS()}
h2 { margin: inherit; }
p { margin: 0 0 10px 0; }
div.item { margin: 30px 0; }
`;
}
render() {
let itemTemplates = [];
for (let [key, data] of Object.entries(this.metadata)) {
if (data['visible'] && (key !== "welcome")) {
itemTemplates.push(html`
<div class="item">
<h2>${data.name[this.lang]}</h2>
${data.description[this.lang]}
</div>`);
}
}
return html`
<p>${this.headline}</p>
<p>${this.subHeadline}</p>
${itemTemplates}
`;
}
}
commonUtils.defineCustomElement('vpu-welcome', SignatureWelcome);
Subproject commit 800e83039641262a503dac6596925ce6200b4776 Subproject commit 0419a6e56f66bce5c19d7c844979d40c7f675550
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment