Allow streamer to set vote point values
This commit is contained in:
parent
fcd8f2b197
commit
60defb7ea6
6 changed files with 133 additions and 38 deletions
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<link rel=stylesheet href=/style.css />
|
||||
<link rel=stylesheet href=/colors.css />
|
||||
<title><%~ it.pageTitle.replace('{username}',it.streamerName) %></title>
|
||||
<title><%~ it.config.title.replace('{username}',it.streamerName) %></title>
|
||||
<script>
|
||||
window.loggedIn = <%= it.loggedIn %>;
|
||||
window.validStates = <%~ it.validStates %>;
|
||||
|
@ -14,7 +14,7 @@
|
|||
<body>
|
||||
<div id="navbar">
|
||||
<div id="nav-streamerpic"><a href="https://twitch.tv/<%= it.streamerName %>"><img src="<%= it.streamerProfilePicture %>" /></a></div>
|
||||
<div id="nav-title"><%~ it.pageTitle.replace('{username}',`<a href="https://twitch.tv/${it.streamerName}">${it.streamerName}</a>`) %></div>
|
||||
<div id="nav-title"><%~ it.config.title.replace('{username}',`<a href="https://twitch.tv/${it.streamerName}">${it.streamerName}</a>`) %></div>
|
||||
<div id="nav-requests"><a href="/">Requests</a></div>
|
||||
<%- if (it.loggedIn) { -%>
|
||||
<div id="nav-addrequest"><a href="#" onclick="openAddRequestModal()">Add Request</a></div>
|
||||
|
@ -120,36 +120,56 @@
|
|||
<h2>Streamer Settings</h2>
|
||||
<div class="error" id="streamerSettingsError"></div>
|
||||
<br>
|
||||
<div>
|
||||
<h3 style='margin-bottom: 0.5em'>Customization</h3>
|
||||
<p>
|
||||
Page Title:
|
||||
<input type="text" id="pageTitle" style="width: 15em" value="<%~ it.pageTitle %>"></input>
|
||||
<button onclick="updatePageTitle(document.getElementById('pageTitle').value)">Submit</button>
|
||||
<button onclick="updatePageTitle('{username}\'s Learn Request Queue')">Reset</button>
|
||||
</p>
|
||||
<p>
|
||||
<h3>Colors:</h3>
|
||||
<p>Click a color to change it</p>
|
||||
<b>Background:</b><br>
|
||||
Primary: <input type="color" id="color-bg-primary" value="<%= it.colors.bg.primary %>"></input><br>
|
||||
Table: <input type="color" id="color-bg-table" value="<%= it.colors.bg.table %>"></input><br>
|
||||
Navbar: <input type="color" id="color-bg-navbar" value="<%= it.colors.bg.navbar %>"></input><br>
|
||||
Error: <input type="color" id="color-bg-error" value="<%= it.colors.bg.error %>"></input><br>
|
||||
<br>
|
||||
<b>Foreground:</b><br>
|
||||
Primary: <input type="color" id="color-fg-primary" value="<%= it.colors.fg.primary %>"></input><br>
|
||||
Link Hover: <input type="color" id="color-fg-ahover" value="<%= it.colors.fg.ahover %>"></input><br>
|
||||
Title: <input type="color" id="color-fg-title" value="<%= it.colors.fg.title %>"></input><br>
|
||||
<br>
|
||||
<button onclick="updateColors(getColorObject())">Submit</button>
|
||||
<button onclick="updateColors({bg:{error: '#ff0000',table: '#282828',navbar: '#666666',primary: '#444444'},fg: { title: '#eeeeee', ahover: '#ffffff', primary: '#dddddd'}})">Reset</button>
|
||||
</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
<h3 style='margin-bottom: 0.5em'>Batch Jobs</h3>
|
||||
<a href="#" onclick="cronRequest('processBans')">Force Refresh Banned Users (NYI)</a>
|
||||
<div id="streamerSettingsMain">
|
||||
<div>
|
||||
<h3 style='margin-bottom: 0.5em'>Vote Point Values</h3>
|
||||
<p>
|
||||
<div id="votepoints">
|
||||
<div style="display: inline-block">User: <input type="number" id="userVotePoints" style="width: 3em" value="<%~ it.config.normaluservotepoints %>"></input></div>
|
||||
<div style="display: inline-block">Follower: <input type="number" id="followerVotePoints" style="width: 3em" value="<%~ it.config.followervotepoints %>"></input></div>
|
||||
<div style="display: inline-block">Subscriber: <input type="number" id="subscriberVotePoints" style="width: 3em" value="<%~ it.config.subscribervotepoints %>"></input></div>
|
||||
</div>
|
||||
<br>
|
||||
<button onclick="updateVotePoints(
|
||||
document.getElementById('userVotePoints').value,
|
||||
document.getElementById('followerVotePoints').value,
|
||||
document.getElementById('subscriberVotePoints').value
|
||||
)">Submit</button>
|
||||
<button onclick="updateVotePoints(10,50,100)">Reset</button>
|
||||
</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
<h3 style='margin-bottom: 0.5em'>Customization</h3>
|
||||
<p>
|
||||
Page Title:
|
||||
<input type="text" id="pageTitle" style="width: 15em" value="<%~ it.config.title %>"></input>
|
||||
<button onclick="updatePageTitle(document.getElementById('pageTitle').value)">Submit</button>
|
||||
<button onclick="updatePageTitle('{username}\'s Learn Request Queue')">Reset</button>
|
||||
</p>
|
||||
<p>
|
||||
<h3>Colors:</h3>
|
||||
<p>Click a color to change it</p>
|
||||
<b>Background:</b><br>
|
||||
Primary: <input type="color" id="color-bg-primary" value="<%= it.config.colors.bg.primary %>"></input><br>
|
||||
Table: <input type="color" id="color-bg-table" value="<%= it.config.colors.bg.table %>"></input><br>
|
||||
Navbar: <input type="color" id="color-bg-navbar" value="<%= it.config.colors.bg.navbar %>"></input><br>
|
||||
Error: <input type="color" id="color-bg-error" value="<%= it.config.colors.bg.error %>"></input><br>
|
||||
<br>
|
||||
<b>Foreground:</b><br>
|
||||
Primary: <input type="color" id="color-fg-primary" value="<%= it.config.colors.fg.primary %>"></input><br>
|
||||
Link Hover: <input type="color" id="color-fg-ahover" value="<%= it.config.colors.fg.ahover %>"></input><br>
|
||||
Title: <input type="color" id="color-fg-title" value="<%= it.config.colors.fg.title %>"></input><br>
|
||||
<br>
|
||||
<button onclick="updateColors(getColorObject())">Submit</button>
|
||||
<button onclick="updateColors({bg:{error: '#ff0000',table: '#282828',navbar: '#666666',primary: '#444444'},fg: { title: '#eeeeee', ahover: '#ffffff', primary: '#dddddd'}})">Reset</button>
|
||||
</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
<h3 style='margin-bottom: 0.5em'>Batch Jobs</h3>
|
||||
<a href="#" onclick="cronRequest('processBans')">Force Refresh Banned Users (NYI)</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue