mirror of
https://github.com/imgfloat/server.git
synced 2026-02-05 11:49:25 +00:00
182 lines
12 KiB
HTML
182 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Imgfloat Admin</title>
|
|
<link rel="stylesheet" href="/css/styles.css" />
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/sockjs-client@1/dist/sockjs.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/stompjs@2.3.3/lib/stomp.min.js"></script>
|
|
</head>
|
|
<body class="admin-body">
|
|
<div class="admin-layout">
|
|
<div class="admin-shell">
|
|
<header class="admin-header">
|
|
<div class="admin-identity">
|
|
<h1 th:text="${broadcaster}"></h1>
|
|
</div>
|
|
<div class="header-actions horizontal">
|
|
<a class="icon-button" th:href="@{/}" title="Back to dashboard">
|
|
<i class="fa-solid fa-chevron-left" aria-hidden="true"></i>
|
|
<span class="sr-only">Back to dashboard</span>
|
|
</a>
|
|
<a class="button ghost" th:href="${'/view/' + broadcaster + '/broadcast'}" target="_blank" rel="noopener">Broadcaster view</a>
|
|
</div>
|
|
</header>
|
|
<section class="overlay" id="admin-overlay">
|
|
<iframe th:src="${'https://player.twitch.tv/?channel=' + broadcaster + '&parent=localhost'}" allowfullscreen></iframe>
|
|
<canvas id="admin-canvas"></canvas>
|
|
</section>
|
|
<section class="controls-full panel">
|
|
<h3>Overlay assets</h3>
|
|
<p>Upload overlay visuals and adjust them inline.</p>
|
|
<div class="asset-management">
|
|
<div class="asset-column">
|
|
<div class="upload-row">
|
|
<input id="asset-file" class="file-input-field" type="file" accept="image/*,video/*,audio/*" onchange="handleFileSelection(this)" />
|
|
<label for="asset-file" class="file-input-trigger">
|
|
<span class="file-input-icon"><i class="fa-solid fa-cloud-arrow-up"></i></span>
|
|
<span class="file-input-copy">
|
|
<strong>Select an image, GIF, video, or audio</strong>
|
|
<small id="asset-file-name">No file chosen</small>
|
|
</span>
|
|
</label>
|
|
</div>
|
|
<ul id="asset-list" class="asset-list"></ul>
|
|
</div>
|
|
<div class="asset-column inspector">
|
|
<div id="asset-inspector" class="asset-inspector panel-section hidden">
|
|
<div class="selected-asset-banner">
|
|
<div class="selected-asset-main">
|
|
<div class="title-row">
|
|
<strong id="selected-asset-name">Choose an asset</strong>
|
|
</div>
|
|
<p class="meta-text" id="selected-asset-meta">Pick an asset in the list to adjust its placement and playback.</p>
|
|
<p class="meta-text subtle-text hidden" id="selected-asset-id"></p>
|
|
<div class="badge-row asset-meta-badges" id="selected-asset-badges"></div>
|
|
</div>
|
|
</div>
|
|
<div id="asset-controls-placeholder" class="asset-controls-placeholder">
|
|
<div id="asset-controls" class="hidden asset-settings">
|
|
<div class="panel-section" id="layout-section">
|
|
<div class="section-header">
|
|
<h5>Layout & order</h5>
|
|
</div>
|
|
<div class="control-grid condensed three-col">
|
|
<label>
|
|
Width
|
|
<input id="asset-width" class="number-input" type="number" min="10" step="5" />
|
|
</label>
|
|
<label>
|
|
Height
|
|
<input id="asset-height" class="number-input" type="number" min="10" step="5" />
|
|
</label>
|
|
<label>
|
|
Maintain AR
|
|
<label class="checkbox-inline toggle">
|
|
<input id="maintain-aspect" type="checkbox" checked />
|
|
<span class="toggle-track" aria-hidden="true">
|
|
<span class="toggle-thumb"></span>
|
|
</span>
|
|
</label>
|
|
</label>
|
|
</div>
|
|
<div class="control-grid condensed">
|
|
<label>
|
|
Layer
|
|
<div class="badge-row stacked">
|
|
<span class="badge">Layer <strong id="asset-z-level">1</strong></span>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
<div class="control-actions filled compact">
|
|
<button type="button" onclick="sendToBack()" class="secondary" title="Send to back"><i class="fa-solid fa-angles-down"></i></button>
|
|
<button type="button" onclick="bringBackward()" class="secondary" title="Move backward"><i class="fa-solid fa-arrow-down"></i></button>
|
|
<button type="button" onclick="bringForward()" class="secondary" title="Move forward"><i class="fa-solid fa-arrow-up"></i></button>
|
|
<button type="button" onclick="bringToFront()" class="secondary" title="Bring to front"><i class="fa-solid fa-angles-up"></i></button>
|
|
<button type="button" onclick="recenterSelectedAsset()" class="secondary" title="Center on canvas"><i class="fa-solid fa-bullseye"></i></button>
|
|
<button type="button" onclick="nudgeRotation(-5)" class="secondary" title="Rotate left"><i class="fa-solid fa-rotate-left"></i></button>
|
|
<button type="button" onclick="nudgeRotation(5)" class="secondary" title="Rotate right"><i class="fa-solid fa-rotate-right"></i></button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel-section" id="playback-section">
|
|
<div class="section-header">
|
|
<h5>Playback</h5>
|
|
</div>
|
|
<div class="stacked-field">
|
|
<div class="label-row">
|
|
<span>Playback speed</span>
|
|
<span class="value-hint" id="asset-speed-label">100%</span>
|
|
</div>
|
|
<input id="asset-speed" class="range-input" type="range" min="0" max="1000" step="10" value="100" />
|
|
<div class="range-meta"><span>0%</span><span>1000%</span></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel-section" id="volume-section">
|
|
<div class="section-header">
|
|
<h5>Volume</h5>
|
|
</div>
|
|
<div class="stacked-field">
|
|
<div class="label-row">
|
|
<span>Playback volume</span>
|
|
<span class="value-hint" id="asset-volume-label">100%</span>
|
|
</div>
|
|
<input id="asset-volume" class="range-input" type="range" min="0" max="200" step="1" value="100" />
|
|
<div class="range-meta"><span>0%</span><span>200%</span></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="panel-section hidden" id="audio-section">
|
|
<div class="section-header">
|
|
<h5>Audio</h5>
|
|
</div>
|
|
<div class="control-grid condensed two-col">
|
|
|
|
<label class="checkbox-inline toggle inline-toggle">
|
|
<input id="asset-audio-loop" type="checkbox" />
|
|
<span class="toggle-track" aria-hidden="true">
|
|
<span class="toggle-thumb"></span>
|
|
</span>
|
|
<span class="toggle-label">Loop</span>
|
|
</label>
|
|
<label>
|
|
Delay (ms)
|
|
<input id="asset-audio-delay" class="number-input" type="number" min="0" step="100" />
|
|
</label>
|
|
</div>
|
|
<div class="stacked-field">
|
|
<div class="label-row">
|
|
<span>Playback speed</span>
|
|
<span class="value-hint" id="asset-audio-speed-label">1.0x</span>
|
|
</div>
|
|
<input id="asset-audio-speed" class="range-input" type="range" min="25" max="400" step="5" value="100" />
|
|
<div class="range-meta"><span>0.25x</span><span>4x</span></div>
|
|
</div>
|
|
<div class="control-grid condensed two-col">
|
|
<label>
|
|
Pitch (%)
|
|
<input id="asset-audio-pitch" class="range-input" type="range" min="50" max="200" step="5" value="100" />
|
|
</label>
|
|
<div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
<script th:inline="javascript">
|
|
const broadcaster = /*[[${broadcaster}]]*/ '';
|
|
const username = /*[[${username}]]*/ '';
|
|
</script>
|
|
<script src="/js/toast.js"></script>
|
|
<script src="/js/admin.js"></script>
|
|
</body>
|
|
</html>
|