2020-04-30 21:58:21 +05:30
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<link rel="stylesheet" type="text/css" href="css/main.css">
|
2020-08-13 21:29:36 +05:30
|
|
|
<link rel="stylesheet" type="text/css" href="css/themes/element/theme.css">
|
2020-04-30 21:58:21 +05:30
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function vm(o) {
|
|
|
|
// fake EventEmitter
|
|
|
|
o.on = () => {};
|
|
|
|
o.off = () => {};
|
|
|
|
o.i18n = (parts, ...expr) => {
|
|
|
|
let result = "";
|
|
|
|
for (let i = 0; i < parts.length; ++i) {
|
|
|
|
result = result + parts[i];
|
|
|
|
if (i < expr.length) {
|
|
|
|
result = result + expr[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
};
|
|
|
|
return o;
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<h1>View Gallery</h1>
|
2020-05-07 03:01:22 +05:30
|
|
|
<h2 name="session-status">Session Status Bar</h2>
|
2020-08-12 15:12:42 +05:30
|
|
|
<div id="session-status" class="hydrogen"></div>
|
2020-05-06 02:48:44 +05:30
|
|
|
<script id="main" type="module">
|
|
|
|
import {SessionStatusView} from "./session/SessionStatusView.js";
|
|
|
|
const view = new SessionStatusView(vm({
|
|
|
|
isShown: true,
|
|
|
|
statusLabel: "Doing something something",
|
|
|
|
isWaiting: true,
|
|
|
|
isConnectNowShown: true,
|
|
|
|
connectNow: () => alert("connecting now")
|
|
|
|
}));
|
2020-05-07 03:01:22 +05:30
|
|
|
document.getElementById("session-status").appendChild(view.mount());
|
2020-05-06 02:48:44 +05:30
|
|
|
</script>
|
2020-04-30 21:58:21 +05:30
|
|
|
<h2 name="login">Login</h2>
|
2020-08-12 15:12:42 +05:30
|
|
|
<div id="login" class="hydrogen"></div>
|
2020-04-30 21:58:21 +05:30
|
|
|
<script id="main" type="module">
|
|
|
|
import {LoginView} from "./login/LoginView.js";
|
|
|
|
const view = new LoginView(vm({
|
|
|
|
defaultHomeServer: "https://hs.tld",
|
|
|
|
login: () => alert("Logging in!"),
|
|
|
|
goBack: () => alert("Going back"),
|
|
|
|
}));
|
|
|
|
document.getElementById("login").appendChild(view.mount());
|
|
|
|
</script>
|
|
|
|
<h2 name="login-loading">Login Loading</h2>
|
2020-08-12 15:12:42 +05:30
|
|
|
<div id="login-loading" class="hydrogen"></div>
|
2020-04-30 21:58:21 +05:30
|
|
|
<script id="main" type="module">
|
|
|
|
import {LoginView} from "./login/LoginView.js";
|
|
|
|
const view = new LoginView(vm({
|
2020-08-12 15:22:18 +05:30
|
|
|
isBusy: true,
|
2020-04-30 21:58:21 +05:30
|
|
|
loadViewModel: vm({
|
|
|
|
loadLabel: "Doing something important...",
|
|
|
|
loading: true,
|
|
|
|
}),
|
|
|
|
defaultHomeServer: "https://hs.tld",
|
|
|
|
}));
|
|
|
|
document.getElementById("login-loading").appendChild(view.mount());
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|