diff --git a/package-lock.json b/package-lock.json index 5106d308..1289ff8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,7 +29,6 @@ "@vincjo/datatables": "^2.8.0", "apexcharts": "^3.44.2", "axios": "^1.6.2", - "bootstrap": "^5.3.2", "chart.js": "^4.4.0", "drawflow": "^0.0.59", "flatpickr": "^4.6.13", @@ -2458,25 +2457,6 @@ "dev": true, "license": "MIT" }, - "node_modules/bootstrap": { - "version": "5.3.8", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.8.tgz", - "integrity": "sha512-HP1SZDqaLDPwsNiqRqi5NcP0SSXciX2s9E+RyqJIIqGo+vJeN5AJVM98CXmW/Wux0nQ5L7jeWUdplCEf0Ee+tg==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/twbs" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/bootstrap" - } - ], - "license": "MIT", - "peerDependencies": { - "@popperjs/core": "^2.11.8" - } - }, "node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", diff --git a/package.json b/package.json index bca68991..43e7d302 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ "@vincjo/datatables": "^2.8.0", "apexcharts": "^3.44.2", "axios": "^1.6.2", - "bootstrap": "^5.3.2", "chart.js": "^4.4.0", "drawflow": "^0.0.59", "flatpickr": "^4.6.13", diff --git a/src/app.css b/src/app.css index 3d552a61..002c5080 100644 --- a/src/app.css +++ b/src/app.css @@ -1,2 +1,40 @@ @import "tailwindcss"; +@plugin "@tailwindcss/forms"; +@plugin "@tailwindcss/typography"; + +@theme { + --font-sans: 'Poppins', ui-sans-serif, system-ui, sans-serif; + + /* Brand colors (overridable at runtime via PUBLIC_PRIMARY_COLOR / PUBLIC_SECONDARY_COLOR) */ + --color-primary: #6f42c1; + --color-primary-hover: color-mix(in srgb, var(--color-primary), black 20%); + --color-secondary: #74788d; + --color-secondary-hover: color-mix(in srgb, var(--color-secondary), black 20%); + + /* Semantic state colors (matched to original Skote palette) */ + --color-success: #34c38f; + --color-info: #50a5f1; + --color-warning: #f1b44c; + --color-danger: #f46a6a; + + /* Neutrals */ + --color-light: #eff2f7; + --color-dark: #343a40; + --color-muted: #74788d; + + /* Layout dimensions */ + --header-height: 70px; + --sidebar-width: 250px; + --sidebar-collapsed-width: 70px; + --footer-height: 60px; + --rightbar-width: 280px; + + /* Sidebar palette (light theme) */ + --sidebar-bg: #ffffff; + --sidebar-menu-item-color: #545a6d; + --sidebar-menu-item-icon-color: #7f8387; + --sidebar-menu-item-hover-color: #383c40; + --sidebar-menu-title-color: #7f8387; +} + diff --git a/src/lib/common/audio-player/AudioPlayer.svelte b/src/lib/common/audio-player/AudioPlayer.svelte index eeef2199..0408a049 100644 --- a/src/lib/common/audio-player/AudioPlayer.svelte +++ b/src/lib/common/audio-player/AudioPlayer.svelte @@ -161,7 +161,7 @@ player.addEventListener("loadedmetadata", () => { $duration = player.duration; }); - + player.addEventListener("error", () => { console.warn("An audio error has occurred, player will skip forward in 2 seconds."); if ($audioList.length > 1) { @@ -230,6 +230,22 @@ } }); + // Bootstrap playerListHeight whenever the list is shown. + // The original transitionend listener in onMount only updates the height + // after a real height transition runs — but with playerListHeight=0 + // initially, the very first toggle goes 0 → 0 and no transition fires, + // so the list would stay invisible forever. Read scrollHeight directly + // here; it reports the natural content height even while overflow is + // clipped and the visible height is 0. + $effect(() => { + // Reading $audioList here registers it as a dependency so the height + // also recomputes when the playlist contents change (e.g. tracks + // added or removed after mount), not just on isShowList flips. + if (isShowList && playListElement && $audioList.length > 0) { + playerListHeight = Math.min(playListElement.scrollHeight, listMaxHeight); + } + }); + const play = () => { if (mutex) { stopAll(); @@ -514,4 +530,329 @@ - \ No newline at end of file + + + diff --git a/src/lib/common/audio-player/AudioSpeaker.svelte b/src/lib/common/audio-player/AudioSpeaker.svelte index 48e4c0db..038ec424 100644 --- a/src/lib/common/audio-player/AudioSpeaker.svelte +++ b/src/lib/common/audio-player/AudioSpeaker.svelte @@ -87,15 +87,17 @@ class="{disableDefaultStyles ? '' : 'chat-speaker-container'} line-align-center {containerClasses}" style={`${containerStyles}`} > -
speak()}> +
speak()}> {#if !speaking} - + title="Play" + > + {:else} - + {/if}
\ No newline at end of file diff --git a/src/lib/common/audio-player/MessageAudioPlayer.svelte b/src/lib/common/audio-player/MessageAudioPlayer.svelte index 7fb98821..91c65ee1 100644 --- a/src/lib/common/audio-player/MessageAudioPlayer.svelte +++ b/src/lib/common/audio-player/MessageAudioPlayer.svelte @@ -111,7 +111,7 @@ {#if !speaking} {:else} - + {/if} \ No newline at end of file diff --git a/src/lib/common/dropdowns/FullScreenDropdown.svelte b/src/lib/common/dropdowns/FullScreenDropdown.svelte index 138a11af..bd7ba062 100644 --- a/src/lib/common/dropdowns/FullScreenDropdown.svelte +++ b/src/lib/common/dropdowns/FullScreenDropdown.svelte @@ -42,8 +42,12 @@ } - diff --git a/src/lib/common/dropdowns/LanguageDropdown.svelte b/src/lib/common/dropdowns/LanguageDropdown.svelte index b89362b0..1bfc99ca 100644 --- a/src/lib/common/dropdowns/LanguageDropdown.svelte +++ b/src/lib/common/dropdowns/LanguageDropdown.svelte @@ -32,42 +32,40 @@ diff --git a/src/lib/common/dropdowns/NotificationDropdown.svelte b/src/lib/common/dropdowns/NotificationDropdown.svelte index dc56a668..ffa9cd03 100644 --- a/src/lib/common/dropdowns/NotificationDropdown.svelte +++ b/src/lib/common/dropdowns/NotificationDropdown.svelte @@ -1,24 +1,9 @@