feat: monaco editor toegevoegd

This commit is contained in:
kodi
2026-03-12 17:13:40 +01:00
parent aac84a0a7f
commit d12319392f
6 changed files with 352 additions and 19 deletions
@@ -76,7 +76,7 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('id="settings-logs-list"', body)
self.assertIn('id="viewer-content"', body)
self.assertIn('id="editor-modal"', body)
self.assertIn('id="editor-content"', body)
self.assertIn('id="editor-host"', body)
self.assertIn('id="editor-save-btn"', body)
self.assertIn('id="editor-cancel-btn"', body)
self.assertIn('id="move-popup"', body)
@@ -158,6 +158,10 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('return triggerActionButton("rename-btn");', app_js)
self.assertIn('function openVideoViewer()', app_js)
self.assertIn('function openPdfViewer()', app_js)
self.assertIn('async function loadMonacoModule()', app_js)
self.assertIn('async function ensureMonacoEditor(path, content)', app_js)
self.assertIn('function disposeMonacoEditor()', app_js)
self.assertIn('https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm', app_js)
self.assertIn('document.getElementById("pdf-modal")', app_js)
self.assertIn("`/api/files/pdf?", app_js)
self.assertIn('if (isPdfSelection(selected)) {', app_js)
@@ -186,6 +190,8 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('.entry-media-icon.pdf', style_css)
self.assertIn('.entry-media-svg', style_css)
self.assertIn('.entry-media-icon.file', style_css)
self.assertIn('.editor-card', style_css)
self.assertIn('.editor-host', style_css)
self.assertNotIn('.select-marker', style_css)
app_js_url = app.url_path_for("ui", path="/app.js")