refactor(share): integrate with client

This commit is contained in:
Elian Doran
2025-06-09 14:13:35 +03:00
parent 3def1a1e57
commit 8bdf3626f0
8 changed files with 16 additions and 15 deletions

View File

@@ -12,7 +12,11 @@
<% } else { %>
<link rel="shortcut icon" href="../favicon.ico">
<% } %>
<link href="assets/styles.css" rel="stylesheet">
<script src="<%= appPath %>/share.js" type="module"></script>
<link href="<%= assetPath %>/src/share.css" rel="stylesheet">
<% if (!note.isLabelTruthy("shareOmitDefaultCss")) { %>
<link href="<%= assetPath %>/stylesheets/share.css" rel="stylesheet">
<% } %>
<% for (const cssRelation of note.getRelations("shareCss")) { %>
<link href="api/notes/<%= cssRelation.value %>/download" rel="stylesheet">
<% } %>

View File

@@ -48,7 +48,6 @@ async function register(app: express.Application) {
app.use(`/assets/vX/stylesheets`, express.static(path.join(srcRoot, "public/stylesheets")));
app.use(`/${assetUrlFragment}/libraries`, persistentCacheStatic(path.join(srcRoot, "public/libraries")));
app.use(`/assets/vX/libraries`, express.static(path.join(srcRoot, "..", "libraries")));
app.use(`/share/assets`, express.static(path.join(resourceDir, "share-theme", "public")));
}
export default {