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
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -603,7 +603,7 @@ class queuePanel extends panelObj{
|
|||
|
||||
//Create entry title
|
||||
const entryTitle = document.createElement('p');
|
||||
entryTitle.textContent = entry[1].title;
|
||||
entryTitle.textContent = utils.unescapeEntities(entry[1].title);
|
||||
|
||||
//Tooltip generation
|
||||
//tooltip div
|
||||
|
|
|
|||
|
|
@ -1028,7 +1028,7 @@ class canopyAjaxUtils{
|
|||
|
||||
//Popup
|
||||
async getPopup(popup){
|
||||
var response = await fetch(`/popup/${popup}`,{
|
||||
var response = await fetch(`/popup/${popup}.html`,{
|
||||
method: "GET"
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
<!-- 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
|
||||
|
|
@ -12,8 +12,8 @@ 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"> %>
|
||||
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">
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
<!-- 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
|
||||
|
|
@ -12,7 +12,7 @@ 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/>. %>
|
||||
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">
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
<!-- 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
|
||||
|
|
@ -12,7 +12,7 @@ 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/>. %>
|
||||
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">
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
<!-- 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
|
||||
|
|
@ -12,9 +12,9 @@ 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 %>
|
||||
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">
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
<!-- 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
|
||||
|
|
@ -12,7 +12,7 @@ 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/>. %>
|
||||
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">
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
<!-- 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
|
||||
|
|
@ -12,7 +12,7 @@ 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/>. %>
|
||||
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">
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
<!-- 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
|
||||
|
|
@ -12,7 +12,7 @@ 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/>. %>
|
||||
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>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
<!-- 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
|
||||
|
|
@ -12,7 +12,7 @@ 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/>. %>
|
||||
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>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
<!-- 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
|
||||
|
|
@ -12,5 +12,5 @@ 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/>. %>
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. -->
|
||||
<h1>This is a test popup!</h1>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
<!-- 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
|
||||
|
|
@ -12,7 +12,7 @@ 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/>. %>
|
||||
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">
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
<!-- 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
|
||||
|
|
@ -12,8 +12,8 @@ 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"> %>
|
||||
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">
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
<!-- 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
|
||||
|
|
@ -12,8 +12,8 @@ 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"> %>
|
||||
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">
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<%# Canopy - The next generation of stoner streaming software
|
||||
<!-- 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
|
||||
|
|
@ -12,7 +12,7 @@ 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/>. %>
|
||||
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">
|
||||
Loading…
Reference in a new issue