diff options
-rw-r--r-- | client/config/webpack.common.js | 12 | ||||
-rw-r--r-- | client/src/app/shared/users/user.model.ts | 2 | ||||
-rw-r--r-- | client/src/assets/images/favicon.png | bin | 2335 -> 539 bytes | |||
-rw-r--r-- | client/src/index.html | 2 | ||||
-rw-r--r-- | server/controllers/client.ts | 2 |
5 files changed, 16 insertions, 2 deletions
diff --git a/client/config/webpack.common.js b/client/config/webpack.common.js index acf22dab1..c37516271 100644 --- a/client/config/webpack.common.js +++ b/client/config/webpack.common.js | |||
@@ -13,6 +13,7 @@ const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin') | |||
13 | const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin') | 13 | const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin') |
14 | const InlineManifestWebpackPlugin = require('inline-manifest-webpack-plugin') | 14 | const InlineManifestWebpackPlugin = require('inline-manifest-webpack-plugin') |
15 | const ngcWebpack = require('ngc-webpack') | 15 | const ngcWebpack = require('ngc-webpack') |
16 | const CopyWebpackPlugin = require('copy-webpack-plugin') | ||
16 | 17 | ||
17 | const WebpackNotifierPlugin = require('webpack-notifier') | 18 | const WebpackNotifierPlugin = require('webpack-notifier') |
18 | 19 | ||
@@ -267,6 +268,17 @@ module.exports = function (options) { | |||
267 | inject: 'body' | 268 | inject: 'body' |
268 | }), | 269 | }), |
269 | 270 | ||
271 | new CopyWebpackPlugin([ | ||
272 | { | ||
273 | from: helpers.root('src/assets/images/favicon.png'), | ||
274 | to: 'assets/images/favicon.png' | ||
275 | }, | ||
276 | { | ||
277 | from: helpers.root('src/assets/images/default-avatar.png'), | ||
278 | to: 'assets/images/default-avatar.png' | ||
279 | } | ||
280 | ]), | ||
281 | |||
270 | /* | 282 | /* |
271 | * Plugin: ScriptExtHtmlWebpackPlugin | 283 | * Plugin: ScriptExtHtmlWebpackPlugin |
272 | * Description: Enhances html-webpack-plugin functionality | 284 | * Description: Enhances html-webpack-plugin functionality |
diff --git a/client/src/app/shared/users/user.model.ts b/client/src/app/shared/users/user.model.ts index 220362ef0..9364ae721 100644 --- a/client/src/app/shared/users/user.model.ts +++ b/client/src/app/shared/users/user.model.ts | |||
@@ -54,6 +54,6 @@ export class User implements UserServerModel { | |||
54 | getAvatarPath () { | 54 | getAvatarPath () { |
55 | if (this.account && this.account.avatar) return this.account.avatar.path | 55 | if (this.account && this.account.avatar) return this.account.avatar.path |
56 | 56 | ||
57 | return '/assets/images/default-avatar.png' | 57 | return '/client/assets/images/default-avatar.png' |
58 | } | 58 | } |
59 | } | 59 | } |
diff --git a/client/src/assets/images/favicon.png b/client/src/assets/images/favicon.png index bb57ee6b0..cef0f0d2e 100644 --- a/client/src/assets/images/favicon.png +++ b/client/src/assets/images/favicon.png | |||
Binary files differ | |||
diff --git a/client/src/index.html b/client/src/index.html index 8e94b903d..4af6b12f6 100644 --- a/client/src/index.html +++ b/client/src/index.html | |||
@@ -11,7 +11,7 @@ | |||
11 | <!-- open graph and oembed tags --> | 11 | <!-- open graph and oembed tags --> |
12 | <!-- Do not remove it! --> | 12 | <!-- Do not remove it! --> |
13 | 13 | ||
14 | <link rel="icon" type="image/png" href="/client/assets/favicon.png" /> | 14 | <link rel="icon" type="image/png" href="/client/assets/images/favicon.png" /> |
15 | 15 | ||
16 | <!-- base url --> | 16 | <!-- base url --> |
17 | <base href="<%= htmlWebpackPlugin.options.metadata.baseUrl %>"> | 17 | <base href="<%= htmlWebpackPlugin.options.metadata.baseUrl %>"> |
diff --git a/server/controllers/client.ts b/server/controllers/client.ts index 64e5829ca..f474c4282 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts | |||
@@ -18,6 +18,7 @@ import { VideoInstance } from '../models' | |||
18 | const clientsRouter = express.Router() | 18 | const clientsRouter = express.Router() |
19 | 19 | ||
20 | const distPath = join(root(), 'client', 'dist') | 20 | const distPath = join(root(), 'client', 'dist') |
21 | const assetsImagesPath = join(root(), 'client', 'dist', 'assets', 'images') | ||
21 | const embedPath = join(distPath, 'standalone', 'videos', 'embed.html') | 22 | const embedPath = join(distPath, 'standalone', 'videos', 'embed.html') |
22 | const indexPath = join(distPath, 'index.html') | 23 | const indexPath = join(distPath, 'index.html') |
23 | 24 | ||
@@ -33,6 +34,7 @@ clientsRouter.use('/videos/embed', (req: express.Request, res: express.Response, | |||
33 | 34 | ||
34 | // Static HTML/CSS/JS client files | 35 | // Static HTML/CSS/JS client files |
35 | clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE })) | 36 | clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE })) |
37 | clientsRouter.use('/client/assets/images', express.static(assetsImagesPath, { maxAge: STATIC_MAX_AGE })) | ||
36 | 38 | ||
37 | // 404 for static files not found | 39 | // 404 for static files not found |
38 | clientsRouter.use('/client/*', (req: express.Request, res: express.Response, next: express.NextFunction) => { | 40 | clientsRouter.use('/client/*', (req: express.Request, res: express.Response, next: express.NextFunction) => { |