core: delete related ddoc when deleting tdoc

This commit is contained in:
undefined committed 2021-08-25 05:19:33 +00:00
1 parent c78fc82d5b
commit 4c6aeeb914
6 files changed
+26 -11

No files matched your search

+10 -8
View File
@@ -172,14 +172,16 @@ const getHash = (i) => {
const getUrl = (files) => files.map((i) => `/${i}?${getHash(i)}`);
bus.on('app/started', () => {
const files = readdirSync(join(tmpdir(), 'hydro', 'public'));
const pages = files.filter((file) => file.endsWith('.page.js'));
const themes = files.filter((file) => file.endsWith('.theme.js'));
UiContextBase.extraPages = getUrl(pages);
UiContextBase.themes = {};
for (const theme of themes) {
UiContextBase.themes[theme] = `/${theme}?${getHash(theme)}`;
}
setTimeout(() => {
const files = readdirSync(join(tmpdir(), 'hydro', 'public'));
const pages = files.filter((file) => file.endsWith('.page.js'));
const themes = files.filter((file) => file.endsWith('.theme.js'));
UiContextBase.extraPages = getUrl(pages);
UiContextBase.themes = {};
for (const theme of themes) {
UiContextBase.themes[theme] = `/${theme}?${getHash(theme)}`;
}
}, 1000);
});
global.Hydro.handler.ui = async () => {
+1 -1
View File
@@ -311,7 +311,7 @@ h1, h2, h3, h4, h5, h6
list-style: decimal
margin-left: 1.9em
.typo li ul, .typo li ol
.typo li ol
margin-top: 1.2em
margin-bottom: 1.2em
margin-left: 2em
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.18.2",
"version": "4.18.3",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",