From 14a98d7eb11c6325d45e8f4218c2e0a17cc11d6d Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Sun, 18 Sep 2022 01:41:59 +0300 Subject: [PATCH] switch to material design icons from feather icons This should improve the visuals of the app. Additionally, it may improve the performance as well. --- frontend/package.json | 6 +- frontend/public/global.css | 2 +- frontend/rollup.config.js | 8 + frontend/src/components/ChannelTopBar.svelte | 7 +- frontend/src/components/Message.svelte | 11 +- frontend/src/components/MessageInput.svelte | 5 +- frontend/src/components/Messages.svelte | 12 +- .../src/components/PresenceSidebar.svelte | 9 +- frontend/src/components/Sidebar.svelte | 25 +- frontend/src/components/UserTopBar.svelte | 5 +- .../src/components/overlays/Settings.svelte | 3 +- frontend/src/components/overlays/Toast.svelte | 6 +- frontend/src/main.js | 2 + frontend/yarn.lock | 214 ++++++++++++++++-- 14 files changed, 244 insertions(+), 71 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 2ad308c..8a16cab 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,12 +10,12 @@ "@rollup/plugin-commonjs": "^22.0.2", "@rollup/plugin-node-resolve": "^13.3.0", "rollup": "^2.78.1", + "rollup-plugin-copy": "^3.4.0", "rollup-plugin-css-only": "^3.1.0", "rollup-plugin-livereload": "^2.0.5", "rollup-plugin-svelte": "^7.1.0", "rollup-plugin-terser": "^7.0.2", "svelte": "^3.49.0", - "svelte-feather-icons": "^4.0.0" - }, - "dependencies": {} + "@material-design-icons/font": "^0.12.1" + } } diff --git a/frontend/public/global.css b/frontend/public/global.css index 75f4f17..4c6442c 100644 --- a/frontend/public/global.css +++ b/frontend/public/global.css @@ -341,7 +341,7 @@ body { max-height: 3.4em; } -.sidebar-button span { +.sidebar-button .sidebar-button-text { margin-left: var(--space-xxs); white-space: nowrap; overflow: hidden; diff --git a/frontend/rollup.config.js b/frontend/rollup.config.js index 79975c4..6f0995a 100644 --- a/frontend/rollup.config.js +++ b/frontend/rollup.config.js @@ -4,6 +4,7 @@ import resolve from '@rollup/plugin-node-resolve'; import livereload from 'rollup-plugin-livereload'; import { terser } from 'rollup-plugin-terser'; import css from 'rollup-plugin-css-only'; +import copy from 'rollup-plugin-copy'; const production = !process.env.ROLLUP_WATCH; @@ -41,6 +42,13 @@ export default { // browser on changes when not in production !production && livereload('public'), + // Copy fonts + copy({ + targets: [ + { src: "node_modules/@material-design-icons/font/material-icons-outlined.woff2", dest: "public/build" }, + ] + }), + // If we're building for production (npm run build // instead of npm run dev), minify production && terser() diff --git a/frontend/src/components/ChannelTopBar.svelte b/frontend/src/components/ChannelTopBar.svelte index 1a29308..677e2db 100644 --- a/frontend/src/components/ChannelTopBar.svelte +++ b/frontend/src/components/ChannelTopBar.svelte @@ -1,5 +1,4 @@ @@ -85,9 +89,7 @@
diff --git a/frontend/src/components/overlays/Settings.svelte b/frontend/src/components/overlays/Settings.svelte index 744901d..e692352 100644 --- a/frontend/src/components/overlays/Settings.svelte +++ b/frontend/src/components/overlays/Settings.svelte @@ -1,5 +1,4 @@