mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-03 05:57:47 +08:00
fix(nx/docker): client-side translations
This commit is contained in:
parent
d8ee579204
commit
69f854034f
@ -56,7 +56,8 @@ module.exports = {
|
|||||||
"./src/assets",
|
"./src/assets",
|
||||||
"./src/stylesheets",
|
"./src/stylesheets",
|
||||||
"./src/libraries",
|
"./src/libraries",
|
||||||
"./src/fonts"
|
"./src/fonts",
|
||||||
|
"./src/translations"
|
||||||
],
|
],
|
||||||
styles: [],
|
styles: [],
|
||||||
stylePreprocessorOptions: {
|
stylePreprocessorOptions: {
|
||||||
|
@ -39,6 +39,9 @@ async function register(app: express.Application) {
|
|||||||
app.use(`/${assetPath}/fonts`, proxy(publicUrl, {
|
app.use(`/${assetPath}/fonts`, proxy(publicUrl, {
|
||||||
proxyReqPathResolver: (req) => "/fonts" + req.url
|
proxyReqPathResolver: (req) => "/fonts" + req.url
|
||||||
}));
|
}));
|
||||||
|
app.use(`/${assetPath}/translations`, proxy(publicUrl, {
|
||||||
|
proxyReqPathResolver: (req) => "/translations" + req.url
|
||||||
|
}));
|
||||||
app.use(`/${assetPath}/images`, persistentCacheStatic(path.join(srcRoot, "assets", "images")));
|
app.use(`/${assetPath}/images`, persistentCacheStatic(path.join(srcRoot, "assets", "images")));
|
||||||
} else {
|
} else {
|
||||||
const clientStaticCache = persistentCacheStatic(path.join(resourceDir, "public"));
|
const clientStaticCache = persistentCacheStatic(path.join(resourceDir, "public"));
|
||||||
@ -47,6 +50,7 @@ async function register(app: express.Application) {
|
|||||||
app.use(`/${assetPath}/stylesheets`, persistentCacheStatic(path.join(resourceDir, "public", "stylesheets")));
|
app.use(`/${assetPath}/stylesheets`, persistentCacheStatic(path.join(resourceDir, "public", "stylesheets")));
|
||||||
app.use(`/${assetPath}/libraries`, persistentCacheStatic(path.join(resourceDir, "public", "libraries")));
|
app.use(`/${assetPath}/libraries`, persistentCacheStatic(path.join(resourceDir, "public", "libraries")));
|
||||||
app.use(`/${assetPath}/fonts`, persistentCacheStatic(path.join(resourceDir, "public", "fonts")));
|
app.use(`/${assetPath}/fonts`, persistentCacheStatic(path.join(resourceDir, "public", "fonts")));
|
||||||
|
app.use(`/${assetPath}/translations/`, persistentCacheStatic(path.join(resourceDir, "public", "translations")));
|
||||||
app.use(`/${assetPath}/images`, persistentCacheStatic(path.join(resourceDir, "assets", "images")));
|
app.use(`/${assetPath}/images`, persistentCacheStatic(path.join(resourceDir, "assets", "images")));
|
||||||
}
|
}
|
||||||
app.use(`/assets/vX/fonts`, express.static(path.join(srcRoot, "public/fonts")));
|
app.use(`/assets/vX/fonts`, express.static(path.join(srcRoot, "public/fonts")));
|
||||||
@ -75,9 +79,6 @@ async function register(app: express.Application) {
|
|||||||
|
|
||||||
app.use(`/${assetPath}/node_modules/jquery-hotkeys/`, persistentCacheStatic(path.join(nodeModulesDir, "jquery-hotkeys/")));
|
app.use(`/${assetPath}/node_modules/jquery-hotkeys/`, persistentCacheStatic(path.join(nodeModulesDir, "jquery-hotkeys/")));
|
||||||
|
|
||||||
// i18n
|
|
||||||
app.use(`/${assetPath}/translations/`, persistentCacheStatic(path.join(srcRoot, "public", "translations/")));
|
|
||||||
|
|
||||||
// Deprecated, https://www.npmjs.com/package/autocomplete.js?activeTab=readme
|
// Deprecated, https://www.npmjs.com/package/autocomplete.js?activeTab=readme
|
||||||
app.use(`/${assetPath}/node_modules/autocomplete.js/dist/`, persistentCacheStatic(path.join(nodeModulesDir, "autocomplete.js/dist/")));
|
app.use(`/${assetPath}/node_modules/autocomplete.js/dist/`, persistentCacheStatic(path.join(nodeModulesDir, "autocomplete.js/dist/")));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user