6 Commits

Author SHA1 Message Date
1fc79c3ba2 1.0.65 2021-03-09 13:41:17 +00:00
cafe63348b fix(core): update 2021-03-09 13:41:16 +00:00
830eab2b18 1.0.64 2021-03-08 23:58:57 +00:00
89bd6259df fix(core): update 2021-03-08 23:58:57 +00:00
d8ee065e25 1.0.63 2021-03-08 23:27:51 +00:00
058384e0a0 fix(core): update 2021-03-08 23:27:50 +00:00
3 changed files with 18 additions and 7 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@uptimelink/webwidget", "name": "@uptimelink/webwidget",
"version": "1.0.62", "version": "1.0.65",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@uptimelink/webwidget", "name": "@uptimelink/webwidget",
"version": "1.0.62", "version": "1.0.65",
"private": false, "private": false,
"description": "the webwidget for public use of uptimelink", "description": "the webwidget for public use of uptimelink",
"main": "dist_ts_web/index.js", "main": "dist_ts_web/index.js",

View File

@ -13,6 +13,9 @@ export class UptimelinkWebwidget extends DeesElement {
@property() @property()
public isFocused = false; public isFocused = false;
@property()
public isElevated = false;
@property() @property()
public showExpanded: boolean = false; public showExpanded: boolean = false;
@ -27,12 +30,14 @@ export class UptimelinkWebwidget extends DeesElement {
${domtools.elementBasic.styles} ${domtools.elementBasic.styles}
<style> <style>
:host { :host {
position: relative;
display: block; display: block;
height: 30px;
z-index: ${this.isElevated ? '10' : 'auto'} ;
} }
.mainbox { .mainbox {
position: relative; position: relative;
line-height: 1em; line-height: 1em;
margin: auto; margin: auto;
font-family: Roboto; font-family: Roboto;
font-weight: 400; font-weight: 400;
@ -57,7 +62,7 @@ export class UptimelinkWebwidget extends DeesElement {
.mainbox.focused { .mainbox.focused {
width: 200px; width: 200px;
height: 128px; height: 118px;
} }
.statusindicator { .statusindicator {
@ -92,7 +97,7 @@ export class UptimelinkWebwidget extends DeesElement {
background: ${this.goBright ? 'rgba(0,0,0,0.07)' : 'rgba(255,255,255,0.07)'}; background: ${this.goBright ? 'rgba(0,0,0,0.07)' : 'rgba(255,255,255,0.07)'};
border-radius: 3px; border-radius: 3px;
width: 190px; width: 190px;
height: 40px; height: 30px;
display: grid; display: grid;
padding: 3px 3px; padding: 3px 3px;
grid-template-columns: repeat(30, 4px); grid-template-columns: repeat(30, 4px);
@ -111,7 +116,7 @@ export class UptimelinkWebwidget extends DeesElement {
.viewStatuspage { .viewStatuspage {
position: absolute; position: absolute;
width: 190px; width: 190px;
top: 90px; top: 80px;
left: calc(50% - 95px); left: calc(50% - 95px);
text-align: center; text-align: center;
background: ${this.goBright ? 'rgba(0,0,0,0.07)' : 'rgba(255,255,255,0.07)'}; background: ${this.goBright ? 'rgba(0,0,0,0.07)' : 'rgba(255,255,255,0.07)'};
@ -152,6 +157,7 @@ export class UptimelinkWebwidget extends DeesElement {
await this.updateComplete; await this.updateComplete;
const mainbox: HTMLDivElement = this.shadowRoot.querySelector('.mainbox'); const mainbox: HTMLDivElement = this.shadowRoot.querySelector('.mainbox');
mainbox.onmouseenter = async () => { mainbox.onmouseenter = async () => {
this.isElevated = true;
this.isFocused = true; this.isFocused = true;
await domtools.DomTools.getGlobalDomToolsSync().convenience.smartdelay.delayFor(200); await domtools.DomTools.getGlobalDomToolsSync().convenience.smartdelay.delayFor(200);
if (!this.isFocused) { if (!this.isFocused) {
@ -159,11 +165,16 @@ export class UptimelinkWebwidget extends DeesElement {
} }
this.showExpanded = true; this.showExpanded = true;
await this.performUpdate(); await this.performUpdate();
await domtools.DomTools.getGlobalDomToolsSync().convenience.smartdelay.delayFor(50); await (await this.domtoolsPromise).convenience.smartdelay.delayFor(50);
const expandedDiv = this.shadowRoot.querySelector('.expanded') as HTMLElement; const expandedDiv = this.shadowRoot.querySelector('.expanded') as HTMLElement;
expandedDiv.style.opacity = '1'; expandedDiv.style.opacity = '1';
}; };
mainbox.onmouseleave = async () => { mainbox.onmouseleave = async () => {
(await this.domtoolsPromise).convenience.smartdelay.delayFor(200).then(() => {
if (!this.isFocused) {
this.isElevated = false;
}
});
if (!this.showExpanded) { if (!this.showExpanded) {
this.isFocused = false; this.isFocused = false;
return; return;