Loading debian/blogi-editor.default-config.yaml +5 −0 Original line number Diff line number Diff line Loading @@ -14,3 +14,8 @@ WEBEDIT: - "/usr/lib/blogi/plugins/webedit" HTMLDIR: "/usr/share/blogi-editor/html" PREFIX: "" AUTHDB: - URL: "https://localhost:8443" CLIENTNAME: "blogi-editor" CLIENTSECRET: "changeme" DOMAIN: "localhost" editor/config.yaml +5 −0 Original line number Diff line number Diff line Loading @@ -15,3 +15,8 @@ WEBEDIT: - "../build/editor/widgets" HTMLDIR: "/usr/local/share/blogi-webedit/html" PREFIX: "" AUTHDB: - URL: "https://localhost:8443" CLIENTNAME: "blogi-editor" CLIENTSECRET: "changeme" DOMAIN: "localhost" editor/html/index.html +3 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ <div class="toolbar-group"> <span id="doc-name" class="doc-name">Untitled</span> </div> <div class="toolbar-group" style="margin-left:auto"> <button id="btn-logout" title="Abmelden">🚪 Abmelden</button> </div> </header> <div id="app"> Loading editor/html/js/api.js +20 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,11 @@ var EditorApi = (function() { xhr.setRequestHeader('Content-Type', 'application/json'); xhr.onreadystatechange = function() { if (xhr.readyState !== 4) return; if (xhr.status === 401) { // Not authenticated — redirect to login window.location.href = '/login.html'; return; } if (xhr.status >= 200 && xhr.status < 300) { try { resolve(JSON.parse(xhr.responseText)); Loading @@ -38,6 +43,21 @@ var EditorApi = (function() { } return { login: function(username, password) { return request('POST', '/api/login', { username: username, password: password }); }, logout: function() { return request('POST', '/api/logout'); }, authCheck: function() { return request('GET', '/api/auth-check'); }, getPlugins: function() { return request('GET', '/api/plugins'); }, Loading editor/html/js/editor.js +8 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,14 @@ document.getElementById('btn-refresh-preview').addEventListener('click', function() { Preview.refresh(); }); document.getElementById('btn-logout').addEventListener('click', function() { EditorApi.logout().then(function() { window.location.href = '/login.html'; }).catch(function() { window.location.href = '/login.html'; }); }); } // --- Tree action bindings --- Loading Loading
debian/blogi-editor.default-config.yaml +5 −0 Original line number Diff line number Diff line Loading @@ -14,3 +14,8 @@ WEBEDIT: - "/usr/lib/blogi/plugins/webedit" HTMLDIR: "/usr/share/blogi-editor/html" PREFIX: "" AUTHDB: - URL: "https://localhost:8443" CLIENTNAME: "blogi-editor" CLIENTSECRET: "changeme" DOMAIN: "localhost"
editor/config.yaml +5 −0 Original line number Diff line number Diff line Loading @@ -15,3 +15,8 @@ WEBEDIT: - "../build/editor/widgets" HTMLDIR: "/usr/local/share/blogi-webedit/html" PREFIX: "" AUTHDB: - URL: "https://localhost:8443" CLIENTNAME: "blogi-editor" CLIENTSECRET: "changeme" DOMAIN: "localhost"
editor/html/index.html +3 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ <div class="toolbar-group"> <span id="doc-name" class="doc-name">Untitled</span> </div> <div class="toolbar-group" style="margin-left:auto"> <button id="btn-logout" title="Abmelden">🚪 Abmelden</button> </div> </header> <div id="app"> Loading
editor/html/js/api.js +20 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,11 @@ var EditorApi = (function() { xhr.setRequestHeader('Content-Type', 'application/json'); xhr.onreadystatechange = function() { if (xhr.readyState !== 4) return; if (xhr.status === 401) { // Not authenticated — redirect to login window.location.href = '/login.html'; return; } if (xhr.status >= 200 && xhr.status < 300) { try { resolve(JSON.parse(xhr.responseText)); Loading @@ -38,6 +43,21 @@ var EditorApi = (function() { } return { login: function(username, password) { return request('POST', '/api/login', { username: username, password: password }); }, logout: function() { return request('POST', '/api/logout'); }, authCheck: function() { return request('GET', '/api/auth-check'); }, getPlugins: function() { return request('GET', '/api/plugins'); }, Loading
editor/html/js/editor.js +8 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,14 @@ document.getElementById('btn-refresh-preview').addEventListener('click', function() { Preview.refresh(); }); document.getElementById('btn-logout').addEventListener('click', function() { EditorApi.logout().then(function() { window.location.href = '/login.html'; }).catch(function() { window.location.href = '/login.html'; }); }); } // --- Tree action bindings --- Loading