diff --git a/frontend/package.json b/frontend/package.json index da02724..b345fed 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -7,7 +7,6 @@ "dev": "rollup -c -w" }, "devDependencies": { - "@fontsource/material-icons-outlined": "^4.5.4", "@rollup/plugin-commonjs": "^23.0.4", "@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-terser": "^0.1.0", @@ -18,6 +17,7 @@ "svelte": "^4.0.0" }, "dependencies": { + "@fontsource-variable/material-symbols-outlined": "^5.0.7", "@fontsource-variable/open-sans": "^5.0.6" } } diff --git a/frontend/rollup.config.mjs b/frontend/rollup.config.mjs index 70824f7..61ae0be 100644 --- a/frontend/rollup.config.mjs +++ b/frontend/rollup.config.mjs @@ -44,7 +44,7 @@ export default { // Copy fonts copy({ targets: [ - { src: "node_modules/@fontsource/material-icons-outlined/files/material-icons-outlined-all-400-normal.woff2", dest: "public/build/files" }, + { src: "node_modules/@fontsource-variable/material-symbols-outlined/files/material-symbols-outlined-latin-opsz-normal.woff2", dest: "public/build/files" }, { src: "node_modules/@fontsource-variable/open-sans/files/open-sans-latin-wght-*", dest: "public/build/files" }, ] }), diff --git a/frontend/src/components/ChipBar.svelte b/frontend/src/components/ChipBar.svelte index fb67cb6..a7d469b 100644 --- a/frontend/src/components/ChipBar.svelte +++ b/frontend/src/components/ChipBar.svelte @@ -2,10 +2,24 @@ export let options = []; export let selectedOptionId = null; export let onSelect = (_) => {}; + export let smaller = false; + export let doHighlight = false; if (selectedOptionId) { onSelect(selectedOptionId); } + + const optionClick = (option) => { + if (option) { + if (doHighlight) { + selectedOptionId = option.id; + } + onSelect(selectedOptionId); + if (option.handle) { + option.handle(); + } + } + }; -
+
{#each options as option (option.id)} - + {#if !option.hidden} + + {/if} {/each}
\ No newline at end of file diff --git a/frontend/src/components/MessageAttachment.svelte b/frontend/src/components/MessageAttachment.svelte index 9b645d3..f255668 100644 --- a/frontend/src/components/MessageAttachment.svelte +++ b/frontend/src/components/MessageAttachment.svelte @@ -96,7 +96,7 @@ {:else if renderAs === AttachmentRenderAs.DownloadableFile}
{ attachment.file_name }
- download + download
{:else}
Couldn't render attachment
diff --git a/frontend/src/components/Sidebar.svelte b/frontend/src/components/Sidebar.svelte index 153f474..4836ff5 100644 --- a/frontend/src/components/Sidebar.svelte +++ b/frontend/src/components/Sidebar.svelte @@ -3,6 +3,7 @@ import { maybeFly, maybeFlyIf } from "../animations"; import { avatarUrl } from "../storage"; import { gatewayStatus, overlayStore, selectedChannel, showSidebar, smallViewport, userInfoStore, unreadStore, OverlayType, communities, selectedCommunity, filteredChannelsStore } from "../stores"; + import SidebarCommunity from "./SidebarCommunity.svelte"; const selectChannel = (channel) => { if ($smallViewport) { @@ -45,11 +46,7 @@ margin: var(--space-sm); margin-bottom: 0; transition-duration: 200ms; - transition-property: border-radius background; - } - - .theme--light .communities .button:hover, .theme--light .communities .button.selected { - color: var(--background-color-3); + transition-property: border-radius background color; } .communities .button:hover, .communities .button.selected { @@ -58,6 +55,18 @@ color: var(--foreground-color-1); } + .theme--light .communities .button.selected .material-icons-outlined, + .theme--light .communities .button:hover .material-icons-outlined, + .theme--light .communities .button:hover, .theme--light .communities .button.selected { + color: var(--background-color-3); + } + .theme--dark .communities .button .material-icons-outlined { + color: var(--foreground-color-2); + } + .theme--dark .communities .button.selected .material-icons-outlined { + color: var(--foreground-color-1); + } + .communities .button span { margin: 0.45em; } @@ -71,11 +80,7 @@