From ff69762a1fef59472dfbbe4c7c85d16c14680182 Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Sun, 8 Dec 2024 05:53:00 -0500 Subject: [PATCH] Finished up cleaning css. --- src/views/partial/adminPanel/channelList.ejs | 20 +++++------ src/views/partial/adminPanel/userBanList.ejs | 16 ++++----- src/views/partial/adminPanel/userList.ejs | 36 +++++++++---------- src/views/partial/channelSettings/banList.ejs | 14 ++++---- .../partial/channelSettings/userList.ejs | 8 ++--- src/views/partial/popup/channelUserBan.ejs | 4 +-- src/views/partial/popup/nukeChannel.ejs | 4 +-- src/views/partial/popup/nukeUser.ejs | 4 +-- src/views/partial/popup/userBan.ejs | 4 +-- www/css/adminPanel.css | 14 +------- www/css/global.css | 11 ++++++ www/css/theme/movie-night.css | 26 +++++++------- www/js/adminPanel.js | 16 +++------ www/js/channelSettings.js | 4 +-- www/js/utils.js | 4 +-- 15 files changed, 87 insertions(+), 98 deletions(-) diff --git a/src/views/partial/adminPanel/channelList.ejs b/src/views/partial/adminPanel/channelList.ejs index 6fb77b0..2ca358e 100644 --- a/src/views/partial/adminPanel/channelList.ejs +++ b/src/views/partial/adminPanel/channelList.ejs @@ -17,29 +17,29 @@ along with this program. If not, see .-->

Channel List:

- - - <% chanGuide.forEach((channel) => { %> - - + - - diff --git a/src/views/partial/adminPanel/userBanList.ejs b/src/views/partial/adminPanel/userBanList.ejs index 93932fc..d9ad5f3 100644 --- a/src/views/partial/adminPanel/userBanList.ejs +++ b/src/views/partial/adminPanel/userBanList.ejs @@ -17,28 +17,28 @@ along with this program. If not, see .-->

User Ban List:

+

Img

+

Name

+

Description

- - +
+ + - + + <%- channel.name %> + <%- channel.description %>
- - - - - - - - diff --git a/src/views/partial/adminPanel/userList.ejs b/src/views/partial/adminPanel/userList.ejs index 764717b..c5a6b4c 100644 --- a/src/views/partial/adminPanel/userList.ejs +++ b/src/views/partial/adminPanel/userList.ejs @@ -17,46 +17,46 @@ along with this program. If not, see .-->

User List:

+

Img

+

ID

+

Name

+

Sign-Up
Date

+

Ban
Date

+

Expires

+

Expiration
Action

+  
- - - - - - - <% userList.forEach((curUser) => { %> - - - - - - - diff --git a/src/views/partial/channelSettings/banList.ejs b/src/views/partial/channelSettings/banList.ejs index d07ac0f..969ce43 100644 --- a/src/views/partial/channelSettings/banList.ejs +++ b/src/views/partial/channelSettings/banList.ejs @@ -21,13 +21,13 @@ along with this program. If not, see .-->
+

Img

+

ID

+

Name

+

Rank

+

E-Mail

+

Sign-Up
Date

+  
- - + + + - + + <%- curUser.id %> - + + <%- curUser.user %> + <% if(rankEnum.indexOf(curUser.rank) < rankEnum.indexOf(user.rank)){%> + <%- curUser.email ? curUser.email : "N/A" %> + <%- curUser.date.toUTCString() %> +
- - - - - - - + + + + + + +

Img

ID

Name

Ban
Alts

Ban Date

Expires

 

Img

ID

Name

Ban
Alts

Ban Date

Expires

 
diff --git a/src/views/partial/channelSettings/userList.ejs b/src/views/partial/channelSettings/userList.ejs index a5a2930..3360ed3 100644 --- a/src/views/partial/channelSettings/userList.ejs +++ b/src/views/partial/channelSettings/userList.ejs @@ -26,10 +26,10 @@ along with this program. If not, see .--> - - - - + + + +

Img

ID

Name

Rank

Img

ID

Name

Rank

diff --git a/src/views/partial/popup/channelUserBan.ejs b/src/views/partial/popup/channelUserBan.ejs index 46a6ee7..8c84bfb 100644 --- a/src/views/partial/popup/channelUserBan.ejs +++ b/src/views/partial/popup/channelUserBan.ejs @@ -17,7 +17,7 @@ along with this program. If not, see .--> even if I'm usually against that, sometimes you gotta break da rulez :P --> -
+
@@ -36,4 +36,4 @@ even if I'm usually against that, sometimes you gotta break da rulez :P --> - \ No newline at end of file +
\ No newline at end of file diff --git a/src/views/partial/popup/nukeChannel.ejs b/src/views/partial/popup/nukeChannel.ejs index 8a7ad30..f76ded4 100644 --- a/src/views/partial/popup/nukeChannel.ejs +++ b/src/views/partial/popup/nukeChannel.ejs @@ -15,10 +15,10 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see .--> -
+

WARNING: You are about to nuke channel '[CHANNEL]' off of the face of the fucking planet.
Enter '[CHANNEL]' below to confirm:

- \ No newline at end of file +
\ No newline at end of file diff --git a/src/views/partial/popup/nukeUser.ejs b/src/views/partial/popup/nukeUser.ejs index 0d1dd16..07c83a8 100644 --- a/src/views/partial/popup/nukeUser.ejs +++ b/src/views/partial/popup/nukeUser.ejs @@ -15,10 +15,10 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see .--> -
+

WARNING: You are about to nuke your account off of the face of the fucking planet.
Enter your password below to confirm:

- \ No newline at end of file +
\ No newline at end of file diff --git a/src/views/partial/popup/userBan.ejs b/src/views/partial/popup/userBan.ejs index 84c9be6..aa58453 100644 --- a/src/views/partial/popup/userBan.ejs +++ b/src/views/partial/popup/userBan.ejs @@ -15,7 +15,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see .--> -
+
@@ -30,4 +30,4 @@ along with this program. If not, see .--> - \ No newline at end of file +
\ No newline at end of file diff --git a/www/css/adminPanel.css b/www/css/adminPanel.css index 2355116..3ec2b6b 100644 --- a/www/css/adminPanel.css +++ b/www/css/adminPanel.css @@ -14,7 +14,7 @@ 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 .*/ -.admin-list-field, .admin-list-div{ +.admin-list-div{ display: flex; flex-direction: column; } @@ -24,18 +24,6 @@ along with this program. If not, see .*/ max-width: 100%; } -.admin-list-field{ - padding: 1em 15%; -} - -.admin-list-entry{ - text-align: center; -} - -.admin-list-entry-large{ - text-align: left; -} - .admin-list-entry-img-title{ width: 1.5em; } diff --git a/www/css/global.css b/www/css/global.css index 1fa9b14..65562a6 100644 --- a/www/css/global.css +++ b/www/css/global.css @@ -26,12 +26,23 @@ body{ flex-direction: column; } + +form{ + display: flex; + flex-direction: column; +} + table{ border-spacing: 0px; } td{ padding: 0.3em 1em; + text-align: center; +} + +td.large{ + text-align: left; } div.control-prompt{ diff --git a/www/css/theme/movie-night.css b/www/css/theme/movie-night.css index b31370c..600f90d 100644 --- a/www/css/theme/movie-night.css +++ b/www/css/theme/movie-night.css @@ -132,6 +132,17 @@ button:active{ background-color: var(--focus0-alt1); } +table, form{ + background-color: var(--bg1); + color: var(--accent1); + box-shadow: 3px 3px 1px var(--bg1-alt0) inset; + border-radius: 1em; +} + +form{ + padding: 1em; +} + tr{ box-shadow: var(--accent1) 0px 1em 1px -2em, var(--accent1) 0px -1em 1px -1em; } @@ -140,11 +151,8 @@ td.not-first-col{ box-shadow: var(--accent1) 1em 0px 1px -2em, var(--accent1) -1em 0px 1px -1em; } -.admin-list-field,.admin-list-table{ - background-color: var(--bg1); +a.admin-list-entry-item{ color: var(--accent1); - box-shadow: 3px 3px 1px var(--bg1-alt0) inset; - border-radius: 1em; } div.control-prompt{ @@ -176,7 +184,6 @@ input.control-prompt, input.control-prompt:focus{ } /* index */ - .channel-guide-entry{ background-color: var(--bg1); color: var(--accent1); @@ -203,15 +210,6 @@ p.channel-guide-entry-item{ background-color: var(--bg1-alt0); } -/* channel settings/admin panel mixed */ -a.admin-list-entry-item{ - color: var(--accent1); -} - -a:hover.admin-list-entry-item{ - color: var(--accent1-alt0); -} - /* channel */ #media-panel-div{ background-color: black; diff --git a/www/js/adminPanel.js b/www/js/adminPanel.js index 7cbe990..d48e82c 100644 --- a/www/js/adminPanel.js +++ b/www/js/adminPanel.js @@ -268,7 +268,7 @@ class adminUserBanList{ } clearBanList(){ - const oldRows = this.table.querySelectorAll('tr.admin-list-entry'); + const oldRows = this.table.querySelectorAll('tr.gen-row'); oldRows.forEach((row) => { row.remove(); }); @@ -330,8 +330,8 @@ class adminUserBanList{ //append img cell to row entryRow.appendChild(utils.ux.newTableCell(imgNode, true)); - //Append standard cells to row - [ + //Generate and append row to table + this.table.appendChild(utils.ux.newTableRow([ ban.user.id, ban.user.user, signUpDateString, @@ -339,15 +339,7 @@ class adminUserBanList{ expirationDateString, banActionString, (ban.user.deleted ? unbanIcon : [unbanIcon, nukeAccount]) - ].forEach((content)=>{ - //I don't like repeating myself, and this didn't really need it's own function - //though we could make one where each is an object that contains ever property needed and pass it to a mktable function - //I just don't see us using it enough to justify it :P - entryRow.appendChild(utils.ux.newTableCell(content)); - }); - - //Append row to table - this.table.appendChild(entryRow); + ])); }); } } diff --git a/www/js/channelSettings.js b/www/js/channelSettings.js index 0bdd035..ac687fe 100644 --- a/www/js/channelSettings.js +++ b/www/js/channelSettings.js @@ -130,7 +130,7 @@ class rankList{ clearTable(){ //get all non-title table rows - const rows = this.table.querySelectorAll("tr.admin-list-entry"); + const rows = this.table.querySelectorAll("tr.gen-row"); //for each row rows.forEach((row) => { @@ -161,7 +161,7 @@ class banList{ } clearList(){ - const oldRows = this.table.querySelectorAll('tr.admin-list-entry'); + const oldRows = this.table.querySelectorAll('tr.gen-row'); oldRows.forEach((row) => { row.remove(); }); diff --git a/www/js/utils.js b/www/js/utils.js index 64f7d2d..34911aa 100644 --- a/www/js/utils.js +++ b/www/js/utils.js @@ -39,7 +39,6 @@ class canopyUXUtils{ newTableCell(content, firstCol = false){ //Create a new 'td' element const cell = document.createElement('td'); - cell.classList.add("admin-list-entry","admin-list-entry-item"); //If it's not the first column, mention it! if(!firstCol){ @@ -78,7 +77,8 @@ class canopyUXUtils{ newTableRow(cellContent){ //Create an empty table row to hold the cells const entryRow = document.createElement('tr'); - entryRow.classList.add("admin-list-entry"); + + entryRow.classList.add("gen-row"); entryRow.appendChild(this.newTableCell(cellContent[0], true));