Skip to content
Snippets Groups Projects
Commit 94beb018 authored by Steinwender, Tamara's avatar Steinwender, Tamara
Browse files

Add qr code scanner activity to demo app

parent 514918ca
No related branches found
No related tags found
No related merge requests found
Pipeline #13213 passed
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
"activities": [ "activities": [
{"path": "person-select.metadata.json"}, {"path": "person-select.metadata.json"},
{"path": "knowledge-base-web-page-element-view.metadata.json"}, {"path": "knowledge-base-web-page-element-view.metadata.json"},
{"path": "common.metadata.json"} {"path": "common.metadata.json"},
{"path": "qr-code-scanner.metadata.json"}
], ],
"attributes": [] "attributes": []
} }
\ No newline at end of file
{
"element": "dbp-qr-code-scanner-demo-activity",
"module_src": "dbp-qr-code-scanner-demo-activity.js",
"routing_name": "qr-code-scanner",
"name": {
"de": "QR Code Scanner",
"en": "QR Code Scanner"
},
"short_name": {
"de": "QR Code Scanner",
"en": "QR Code Scanner"
},
"description": {
"de": "Scannt Qr Codes",
"en": "Scans Qr Codes"
}
}
...@@ -23,7 +23,7 @@ import selfsigned from 'selfsigned'; ...@@ -23,7 +23,7 @@ import selfsigned from 'selfsigned';
// Some new web APIs are only available when HTTPS is active. // Some new web APIs are only available when HTTPS is active.
// Note that this only works with a Non-HTTPS API endpoint with Chrome, // Note that this only works with a Non-HTTPS API endpoint with Chrome,
// Firefox will emit CORS errors, see https://bugzilla.mozilla.org/show_bug.cgi?id=1488740 // Firefox will emit CORS errors, see https://bugzilla.mozilla.org/show_bug.cgi?id=1488740
const USE_HTTPS = false; const USE_HTTPS = true;
// ------------------------------- // -------------------------------
......
import {css, html, LitElement} from 'lit-element';
import {ScopedElementsMixin} from '@open-wc/scoped-elements';
import * as PersonSelectDemo from 'dbp-qr-code-scanner/src/dbp-qr-code-scanner-demo';
import * as commonUtils from 'dbp-common/utils';
import * as commonStyles from 'dbp-common/styles';
import {unsafeHTML} from 'lit-html/directives/unsafe-html.js';
import readme from 'dbp-qr-code-scanner/README.md';
import highlightCSSPath from 'highlight.js/styles/default.css';
class DbpQrCodeScannerDemoActivity extends ScopedElementsMixin(LitElement) {
static get scopedElements() {
return {
'dbp-person-select-demo': PersonSelectDemo,
};
}
static get properties() {
return {
};
}
connectedCallback() {
super.connectedCallback();
this.updateComplete.then(()=>{
});
}
static get styles() {
// language=css
return [
commonStyles.getThemeCSS(),
commonStyles.getGeneralCSS(),
css`
h1.title {margin-bottom: 1em;}
div.container {margin-bottom: 1.5em;}
`
];
}
render() {
return html`
xxx
<dbp-qr-code-scanner-demo lang="en"></dbp-qr-code-scanner-demo>
${unsafeHTML(readme)}
`;
}
}
commonUtils.defineCustomElement('dbp-qr-code-scanner-demo-activity', DbpQrCodeScannerDemoActivity);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment