fix(core): update
This commit is contained in:
parent
fe38765d2f
commit
efb2e53e0c
@ -1,5 +1,13 @@
|
|||||||
import * as plugins from '../plugins';
|
import * as plugins from '../plugins';
|
||||||
import { DeesElement, property, html, customElement, TemplateResult, css, cssManager } from '@designestate/dees-element';
|
import {
|
||||||
|
DeesElement,
|
||||||
|
property,
|
||||||
|
html,
|
||||||
|
customElement,
|
||||||
|
TemplateResult,
|
||||||
|
css,
|
||||||
|
cssManager,
|
||||||
|
} from '@designestate/dees-element';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
@ -10,27 +18,24 @@ declare global {
|
|||||||
@customElement('upl-statuspage-incidents')
|
@customElement('upl-statuspage-incidents')
|
||||||
export class UplStatuspageIncidents extends DeesElement {
|
export class UplStatuspageIncidents extends DeesElement {
|
||||||
// STATIC
|
// STATIC
|
||||||
public static demo = () => html`
|
public static demo = () => html` <upl-statuspage-incidents></upl-statuspage-incidents> `;
|
||||||
<upl-statuspage-incidents></upl-statuspage-incidents>
|
|
||||||
`;
|
|
||||||
|
|
||||||
// INSTANCE
|
// INSTANCE
|
||||||
@property({
|
@property({
|
||||||
type: Array
|
type: Array,
|
||||||
})
|
})
|
||||||
public currentIncidences: plugins.uplInterfaces.data.IIncident[] = [];
|
public currentIncidences: plugins.uplInterfaces.data.IIncident[] = [];
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: Array
|
type: Array,
|
||||||
})
|
})
|
||||||
public pastIncidences: plugins.uplInterfaces.data.IIncident[] = [];
|
public pastIncidences: plugins.uplInterfaces.data.IIncident[] = [];
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: Boolean
|
type: Boolean,
|
||||||
})
|
})
|
||||||
public whitelabel = false;
|
public whitelabel = false;
|
||||||
|
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
@ -55,41 +60,31 @@ export class UplStatuspageIncidents extends DeesElement {
|
|||||||
padding: 10px;
|
padding: 10px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
`,
|
||||||
`
|
];
|
||||||
]
|
|
||||||
|
|
||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<style></style>
|
<style></style>
|
||||||
<div class="mainbox">
|
<div class="mainbox">
|
||||||
<uplinternal-miniheading>
|
<uplinternal-miniheading> Current Incidents </uplinternal-miniheading>
|
||||||
Current Incidents
|
${this.currentIncidences.length
|
||||||
</uplinternal-miniheading>
|
? html``
|
||||||
<div class="noIncidentBox">
|
: html` <div class="noIncidentBox">No incidents ongoing.</div> `}
|
||||||
No incidents ongoing.
|
<uplinternal-miniheading> Past Incidents </uplinternal-miniheading>
|
||||||
</div>
|
${this.pastIncidences.length
|
||||||
<uplinternal-miniheading>
|
? html``
|
||||||
Past Incidents
|
: html` <div class="noIncidentBox">No past incidents in the last 90 days.</div> `}
|
||||||
</uplinternal-miniheading>
|
|
||||||
<div class="noIncidentBox">
|
|
||||||
No past incidents in the last 90 days.
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
public dispatchReportNewIncident() {
|
public dispatchReportNewIncident() {
|
||||||
this.dispatchEvent(new CustomEvent('reportNewIncident', {
|
this.dispatchEvent(new CustomEvent('reportNewIncident', {}));
|
||||||
|
|
||||||
}))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public dispatchStatusSubscribe() {
|
public dispatchStatusSubscribe() {
|
||||||
this.dispatchEvent(new CustomEvent('statusSubscribe', {
|
this.dispatchEvent(new CustomEvent('statusSubscribe', {}));
|
||||||
|
|
||||||
}))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user