feat: the assistant is its own full page at /assistant — no underlying app scrolling, back returns home; menu links to it
This commit is contained in:
parent
d74acfe31b
commit
b115491858
2 changed files with 2 additions and 1 deletions
|
|
@ -472,6 +472,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
// Restore last visited tab (saved by activateTab)
|
// Restore last visited tab (saved by activateTab)
|
||||||
var lastTab = null;
|
var lastTab = null;
|
||||||
try { lastTab = localStorage.getItem('ped_last_tab'); } catch(e) {}
|
try { lastTab = localStorage.getItem('ped_last_tab'); } catch(e) {}
|
||||||
|
if (typeof window !== 'undefined' && window.location && window.location.pathname === '/assistant') lastTab = 'assistant';
|
||||||
if (typeof window.activateTab === 'function') {
|
if (typeof window.activateTab === 'function') {
|
||||||
if (!lastTab || !window.activateTab(lastTab)) {
|
if (!lastTab || !window.activateTab(lastTab)) {
|
||||||
window.activateTab('encounter');
|
window.activateTab('encounter');
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ function getTemplatedIndex() {
|
||||||
// Prime once at boot so first request is fast
|
// Prime once at boot so first request is fast
|
||||||
getTemplatedIndex();
|
getTemplatedIndex();
|
||||||
|
|
||||||
app.get(['/', '/index.html'], function(req, res) {
|
app.get(['/', '/index.html', '/assistant'], function(req, res) {
|
||||||
var html = getTemplatedIndex();
|
var html = getTemplatedIndex();
|
||||||
if (!html) return res.sendFile(INDEX_PATH);
|
if (!html) return res.sendFile(INDEX_PATH);
|
||||||
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue