mirror of
https://gitlab.com/vyla-entertainment/home.git
synced 2026-11-12 13:17:21 -05:00
745 lines
18 KiB
HTML
745 lines
18 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Vyla Home</title>
|
|
<style>
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html,
|
|
body {
|
|
margin: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: #000;
|
|
color: #fff;
|
|
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
|
|
overflow: hidden;
|
|
}
|
|
|
|
body {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 32px;
|
|
}
|
|
|
|
.view-state {
|
|
display: none;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 100%;
|
|
animation: fadeIn 0.4s ease forwards;
|
|
}
|
|
|
|
.view-state.active {
|
|
display: flex;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: scale(0.98);
|
|
}
|
|
|
|
to {
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
.container {
|
|
max-width: 480px;
|
|
text-align: center;
|
|
}
|
|
|
|
.icon {
|
|
width: 38px;
|
|
height: 38px;
|
|
margin: 0 auto 22px;
|
|
}
|
|
|
|
.icon-error {
|
|
color: #ff453a;
|
|
}
|
|
|
|
.icon-loader {
|
|
color: #ffffff;
|
|
width: 45px;
|
|
height: 45px;
|
|
}
|
|
|
|
h1 {
|
|
margin: 0;
|
|
font-size: 22px;
|
|
font-weight: 600;
|
|
letter-spacing: -.02em;
|
|
}
|
|
|
|
p {
|
|
margin: 14px 0 28px;
|
|
color: rgba(255, 255, 255, .55);
|
|
font-size: 14px;
|
|
line-height: 1.6;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.buttons {
|
|
display: flex;
|
|
gap: 10px;
|
|
justify-content: center;
|
|
}
|
|
|
|
button {
|
|
appearance: none;
|
|
border: 0;
|
|
border-radius: 8px;
|
|
padding: 11px 20px;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
font-family: inherit;
|
|
cursor: pointer;
|
|
transition: opacity .15s ease, transform .15s ease;
|
|
min-width: 120px;
|
|
}
|
|
|
|
button:hover:not(:disabled) {
|
|
opacity: .85;
|
|
}
|
|
|
|
button:active:not(:disabled) {
|
|
transform: scale(.97);
|
|
}
|
|
|
|
button:disabled {
|
|
cursor: default;
|
|
opacity: .35;
|
|
}
|
|
|
|
.primary {
|
|
background: #fff;
|
|
color: #000;
|
|
}
|
|
|
|
.secondary {
|
|
background: rgba(255, 255, 255, .1);
|
|
color: #fff;
|
|
}
|
|
|
|
.progress-wrap {
|
|
width: 100%;
|
|
max-width: 240px;
|
|
height: 4px;
|
|
background: rgba(255, 255, 255, 0.15);
|
|
border-radius: 999px;
|
|
margin: 0 auto 28px;
|
|
overflow: hidden;
|
|
display: none;
|
|
}
|
|
|
|
.progress-fill {
|
|
width: 0%;
|
|
height: 100%;
|
|
background: #0a84ff;
|
|
transition: width 0.2s ease;
|
|
}
|
|
|
|
.box5631 {
|
|
transform-origin: 50% 50%;
|
|
fill: currentColor;
|
|
}
|
|
|
|
@keyframes moveBox5631-1 {
|
|
9.09% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
18.18% {
|
|
transform: translate(0px, 0);
|
|
}
|
|
|
|
27.27% {
|
|
transform: translate(0px, 0);
|
|
}
|
|
|
|
36.36% {
|
|
transform: translate(12px, 0);
|
|
}
|
|
|
|
45.45% {
|
|
transform: translate(12px, 12px);
|
|
}
|
|
|
|
54.54% {
|
|
transform: translate(12px, 12px);
|
|
}
|
|
|
|
63.63% {
|
|
transform: translate(12px, 12px);
|
|
}
|
|
|
|
72.73% {
|
|
transform: translate(12px, 0px);
|
|
}
|
|
|
|
81.81% {
|
|
transform: translate(0px, 0px);
|
|
}
|
|
|
|
90.90% {
|
|
transform: translate(-12px, 0px);
|
|
}
|
|
|
|
100% {
|
|
transform: translate(0px, 0px);
|
|
}
|
|
}
|
|
|
|
.box5631:nth-child(1) {
|
|
animation: moveBox5631-1 4s infinite;
|
|
}
|
|
|
|
@keyframes moveBox5631-2 {
|
|
9.09% {
|
|
transform: translate(0, 0);
|
|
}
|
|
|
|
18.18% {
|
|
transform: translate(12px, 0);
|
|
}
|
|
|
|
27.27% {
|
|
transform: translate(0px, 0);
|
|
}
|
|
|
|
36.36% {
|
|
transform: translate(12px, 0);
|
|
}
|
|
|
|
45.45% {
|
|
transform: translate(12px, 12px);
|
|
}
|
|
|
|
54.54% {
|
|
transform: translate(12px, 12px);
|
|
}
|
|
|
|
63.63% {
|
|
transform: translate(12px, 12px);
|
|
}
|
|
|
|
72.73% {
|
|
transform: translate(12px, 12px);
|
|
}
|
|
|
|
81.81% {
|
|
transform: translate(0px, 12px);
|
|
}
|
|
|
|
90.90% {
|
|
transform: translate(0px, 12px);
|
|
}
|
|
|
|
100% {
|
|
transform: translate(0px, 0px);
|
|
}
|
|
}
|
|
|
|
.box5631:nth-child(2) {
|
|
animation: moveBox5631-2 4s infinite;
|
|
}
|
|
|
|
@keyframes moveBox5631-3 {
|
|
9.09% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
18.18% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
27.27% {
|
|
transform: translate(0px, 0);
|
|
}
|
|
|
|
36.36% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
45.45% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
54.54% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
63.63% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
72.73% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
81.81% {
|
|
transform: translate(-12px, -12px);
|
|
}
|
|
|
|
90.90% {
|
|
transform: translate(0px, -12px);
|
|
}
|
|
|
|
100% {
|
|
transform: translate(0px, 0px);
|
|
}
|
|
}
|
|
|
|
.box5631:nth-child(3) {
|
|
animation: moveBox5631-3 4s infinite;
|
|
}
|
|
|
|
@keyframes moveBox5631-4 {
|
|
9.09% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
18.18% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
27.27% {
|
|
transform: translate(-12px, -12px);
|
|
}
|
|
|
|
36.36% {
|
|
transform: translate(0px, -12px);
|
|
}
|
|
|
|
45.45% {
|
|
transform: translate(0px, 0px);
|
|
}
|
|
|
|
54.54% {
|
|
transform: translate(0px, -12px);
|
|
}
|
|
|
|
63.63% {
|
|
transform: translate(0px, -12px);
|
|
}
|
|
|
|
72.73% {
|
|
transform: translate(0px, -12px);
|
|
}
|
|
|
|
81.81% {
|
|
transform: translate(-12px, -12px);
|
|
}
|
|
|
|
90.90% {
|
|
transform: translate(-12px, 0px);
|
|
}
|
|
|
|
100% {
|
|
transform: translate(0px, 0px);
|
|
}
|
|
}
|
|
|
|
.box5631:nth-child(4) {
|
|
animation: moveBox5631-4 4s infinite;
|
|
}
|
|
|
|
@keyframes moveBox5631-5 {
|
|
9.09% {
|
|
transform: translate(0, 0);
|
|
}
|
|
|
|
18.18% {
|
|
transform: translate(0, 0);
|
|
}
|
|
|
|
27.27% {
|
|
transform: translate(0, 0);
|
|
}
|
|
|
|
36.36% {
|
|
transform: translate(12px, 0);
|
|
}
|
|
|
|
45.45% {
|
|
transform: translate(12px, 0);
|
|
}
|
|
|
|
54.54% {
|
|
transform: translate(12px, 0);
|
|
}
|
|
|
|
63.63% {
|
|
transform: translate(12px, 0);
|
|
}
|
|
|
|
72.73% {
|
|
transform: translate(12px, 0);
|
|
}
|
|
|
|
81.81% {
|
|
transform: translate(12px, -12px);
|
|
}
|
|
|
|
90.90% {
|
|
transform: translate(0px, -12px);
|
|
}
|
|
|
|
100% {
|
|
transform: translate(0px, 0px);
|
|
}
|
|
}
|
|
|
|
.box5631:nth-child(5) {
|
|
animation: moveBox5631-5 4s infinite;
|
|
}
|
|
|
|
@keyframes moveBox5631-6 {
|
|
9.09% {
|
|
transform: translate(0, 0);
|
|
}
|
|
|
|
18.18% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
27.27% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
36.36% {
|
|
transform: translate(0px, 0);
|
|
}
|
|
|
|
45.45% {
|
|
transform: translate(0px, 0);
|
|
}
|
|
|
|
54.54% {
|
|
transform: translate(0px, 0);
|
|
}
|
|
|
|
63.63% {
|
|
transform: translate(0px, 0);
|
|
}
|
|
|
|
72.73% {
|
|
transform: translate(0px, 12px);
|
|
}
|
|
|
|
81.81% {
|
|
transform: translate(-12px, 12px);
|
|
}
|
|
|
|
90.90% {
|
|
transform: translate(-12px, 0px);
|
|
}
|
|
|
|
100% {
|
|
transform: translate(0px, 0px);
|
|
}
|
|
}
|
|
|
|
.box5631:nth-child(6) {
|
|
animation: moveBox5631-6 4s infinite;
|
|
}
|
|
|
|
@keyframes moveBox5631-7 {
|
|
9.09% {
|
|
transform: translate(12px, 0);
|
|
}
|
|
|
|
18.18% {
|
|
transform: translate(12px, 0);
|
|
}
|
|
|
|
27.27% {
|
|
transform: translate(12px, 0);
|
|
}
|
|
|
|
36.36% {
|
|
transform: translate(0px, 0);
|
|
}
|
|
|
|
45.45% {
|
|
transform: translate(0px, -12px);
|
|
}
|
|
|
|
54.54% {
|
|
transform: translate(12px, -12px);
|
|
}
|
|
|
|
63.63% {
|
|
transform: translate(0px, -12px);
|
|
}
|
|
|
|
72.73% {
|
|
transform: translate(0px, -12px);
|
|
}
|
|
|
|
81.81% {
|
|
transform: translate(0px, 0px);
|
|
}
|
|
|
|
90.90% {
|
|
transform: translate(12px, 0px);
|
|
}
|
|
|
|
100% {
|
|
transform: translate(0px, 0px);
|
|
}
|
|
}
|
|
|
|
.box5631:nth-child(7) {
|
|
animation: moveBox5631-7 4s infinite;
|
|
}
|
|
|
|
@keyframes moveBox5631-8 {
|
|
9.09% {
|
|
transform: translate(0, 0);
|
|
}
|
|
|
|
18.18% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
27.27% {
|
|
transform: translate(-12px, -12px);
|
|
}
|
|
|
|
36.36% {
|
|
transform: translate(0px, -12px);
|
|
}
|
|
|
|
45.45% {
|
|
transform: translate(0px, -12px);
|
|
}
|
|
|
|
54.54% {
|
|
transform: translate(0px, -12px);
|
|
}
|
|
|
|
63.63% {
|
|
transform: translate(0px, -12px);
|
|
}
|
|
|
|
72.73% {
|
|
transform: translate(0px, -12px);
|
|
}
|
|
|
|
81.81% {
|
|
transform: translate(12px, -12px);
|
|
}
|
|
|
|
90.90% {
|
|
transform: translate(12px, 0px);
|
|
}
|
|
|
|
100% {
|
|
transform: translate(0px, 0px);
|
|
}
|
|
}
|
|
|
|
.box5631:nth-child(8) {
|
|
animation: moveBox5631-8 4s infinite;
|
|
}
|
|
|
|
@keyframes moveBox5631-9 {
|
|
9.09% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
18.18% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
27.27% {
|
|
transform: translate(0px, 0);
|
|
}
|
|
|
|
36.36% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
45.45% {
|
|
transform: translate(0px, 0);
|
|
}
|
|
|
|
54.54% {
|
|
transform: translate(0px, 0);
|
|
}
|
|
|
|
63.63% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
72.73% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
81.81% {
|
|
transform: translate(-24px, 0);
|
|
}
|
|
|
|
90.90% {
|
|
transform: translate(-12px, 0);
|
|
}
|
|
|
|
100% {
|
|
transform: translate(0px, 0);
|
|
}
|
|
}
|
|
|
|
.box5631:nth-child(9) {
|
|
animation: moveBox5631-9 4s infinite;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="view-loader" class="view-state active">
|
|
<div class="container">
|
|
<svg class="icon icon-loader" viewBox="-13 -13 45 45" xmlns="http://www.w3.org/2000/svg">
|
|
<g>
|
|
<circle class="box5631" cx="13" cy="1" r="5" />
|
|
<circle class="box5631" cx="13" cy="1" r="5" />
|
|
<circle class="box5631" cx="25" cy="25" r="5" />
|
|
<circle class="box5631" cx="13" cy="13" r="5" />
|
|
<circle class="box5631" cx="13" cy="13" r="5" />
|
|
<circle class="box5631" cx="25" cy="13" r="5" />
|
|
<circle class="box5631" cx="1" cy="25" r="5" />
|
|
<circle class="box5631" cx="13" cy="25" r="5" />
|
|
<circle class="box5631" cx="25" cy="25" r="5" />
|
|
</g>
|
|
</svg>
|
|
|
|
<h1>Starting Vyla Home</h1>
|
|
<p id="status-msg">Initializing services...</p>
|
|
|
|
<div id="progress-wrap" class="progress-wrap">
|
|
<div id="progress-fill" class="progress-fill"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="view-update" class="view-state">
|
|
<div class="container">
|
|
<svg class="icon icon-loader" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
style="color:#0a84ff; animation:none; transform:none;">
|
|
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3" />
|
|
</svg>
|
|
<h1>Update Available</h1>
|
|
<p id="update-msg">A new version is available.</p>
|
|
<div class="buttons">
|
|
<button class="secondary" onclick="skipUpdate()">Skip</button>
|
|
<button class="primary" onclick="installUpdate()">Install Update</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="view-error" class="view-state">
|
|
<div class="container">
|
|
<svg class="icon icon-error" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="12" cy="12" r="10" />
|
|
<line x1="12" y1="7" x2="12" y2="13" />
|
|
<circle cx="12" cy="17" r="1" />
|
|
</svg>
|
|
|
|
<h1>Couldn't start Vyla Home</h1>
|
|
<p id="error-msg"></p>
|
|
|
|
<div class="buttons">
|
|
<button class="primary" onclick="location.reload()">Try Again</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
const viewLoader = document.getElementById('view-loader');
|
|
const viewError = document.getElementById('view-error');
|
|
const viewUpdate = document.getElementById('view-update');
|
|
|
|
const statusMsg = document.getElementById('status-msg');
|
|
const errorMsg = document.getElementById('error-msg');
|
|
|
|
const progressWrap = document.getElementById('progress-wrap');
|
|
const progressFill = document.getElementById('progress-fill');
|
|
|
|
function showView(viewElement) {
|
|
document.querySelectorAll('.view-state').forEach(el => el.classList.remove('active'));
|
|
viewElement.classList.add('active');
|
|
}
|
|
|
|
if (window.__TAURI__ && window.__TAURI__.event) {
|
|
window.__TAURI__.event.listen('update-available', (e) => {
|
|
if (e.payload) {
|
|
document.getElementById('update-msg').textContent = `Version ${e.payload.latest} is available (Current: ${e.payload.current}).`;
|
|
showView(viewUpdate);
|
|
}
|
|
});
|
|
|
|
window.__TAURI__.event.listen('status', (e) => {
|
|
if (e.payload && e.payload.message) {
|
|
statusMsg.textContent = e.payload.message;
|
|
}
|
|
});
|
|
|
|
window.__TAURI__.event.listen('download-progress', (e) => {
|
|
if (e.payload) {
|
|
statusMsg.textContent = `Downloading update: ${e.payload.percent}%`;
|
|
progressWrap.style.display = 'block';
|
|
progressFill.style.width = `${e.payload.percent}%`;
|
|
}
|
|
});
|
|
|
|
window.__TAURI__.event.listen('error', (e) => {
|
|
if (e.payload && e.payload.message) {
|
|
errorMsg.textContent = e.payload.message;
|
|
showView(viewError);
|
|
}
|
|
});
|
|
|
|
window.__TAURI__.event.listen('ready', (e) => {
|
|
if (e.payload && e.payload.url) {
|
|
window.location.href = e.payload.url;
|
|
}
|
|
});
|
|
}
|
|
|
|
function installUpdate() {
|
|
fetch('http://127.0.0.1:4891/update/yes', { method: 'POST' }).catch(() => { });
|
|
statusMsg.textContent = 'Starting update...';
|
|
showView(viewLoader);
|
|
}
|
|
|
|
function skipUpdate() {
|
|
fetch('http://127.0.0.1:4891/update/no', { method: 'POST' }).catch(() => { });
|
|
statusMsg.textContent = 'Continuing to app...';
|
|
showView(viewLoader);
|
|
}
|
|
|
|
function pollBackend() {
|
|
fetch('http://localhost:4890')
|
|
.then(res => {
|
|
if (res.ok) window.location.href = 'http://localhost:4890';
|
|
else setTimeout(pollBackend, 1000);
|
|
})
|
|
.catch(() => setTimeout(pollBackend, 1000));
|
|
}
|
|
setTimeout(pollBackend, 1500);
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html> |