little fixes

This commit is contained in:
jusax23 2022-06-09 16:49:03 +02:00
parent 350dbf123f
commit 8c0bb9a40c
3 changed files with 8 additions and 9 deletions

View file

@ -20,14 +20,12 @@ _({find:"main"},[
left: "50%",
top: "50%",
transform: "translate(-50%, -50%)",
}},[
l1()
])
}}, l1())
]);
export const call = async (stear, { find, resolve, render, call }, {name,id}) => {
find.text._.innerText = "Connecting to: " + name + " (" + id + ")";
await fadein(find.main._, 200, true);
await fadein(find.main._, 200, true);
//do connection
await wait(1000);
var success = Math.random()>0.25;

View file

@ -1,14 +1,16 @@
import { class_, Stear, _ } from "../main.js";
export class loading1 extends class_{
constructor(){
constructor(color){
super({ class: "box" }, [
_(), _(), _()
_({ style: { backgroundColor: color}}),
_({ style: { backgroundColor: color}}),
_({ style: { backgroundColor: color}}),
]);
}
}
export const l1 = () => new loading1();
export const l1 = (color="black") => new loading1(color);
var animation = Stear.addAnimation({
@ -35,7 +37,6 @@ Stear.addGlobalStyleJSON({
height: "44%",
width: "44%",
borderRadius: "25%",
backgroundColor: "#000",
animation: `${animation} 6s linear infinite`,
}, ".box div");

View file

@ -209,6 +209,6 @@ export class class_ {
return out;
}
}
export const _ = (settings = {}, childs = []) => new class_(settings,childs);
export const _ = (settings = {}, childs = []) => new class_(settings, Array.isArray(childs) ? childs : [childs]);