2024-09-29 13:56:38 +02:00
|
|
|
import * as plugins from '../plugins.js';
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
customElement,
|
|
|
|
|
DeesElement,
|
|
|
|
|
property,
|
|
|
|
|
html,
|
|
|
|
|
type TemplateResult,
|
|
|
|
|
css,
|
|
|
|
|
cssManager,
|
|
|
|
|
query,
|
|
|
|
|
} from '@design.estate/dees-element';
|
|
|
|
|
|
|
|
|
|
import { commitinfo } from '../../dist_ts/00_commitinfo_data.js';
|
2024-10-06 23:56:03 +02:00
|
|
|
import { IdpState } from '../states/idp.state.js';
|
2024-09-29 13:56:38 +02:00
|
|
|
|
|
|
|
|
declare global {
|
|
|
|
|
interface HTMLElementTagNameMap {
|
2024-10-04 15:43:36 +02:00
|
|
|
'idp-centercontainer': IdpCenterContainer;
|
2024-09-29 13:56:38 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-04 15:43:36 +02:00
|
|
|
@customElement('idp-centercontainer')
|
|
|
|
|
export class IdpCenterContainer extends DeesElement {
|
|
|
|
|
public static demo = () => html`<idp-centercontainer></idp-centercontainer>`;
|
2024-09-29 13:56:38 +02:00
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
|
super();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static styles = [
|
|
|
|
|
cssManager.defaultStyles,
|
|
|
|
|
css`
|
|
|
|
|
:host {
|
2024-09-29 16:48:06 +02:00
|
|
|
font-family: 'Geist Sans';
|
2024-09-29 13:56:38 +02:00
|
|
|
position: absolute;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mainContainer {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0px;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
opacity: 0;
|
2024-10-04 15:43:36 +02:00
|
|
|
transition: all 0.1s;
|
|
|
|
|
transition-delay: 0.05s;
|
|
|
|
|
transform: translate3d(0px, 8px, 0px);
|
2024-09-29 13:56:38 +02:00
|
|
|
pointer-events: none;
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-04 02:18:47 +02:00
|
|
|
.mainContainer.show {
|
2024-09-29 13:56:38 +02:00
|
|
|
opacity: 1;
|
|
|
|
|
pointer-events: all;
|
|
|
|
|
transform: translate3d(0px, 0px, 0px);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.loginblock {
|
2024-10-01 20:03:49 +02:00
|
|
|
max-width: 500px;
|
2024-09-29 13:56:38 +02:00
|
|
|
flex-grow: 1;
|
|
|
|
|
transform: translate3d(0px, 0px, 0px);
|
|
|
|
|
transition: all 0.2s;
|
|
|
|
|
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
|
2024-10-01 20:03:49 +02:00
|
|
|
background: ${cssManager.bdTheme('#ffffff', '#111111')};
|
|
|
|
|
border-top: 1px solid ${cssManager.bdTheme('#ffffff', '#222222')};
|
2024-09-29 13:56:38 +02:00
|
|
|
border-radius: 16px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-01 20:03:49 +02:00
|
|
|
h1 {
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
font-family: 'Cal Sans';
|
|
|
|
|
text-align: center;
|
|
|
|
|
letter-spacing:0.0125em;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.contentSpacer {
|
|
|
|
|
padding: 0px 0px 16px 0px;
|
2024-09-29 13:56:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.legalinfo {
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin: auto;
|
|
|
|
|
color: ${cssManager.bdTheme('#666', '#ccc')};
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
line-height: 100%;
|
|
|
|
|
padding: 8px;
|
|
|
|
|
background: ${cssManager.bdTheme('#f5f5f5', '#111')};
|
|
|
|
|
border-top: 1px solid ${cssManager.bdTheme('#ccc', '#222222')};
|
|
|
|
|
color: ${cssManager.bdTheme('#666', '#888')};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.legalinfo a {
|
|
|
|
|
color: ${cssManager.bdTheme('#666', '#ccc')};
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
}
|
|
|
|
|
`,
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
return html`
|
2024-10-04 02:18:47 +02:00
|
|
|
<div class="mainContainer">
|
2024-09-29 13:56:38 +02:00
|
|
|
<div class="loginblock">
|
2024-10-01 20:03:49 +02:00
|
|
|
<h1>idp.global</h1>
|
|
|
|
|
<div class="contentSpacer">
|
2024-10-04 15:43:36 +02:00
|
|
|
<slot></slot>
|
2024-10-01 20:03:49 +02:00
|
|
|
</div>
|
2024-09-29 13:56:38 +02:00
|
|
|
<div class="legalinfo">
|
|
|
|
|
<a href="https://legal.task.vc/" target="_blank">Legal Info</a>
|
|
|
|
|
| <a href="https://task.vc/" target="_blank">Company Website</a>
|
|
|
|
|
| <a href="https://support.task.vc/" target="_blank">Support</a>
|
2024-10-04 15:43:36 +02:00
|
|
|
| idp.global v${commitinfo.version}
|
2024-09-29 13:56:38 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
`;
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-04 15:43:36 +02:00
|
|
|
public async show() {
|
|
|
|
|
await this.updateComplete;
|
|
|
|
|
const domtoolsInstance = await this.domtoolsPromise;
|
|
|
|
|
const done = plugins.smartpromise.defer();
|
2024-10-04 02:18:47 +02:00
|
|
|
requestAnimationFrame(async () => {
|
|
|
|
|
this.shadowRoot.querySelector('.mainContainer').classList.add('show');
|
2024-10-04 15:43:36 +02:00
|
|
|
await domtoolsInstance.convenience.smartdelay.delayFor(200);
|
|
|
|
|
done.resolve();
|
|
|
|
|
});
|
|
|
|
|
return done.promise;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async hide() {
|
|
|
|
|
await this.updateComplete;
|
|
|
|
|
const domtoolsInstance = await this.domtoolsPromise;
|
|
|
|
|
const done = plugins.smartpromise.defer();
|
|
|
|
|
requestAnimationFrame(async () => {
|
|
|
|
|
this.shadowRoot.querySelector('.mainContainer').classList.remove('show');
|
|
|
|
|
await domtoolsInstance.convenience.smartdelay.delayFor(200);
|
|
|
|
|
done.resolve();
|
2024-09-29 13:56:38 +02:00
|
|
|
});
|
2024-10-04 15:43:36 +02:00
|
|
|
return done.promise;
|
2024-09-29 13:56:38 +02:00
|
|
|
}
|
|
|
|
|
}
|