mirror of
https://github.com/wekan/wekan.git
synced 2026-11-17 16:59:41 -05:00
Each was checked for which side was wrong: - The LibreJS labels page sent Cache-Control: public; it is private now, as fileCacheHeaders requires of every response. - Closing a card marks it seen (#2111): that code moved below the #6686 popup handling, which labelsPopupStaleCardContext reads from the top of onDestroyed; unreadChanges now finds it anywhere in onDestroyed. - The shared header helper (#2805) moved below the swimlane's currentUser helper, where largeBoardDataLoading pins it. - The Story/Task kind, column set places and drawing strokes (#2012, #211, #1178) get their rule e-mail dispositions: none is e-mail content. - Guards updated for deliberate changes, each saying why: the Rules group in Admin Panel Visibility (#2217), the rule under the team tabs in All Boards (#802, the two around Workspaces still pinned where they are), and a linked list's card clearing the title draft only after it was added (#2809, every clear checked against the add before it). Thanks to xet7 !
26 lines
1.0 KiB
JavaScript
26 lines
1.0 KiB
JavaScript
// #1040: the JS Web Labels page LibreJS reads (models/lib/jsWebLabels.js),
|
|
// built from the client bundle this server is serving.
|
|
import { WebApp } from 'meteor/webapp';
|
|
|
|
const { bundleScripts, renderJsWebLabels } = require('/models/lib/jsWebLabels');
|
|
|
|
function prefix() {
|
|
return (typeof __meteor_runtime_config__ !== 'undefined' && __meteor_runtime_config__.ROOT_URL_PATH_PREFIX) || '';
|
|
}
|
|
|
|
WebApp.handlers.get('/jslicense.html', (req, res) => {
|
|
try {
|
|
const programs = WebApp.clientPrograms || {};
|
|
const scripts = [...new Set(['web.browser', 'web.browser.legacy']
|
|
.flatMap(arch => bundleScripts(programs[arch] && programs[arch].manifest, prefix())))];
|
|
const version = (() => { try { return require('/package.json').version; } catch (e) { return ''; } })();
|
|
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
|
res.setHeader('Cache-Control', 'private, max-age=3600');
|
|
res.end(renderJsWebLabels({ scripts, version }));
|
|
} catch (error) {
|
|
res.statusCode = 500;
|
|
res.end();
|
|
}
|
|
});
|
|
|