diff --git a/composer.lock b/composer.lock index 033a2b6..2c4b950 100644 --- a/composer.lock +++ b/composer.lock @@ -2400,16 +2400,16 @@ }, { "name": "symfony/http-foundation", - "version": "v6.4.46", + "version": "v6.4.50", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "08bbdd5cf09248785442c41929aabe42f8ef5cfd" + "reference": "f0cd207e06ba547c9ad4ee4bdf04729984d39045" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/08bbdd5cf09248785442c41929aabe42f8ef5cfd", - "reference": "08bbdd5cf09248785442c41929aabe42f8ef5cfd", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f0cd207e06ba547c9ad4ee4bdf04729984d39045", + "reference": "f0cd207e06ba547c9ad4ee4bdf04729984d39045", "shasum": "" }, "require": { @@ -2457,7 +2457,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.4.46" + "source": "https://github.com/symfony/http-foundation/tree/v6.4.50" }, "funding": [ { @@ -2477,7 +2477,7 @@ "type": "tidelift" } ], - "time": "2026-09-14T17:40:49+00:00" + "time": "2026-11-04T08:16:31+00:00" }, { "name": "symfony/options-resolver", @@ -3356,16 +3356,16 @@ }, { "name": "symfony/routing", - "version": "v6.4.41", + "version": "v6.4.50", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "af04c79671fd8df0805a44c83fa2b0ba56c8329e" + "reference": "80253f3a04ea4e1ba4d78690b8a1727ed9f104e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/af04c79671fd8df0805a44c83fa2b0ba56c8329e", - "reference": "af04c79671fd8df0805a44c83fa2b0ba56c8329e", + "url": "https://api.github.com/repos/symfony/routing/zipball/80253f3a04ea4e1ba4d78690b8a1727ed9f104e0", + "reference": "80253f3a04ea4e1ba4d78690b8a1727ed9f104e0", "shasum": "" }, "require": { @@ -3419,7 +3419,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.4.41" + "source": "https://github.com/symfony/routing/tree/v6.4.50" }, "funding": [ { @@ -3439,7 +3439,7 @@ "type": "tidelift" } ], - "time": "2026-05-24T11:18:16+00:00" + "time": "2026-11-04T08:16:31+00:00" }, { "name": "symfony/service-contracts", diff --git a/src/vue/App.scss b/src/vue/App.scss new file mode 100644 index 0000000..8338981 --- /dev/null +++ b/src/vue/App.scss @@ -0,0 +1,653 @@ +@use "sass:color"; + +.channel-sidebar { + display: grid; + gap: 0.5rem; + padding: 1rem; + border: 1px solid var(--border-color, #cbd5e1); + border-radius: 0.75rem; + background: var(--surface-color, #fff); + + h2 { + margin: 0 0 0.25rem; + font-size: 1rem; + } +} + +.channel-link { + display: flex; + justify-content: space-between; + gap: 0.75rem; + width: 100%; + padding: 0.65rem 0.75rem; + border: 1px solid transparent; + border-radius: 0.5rem; + background: transparent; + color: inherit; + text-align: left; + cursor: pointer; + + &.active { + border-color: #3f6398; + background: color-mix(in srgb, #3f6398 12%, transparent); + font-weight: 700; + } +} + +.channel-unread { + min-width: 1.5rem; + padding: 0.1rem 0.4rem; + border-radius: 999px; + background: #3f6398; + color: #fff; + text-align: center; +} + +.dm-form { + display: grid; + gap: 0.35rem; + margin-top: 0.5rem; + + div { + display: flex; + gap: 0.4rem; + } + + input { + min-width: 0; + flex: 1; + } +} + +// Variables +$primary-color: #3f6398; +$secondary-color: #6c757d; +$background-color: #f8f9fa; +$border-color: #dee2e6; +$text-color: #343a40; +$light-text-color: #5c6268; +$error-color: #dc3545; +$success-color: #28a745; +$hover-color: #e9ecef; +$box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); +$border-radius: 4px; +$transition-speed: 0.2s; + +// Global styles +* { + box-sizing: border-box; +} + +button, +input, +textarea, +.logout-btn { + min-height: 44px; +} + +button, +.logout-btn { + min-width: 44px; + touch-action: manipulation; +} + +button:active:not(:disabled), +.logout-btn:active { + filter: brightness(0.85); + transform: translateY(1px); +} + +// Chat container +.chat-container { + max-width: 600px; + margin: 20px auto; + background-color: white; + border-radius: 8px; + box-shadow: $box-shadow; + overflow: hidden; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; + color: $text-color; + + @media (max-width: 640px) { + margin: 10px; + width: auto; + } +} + +// Chat header +.chat-header { + background-color: $primary-color; + color: white; + padding: 15px; + border-bottom: 1px solid color.adjust($primary-color, $lightness: -10%); +} + +.user-info { + display: flex; + justify-content: space-between; + align-items: center; + gap: 8px; + min-width: 0; +} + +.welcome-text { + font-size: 16px; +} + +.chat-header .logout-btn { + display: inline-flex; + align-items: center; + justify-content: center; + color: white; + text-decoration: none; + font-size: 14px; + padding: 5px 10px; + border-radius: $border-radius; + background-color: rgba(255, 255, 255, 0.1); + transition: background-color $transition-speed; + + &:hover { + background-color: rgba(255, 255, 255, 0.2); + } +} + +.search-panel { + padding: 15px; + border-bottom: 1px solid $border-color; + background-color: white; +} + +.search-panel-header { + display: flex; + justify-content: space-between; + gap: 10px; + align-items: center; + margin-bottom: 10px; + + h2 { + margin: 0; + font-size: 16px; + } +} + +.search-form { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 10px; + align-items: end; + + @media (max-width: 640px) { + grid-template-columns: 1fr; + } +} + +.search-field { + display: flex; + flex-direction: column; + gap: 4px; + + label { + font-weight: 700; + font-size: 13px; + } + + input { + min-width: 0; + padding: 8px; + border: 1px solid $border-color; + border-radius: $border-radius; + font: inherit; + } +} + +.search-field-wide { + grid-column: 1 / -1; +} + +.search-btn { + padding: 9px 14px; + border: 1px solid color.adjust($primary-color, $lightness: -8%); + border-radius: $border-radius; + background-color: $primary-color; + color: white; + font-size: 14px; + cursor: pointer; + transition: background-color $transition-speed; + + &:hover:not(:disabled) { + background-color: color.adjust($primary-color, $lightness: -8%); + } + + &:disabled { + opacity: 0.5; + cursor: not-allowed; + } +} + +.search-help, +.search-status { + margin: 10px 0 0; + color: $light-text-color; + font-size: 13px; +} + +// Message container +.message-container { + position: relative; + min-height: 300px; + min-width: 0; +} + +// Messages +.messages { + height: 350px; + overflow-y: auto; + overflow-anchor: none; + padding: 15px; + background-color: $background-color; + + @media (max-width: 640px) { + height: 300px; + } +} + +.history-boundary, +.history-loading { + margin: 0 0 12px; + color: $light-text-color; + text-align: center; +} + +.history-sentinel { + height: 1px; +} + +.message-item { + min-width: 0; + margin-bottom: 15px; + padding: 10px; + background-color: white; + border-radius: $border-radius; + box-shadow: $box-shadow; + transition: transform $transition-speed; + + &:hover { + transform: translateY(-2px); + } +} + +.message-header { + display: flex; + justify-content: space-between; + gap: 8px; + margin-bottom: 5px; + font-size: 14px; +} + +.username { + min-width: 0; + overflow-wrap: anywhere; + font-weight: bold; + color: $primary-color; +} + +.timestamp { + flex: 0 0 auto; + color: $light-text-color; + font-size: 12px; +} + +.message-content { + min-width: 0; + max-width: 100%; + line-height: 1.5; + word-break: break-word; + overflow-wrap: anywhere; + + a { + color: $primary-color; + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } + + code { + max-width: 100%; + white-space: pre-wrap; + overflow-wrap: anywhere; + background-color: $background-color; + padding: 2px 4px; + border-radius: 3px; + font-family: monospace; + font-size: 0.9em; + } + + blockquote { + max-width: 100%; + border-left: 3px solid $border-color; + margin: 5px 0; + padding-left: 10px; + color: $secondary-color; + } + + pre { + max-width: 100%; + overflow-x: auto; + white-space: pre-wrap; + overflow-wrap: anywhere; + } + + mark { + padding: 0 2px; + border-radius: 2px; + background-color: #fff0a6; + color: inherit; + } +} + +.no-messages { + text-align: center; + color: $light-text-color; + padding: 20px; +} + +// Loading indicators +.loading-indicator { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 300px; + color: $secondary-color; +} + +.loading-indicator-small { + display: flex; + align-items: center; + justify-content: center; + padding: 10px; + color: $secondary-color; +} + +.spinner { + border: 3px solid rgba(0, 0, 0, 0.1); + border-top: 3px solid $primary-color; + border-radius: 50%; + width: 30px; + height: 30px; + animation: spin 1s linear infinite; + margin-bottom: 10px; +} + +.spinner-small { + border: 2px solid rgba(0, 0, 0, 0.1); + border-top: 2px solid $primary-color; + border-radius: 50%; + width: 16px; + height: 16px; + animation: spin 1s linear infinite; + display: inline-block; + margin-right: 5px; + vertical-align: middle; +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + +// Load more button +.load-more-container { + text-align: center; + padding: 10px; + background-color: $background-color; + border-top: 1px solid $border-color; +} + +.load-more-btn { + padding: 8px 15px; + background-color: white; + border: 1px solid $border-color; + border-radius: $border-radius; + cursor: pointer; + font-size: 14px; + transition: background-color $transition-speed; + + &:hover:not(:disabled) { + background-color: $hover-color; + } + + &:disabled { + opacity: 0.5; + cursor: not-allowed; + } +} + +.typing-indicator { + min-height: 24px; + padding: 6px 15px; + color: $light-text-color; + font-size: 14px; +} + +.typing-dots span { + display: inline-block; + animation: typing-dot 1.2s ease-in-out infinite; + + &:nth-child(2) { + animation-delay: 0.15s; + } + + &:nth-child(3) { + animation-delay: 0.3s; + } +} + +@keyframes typing-dot { + 0%, 60%, 100% { opacity: 0.35; } + 30% { opacity: 1; } +} + +@media (prefers-reduced-motion: reduce) { + .typing-dots span { + animation: none; + } +} + +// Message form +.message-form-container { + padding: 15px; + border-top: 1px solid $border-color; +} + +.message-form { + display: flex; + flex-direction: column; +} + +.form-group { + margin-bottom: 15px; + + label { + display: block; + margin-bottom: 5px; + font-weight: bold; + } + + textarea { + width: 100%; + padding: 10px; + border: 1px solid $border-color; + border-radius: $border-radius; + font-family: inherit; + font-size: 14px; + resize: vertical; + overflow-wrap: anywhere; + + &:focus { + border-color: $primary-color; + } + + &.error-field { + border-color: $error-color; + } + } +} + +.formatting-help { + display: flex; + align-items: center; + margin-top: 5px; + padding: 0; + border: 0; + min-inline-size: 0; + flex-wrap: wrap; + + button { + background-color: $background-color; + border: 1px solid $border-color; + border-radius: $border-radius; + margin-right: 5px; + padding: 3px 8px; + font-size: 12px; + cursor: pointer; + transition: background-color $transition-speed; + + &:hover { + background-color: $hover-color; + } + } + + .format-info { + font-size: 12px; + color: $light-text-color; + margin-left: 5px; + } + + @media (max-width: 640px) { + .format-info { + display: none; + } + } +} + +.error { + color: $error-color; + font-size: 14px; + margin-top: 5px; +} + +.form-actions { + display: flex; + gap: 10px; + + button { + padding: 10px 15px; + border-radius: $border-radius; + font-size: 14px; + cursor: pointer; + transition: background-color $transition-speed; + + &:disabled { + opacity: 0.5; + cursor: not-allowed; + } + } + + .send-btn { + background-color: $primary-color; + color: white; + border: none; + flex: 1; + + &:hover:not(:disabled) { + background-color: color.adjust($primary-color, $lightness: -10%); + } + } + + .clear-btn { + background-color: $secondary-color; + color: white; + border: none; + + &:hover:not(:disabled) { + background-color: color.adjust($secondary-color, $lightness: -10%); + } + } +} + +// Responsive adjustments +@media (max-width: 640px) { + .chat-container { + border-radius: 0; + box-shadow: none; + margin: 0; + height: 100vh; + height: 100dvh; + width: 100%; + max-width: 100%; + min-height: 0; + display: flex; + flex-direction: column; + overflow-x: hidden; + overflow-y: auto; + scroll-padding-bottom: calc(120px + var(--chat-safe-area-bottom)); + } + + .chat-header { + padding-top: calc(15px + var(--chat-safe-area-top)); + padding-right: calc(15px + var(--chat-safe-area-right)); + padding-left: calc(15px + var(--chat-safe-area-left)); + } + + .user-info { + flex-wrap: wrap; + } + + .welcome-text { + flex: 1 1 100%; + } + + .search-panel, + .messages, + .load-more-container, + .typing-indicator { + padding-right: calc(15px + var(--chat-safe-area-right)); + padding-left: calc(15px + var(--chat-safe-area-left)); + } + + .message-container { + flex: 1 0 180px; + min-height: 180px; + overflow: hidden; + } + + .messages { + height: 100%; + } + + .form-actions { + flex-wrap: wrap; + + button { + flex: 1 1 120px; + padding: 12px 15px; + } + } + + .message-form-container { + position: sticky; + bottom: 0; + z-index: 2; + padding-right: calc(15px + var(--chat-safe-area-right)); + padding-bottom: calc(15px + var(--chat-safe-area-bottom)); + padding-left: calc(15px + var(--chat-safe-area-left)); + background-color: white; + } + + #message-input { + scroll-margin-bottom: calc(120px + var(--chat-safe-area-bottom)); + } +} diff --git a/src/vue/App.vue b/src/vue/App.vue index 663876e..d81b35f 100644 --- a/src/vue/App.vue +++ b/src/vue/App.vue @@ -1534,659 +1534,3 @@ }, }; - - diff --git a/src/vue/main.js b/src/vue/main.js index 156f7ad..568875e 100644 --- a/src/vue/main.js +++ b/src/vue/main.js @@ -2,7 +2,8 @@ import { createApp } from 'vue'; import { setupPwa } from '../js/pwa.js'; import App from './App.vue'; -// Import CSS +// Load Vue page styles before the shared chat styles to preserve their cascade. +import './App.scss'; import '../css/chat.scss'; // Create Vue app