4 Commits
Author SHA1 Message Date
orrisroot e7ddc91344 chore: correct the package name recorded in the lockfile 2026-09-15 20:30:54 +09:00
orrisroot 375b1b2040 fix: keep text dark on form controls given a white background
sanitize.css forms.css makes form controls inherit the text color, so
the rules that put them back on white left white text wherever the
surrounding panel sets it, as in the nimgsearch search panel and the
open.neuroinf.jp advanced search.

- set the text to black next to each white control background,
  matching how the browser drew the controls before sanitize.css
2026-09-15 20:02:11 +09:00
orrisroot c440710ef6 fix: draw the index tree lines at the right depth
The index tree has a single root, so its first indent unit is always
marked as an end and every line was shifted one column to the right,
doubling the vertical line under the root. Hide that unit and draw the
node's own branch (├ or └) after the indent from the leaf-last class,
as nimg.neuroinf.jp already does.
2026-09-15 18:27:18 +09:00
orrisroot 0d79a0ffd6 fix: serve data files with reserved characters in dev and preview
sirv decodes request paths with decodeURI, which leaves %26 (&) and
%23 (#) encoded, so data files with such characters in their names
were not found by the dev and preview servers. Hand sirv the fully
decoded path, the way Apache resolves it in production.
2026-09-14 18:33:37 +09:00
5 changed files with 52 additions and 11 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
{
"name": "cerebellum",
"name": "pupil",
"version": "2.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "cerebellum",
"name": "pupil",
"version": "2.0.0",
"dependencies": {
"@dr.pogodin/react-helmet": "^3.2.3",
+1
View File
@@ -41,5 +41,6 @@
.leftBlockContent button,
.leftBlockContent :global(.formButton) {
background-color: #ffffff;
color: #000000;
font-size: 13.3333px;
}
+1
View File
@@ -77,4 +77,5 @@
.database :global(.fieldDate input),
.database :global(.listTable select) {
background-color: #ffffff;
color: #000000;
}
+20 -8
View File
@@ -18,6 +18,7 @@
margin: 3px 3px 10px;
/* sanitize.css forms.css leaves buttons transparent */
background-color: #ffffff;
color: #000000;
}
.indexTree div span {
@@ -43,26 +44,37 @@
display: inline-block;
height: 20px;
width: 9px;
background: url(../assets/images/tree_line.png);
background: url(../assets/images/tree_line.png) no-repeat -18px 0;
}
.indexTree:global(.rc-tree .rc-tree-treenode .rc-tree-indent .rc-tree-indent-unit:not(:last-child)) {
/* treeData has a single root, so the first indent unit never carries a line. */
.indexTree:global(.rc-tree .rc-tree-treenode .rc-tree-indent .rc-tree-indent-unit:first-child) {
display: none;
}
.indexTree:global(.rc-tree .rc-tree-treenode .rc-tree-indent .rc-tree-indent-unit:not(.rc-tree-indent-unit-end)) {
background-position: -9px 0;
}
.indexTree:global(
.rc-tree .rc-tree-treenode .rc-tree-indent .rc-tree-indent-unit:not(:last-child).rc-tree-indent-unit-end
) {
background-position: -18px 0;
/* The node's own branch (├ or └) is drawn after the indent units. */
.indexTree:global(.rc-tree .rc-tree-treenode .rc-tree-indent)::after {
content: "";
display: inline-block;
vertical-align: bottom;
height: 20px;
width: 9px;
background: url(../assets/images/tree_line.png) no-repeat 0 0;
}
.indexTree:global(.rc-tree .rc-tree-treenode .rc-tree-indent .rc-tree-indent-unit:last-child.rc-tree-indent-unit-end) {
.indexTree:global(.rc-tree .rc-tree-treenode.rc-tree-treenode-leaf-last .rc-tree-indent)::after {
background-position: -27px 0;
}
.indexTree:global(.rc-tree .rc-tree-treenode:first-child .rc-tree-indent)::after {
display: none;
}
.indexTree:global(.rc-tree .rc-tree-treenode .rc-tree-switcher) {
display: inline-block;
height: 20px;
width: 16px;
margin-right: 2px;
background: url(../assets/images/tree_node.png);
background: url(../assets/images/tree_node.png) no-repeat;
cursor: pointer;
}
.indexTree:global(.rc-tree .rc-tree-treenode:first-child .rc-tree-switcher.rc-tree-switcher-noop) {
+28 -1
View File
@@ -20,7 +20,34 @@ const staticContents = (): Plugin => {
// browser revalidates against the ETag instead of falling back to
// heuristic caching. Without it a re-dump, or another site served
// from the same localhost port, is answered from a stale cache.
middlewares.use(sirv(dir, { dev, etag: true, maxAge: 0 }));
const serve = sirv(dir, { dev, etag: true, maxAge: 0 });
middlewares.use((req, res, next) => {
// sirv decodes the path with decodeURI, which leaves reserved
// characters such as %26 (&) and %23 (#) encoded, so a file like
// `CFP&Reg.png` is not found. sirv reuses `req._parsedUrl` when
// it was parsed from the same `req.url`, so hand it the path
// decoded the way Apache resolves it.
const raw = req.url ?? '/';
const idx = raw.search(/[?#]/);
const pathname = idx === -1 ? raw : raw.slice(0, idx);
if (pathname.includes('%')) {
try {
const decoded = pathname.split('/').map(decodeURIComponent).join('/');
if (!decoded.includes('%')) {
(req as typeof req & { _parsedUrl?: object })._parsedUrl = {
pathname: decoded,
search: '',
query: undefined,
hash: undefined,
raw,
};
}
} catch {
// leave malformed escapes to sirv
}
}
serve(req, res, next);
});
}
};
return {