2020-04-30 18:28:21 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<link rel="stylesheet" type="text/css" href="css/main.css">
|
2020-08-13 17:59:36 +02:00
|
|
|
<link rel="stylesheet" type="text/css" href="css/themes/element/theme.css">
|
2020-04-30 18:28:21 +02:00
|
|
|
</head>
|
2020-09-11 11:28:59 +02:00
|
|
|
<body class="not-ie11">
|
2020-04-30 18:28:21 +02:00
|
|
|
<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-06 23:31:22 +02:00
|
|
|
<h2 name="session-status">Session Status Bar</h2>
|
2020-08-12 11:42:42 +02:00
|
|
|
<div id="session-status" class="hydrogen"></div>
|
2020-05-05 23:18:44 +02:00
|
|
|
<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-06 23:31:22 +02:00
|
|
|
document.getElementById("session-status").appendChild(view.mount());
|
2020-05-05 23:18:44 +02:00
|
|
|
</script>
|
2020-04-30 18:28:21 +02:00
|
|
|
<h2 name="login">Login</h2>
|
2020-08-12 11:42:42 +02:00
|
|
|
<div id="login" class="hydrogen"></div>
|
2020-04-30 18:28:21 +02:00
|
|
|
<script id="main" type="module">
|
|
|
|
import {LoginView} from "./login/LoginView.js";
|
|
|
|
const view = new LoginView(vm({
|
2021-08-23 19:26:39 +02:00
|
|
|
defaultHomeserver: "https://hs.tld",
|
2020-04-30 18:28:21 +02:00
|
|
|
login: () => alert("Logging in!"),
|
2020-10-09 17:04:25 +02:00
|
|
|
cancelUrl: "#/session"
|
2020-04-30 18:28:21 +02:00
|
|
|
}));
|
|
|
|
document.getElementById("login").appendChild(view.mount());
|
|
|
|
</script>
|
|
|
|
<h2 name="login-loading">Login Loading</h2>
|
2020-08-12 11:42:42 +02:00
|
|
|
<div id="login-loading" class="hydrogen"></div>
|
2020-04-30 18:28:21 +02:00
|
|
|
<script id="main" type="module">
|
|
|
|
import {LoginView} from "./login/LoginView.js";
|
|
|
|
const view = new LoginView(vm({
|
2020-08-12 11:52:18 +02:00
|
|
|
isBusy: true,
|
2020-04-30 18:28:21 +02:00
|
|
|
loadViewModel: vm({
|
|
|
|
loadLabel: "Doing something important...",
|
|
|
|
loading: true,
|
|
|
|
}),
|
2020-10-09 17:04:25 +02:00
|
|
|
cancelUrl: "#/session",
|
2021-08-23 19:26:39 +02:00
|
|
|
defaultHomeserver: "https://hs.tld",
|
2020-04-30 18:28:21 +02:00
|
|
|
}));
|
|
|
|
document.getElementById("login-loading").appendChild(view.mount());
|
|
|
|
</script>
|
2020-10-09 09:56:13 +02:00
|
|
|
<h2 name="session-loading">Session Loading</h2>
|
|
|
|
<div id="session-loading" class="hydrogen"></div>
|
|
|
|
<script id="main" type="module">
|
|
|
|
import {SessionLoadView} from "./login/SessionLoadView.js";
|
|
|
|
const view = new SessionLoadView(vm({
|
|
|
|
loading: true,
|
|
|
|
loadLabel: "Getting on with loading your session..."
|
|
|
|
}));
|
|
|
|
document.getElementById("session-loading").appendChild(view.mount());
|
|
|
|
</script>
|
2021-04-27 15:02:43 +02:00
|
|
|
<h2 name="invite-dm-view">Invite DM view</h2>
|
|
|
|
<div id="invite-dm-view" style="height: 600px" class="hydrogen"></div>
|
|
|
|
<script id="main" type="module">
|
|
|
|
import {InviteView} from "./session/room/InviteView.js";
|
|
|
|
const view = new InviteView(vm({
|
|
|
|
busy: false,
|
|
|
|
name: "Alice",
|
|
|
|
avatarTitle: "Alice",
|
|
|
|
avatarColorNumber: 5,
|
|
|
|
avatarLetter: "A",
|
|
|
|
error: "",
|
|
|
|
inviter: {
|
|
|
|
id: "@alice:hs.tld",
|
|
|
|
displayName: "Alice",
|
|
|
|
name: "Alice",
|
|
|
|
avatarTitle: "Alice",
|
|
|
|
avatarColorNumber: 5,
|
|
|
|
avatarLetter: "A",
|
|
|
|
},
|
|
|
|
isDirectMessage: true,
|
|
|
|
showDMProfile: true,
|
|
|
|
}));
|
|
|
|
document.getElementById("invite-dm-view").appendChild(view.mount());
|
|
|
|
</script>
|
|
|
|
<h2 name="invite-room-view">Invite Room view</h2>
|
|
|
|
<div id="invite-room-view" style="height: 600px" class="hydrogen"></div>
|
|
|
|
<script id="main" type="module">
|
|
|
|
import {InviteView} from "./session/room/InviteView.js";
|
|
|
|
const view = new InviteView(vm({
|
|
|
|
busy: false,
|
|
|
|
name: "Some Room",
|
|
|
|
avatarTitle: "Some Room",
|
|
|
|
avatarColorNumber: 2,
|
|
|
|
avatarLetter: "S",
|
|
|
|
error: "",
|
|
|
|
inviter: {
|
|
|
|
id: "@alice:hs.tld",
|
|
|
|
displayName: "Alice",
|
|
|
|
name: "Alice",
|
|
|
|
avatarTitle: "Alice",
|
|
|
|
avatarColorNumber: 5,
|
|
|
|
avatarLetter: "A",
|
|
|
|
},
|
|
|
|
roomDescription: "#some-room:hs.tld - public room",
|
|
|
|
isDirectMessage: false,
|
|
|
|
showDMProfile: false,
|
|
|
|
}));
|
|
|
|
document.getElementById("invite-room-view").appendChild(view.mount());
|
|
|
|
</script>
|
2020-04-30 18:28:21 +02:00
|
|
|
</body>
|
|
|
|
</html>
|