Converted pop-ups to standard HTML. None use templating features and the router was poorly written anywho.
This commit is contained in:
parent
ef0344942b
commit
878ee4bb2d
18 changed files with 35 additions and 89 deletions
|
|
@ -1,24 +0,0 @@
|
|||
/*Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024-2025 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/>.*/
|
||||
|
||||
//root index functions
|
||||
module.exports.get = async function(req, res){
|
||||
try{
|
||||
res.render(`partial/popup${req.url}`, {});
|
||||
}catch(err){
|
||||
return res.sendStatus(400);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
/*Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024-2025 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/>.*/
|
||||
|
||||
//npm imports
|
||||
const { Router } = require('express');
|
||||
|
||||
|
||||
//local imports
|
||||
const popupController = require("../controllers/popupController");
|
||||
|
||||
//globals
|
||||
const router = Router();
|
||||
|
||||
//routing functions
|
||||
router.get('/*', popupController.get);
|
||||
|
||||
module.exports = router;
|
||||
|
|
@ -58,7 +58,7 @@ const emailChangeRouter = require('./routers/emailChangeController');
|
|||
//Panel
|
||||
const panelRouter = require('./routers/panelRouter');
|
||||
//Popup
|
||||
const popupRouter = require('./routers/popupRouter');
|
||||
//const popupRouter = require('./routers/popupRouter');
|
||||
//Tooltip
|
||||
const tooltipRouter = require('./routers/tooltipRouter');
|
||||
//Api
|
||||
|
|
@ -161,7 +161,7 @@ app.use('/emailChange', emailChangeRouter);
|
|||
//Panel
|
||||
app.use('/panel', panelRouter);
|
||||
//Popup
|
||||
app.use('/popup', popupRouter);
|
||||
//app.use('/popup', popupRouter);
|
||||
//tooltip
|
||||
app.use('/tooltip', tooltipRouter);
|
||||
//Bot-Ready
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024-2025 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/>. %>
|
||||
<%# <link rel="stylesheet" type="text/css" href="/css/popup/schedule.css"> %>
|
||||
<h3 class="popup-title">Add to Playlist From URL</h3>
|
||||
<div>
|
||||
<input id="playlist-add-media-popup-prompt" placeholder="Media URL">
|
||||
<button class="positive-button" id="playlist-add-media-popup-button">Add to playlist</button>
|
||||
</div>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024-2025 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/>. %>
|
||||
<link rel="stylesheet" type="text/css" href="/css/popup/changeEmail.css">
|
||||
<h3 id="email-change-popup-title" class="popup-title">Update Email</h3>
|
||||
<div id="email-change-popup-content">
|
||||
<p id="email-change-popup-caption">Enter new email and current password below:</p>
|
||||
<input type="email" placeholder="email" id="email-change-popup-email">
|
||||
<input type="password" placeholder="password" id="email-change-popup-password">
|
||||
</div>
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024-2025 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/>. %>
|
||||
<link rel="stylesheet" type="text/css" href="/css/popup/changePassword.css">
|
||||
<h3 id="password-change-popup-title" class="popup-title">Update Password</h3>
|
||||
<div id="password-change-popup-content">
|
||||
<p id="password-change-popup-caption">Enter new and confirm current password below:</p>
|
||||
<input type="password" placeholder="Current Password" id="password-change-popup-old-password">
|
||||
<input type="password" placeholder="New Password" id="password-change-popup-new-password">
|
||||
<input type="password" placeholder="Confirm New Password" id="password-change-popup-confirm-new-password">
|
||||
</div>
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024-2025 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/>. %>
|
||||
<%# I could turn this into partials which get called by both this and userBan but that seems like a lot of work to avoid a quick copy/pase
|
||||
even if I'm usually against that, sometimes you gotta break da rulez :P %>
|
||||
<link rel="stylesheet" type="text/css" href="/css/popup/ban.css">
|
||||
<h3 class="popup-title">Ban NULL</h3>
|
||||
<div class="ban-popup-content">
|
||||
<span>
|
||||
<label for="ban-popup-perm">Perma-Ban:</label>
|
||||
<input type="checkbox" name="ban-popup-perm" id="ban-popup-perm">
|
||||
</span>
|
||||
<span>
|
||||
<label id="ban-popup-expiration-prefix" for="ban-popup-expiration">Ban Expires In: </label>
|
||||
<input type="number" name="ban-popup-expiration" id="ban-popup-expiration" value="14">
|
||||
<label fid="ban-popup-expiration-postfix" or="ban-popup-expiration"> Days</label>
|
||||
</span>
|
||||
<span>
|
||||
<label id="ban-popup-alts-prefix" for="ban-popup-alts">Ban Alts: </label>
|
||||
<input type="checkbox" name="ban-popup-alts" id="ban-popup-alts" checked>
|
||||
</span>
|
||||
<span id="ban-popup-button-span">
|
||||
<button id="ban-popup-cancel-button">Cancel</button>
|
||||
<span id="ban-popup-button-span-spacer"></span>
|
||||
<button id="ban-popup-ban-button" class="danger-button">Ban</button>
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024-2025 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/>. %>
|
||||
<link rel="stylesheet" type="text/css" href="/css/popup/clearMedia.css">
|
||||
<h3 class="popup-title">Clear Media</h3>
|
||||
<div class="clear-media-popup-div">
|
||||
<span class="clear-media-input-span">
|
||||
<label for="clear-media-popup-start-time-prompt">Start:</label>
|
||||
<input name="clear-media-popup-start-time-prompt" type="datetime-local" id="clear-media-popup-start-time-prompt">
|
||||
</span>
|
||||
<span class="clear-media-input-span">
|
||||
<label for="clear-media-popup-end-time-prompt">End:</label>
|
||||
<input name="clear-media-popup-end-time-prompt" type="datetime-local" id="clear-media-popup-end-time-prompt">
|
||||
</span>
|
||||
<button class="danger-button" id="clear-media-popup-clear-button">Clear</button>
|
||||
</div>
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024-2025 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/>. %>
|
||||
<h3 class="popup-title">Create Playlist</h3>
|
||||
<div id="queue-create-playlist-popup-div">
|
||||
<input id="queue-create-playlist-popup-name" placeholder="Name">
|
||||
<textarea id="queue-create-playlist-popup-default-titles" placeholder="Default Titles"></textarea>
|
||||
<span>
|
||||
<label for="location">Save To:</label>
|
||||
<select name="location" id="queue-create-playlist-popup-location">
|
||||
<option value="Channel">Channel</option>
|
||||
<option value="User">Account</option>
|
||||
</select>
|
||||
</span>
|
||||
<button id="queue-create-playlist-popup-save" class="positive-button">Create Playlist</button>
|
||||
</div>
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024-2025 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/>. %>
|
||||
<link rel="stylesheet" type="text/css" href="/css/popup/delete.css">
|
||||
<h3 id="delete-channel-popup-title" class="popup-title">Delete Channel</h3>
|
||||
<div>
|
||||
<p id="delete-channel-popup-content">WARNING: You are about to nuke channel '[CHANNEL]' off of the face of the fucking planet.<br>
|
||||
Enter '[CHANNEL]' below to confirm:</p>
|
||||
<span id="delete-channel-popup-prompt-span">
|
||||
<input type="text" id="delete-channel-popup-prompt">
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024-2025 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/>. %>
|
||||
<link rel="stylesheet" type="text/css" href="/css/popup/delete.css">
|
||||
<h3 id="delete-account-popup-title" class="popup-title">Delete Account</h3>
|
||||
<div>
|
||||
<p id="delete-account-popup-content">WARNING: You are about to nuke your account off of the face of the fucking planet.<br>
|
||||
Enter your password below to confirm:</p>
|
||||
<span id="delete-account-popup-password-span">
|
||||
<input type="password" id="delete-account-popup-password">
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024-2025 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/>. %>
|
||||
<h1>This is a test popup!</h1>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024-2025 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/>. %>
|
||||
<link rel="stylesheet" type="text/css" href="/css/popup/playlistDefaultTitles.css">
|
||||
<h3 class="popup-title">Edit Playlist Default Titles</h3>
|
||||
<div id="playlist-default-titles-popup-div">
|
||||
<textarea id="playlist-default-titles-popup-prompt"></textarea>
|
||||
<button class="positive-button" id="playlist-default-media-popup-button">Change Titles</button>
|
||||
</div>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024-2025 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/>. %>
|
||||
<%# <link rel="stylesheet" type="text/css" href="/css/popup/schedule.css"> %>
|
||||
<h3 class="popup-title">Rename Playlist</h3>
|
||||
<div>
|
||||
<input id="playlist-rename-popup-prompt" placeholder="New Name">
|
||||
<button class="positive-button" id="playlist-rename-popup-button">Rename Playlist</button>
|
||||
</div>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024-2025 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/>. %>
|
||||
<%# <link rel="stylesheet" type="text/css" href="/css/popup/schedule.css"> %>
|
||||
<h3 class="popup-title">Schedule Media</h3>
|
||||
<div>
|
||||
<input type="datetime-local" id="schedule-media-popup-time-prompt">
|
||||
<button class="positive-button" id="schedule-media-popup-schedule-button">Schedule</button>
|
||||
</div>
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
Copyright (C) 2024-2025 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/>. %>
|
||||
<link rel="stylesheet" type="text/css" href="/css/popup/ban.css">
|
||||
<h3 class="popup-title">Ban NULL</h3>
|
||||
<div class="ban-popup-content">
|
||||
<span>
|
||||
<label for="ban-popup-perm">IP-Ban:</label>
|
||||
<input type="checkbox" name="ban-popup-ip" id="ban-popup-ip">
|
||||
</span>
|
||||
<span>
|
||||
<label for="ban-popup-perm">Perma-Ban:</label>
|
||||
<input type="checkbox" name="ban-popup-perm" id="ban-popup-perm">
|
||||
</span>
|
||||
<span>
|
||||
<label id="ban-popup-expiration-prefix" for="ban-popup-expiration">Ban Expires In: </label>
|
||||
<input type="number" name="ban-popup-expiration" id="ban-popup-expiration" value="14">
|
||||
<label fid="ban-popup-expiration-postfix" or="ban-popup-expiration"> Days</label>
|
||||
</span>
|
||||
<span id="ban-popup-button-span">
|
||||
<button id="ban-popup-cancel-button">Cancel</button>
|
||||
<span id="ban-popup-button-span-spacer"></span>
|
||||
<button id="ban-popup-ban-button" class="danger-button">Ban</button>
|
||||
</span>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue