fd7f1a95e2
* cfg edit 1 * jsonschema deps * feat: lp mig - first few steps * lp mig: default tasks * code comments * docs * lp-mig-progress * shared * comments and todos * fix: curio: rename lotus-provider to curio (#11645) * rename provider to curio * install gotext * fix lint errors, mod tidy * fix typo * fix API_INFO and add gotext to circleCI * add back gotext * add gotext after remerge * lp: channels doc * finish easy-migration TODOs * out generate * merging and more renames * avoid make-all * minor doc stuff * cu: make gen * make gen fix * make gen * tryfix * go mod tidy * minor ez migration fixes * ez setup - ui cleanups * better error message * guided setup colors * better path to saveconfigtolayer * loadconfigwithupgrades fix * readMiner oops * guided - homedir * err if miner is running * prompt error should exit * process already running, miner_id sectors in migration * dont prompt for language a second time * check miner stopped * unlock repo * render and sql oops * curio easyMig - some fixes * easyMigration runs successfully * lint * part 2 of last * message * merge addtl * fixing guided setup for myself * warn-on-no-post * EditorLoads * cleanups and styles * create info * fix tests * make gen * change layout, add help button * Duration custom json * mjs naming --------- Co-authored-by: LexLuthr <88259624+LexLuthr@users.noreply.github.com> Co-authored-by: LexLuthr <lexluthr@protocol.ai> Co-authored-by: LexLuthr <lexluthr@curiostorage.org>
50 lines
1.3 KiB
JavaScript
50 lines
1.3 KiB
JavaScript
import {LitElement, css, html} from 'https://cdn.jsdelivr.net/gh/lit/dist@3/all/lit-all.min.js';
|
|
|
|
|
|
class CurioUX extends LitElement {
|
|
static styles = css`
|
|
.curio-slot {
|
|
}
|
|
`;
|
|
connectedCallback() {
|
|
super.connectedCallback();
|
|
const links = [
|
|
"https://unpkg.com/@cds/core/global.min.css",
|
|
"https://unpkg.com/@cds/city/css/bundles/default.min.css",
|
|
"https://unpkg.com/@cds/core/styles/theme.dark.min.css",
|
|
"https://unpkg.com/@clr/ui/clr-ui.min.css",
|
|
"https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
|
|
];
|
|
|
|
const head = document.head;
|
|
links.forEach(link => {
|
|
const linkNode = document.createElement('link');
|
|
linkNode.rel = 'stylesheet';
|
|
linkNode.href = link;
|
|
head.appendChild(linkNode);
|
|
});
|
|
|
|
var theme = document.createAttribute('cds-theme');
|
|
theme.value = localStorage.getItem('theme') || 'dark';
|
|
document.body.attributes.setNamedItem(theme);
|
|
|
|
var cdsText = document.createAttribute('cds-text');
|
|
cdsText.value = 'body';
|
|
document.body.attributes.setNamedItem(cdsText);
|
|
|
|
document.body.style.visibility = 'initial';
|
|
}
|
|
|
|
render() {
|
|
return html`
|
|
<!-- wrap the slot -->
|
|
<div >
|
|
<slot class="curio-slot"></slot>
|
|
</div>
|
|
|
|
`;
|
|
}
|
|
|
|
}
|
|
|
|
customElements.define('curio-ux', CurioUX); |