diff --git a/src/routers/layout.js b/src/routers/layout.js deleted file mode 100644 index 4a443a5..0000000 --- a/src/routers/layout.js +++ /dev/null @@ -1,37 +0,0 @@ -const express = require('express'); -const router = express.Router(); -const db = require('../db'); - -router.get('/', (req, res) => { - res.render('layout_editor', { overlayLayout: db.getLayout(), settings: db.getSettings() }); -}); - -router.post('/', (req, res) => { - const b = req.body; - const int = (v, d) => { const n = parseInt(v, 10); return isNaN(n) ? d : n; }; - const flt = (v, d) => { const n = parseFloat(v); return isNaN(n) ? d : n; }; - db.updateLayout({ - chat_left: flt(b.chat_left, 2.0), - chat_top: flt(b.chat_top, 60.0), - chat_width: flt(b.chat_width, 25.0), - chat_height: flt(b.chat_height, 35.0), - alert_left: flt(b.alert_left, 50.0), - alert_top: flt(b.alert_top, 40.0), - chat_font_size: int(b.chat_font_size, 15), - chat_font_family: b.chat_font_family || 'Inter, sans-serif', - chat_bg_opacity: flt(b.chat_bg_opacity, 0.45), - chat_text_color: b.chat_text_color || '#ffffff', - chat_border_radius: int(b.chat_border_radius, 8), - alert_font_size: int(b.alert_font_size, 32), - alert_bg_opacity: flt(b.alert_bg_opacity, 0.7), - alert_text_color: b.alert_text_color || '#ffffff', - }); - res.redirect('/layout'); -}); - -router.post('/positions', (req, res) => { - db.updateLayoutPositions(req.body); - res.json({ ok: true }); -}); - -module.exports = router; diff --git a/views/layout_editor.ejs b/views/layout_editor.ejs deleted file mode 100644 index 12b56c6..0000000 --- a/views/layout_editor.ejs +++ /dev/null @@ -1,73 +0,0 @@ -

Layout editor

- -
- -
- -
- -

Chat position & size

-
- - - - -
- -

Chat style

-
- - - - - -
- -

Alert position

-
- - -
- -

Alert style

-
- - - -
- - -
- - diff --git a/views/overlay_preview.ejs b/views/overlay_preview.ejs deleted file mode 100644 index 5c8a0e9..0000000 --- a/views/overlay_preview.ejs +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - -
-
channel: This is a preview message
-
someviewer: Looking great!
-
anotheruser: pog pog pog
-
-
Alert preview
-
-
- -