Finished up with channel rank/perms frontend.
This commit is contained in:
parent
edb4215929
commit
796bb033a7
22 changed files with 472 additions and 57 deletions
32
src/views/partial/channelSettings/permList.ejs
Normal file
32
src/views/partial/channelSettings/permList.ejs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<!--Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024 Rainbownapkin and the TTN Community
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.-->
|
||||
<div class="admin-list-div">
|
||||
<h3> Permissions:</h3>
|
||||
<form action="javascript:" class="admin-list-field">
|
||||
<% Object.keys(channel.permissions.toObject()).forEach((key)=>{ %>
|
||||
<% if(key != "channelOverrides"){ %>
|
||||
<span class="admin-list-field-container">
|
||||
<label id="admin-perm-list-label-<%- key %>" class="admin-list-label admin-perm-list" for="admin-perm-list-rank-select-<%- key %>"><%- key %>: </label>
|
||||
<select id="admin-perm-list-rank-select-<%- key %>" name="admin-perm-list-rank-select-<%- key %>" class="channel-perm-select admin-list-select admin-perm-list-rank-select">
|
||||
<%rankEnum.slice().reverse().forEach((rank)=>{ %>
|
||||
<option <%if(channel.permissions.toObject()[key] == rank){%> selected <%}%> value="<%- rank %>"><%- rank %></option>
|
||||
<% }); %>
|
||||
</select>
|
||||
</span>
|
||||
<% } %>
|
||||
<% }); %>
|
||||
</form>
|
||||
</div>
|
||||
26
src/views/partial/channelSettings/settings.ejs
Normal file
26
src/views/partial/channelSettings/settings.ejs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<!--Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024 Rainbownapkin and the TTN Community
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.-->
|
||||
<div class="admin-list-div">
|
||||
<h3>Channel Preferences:</h3>
|
||||
<form action="javascript:" class="admin-list-field">
|
||||
<% Object.keys(channel.settings).forEach((key) => { %>
|
||||
<span class="admin-list-field-container">
|
||||
<label class="admin-list-label"><%- key %>:</label>
|
||||
<input id=<%- `channel-preference-${key}` %> class="channel-preference-list-item" type="checkbox" <% if(channel.settings[key]){ %> checked <% } %>>
|
||||
</span>
|
||||
<% }); %>
|
||||
</form>
|
||||
</div>
|
||||
36
src/views/partial/channelSettings/userList.ejs
Normal file
36
src/views/partial/channelSettings/userList.ejs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!--Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024 Rainbownapkin and the TTN Community
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.-->
|
||||
<div class="admin-list-div">
|
||||
<h3 id="channel-rank-title">Channel Ranks:</h3>
|
||||
<sup id="channel-rank-sup">Users set to default channel rank 'user' will NOT be listed below.</sup>
|
||||
<span id="new-rank-span">
|
||||
<input placeholder="Add Username..." id="new-rank-input">
|
||||
<select id="new-rank-select">
|
||||
<%rankEnum.slice().reverse().forEach((rank)=>{ %>
|
||||
<option value="<%= rank %>"><%= rank %></option>
|
||||
<% }); %>
|
||||
</select>
|
||||
</span>
|
||||
<table class="admin-list-table">
|
||||
<tr class="admin-list-entry-title-row">
|
||||
<td class="admin-list-entry-item admin-list-entry admin-list-entry-img-title"><h3>Img</h3></td>
|
||||
<td id="admin-user-list-entry-id-title" class="admin-list-entry-item admin-list-entry admin-list-entry-not-first-col"><h3>ID</h3></td>
|
||||
<td class="admin-list-entry-item admin-list-entry admin-list-entry-not-first-col"><h3>Name</h3></td>
|
||||
<td id="channel-user-list-entry-rank-title" class="admin-list-entry-item admin-list-entry admin-list-entry-not-first-col"><h3>Rank</h3></td>
|
||||
</tr>
|
||||
<!-- This is getting filled via AJAX since we need to refresh it when new users are added anywho. -->
|
||||
</table>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue