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

Add a simple welcome page

This allows users to see what the applocation is about without
being logged in.
parent dc895214
Branches
No related tags found
No related merge requests found
Pipeline #9516 passed
{
"element": "vpu-signature-welcome",
"module_src": "vpu-signature-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
......@@ -13,6 +13,7 @@
},
"routing_name": "signature",
"activities": [
{"path": "vpu-signature-welcome.metadata.json"},
{"path": "vpu-signature-pdf-upload.metadata.json"},
{"path": "vpu-signature-profile.metadata.json",
"visible": false}
......
......@@ -144,6 +144,7 @@ export default {
'src/vpu-signature.js',
'src/vpu-signature-pdf-upload.js',
'src/vpu-signature-profile.js',
'src/vpu-signature-welcome.js',
] : glob.sync('test/**/*.js'),
output: {
dir: 'dist',
......
......@@ -16,6 +16,10 @@
"pdf-upload": {
"button-refresh-title": "Aufstellung von {{name}} erneut laden"
},
"welcome": {
"headline": "Willkommen beim Amtssignatureservice der TU Graz",
"description": "Mit dieser Applikation können Sie, sofern Sie dazu berechtigt sind, PDF Dateien im Namen der TU Graz signieren"
},
"create-loan": {
"info-no-existing-loans-summary": "Keine bestehenden Entlehnungen",
"info-no-existing-loans-body": "Es wurden keine bestehenden Entlehnungen gefunden, das Buch kann entlehnt werden.",
......
......@@ -16,6 +16,10 @@
"pdf-upload": {
"button-refresh-title": "Load pdf-upload from {{name}} again"
},
"welcome": {
"headline": "Welcome to the official 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"
},
"create-loan": {
"info-no-existing-loans-summary": "No existing loans",
"info-no-existing-loans-body": "No existing loans were found, a new one can be created.",
......
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;
}
static get properties() {
return {
lang: { type: String },
};
}
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()}
`;
}
render() {
return html`
<p>${i18n.t('welcome.headline')}</p>
<br>
<p>${i18n.t('welcome.description')}</p>
`;
}
}
commonUtils.defineCustomElement('vpu-signature-welcome', SignatureWelcome);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment