mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-25 13:51:13 +00:00
Address PR feedback
This commit is contained in:
parent
aaf9bc970c
commit
c7ea1b7c56
6 changed files with 9 additions and 9 deletions
|
@ -19,7 +19,7 @@ const [hostname, port] = process.env["LEMMY_UI_HOST"]
|
||||||
|
|
||||||
server.use(express.json());
|
server.use(express.json());
|
||||||
server.use(express.urlencoded({ extended: false }));
|
server.use(express.urlencoded({ extended: false }));
|
||||||
server.use(`/static-${COMMIT_HASH}`, express.static(path.resolve("./dist")));
|
server.use(`/static/${COMMIT_HASH}`, express.static(path.resolve("./dist")));
|
||||||
server.use(setCacheControl);
|
server.use(setCacheControl);
|
||||||
|
|
||||||
if (!process.env["LEMMY_UI_DISABLE_CSP"] && !process.env["LEMMY_UI_DEBUG"]) {
|
if (!process.env["LEMMY_UI_DISABLE_CSP"] && !process.env["LEMMY_UI_DEBUG"]) {
|
||||||
|
|
|
@ -88,7 +88,7 @@ export async function createSsrHtml(
|
||||||
<link rel="apple-touch-startup-image" href=${appleTouchIcon} />
|
<link rel="apple-touch-startup-image" href=${appleTouchIcon} />
|
||||||
|
|
||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
<link rel="stylesheet" type="text/css" href="/static-${COMMIT_HASH}/styles/styles.css" />
|
<link rel="stylesheet" type="text/css" href="/static/${COMMIT_HASH}/styles/styles.css" />
|
||||||
|
|
||||||
<!-- Current theme and more -->
|
<!-- Current theme and more -->
|
||||||
${helmet.link.toString() || fallbackTheme}
|
${helmet.link.toString() || fallbackTheme}
|
||||||
|
@ -103,7 +103,7 @@ export async function createSsrHtml(
|
||||||
</noscript>
|
</noscript>
|
||||||
|
|
||||||
<div id='root'>${root}</div>
|
<div id='root'>${root}</div>
|
||||||
<script defer src='/static-${COMMIT_HASH}/js/client.js'></script>
|
<script defer src='/static/${COMMIT_HASH}/js/client.js'></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -24,7 +24,7 @@ export class Icon extends Component<IconProps, any> {
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<use
|
<use
|
||||||
xlinkHref={`/static-${COMMIT_HASH}/assets/symbols.svg#icon-${this.props.icon}`}
|
xlinkHref={`/static/${COMMIT_HASH}/assets/symbols.svg#icon-${this.props.icon}`}
|
||||||
></use>
|
></use>
|
||||||
<div className="visually-hidden">
|
<div className="visually-hidden">
|
||||||
<title>{this.props.icon}</title>
|
<title>{this.props.icon}</title>
|
||||||
|
|
|
@ -90,7 +90,7 @@ export class PersonListing extends Component<PersonListingProps, any> {
|
||||||
showAvatars() && (
|
showAvatars() && (
|
||||||
<PictrsImage
|
<PictrsImage
|
||||||
src={
|
src={
|
||||||
avatar ?? `/static-${COMMIT_HASH}/assets/icons/icon-96x96.png`
|
avatar ?? `/static/${COMMIT_HASH}/assets/icons/icon-96x96.png`
|
||||||
}
|
}
|
||||||
icon
|
icon
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { COMMIT_HASH } from "./version";
|
import { COMMIT_HASH } from "./version";
|
||||||
|
|
||||||
export const favIconUrl = `/static-${COMMIT_HASH}/assets/icons/favicon.svg`;
|
export const favIconUrl = `/static/${COMMIT_HASH}/assets/icons/favicon.svg`;
|
||||||
export const favIconPngUrl = `/static-${COMMIT_HASH}/assets/icons/apple-touch-icon.png`;
|
export const favIconPngUrl = `/static/${COMMIT_HASH}/assets/icons/apple-touch-icon.png`;
|
||||||
|
|
||||||
export const repoUrl = "https://github.com/LemmyNet";
|
export const repoUrl = "https://github.com/LemmyNet";
|
||||||
export const joinLemmyUrl = "https://join-lemmy.org";
|
export const joinLemmyUrl = "https://join-lemmy.org";
|
||||||
|
|
|
@ -101,7 +101,7 @@ const createClientConfig = (_env, mode) => {
|
||||||
entry: "./src/client/index.tsx",
|
entry: "./src/client/index.tsx",
|
||||||
output: {
|
output: {
|
||||||
filename: "js/client.js",
|
filename: "js/client.js",
|
||||||
publicPath: `/static-${commitHash}`,
|
publicPath: `/static/${commitHash}`,
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
...base.plugins,
|
...base.plugins,
|
||||||
|
@ -109,7 +109,7 @@ const createClientConfig = (_env, mode) => {
|
||||||
enableInDevelopment: mode !== "development", // this may seem counterintuitive, but it is correct
|
enableInDevelopment: mode !== "development", // this may seem counterintuitive, but it is correct
|
||||||
workbox: {
|
workbox: {
|
||||||
modifyURLPrefix: {
|
modifyURLPrefix: {
|
||||||
"/": `/static-${commitHash}/`,
|
"/": `/static/${commitHash}/`,
|
||||||
},
|
},
|
||||||
cacheId: "lemmy",
|
cacheId: "lemmy",
|
||||||
include: [/(assets|styles)\/.+\..+|client\.js$/g],
|
include: [/(assets|styles)\/.+\..+|client\.js$/g],
|
||||||
|
|
Loading…
Reference in a new issue