mirror of
https://github.com/imgfloat/server.git
synced 2026-02-05 03:39:26 +00:00
Clean up index page
This commit is contained in:
@@ -23,10 +23,21 @@ public class SchemaMigration implements ApplicationRunner {
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) {
|
||||
cleanupSpringSessionTables();
|
||||
ensureChannelCanvasColumns();
|
||||
ensureAssetMediaColumns();
|
||||
}
|
||||
|
||||
private void cleanupSpringSessionTables() {
|
||||
try {
|
||||
jdbcTemplate.execute("DELETE FROM SPRING_SESSION_ATTRIBUTES");
|
||||
jdbcTemplate.execute("DELETE FROM SPRING_SESSION");
|
||||
logger.info("Cleared persisted Spring Session tables on startup to avoid stale session conflicts");
|
||||
} catch (DataAccessException ex) {
|
||||
logger.debug("Spring Session tables not available for cleanup", ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void ensureChannelCanvasColumns() {
|
||||
List<String> columns;
|
||||
try {
|
||||
|
||||
@@ -348,8 +348,9 @@ body {
|
||||
|
||||
.panel-actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
flex-direction: row;
|
||||
gap: 20px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.preview-grid {
|
||||
@@ -461,6 +462,35 @@ body {
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.dashboard-topbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
padding: 14px 18px;
|
||||
background: rgba(15, 23, 42, 0.85);
|
||||
border: 1px solid #1f2937;
|
||||
border-radius: 14px;
|
||||
box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
.user-pill {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
gap: 4px;
|
||||
padding: 10px 12px;
|
||||
border-radius: 12px;
|
||||
background: rgba(124, 58, 237, 0.1);
|
||||
border: 1px solid rgba(124, 58, 237, 0.2);
|
||||
}
|
||||
|
||||
.user-display {
|
||||
font-weight: 700;
|
||||
color: #e2e8f0;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.dashboard-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
@@ -1278,6 +1308,12 @@ body {
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
#admin-suggestions {
|
||||
max-height: 240px;
|
||||
overflow-y: auto;
|
||||
padding-right: 6px;
|
||||
}
|
||||
|
||||
.stacked-list-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -7,27 +7,24 @@
|
||||
</head>
|
||||
<body class="dashboard-body">
|
||||
<div class="dashboard-shell">
|
||||
<header class="dashboard-hero hero hero-compact">
|
||||
<div class="hero-text">
|
||||
<p class="eyebrow">Dashboard</p>
|
||||
<h1>Hello, <span th:text="${username}">user</span></h1>
|
||||
<p class="lead">Manage overlay assets, keep your canvas sized correctly, and hand off control to trusted mods.</p>
|
||||
<ul class="pill-list minimal">
|
||||
<li>Channel: <strong th:text="${channel}">channel</strong></li>
|
||||
<li>Secure dashboard</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="hero-panel hero-preview">
|
||||
<div class="panel-header">
|
||||
<header class="dashboard-topbar">
|
||||
<div class="brand">
|
||||
<div class="brand-mark">IF</div>
|
||||
<div>
|
||||
<p class="eyebrow subtle">Quick actions</p>
|
||||
<h3>Jump into your overlay</h3>
|
||||
<div class="brand-title">Imgfloat</div>
|
||||
<div class="brand-subtitle">Twitch overlay manager</div>
|
||||
</div>
|
||||
<span class="badge">Live</span>
|
||||
</div>
|
||||
<div class="preview-summary">
|
||||
<p class="muted">Open your broadcast view or delegate control without leaving this page.</p>
|
||||
<div class="user-pill">
|
||||
<span class="eyebrow subtle">Signed in as</span>
|
||||
<span class="user-display" th:text="${username}">user</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section class="card">
|
||||
<p class="eyebrow">Navigation</p>
|
||||
<h3>Shortcuts</h3>
|
||||
<p class="muted">Jump into your overlay</p>
|
||||
<div class="panel-actions">
|
||||
<a class="button block" th:href="@{'/view/' + ${channel} + '/broadcast'}">Open broadcast overlay</a>
|
||||
<a class="button ghost block" th:href="@{'/view/' + ${channel} + '/admin'}">Open admin console</a>
|
||||
@@ -35,19 +32,12 @@
|
||||
<button class="secondary block" type="submit">Logout</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</section>
|
||||
|
||||
<section class="card-grid two-col">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div>
|
||||
<p class="eyebrow">Canvas</p>
|
||||
<h3>Overlay size</h3>
|
||||
<p class="muted">Match your OBS output so overlays land where you expect.</p>
|
||||
</div>
|
||||
<div class="pill">Visible to admins</div>
|
||||
</div>
|
||||
<section class="card">
|
||||
<p class="eyebrow">Settings</p>
|
||||
<h3>Overlay dimensions</h3>
|
||||
<p class="muted">Match these with your OBS resolution.</p>
|
||||
<div class="control-grid">
|
||||
<label>
|
||||
Width
|
||||
@@ -62,8 +52,9 @@
|
||||
<button type="button" onclick="saveCanvasSettings()">Save canvas size</button>
|
||||
<span id="canvas-status" class="muted"></span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="card-grid two-col">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div>
|
||||
@@ -78,14 +69,13 @@
|
||||
</div>
|
||||
<div class="card-section">
|
||||
<div class="section-header">
|
||||
<p class="eyebrow subtle">Current</p>
|
||||
<h4 class="list-title">Admins</h4>
|
||||
<p class="muted">Users who can currently modify your overlay.</p>
|
||||
</div>
|
||||
<ul id="admin-list" class="stacked-list"></ul>
|
||||
</div>
|
||||
<div class="card-section">
|
||||
<div class="section-header">
|
||||
<p class="eyebrow subtle">Suggested</p>
|
||||
<h4 class="list-title">Your Twitch moderators</h4>
|
||||
<p class="muted">Add moderators who already help run your channel.</p>
|
||||
</div>
|
||||
|
||||
@@ -29,14 +29,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="landing-footer compact">
|
||||
<div>
|
||||
<div class="brand-title">Imgfloat</div>
|
||||
<div class="muted">Ready when you go live.</div>
|
||||
</div>
|
||||
<a class="button ghost" href="/oauth2/authorization/twitch">Login</a>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user