Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edc7f1955e | ||
|
|
8475ccf873 | ||
|
|
a68dd90bd9 | ||
|
|
7b2541dd35 | ||
|
|
1121939c25 | ||
|
|
3188999a96 | ||
|
|
9162c9b5c9 | ||
|
|
35b5ea5efd |
No files matched your search
@@ -37,6 +37,10 @@ BROADCAST_CONNECTION=log
|
|||||||
FILESYSTEM_DISK=local
|
FILESYSTEM_DISK=local
|
||||||
QUEUE_CONNECTION=database
|
QUEUE_CONNECTION=database
|
||||||
|
|
||||||
|
CHAT_ATTACHMENT_MAX_FILES=5
|
||||||
|
CHAT_ATTACHMENT_MAX_FILE_SIZE_KB=2097152
|
||||||
|
CHAT_LIVEWIRE_MAX_UPLOAD_TIME=60
|
||||||
|
|
||||||
CACHE_STORE=database
|
CACHE_STORE=database
|
||||||
# CACHE_PREFIX=
|
# CACHE_PREFIX=
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,197 @@
|
|||||||
# fluent-chat
|
# Fluent Chat
|
||||||
Fluent chat project with laravel and Flux
|
|
||||||
|
Fluent Chat is a modern Laravel chat platform built with Laravel 13, Livewire 4, Flux UI, Tailwind CSS 4, and Fortify. It focuses on a polished SaaS-style messaging experience with direct conversations, group conversations, profile settings, file sharing, and responsive chat layouts.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Premium responsive chat dashboard with conversation sidebar, message stream, sticky headers, composer, and details panel.
|
||||||
|
- Direct and group conversations with member management.
|
||||||
|
- Conversation search, message search, unread badges, online indicators, pinned conversations, and muted conversations.
|
||||||
|
- Message composer with multiline input, Enter to send, Shift + Enter for new lines, emoji picker, attachment upload UI, loading states, and validation.
|
||||||
|
- File messages with download support and a conversation details "Files" browser.
|
||||||
|
- User profile settings for name, email, password, appearance, and two-factor authentication.
|
||||||
|
- Fortify-backed authentication with verified dashboard access.
|
||||||
|
- Demo seed data for realistic conversations and messages.
|
||||||
|
- Pest feature tests covering core chat flows.
|
||||||
|
|
||||||
|
## Tech Stack
|
||||||
|
|
||||||
|
| Layer | Technology |
|
||||||
|
|------------|----------------------------------|
|
||||||
|
| Backend | Laravel 13, PHP 8.4 |
|
||||||
|
| UI | Livewire 4, Flux UI, Blade |
|
||||||
|
| Styling | Tailwind CSS 4, Vite |
|
||||||
|
| Auth | Laravel Fortify |
|
||||||
|
| Database | MySQL by default in this project |
|
||||||
|
| Testing | Pest 4, Laravel testing tools |
|
||||||
|
| Formatting | Laravel Pint |
|
||||||
|
|
||||||
|
## Main Routes
|
||||||
|
|
||||||
|
| Route | Purpose |
|
||||||
|
|----------------------------------|----------------------------------------|
|
||||||
|
| `/` | Public welcome page |
|
||||||
|
| `/dashboard` | Authenticated chat dashboard |
|
||||||
|
| `/settings/profile` | Profile settings |
|
||||||
|
| `/settings/security` | Password and two-factor authentication |
|
||||||
|
| `/settings/appearance` | Appearance settings |
|
||||||
|
| `/messages/{message}/attachment` | Authenticated file download route |
|
||||||
|
|
||||||
|
When served through Laravel Herd, the dashboard resolves to:
|
||||||
|
|
||||||
|
```text
|
||||||
|
https://fluent-chat.test/dashboard
|
||||||
|
```
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- PHP 8.4+
|
||||||
|
- Composer
|
||||||
|
- Node.js and npm
|
||||||
|
- MySQL or another Laravel-supported database
|
||||||
|
- Laravel Herd, Valet, Sail, or another local PHP environment
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Clone the project and install dependencies:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
composer install
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
Create the environment file and application key:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp .env.example .env
|
||||||
|
php artisan key:generate
|
||||||
|
```
|
||||||
|
|
||||||
|
Configure the database in `.env`. For the current local setup, this project uses MySQL:
|
||||||
|
|
||||||
|
```env
|
||||||
|
DB_CONNECTION=mysql
|
||||||
|
DB_HOST=127.0.0.1
|
||||||
|
DB_PORT=3306
|
||||||
|
DB_DATABASE=fluent_chat_db
|
||||||
|
DB_USERNAME=root
|
||||||
|
DB_PASSWORD=
|
||||||
|
```
|
||||||
|
|
||||||
|
Run migrations and seed demo data:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
php artisan migrate --seed
|
||||||
|
```
|
||||||
|
|
||||||
|
Build frontend assets:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
For active frontend development, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
## Demo Account
|
||||||
|
|
||||||
|
The database seeder creates a demo user:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Email: test@example.com
|
||||||
|
Password: password
|
||||||
|
```
|
||||||
|
|
||||||
|
## Development Commands
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Run the Vite dev server
|
||||||
|
npm run dev
|
||||||
|
|
||||||
|
# Build production assets
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
# Run the test suite
|
||||||
|
php artisan test --compact
|
||||||
|
|
||||||
|
# Run only chat feature tests
|
||||||
|
php artisan test --compact tests/Feature/ChatTest.php
|
||||||
|
|
||||||
|
# Format dirty PHP files
|
||||||
|
vendor/bin/pint --dirty --format agent
|
||||||
|
|
||||||
|
# Clear cached Laravel state
|
||||||
|
php artisan optimize:clear
|
||||||
|
```
|
||||||
|
|
||||||
|
## Data Model
|
||||||
|
|
||||||
|
The chat system is centered on four main models:
|
||||||
|
|
||||||
|
- `User`: authenticated account, profile, security settings, and sent messages.
|
||||||
|
- `Conversation`: direct or group conversation.
|
||||||
|
- `ConversationParticipant`: per-user conversation membership, role, read state, mute state, and pin state.
|
||||||
|
- `Message`: text or file message belonging to a conversation and sender.
|
||||||
|
|
||||||
|
Important relationships:
|
||||||
|
|
||||||
|
- A conversation has many participants.
|
||||||
|
- A conversation has many messages.
|
||||||
|
- A message belongs to a conversation.
|
||||||
|
- A message belongs to a sender.
|
||||||
|
- A user belongs to many conversations through participants.
|
||||||
|
- A user has many messages.
|
||||||
|
|
||||||
|
## Livewire Components
|
||||||
|
|
||||||
|
Core chat UI is split into focused Livewire components:
|
||||||
|
|
||||||
|
- `ChatPage`: dashboard shell and selected conversation state.
|
||||||
|
- `ConversationList`: search, create conversation modal, unread counts, pinned and muted indicators.
|
||||||
|
- `ConversationHeader`: selected conversation header and message search toggle.
|
||||||
|
- `ConversationView`: message stream, grouped messages, search results, and loading states.
|
||||||
|
- `MessageComposer`: text, emoji, and file sending.
|
||||||
|
- `ConversationDetailsPanel`: participants, add members, files, mute, and pin actions.
|
||||||
|
|
||||||
|
Settings components live under `App\Livewire\Settings`.
|
||||||
|
|
||||||
|
## File Uploads
|
||||||
|
|
||||||
|
File messages are stored on Laravel's configured filesystem disk. The app captures attachment metadata before moving the temporary Livewire upload and serves files through an authenticated download route.
|
||||||
|
|
||||||
|
Useful environment value:
|
||||||
|
|
||||||
|
```env
|
||||||
|
FILESYSTEM_DISK=local
|
||||||
|
```
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
Run the main test suite:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
php artisan test --compact
|
||||||
|
```
|
||||||
|
|
||||||
|
The chat feature tests cover authenticated dashboard access, conversation visibility, direct and group creation, message sending, emoji insertion, file messages, file downloads, details panel files, member management, message search, and empty message validation.
|
||||||
|
|
||||||
|
## Production Notes
|
||||||
|
|
||||||
|
- Run `php artisan migrate --force` during deployment.
|
||||||
|
- Run `npm run build` before serving production assets.
|
||||||
|
- Use a queue worker if queued jobs are introduced.
|
||||||
|
- Keep `APP_DEBUG=false` in production.
|
||||||
|
- Configure mail before enabling real user-facing email flows.
|
||||||
|
- Configure HTTPS and secure session/cookie settings for production.
|
||||||
|
|
||||||
|
## Future Enhancements
|
||||||
|
|
||||||
|
- Real-time broadcasting for live message delivery and typing indicators.
|
||||||
|
- Read receipts and delivery receipts.
|
||||||
|
- Message reactions, edits, deletes, and replies.
|
||||||
|
- Drag-and-drop attachment uploads.
|
||||||
|
- Conversation-level roles and moderation controls.
|
||||||
|
- Notification preferences beyond mute state.
|
||||||
@@ -65,7 +65,7 @@ class ConversationDetailsPanel extends Component
|
|||||||
->forUser(Auth::user())
|
->forUser(Auth::user())
|
||||||
->with([
|
->with([
|
||||||
'participants' => fn ($query) => $query
|
'participants' => fn ($query) => $query
|
||||||
->select(['id', 'conversation_id', 'user_id', 'role', 'joined_at'])
|
->select(['id', 'conversation_id', 'user_id', 'role', 'joined_at', 'muted_until', 'pinned_at'])
|
||||||
->with('user:id,name,email'),
|
->with('user:id,name,email'),
|
||||||
])
|
])
|
||||||
->withCount([
|
->withCount([
|
||||||
@@ -104,11 +104,73 @@ class ConversationDetailsPanel extends Component
|
|||||||
return Gate::allows('addMembers', $this->conversation);
|
return Gate::allows('addMembers', $this->conversation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function currentParticipant(): ConversationParticipant
|
||||||
|
{
|
||||||
|
$participant = $this->conversation->participants
|
||||||
|
->first(fn (ConversationParticipant $participant) => $participant->user_id === Auth::id());
|
||||||
|
|
||||||
|
abort_unless($participant instanceof ConversationParticipant, 404);
|
||||||
|
|
||||||
|
return $participant;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isMuted(): bool
|
||||||
|
{
|
||||||
|
return $this->currentParticipant()->isMuted();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isPinned(): bool
|
||||||
|
{
|
||||||
|
return $this->currentParticipant()->isPinned();
|
||||||
|
}
|
||||||
|
|
||||||
public function closeDetails(): void
|
public function closeDetails(): void
|
||||||
{
|
{
|
||||||
$this->dispatch('conversation-details-toggled');
|
$this->dispatch('conversation-details-toggled');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function toggleMute(): void
|
||||||
|
{
|
||||||
|
Gate::authorize('view', $this->conversation);
|
||||||
|
|
||||||
|
$participant = $this->currentParticipant();
|
||||||
|
$wasMuted = $participant->isMuted();
|
||||||
|
|
||||||
|
$participant->forceFill([
|
||||||
|
'muted_until' => $wasMuted ? null : now()->addYear(),
|
||||||
|
])->save();
|
||||||
|
|
||||||
|
unset($this->conversation);
|
||||||
|
|
||||||
|
Flux::toast(
|
||||||
|
variant: 'success',
|
||||||
|
text: $wasMuted ? __('Conversation unmuted.') : __('Conversation muted.'),
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->dispatch('conversation-updated', conversationId: $this->conversationId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function togglePin(): void
|
||||||
|
{
|
||||||
|
Gate::authorize('view', $this->conversation);
|
||||||
|
|
||||||
|
$participant = $this->currentParticipant();
|
||||||
|
$wasPinned = $participant->isPinned();
|
||||||
|
|
||||||
|
$participant->forceFill([
|
||||||
|
'pinned_at' => $wasPinned ? null : now(),
|
||||||
|
])->save();
|
||||||
|
|
||||||
|
unset($this->conversation);
|
||||||
|
|
||||||
|
Flux::toast(
|
||||||
|
variant: 'success',
|
||||||
|
text: $wasPinned ? __('Conversation unpinned.') : __('Conversation pinned.'),
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->dispatch('conversation-updated', conversationId: $this->conversationId);
|
||||||
|
}
|
||||||
|
|
||||||
public function openAddMembers(): void
|
public function openAddMembers(): void
|
||||||
{
|
{
|
||||||
Gate::authorize('addMembers', $this->conversation);
|
Gate::authorize('addMembers', $this->conversation);
|
||||||
|
|||||||
@@ -98,6 +98,11 @@ class ConversationHeader extends Component
|
|||||||
$this->dispatch('conversation-details-toggled');
|
$this->dispatch('conversation-details-toggled');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function toggleSearch(): void
|
||||||
|
{
|
||||||
|
$this->dispatch('conversation-search-toggled', conversationId: $this->conversationId);
|
||||||
|
}
|
||||||
|
|
||||||
private function otherParticipant(): ?User
|
private function otherParticipant(): ?User
|
||||||
{
|
{
|
||||||
return $this->conversation->participants
|
return $this->conversation->participants
|
||||||
|
|||||||
@@ -196,12 +196,19 @@ class ConversationList extends Component
|
|||||||
->forUser($user)
|
->forUser($user)
|
||||||
->with([
|
->with([
|
||||||
'participants' => fn ($query) => $query
|
'participants' => fn ($query) => $query
|
||||||
->select(['id', 'conversation_id', 'user_id', 'role', 'last_read_at'])
|
->select(['id', 'conversation_id', 'user_id', 'role', 'last_read_at', 'muted_until', 'pinned_at'])
|
||||||
->with('user:id,name,email'),
|
->with('user:id,name,email'),
|
||||||
'latestMessage' => fn ($query) => $query
|
'latestMessage' => fn ($query) => $query
|
||||||
->select(['messages.id', 'messages.conversation_id', 'messages.user_id', 'messages.type', 'messages.body', 'messages.metadata', 'messages.created_at']),
|
->select(['messages.id', 'messages.conversation_id', 'messages.user_id', 'messages.type', 'messages.body', 'messages.metadata', 'messages.created_at']),
|
||||||
'latestMessage.sender:id,name,email',
|
'latestMessage.sender:id,name,email',
|
||||||
])
|
])
|
||||||
|
->addSelect([
|
||||||
|
'current_participant_pinned_at' => ConversationParticipant::query()
|
||||||
|
->select('pinned_at')
|
||||||
|
->whereColumn('conversation_participants.conversation_id', 'conversations.id')
|
||||||
|
->where('conversation_participants.user_id', $user->id)
|
||||||
|
->limit(1),
|
||||||
|
])
|
||||||
->withMax('messages', 'created_at')
|
->withMax('messages', 'created_at')
|
||||||
->withCount([
|
->withCount([
|
||||||
'messages as unread_messages_count' => fn (Builder $messages) => $messages
|
'messages as unread_messages_count' => fn (Builder $messages) => $messages
|
||||||
@@ -224,6 +231,7 @@ class ConversationList extends Component
|
|||||||
->where('name', 'like', "%{$search}%")
|
->where('name', 'like', "%{$search}%")
|
||||||
->orWhere('email', 'like', "%{$search}%")));
|
->orWhere('email', 'like', "%{$search}%")));
|
||||||
}))
|
}))
|
||||||
|
->orderByDesc('current_participant_pinned_at')
|
||||||
->orderByDesc('messages_max_created_at')
|
->orderByDesc('messages_max_created_at')
|
||||||
->orderByDesc('updated_at')
|
->orderByDesc('updated_at')
|
||||||
->limit(40)
|
->limit(40)
|
||||||
@@ -336,6 +344,16 @@ class ConversationList extends Component
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isPinnedFor(Conversation $conversation): bool
|
||||||
|
{
|
||||||
|
return (bool) $this->currentParticipantFor($conversation)?->isPinned();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isMutedFor(Conversation $conversation): bool
|
||||||
|
{
|
||||||
|
return (bool) $this->currentParticipantFor($conversation)?->isMuted();
|
||||||
|
}
|
||||||
|
|
||||||
public function isOnline(Conversation $conversation): bool
|
public function isOnline(Conversation $conversation): bool
|
||||||
{
|
{
|
||||||
$participant = $this->otherParticipant($conversation);
|
$participant = $this->otherParticipant($conversation);
|
||||||
@@ -343,6 +361,12 @@ class ConversationList extends Component
|
|||||||
return $participant instanceof User && $participant->id % 3 !== 0;
|
return $participant instanceof User && $participant->id % 3 !== 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function currentParticipantFor(Conversation $conversation): ?ConversationParticipant
|
||||||
|
{
|
||||||
|
return $conversation->participants
|
||||||
|
->first(fn (ConversationParticipant $participant) => $participant->user_id === Auth::id());
|
||||||
|
}
|
||||||
|
|
||||||
private function otherParticipant(Conversation $conversation): ?User
|
private function otherParticipant(Conversation $conversation): ?User
|
||||||
{
|
{
|
||||||
return $conversation->participants
|
return $conversation->participants
|
||||||
|
|||||||
@@ -7,9 +7,11 @@ use App\Models\ConversationParticipant;
|
|||||||
use App\Models\Message;
|
use App\Models\Message;
|
||||||
use Carbon\CarbonInterface;
|
use Carbon\CarbonInterface;
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
|
use Illuminate\Support\HtmlString;
|
||||||
use Livewire\Attributes\Computed;
|
use Livewire\Attributes\Computed;
|
||||||
use Livewire\Attributes\On;
|
use Livewire\Attributes\On;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
@@ -20,6 +22,10 @@ class ConversationView extends Component
|
|||||||
|
|
||||||
public int $messageLimit = 40;
|
public int $messageLimit = 40;
|
||||||
|
|
||||||
|
public bool $messageSearchOpen = false;
|
||||||
|
|
||||||
|
public string $messageSearch = '';
|
||||||
|
|
||||||
public function mount(int $conversationId): void
|
public function mount(int $conversationId): void
|
||||||
{
|
{
|
||||||
$this->conversationId = $conversationId;
|
$this->conversationId = $conversationId;
|
||||||
@@ -33,6 +39,42 @@ class ConversationView extends Component
|
|||||||
$this->messageLimit += 25;
|
$this->messageLimit += 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[On('conversation-search-toggled')]
|
||||||
|
public function toggleMessageSearch(int $conversationId): void
|
||||||
|
{
|
||||||
|
if ($conversationId !== $this->conversationId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->messageSearchOpen = ! $this->messageSearchOpen;
|
||||||
|
|
||||||
|
if (! $this->messageSearchOpen) {
|
||||||
|
$this->clearMessageSearch();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updatedMessageSearch(): void
|
||||||
|
{
|
||||||
|
$this->messageLimit = 40;
|
||||||
|
|
||||||
|
unset($this->messages, $this->hasMoreMessages, $this->searchResultsCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function clearMessageSearch(): void
|
||||||
|
{
|
||||||
|
$this->messageSearch = '';
|
||||||
|
$this->messageLimit = 40;
|
||||||
|
|
||||||
|
unset($this->messages, $this->hasMoreMessages, $this->searchResultsCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function closeMessageSearch(): void
|
||||||
|
{
|
||||||
|
$this->messageSearchOpen = false;
|
||||||
|
|
||||||
|
$this->clearMessageSearch();
|
||||||
|
}
|
||||||
|
|
||||||
#[On('message-created')]
|
#[On('message-created')]
|
||||||
public function refreshMessages(int $conversationId): void
|
public function refreshMessages(int $conversationId): void
|
||||||
{
|
{
|
||||||
@@ -76,8 +118,7 @@ class ConversationView extends Component
|
|||||||
#[Computed]
|
#[Computed]
|
||||||
public function messages(): Collection
|
public function messages(): Collection
|
||||||
{
|
{
|
||||||
return Message::query()
|
return $this->messageQuery()
|
||||||
->where('conversation_id', $this->conversationId)
|
|
||||||
->with('sender:id,name,email')
|
->with('sender:id,name,email')
|
||||||
->latest()
|
->latest()
|
||||||
->limit($this->messageLimit)
|
->limit($this->messageLimit)
|
||||||
@@ -89,11 +130,20 @@ class ConversationView extends Component
|
|||||||
#[Computed]
|
#[Computed]
|
||||||
public function hasMoreMessages(): bool
|
public function hasMoreMessages(): bool
|
||||||
{
|
{
|
||||||
return Message::query()
|
return $this->messageQuery()
|
||||||
->where('conversation_id', $this->conversationId)
|
|
||||||
->count() > $this->messageLimit;
|
->count() > $this->messageLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[Computed]
|
||||||
|
public function searchResultsCount(): int
|
||||||
|
{
|
||||||
|
if (! $this->messageSearchIsActive()) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->messageQuery()->count();
|
||||||
|
}
|
||||||
|
|
||||||
public function dateLabel(CarbonInterface $timestamp): string
|
public function dateLabel(CarbonInterface $timestamp): string
|
||||||
{
|
{
|
||||||
if ($timestamp->isToday()) {
|
if ($timestamp->isToday()) {
|
||||||
@@ -107,6 +157,30 @@ class ConversationView extends Component
|
|||||||
return $timestamp->format('F j, Y');
|
return $timestamp->format('F j, Y');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function messageSearchIsActive(): bool
|
||||||
|
{
|
||||||
|
return $this->messageSearchOpen && trim($this->messageSearch) !== '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function highlightedText(string $text): HtmlString
|
||||||
|
{
|
||||||
|
$escapedText = e($text);
|
||||||
|
$search = trim($this->messageSearch);
|
||||||
|
|
||||||
|
if (! $this->messageSearchIsActive() || $search === '') {
|
||||||
|
return new HtmlString($escapedText);
|
||||||
|
}
|
||||||
|
|
||||||
|
$escapedSearch = e($search);
|
||||||
|
$highlighted = preg_replace(
|
||||||
|
'/('.preg_quote($escapedSearch, '/').')/iu',
|
||||||
|
'<mark class="rounded bg-amber-200 px-0.5 text-zinc-950">$1</mark>',
|
||||||
|
$escapedText,
|
||||||
|
);
|
||||||
|
|
||||||
|
return new HtmlString($highlighted ?? $escapedText);
|
||||||
|
}
|
||||||
|
|
||||||
private function authorizeConversation(): void
|
private function authorizeConversation(): void
|
||||||
{
|
{
|
||||||
$conversation = Conversation::query()
|
$conversation = Conversation::query()
|
||||||
@@ -124,6 +198,24 @@ class ConversationView extends Component
|
|||||||
->update(['last_read_at' => now()]);
|
->update(['last_read_at' => now()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Builder<Message>
|
||||||
|
*/
|
||||||
|
private function messageQuery(): Builder
|
||||||
|
{
|
||||||
|
$search = trim($this->messageSearch);
|
||||||
|
|
||||||
|
return Message::query()
|
||||||
|
->where('conversation_id', $this->conversationId)
|
||||||
|
->when($this->messageSearchIsActive(), fn (Builder $query) => $query->where(function (Builder $query) use ($search): void {
|
||||||
|
$query
|
||||||
|
->where('body', 'like', "%{$search}%")
|
||||||
|
->orWhereHas('sender', fn (Builder $sender) => $sender
|
||||||
|
->where('name', 'like', "%{$search}%")
|
||||||
|
->orWhere('email', 'like', "%{$search}%"));
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
public function render(): View
|
public function render(): View
|
||||||
{
|
{
|
||||||
return view('livewire.chat.conversation-view');
|
return view('livewire.chat.conversation-view');
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ use Illuminate\Contracts\View\View;
|
|||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
|
use Illuminate\Support\Number;
|
||||||
use Livewire\Attributes\Locked;
|
use Livewire\Attributes\Locked;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
use Livewire\Features\SupportFileUploads\TemporaryUploadedFile;
|
use Livewire\Features\SupportFileUploads\TemporaryUploadedFile;
|
||||||
@@ -23,6 +24,8 @@ class MessageComposer extends Component
|
|||||||
|
|
||||||
public string $body = '';
|
public string $body = '';
|
||||||
|
|
||||||
|
public bool $emojiPickerOpen = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array<int, TemporaryUploadedFile>
|
* @var array<int, TemporaryUploadedFile>
|
||||||
*/
|
*/
|
||||||
@@ -39,16 +42,19 @@ class MessageComposer extends Component
|
|||||||
{
|
{
|
||||||
$this->body = trim($this->body);
|
$this->body = trim($this->body);
|
||||||
$hasAttachments = $this->hasAttachments();
|
$hasAttachments = $this->hasAttachments();
|
||||||
|
$maxAttachmentFiles = $this->maxAttachmentFiles();
|
||||||
|
$maxAttachmentFileSizeKilobytes = $this->maxAttachmentFileSizeKilobytes();
|
||||||
|
$maxAttachmentFileSizeLabel = $this->maxAttachmentFileSizeLabel();
|
||||||
|
|
||||||
$validated = $this->validate([
|
$validated = $this->validate([
|
||||||
'body' => [$hasAttachments ? 'nullable' : 'required', 'string', 'max:4000'],
|
'body' => [$hasAttachments ? 'nullable' : 'required', 'string', 'max:4000'],
|
||||||
'attachments' => ['array', 'max:5'],
|
'attachments' => ['array', 'max:'.$maxAttachmentFiles],
|
||||||
'attachments.*' => ['file', 'max:10240'],
|
'attachments.*' => ['file', 'max:'.$maxAttachmentFileSizeKilobytes],
|
||||||
], [
|
], [
|
||||||
'body.required' => __('Write a message or attach a file before sending.'),
|
'body.required' => __('Write a message or attach a file before sending.'),
|
||||||
'attachments.max' => __('Attach up to :max files at a time.'),
|
'attachments.max' => __('Attach up to :max files at a time.', ['max' => $maxAttachmentFiles]),
|
||||||
'attachments.*.file' => __('Each attachment must be a valid file.'),
|
'attachments.*.file' => __('Each attachment must be a valid file.'),
|
||||||
'attachments.*.max' => __('Each attachment must be 10 MB or smaller.'),
|
'attachments.*.max' => __('Each attachment must be :size or smaller.', ['size' => $maxAttachmentFileSizeLabel]),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$conversation = $this->conversation();
|
$conversation = $this->conversation();
|
||||||
@@ -103,11 +109,32 @@ class MessageComposer extends Component
|
|||||||
});
|
});
|
||||||
|
|
||||||
$this->reset('body', 'attachments');
|
$this->reset('body', 'attachments');
|
||||||
|
$this->emojiPickerOpen = false;
|
||||||
$this->resetValidation();
|
$this->resetValidation();
|
||||||
|
|
||||||
$this->dispatch('message-created', conversationId: $conversation->id, messageId: $message->id);
|
$this->dispatch('message-created', conversationId: $conversation->id, messageId: $message->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function toggleEmojiPicker(): void
|
||||||
|
{
|
||||||
|
$this->emojiPickerOpen = ! $this->emojiPickerOpen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function appendEmoji(string $code): void
|
||||||
|
{
|
||||||
|
$emoji = $this->emojiForCode($code);
|
||||||
|
|
||||||
|
if ($emoji === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$body = rtrim($this->body);
|
||||||
|
$this->body = $body === '' ? $emoji : $body.' '.$emoji;
|
||||||
|
$this->emojiPickerOpen = false;
|
||||||
|
|
||||||
|
$this->resetValidation('body');
|
||||||
|
}
|
||||||
|
|
||||||
public function removeAttachment(int $index): void
|
public function removeAttachment(int $index): void
|
||||||
{
|
{
|
||||||
if (! array_key_exists($index, $this->attachments)) {
|
if (! array_key_exists($index, $this->attachments)) {
|
||||||
@@ -122,6 +149,41 @@ class MessageComposer extends Component
|
|||||||
$this->resetValidation("attachments.{$index}");
|
$this->resetValidation("attachments.{$index}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<int, array{code: string, label: string}>
|
||||||
|
*/
|
||||||
|
public function emojiOptions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
['code' => '1F600', 'label' => __('Grinning face')],
|
||||||
|
['code' => '1F604', 'label' => __('Smiling face')],
|
||||||
|
['code' => '1F602', 'label' => __('Laughing face')],
|
||||||
|
['code' => '1F60D', 'label' => __('Heart eyes')],
|
||||||
|
['code' => '1F44B', 'label' => __('Wave')],
|
||||||
|
['code' => '1F44D', 'label' => __('Thumbs up')],
|
||||||
|
['code' => '1F44F', 'label' => __('Clap')],
|
||||||
|
['code' => '1F64C', 'label' => __('Raised hands')],
|
||||||
|
['code' => '1F525', 'label' => __('Fire')],
|
||||||
|
['code' => '2728', 'label' => __('Sparkles')],
|
||||||
|
['code' => '2705', 'label' => __('Check mark')],
|
||||||
|
['code' => '1F680', 'label' => __('Rocket')],
|
||||||
|
['code' => '1F4A1', 'label' => __('Idea')],
|
||||||
|
['code' => '1F440', 'label' => __('Eyes')],
|
||||||
|
['code' => '1F4CC', 'label' => __('Pin')],
|
||||||
|
['code' => '1F4CE', 'label' => __('Paperclip')],
|
||||||
|
['code' => '2764', 'label' => __('Heart')],
|
||||||
|
['code' => '1F389', 'label' => __('Party')],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function attachmentLimitSummary(): string
|
||||||
|
{
|
||||||
|
return __('Up to :count files, :size each', [
|
||||||
|
'count' => $this->maxAttachmentFiles(),
|
||||||
|
'size' => $this->maxAttachmentFileSizeLabel(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
private function conversation(): Conversation
|
private function conversation(): Conversation
|
||||||
{
|
{
|
||||||
$conversation = Conversation::query()
|
$conversation = Conversation::query()
|
||||||
@@ -140,6 +202,34 @@ class MessageComposer extends Component
|
|||||||
->isNotEmpty();
|
->isNotEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function maxAttachmentFiles(): int
|
||||||
|
{
|
||||||
|
return (int) config('chat.attachments.max_files', 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function maxAttachmentFileSizeKilobytes(): int
|
||||||
|
{
|
||||||
|
return (int) config('chat.attachments.max_file_size_kilobytes', 2 * 1024 * 1024);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function maxAttachmentFileSizeLabel(): string
|
||||||
|
{
|
||||||
|
return Number::fileSize($this->maxAttachmentFileSizeKilobytes() * 1024);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function emojiForCode(string $code): ?string
|
||||||
|
{
|
||||||
|
$code = strtoupper($code);
|
||||||
|
$isAllowed = collect($this->emojiOptions())
|
||||||
|
->contains(fn (array $emoji): bool => $emoji['code'] === $code);
|
||||||
|
|
||||||
|
if (! $isAllowed) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return html_entity_decode('&#x'.$code.';', ENT_QUOTES, 'UTF-8');
|
||||||
|
}
|
||||||
|
|
||||||
public function render(): View
|
public function render(): View
|
||||||
{
|
{
|
||||||
return view('livewire.chat.message-composer');
|
return view('livewire.chat.message-composer');
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ use Database\Factories\ConversationFactory;
|
|||||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
|
|
||||||
#[Fillable(['created_by_id', 'type', 'name', 'description'])]
|
#[Fillable(['created_by_id', 'type', 'name', 'description'])]
|
||||||
class Conversation extends Model
|
class Conversation extends Model
|
||||||
@@ -44,7 +44,7 @@ class Conversation extends Model
|
|||||||
public function users(): BelongsToMany
|
public function users(): BelongsToMany
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(User::class, 'conversation_participants')
|
return $this->belongsToMany(User::class, 'conversation_participants')
|
||||||
->withPivot(['role', 'joined_at', 'last_read_at', 'muted_until'])
|
->withPivot(['role', 'joined_at', 'last_read_at', 'muted_until', 'pinned_at'])
|
||||||
->withTimestamps();
|
->withTimestamps();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ namespace App\Models;
|
|||||||
use Database\Factories\ConversationParticipantFactory;
|
use Database\Factories\ConversationParticipantFactory;
|
||||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
|
|
||||||
#[Fillable(['conversation_id', 'user_id', 'role', 'joined_at', 'last_read_at', 'muted_until'])]
|
#[Fillable(['conversation_id', 'user_id', 'role', 'joined_at', 'last_read_at', 'muted_until', 'pinned_at'])]
|
||||||
class ConversationParticipant extends Model
|
class ConversationParticipant extends Model
|
||||||
{
|
{
|
||||||
/** @use HasFactory<ConversationParticipantFactory> */
|
/** @use HasFactory<ConversationParticipantFactory> */
|
||||||
@@ -27,9 +27,20 @@ class ConversationParticipant extends Model
|
|||||||
'joined_at' => 'datetime',
|
'joined_at' => 'datetime',
|
||||||
'last_read_at' => 'datetime',
|
'last_read_at' => 'datetime',
|
||||||
'muted_until' => 'datetime',
|
'muted_until' => 'datetime',
|
||||||
|
'pinned_at' => 'datetime',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isMuted(): bool
|
||||||
|
{
|
||||||
|
return $this->muted_until !== null && $this->muted_until->isFuture();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isPinned(): bool
|
||||||
|
{
|
||||||
|
return $this->pinned_at !== null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return BelongsTo<Conversation, $this>
|
* @return BelongsTo<Conversation, $this>
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function register(): void
|
public function register(): void
|
||||||
{
|
{
|
||||||
//
|
$this->configureFileUploads();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,4 +47,14 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
: null,
|
: null,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function configureFileUploads(): void
|
||||||
|
{
|
||||||
|
$maxFileSizeKilobytes = (int) config('chat.attachments.max_file_size_kilobytes');
|
||||||
|
|
||||||
|
config([
|
||||||
|
'livewire.temporary_file_upload.rules' => ['required', 'file', 'max:'.$maxFileSizeKilobytes],
|
||||||
|
'livewire.temporary_file_upload.max_upload_time' => (int) config('chat.attachments.livewire_max_upload_time'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+6
-4
@@ -1,15 +1,17 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://getcomposer.org/schema.json",
|
"$schema": "https://getcomposer.org/schema.json",
|
||||||
"name": "laravel/livewire-starter-kit",
|
"name": "meghdadfadaee/fluent-chat",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"description": "The official Laravel starter kit for Livewire.",
|
"description": "Fluent chat project with laravel and Flux.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"laravel",
|
"laravel",
|
||||||
"framework"
|
"framework",
|
||||||
|
"chat",
|
||||||
|
"flux"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.3",
|
"php": "^8.4",
|
||||||
"laravel/fortify": "^1.34",
|
"laravel/fortify": "^1.34",
|
||||||
"laravel/framework": "^13.7",
|
"laravel/framework": "^13.7",
|
||||||
"laravel/tinker": "^3.0",
|
"laravel/tinker": "^3.0",
|
||||||
|
|||||||
Generated
+8
-8
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "f8bf4402fcc5a2102d8cc579e484a8f4",
|
"content-hash": "a3ca7feabe07b0ac40f38a9bb55d43e1",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "bacon/bacon-qr-code",
|
"name": "bacon/bacon-qr-code",
|
||||||
@@ -2261,16 +2261,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "livewire/livewire",
|
"name": "livewire/livewire",
|
||||||
"version": "v4.2.4",
|
"version": "v4.3.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/livewire/livewire.git",
|
"url": "https://github.com/livewire/livewire.git",
|
||||||
"reference": "7d0bfa46269b1ec186b8cdd38baffee5cc647d10"
|
"reference": "19ebb1ee4d057debceccf70ff01950e6a6114edc"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/livewire/livewire/zipball/7d0bfa46269b1ec186b8cdd38baffee5cc647d10",
|
"url": "https://api.github.com/repos/livewire/livewire/zipball/19ebb1ee4d057debceccf70ff01950e6a6114edc",
|
||||||
"reference": "7d0bfa46269b1ec186b8cdd38baffee5cc647d10",
|
"reference": "19ebb1ee4d057debceccf70ff01950e6a6114edc",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -2325,7 +2325,7 @@
|
|||||||
"description": "A front-end framework for Laravel.",
|
"description": "A front-end framework for Laravel.",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/livewire/livewire/issues",
|
"issues": "https://github.com/livewire/livewire/issues",
|
||||||
"source": "https://github.com/livewire/livewire/tree/v4.2.4"
|
"source": "https://github.com/livewire/livewire/tree/v4.3.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -2333,7 +2333,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-04-02T20:48:35+00:00"
|
"time": "2026-05-01T00:46:07+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "monolog/monolog",
|
"name": "monolog/monolog",
|
||||||
@@ -10084,7 +10084,7 @@
|
|||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": "^8.3"
|
"php": "^8.4"
|
||||||
},
|
},
|
||||||
"platform-dev": {},
|
"platform-dev": {},
|
||||||
"plugin-api-version": "2.9.0"
|
"plugin-api-version": "2.9.0"
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'attachments' => [
|
||||||
|
'max_files' => (int) env('CHAT_ATTACHMENT_MAX_FILES', 5),
|
||||||
|
'max_file_size_kilobytes' => (int) env('CHAT_ATTACHMENT_MAX_FILE_SIZE_KB', 2 * 1024 * 1024),
|
||||||
|
'livewire_max_upload_time' => (int) env('CHAT_LIVEWIRE_MAX_UPLOAD_TIME', 60),
|
||||||
|
],
|
||||||
|
];
|
||||||
@@ -26,6 +26,7 @@ class ConversationParticipantFactory extends Factory
|
|||||||
'joined_at' => fake()->dateTimeBetween('-2 months', 'now'),
|
'joined_at' => fake()->dateTimeBetween('-2 months', 'now'),
|
||||||
'last_read_at' => fake()->optional(0.85)->dateTimeBetween('-2 weeks', 'now'),
|
'last_read_at' => fake()->optional(0.85)->dateTimeBetween('-2 weeks', 'now'),
|
||||||
'muted_until' => null,
|
'muted_until' => null,
|
||||||
|
'pinned_at' => null,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('conversation_participants', function (Blueprint $table): void {
|
||||||
|
$table->timestamp('pinned_at')->nullable()->after('muted_until');
|
||||||
|
$table->index(['user_id', 'pinned_at']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('conversation_participants', function (Blueprint $table): void {
|
||||||
|
$table->dropIndex(['user_id', 'pinned_at']);
|
||||||
|
$table->dropColumn('pinned_at');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
upload_max_filesize=2048M
|
||||||
|
post_max_size=2050M
|
||||||
|
max_input_time=3600
|
||||||
|
max_execution_time=3600
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 5.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 197 KiB |
+15
-2
@@ -1,3 +1,16 @@
|
|||||||
<svg width="166" height="166" viewBox="0 0 166 166" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Fluent Chat">
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M162.041 38.7592C162.099 38.9767 162.129 39.201 162.13 39.4264V74.4524C162.13 74.9019 162.011 75.3435 161.786 75.7325C161.561 76.1216 161.237 76.4442 160.847 76.6678L131.462 93.5935V127.141C131.462 128.054 130.977 128.897 130.186 129.357L68.8474 164.683C68.707 164.763 68.5538 164.814 68.4007 164.868C68.3432 164.887 68.289 164.922 68.2284 164.938C67.7996 165.051 67.3489 165.051 66.9201 164.938C66.8499 164.919 66.7861 164.881 66.7191 164.855C66.5787 164.804 66.4319 164.76 66.2979 164.683L4.97219 129.357C4.58261 129.133 4.2589 128.81 4.0337 128.421C3.8085 128.032 3.68976 127.591 3.68945 127.141L3.68945 22.0634C3.68945 21.8336 3.72136 21.6101 3.7788 21.393C3.79794 21.3196 3.84262 21.2526 3.86814 21.1791C3.91601 21.0451 3.96068 20.9078 4.03088 20.7833C4.07874 20.7003 4.14894 20.6333 4.20638 20.5566C4.27977 20.4545 4.34678 20.3491 4.43293 20.2598C4.50632 20.1863 4.60205 20.1321 4.68501 20.0682C4.77755 19.9916 4.86051 19.9086 4.96581 19.848L35.6334 2.18492C36.0217 1.96139 36.4618 1.84375 36.9098 1.84375C37.3578 1.84375 37.7979 1.96139 38.1862 2.18492L68.8506 19.848H68.857C68.9591 19.9118 69.0452 19.9916 69.1378 20.065C69.2207 20.1289 69.3133 20.1863 69.3867 20.2566C69.476 20.3491 69.5398 20.4545 69.6164 20.5566C69.6707 20.6333 69.7441 20.7003 69.7887 20.7833C69.8621 20.911 69.9036 21.0451 69.9546 21.1791C69.9802 21.2526 70.0248 21.3196 70.044 21.3962C70.1027 21.6138 70.1328 21.8381 70.1333 22.0634V87.6941L95.686 72.9743V39.4232C95.686 39.1997 95.7179 38.9731 95.7753 38.7592C95.7977 38.6826 95.8391 38.6155 95.8647 38.5421C95.9157 38.408 95.9604 38.2708 96.0306 38.1463C96.0785 38.0633 96.1487 37.9962 96.2029 37.9196C96.2795 37.8175 96.3433 37.7121 96.4326 37.6227C96.506 37.5493 96.5986 37.495 96.6815 37.4312C96.7773 37.3546 96.8602 37.2716 96.9623 37.2109L127.633 19.5479C128.021 19.324 128.461 19.2062 128.91 19.2062C129.358 19.2062 129.798 19.324 130.186 19.5479L160.85 37.2109C160.959 37.2748 161.042 37.3546 161.137 37.428C161.217 37.4918 161.31 37.5493 161.383 37.6195C161.473 37.7121 161.536 37.8175 161.613 37.9196C161.67 37.9962 161.741 38.0633 161.785 38.1463C161.859 38.2708 161.9 38.408 161.951 38.5421C161.98 38.6155 162.021 38.6826 162.041 38.7592ZM157.018 72.9743V43.8477L146.287 50.028L131.462 58.5675V87.6941L157.021 72.9743H157.018ZM126.354 125.663V96.5176L111.771 104.85L70.1301 128.626V158.046L126.354 125.663ZM8.80126 26.4848V125.663L65.0183 158.043V128.629L35.6494 112L35.6398 111.994L35.6271 111.988C35.5281 111.93 35.4452 111.847 35.3526 111.777C35.2729 111.713 35.1803 111.662 35.1101 111.592L35.1038 111.582C35.0208 111.502 34.9634 111.403 34.8932 111.314C34.8293 111.228 34.7528 111.154 34.7017 111.065L34.6985 111.055C34.6411 110.96 34.606 110.845 34.5645 110.736C34.523 110.64 34.4688 110.551 34.4432 110.449C34.4113 110.328 34.4049 110.197 34.3922 110.072C34.3794 109.976 34.3539 109.881 34.3539 109.785V109.778V41.2045L19.5322 32.6619L8.80126 26.4848ZM36.913 7.35007L11.3635 22.0634L36.9066 36.7768L62.4529 22.0602L36.9066 7.35007H36.913ZM50.1999 99.1736L65.0215 90.6374V26.4848L54.2906 32.6651L39.4657 41.2045V105.357L50.1999 99.1736ZM128.91 24.713L103.363 39.4264L128.91 54.1397L154.453 39.4232L128.91 24.713ZM126.354 58.5675L111.529 50.028L100.798 43.8477V72.9743L115.619 81.5106L126.354 87.6941V58.5675ZM67.5711 124.205L105.042 102.803L123.772 92.109L98.2451 77.4053L68.8538 94.3341L42.0663 109.762L67.5711 124.205Z" fill="#FF2D20"/>
|
<rect width="64" height="64" rx="15" fill="#0A0A0A"/>
|
||||||
|
<rect x="6" y="6" width="52" height="52" rx="13" fill="url(#fluent-chat-gradient)"/>
|
||||||
|
<path d="M18 18.5C18 15.4624 20.4624 13 23.5 13H43.5C46.5376 13 49 15.4624 49 18.5V34.5C49 37.5376 46.5376 40 43.5 40H35.8918L25.75 48V40H23.5C20.4624 40 18 37.5376 18 34.5V18.5Z" fill="#0A0A0A"/>
|
||||||
|
<path d="M26 24H41" stroke="white" stroke-width="3.75" stroke-linecap="round"/>
|
||||||
|
<path d="M26 31H36" stroke="white" stroke-width="3.75" stroke-linecap="round"/>
|
||||||
|
<circle cx="46" cy="17" r="5" fill="white"/>
|
||||||
|
<circle cx="46" cy="17" r="2" fill="#10B981"/>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="fluent-chat-gradient" x1="10" y1="9" x2="56" y2="57" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#2DD4BF"/>
|
||||||
|
<stop offset="0.58" stop-color="#34D399"/>
|
||||||
|
<stop offset="1" stop-color="#FACC15"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 1.0 KiB |
@@ -43,12 +43,36 @@
|
|||||||
<flux:heading size="sm">{{ __('Quick actions') }}</flux:heading>
|
<flux:heading size="sm">{{ __('Quick actions') }}</flux:heading>
|
||||||
|
|
||||||
<div class="mt-3 grid grid-cols-3 gap-2">
|
<div class="mt-3 grid grid-cols-3 gap-2">
|
||||||
<flux:tooltip :content="__('Mute')" position="top">
|
<flux:tooltip :content="$this->isMuted() ? __('Unmute') : __('Mute')" position="top">
|
||||||
<flux:button type="button" variant="filled" icon="bell-slash" aria-label="{{ __('Mute') }}" />
|
<flux:button
|
||||||
|
type="button"
|
||||||
|
:variant="$this->isMuted() ? 'primary' : 'filled'"
|
||||||
|
icon="bell-slash"
|
||||||
|
wire:click="toggleMute"
|
||||||
|
wire:loading.attr="disabled"
|
||||||
|
wire:target="toggleMute"
|
||||||
|
aria-pressed="{{ $this->isMuted() ? 'true' : 'false' }}"
|
||||||
|
aria-label="{{ $this->isMuted() ? __('Unmute conversation') : __('Mute conversation') }}"
|
||||||
|
class="w-full"
|
||||||
|
>
|
||||||
|
{{ $this->isMuted() ? __('Muted') : __('Mute') }}
|
||||||
|
</flux:button>
|
||||||
</flux:tooltip>
|
</flux:tooltip>
|
||||||
|
|
||||||
<flux:tooltip :content="__('Pin')" position="top">
|
<flux:tooltip :content="$this->isPinned() ? __('Unpin') : __('Pin')" position="top">
|
||||||
<flux:button type="button" variant="filled" icon="bookmark" aria-label="{{ __('Pin') }}" />
|
<flux:button
|
||||||
|
type="button"
|
||||||
|
:variant="$this->isPinned() ? 'primary' : 'filled'"
|
||||||
|
icon="bookmark"
|
||||||
|
wire:click="togglePin"
|
||||||
|
wire:loading.attr="disabled"
|
||||||
|
wire:target="togglePin"
|
||||||
|
aria-pressed="{{ $this->isPinned() ? 'true' : 'false' }}"
|
||||||
|
aria-label="{{ $this->isPinned() ? __('Unpin conversation') : __('Pin conversation') }}"
|
||||||
|
class="w-full"
|
||||||
|
>
|
||||||
|
{{ $this->isPinned() ? __('Pinned') : __('Pin') }}
|
||||||
|
</flux:button>
|
||||||
</flux:tooltip>
|
</flux:tooltip>
|
||||||
|
|
||||||
<flux:tooltip :content="__('Files')" position="top">
|
<flux:tooltip :content="__('Files')" position="top">
|
||||||
@@ -62,7 +86,9 @@
|
|||||||
wire:target="openFiles"
|
wire:target="openFiles"
|
||||||
aria-label="{{ __('Files') }}"
|
aria-label="{{ __('Files') }}"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
/>
|
>
|
||||||
|
{{ __('Files') }}
|
||||||
|
</flux:button>
|
||||||
|
|
||||||
@if ((int) $this->conversation->files_count > 0)
|
@if ((int) $this->conversation->files_count > 0)
|
||||||
<span class="absolute -end-1 -top-1 flex min-w-5 items-center justify-center rounded-full bg-zinc-900 px-1 text-[10px] font-semibold text-white shadow-sm dark:bg-white dark:text-zinc-950">
|
<span class="absolute -end-1 -top-1 flex min-w-5 items-center justify-center rounded-full bg-zinc-900 px-1 text-[10px] font-semibold text-white shadow-sm dark:bg-white dark:text-zinc-950">
|
||||||
@@ -146,7 +172,7 @@
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<flux:modal wire:model="showAddMembersModal" class="w-full max-w-xl">
|
<flux:modal wire:model="showAddMembersModal" :closable="false" class="w-full max-w-xl">
|
||||||
<form wire:submit="addMembers" class="space-y-6">
|
<form wire:submit="addMembers" class="space-y-6">
|
||||||
<div>
|
<div>
|
||||||
<flux:heading size="lg">{{ __('Add people') }}</flux:heading>
|
<flux:heading size="lg">{{ __('Add people') }}</flux:heading>
|
||||||
@@ -258,7 +284,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</flux:modal>
|
</flux:modal>
|
||||||
|
|
||||||
<flux:modal wire:model="showFilesModal" class="w-full max-w-2xl">
|
<flux:modal wire:model="showFilesModal" :closable="false" class="w-full max-w-2xl">
|
||||||
<div class="space-y-6">
|
<div class="space-y-6">
|
||||||
<div class="flex items-start justify-between gap-4">
|
<div class="flex items-start justify-between gap-4">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -45,7 +45,13 @@
|
|||||||
|
|
||||||
<div class="flex items-center gap-1">
|
<div class="flex items-center gap-1">
|
||||||
<flux:tooltip :content="__('Search messages')" position="bottom">
|
<flux:tooltip :content="__('Search messages')" position="bottom">
|
||||||
<flux:button type="button" variant="ghost" icon="magnifying-glass" aria-label="{{ __('Search messages') }}" />
|
<flux:button
|
||||||
|
type="button"
|
||||||
|
variant="ghost"
|
||||||
|
icon="magnifying-glass"
|
||||||
|
wire:click="toggleSearch"
|
||||||
|
aria-label="{{ __('Search messages') }}"
|
||||||
|
/>
|
||||||
</flux:tooltip>
|
</flux:tooltip>
|
||||||
|
|
||||||
<flux:tooltip :content="__('Conversation details')" position="bottom">
|
<flux:tooltip :content="__('Conversation details')" position="bottom">
|
||||||
|
|||||||
@@ -48,6 +48,8 @@
|
|||||||
@php
|
@php
|
||||||
$selected = $selectedConversationId === $conversation->id;
|
$selected = $selectedConversationId === $conversation->id;
|
||||||
$unreadCount = (int) ($conversation->unread_messages_count ?? 0);
|
$unreadCount = (int) ($conversation->unread_messages_count ?? 0);
|
||||||
|
$isPinned = $this->isPinnedFor($conversation);
|
||||||
|
$isMuted = $this->isMutedFor($conversation);
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<button
|
<button
|
||||||
@@ -111,6 +113,28 @@
|
|||||||
'bg-sky-50 text-sky-700 dark:bg-sky-400/10 dark:text-sky-300' => ! $selected,
|
'bg-sky-50 text-sky-700 dark:bg-sky-400/10 dark:text-sky-300' => ! $selected,
|
||||||
])>{{ __('Group') }}</span>
|
])>{{ __('Group') }}</span>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@if ($isPinned)
|
||||||
|
<span @class([
|
||||||
|
'inline-flex shrink-0 items-center',
|
||||||
|
'text-amber-300 dark:text-amber-600' => $selected,
|
||||||
|
'text-amber-500 dark:text-amber-400' => ! $selected,
|
||||||
|
])>
|
||||||
|
<span class="sr-only">{{ __('Pinned') }}</span>
|
||||||
|
<flux:icon.bookmark class="size-3.5" />
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if ($isMuted)
|
||||||
|
<span @class([
|
||||||
|
'inline-flex shrink-0 items-center',
|
||||||
|
'text-white/60 dark:text-zinc-600' => $selected,
|
||||||
|
'text-zinc-400 dark:text-zinc-500' => ! $selected,
|
||||||
|
])>
|
||||||
|
<span class="sr-only">{{ __('Muted') }}</span>
|
||||||
|
<flux:icon.bell-slash class="size-3.5" />
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p @class([
|
<p @class([
|
||||||
@@ -215,7 +239,7 @@
|
|||||||
</flux:dropdown>
|
</flux:dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<flux:modal wire:model="showCreateConversationModal" class="w-full max-w-2xl">
|
<flux:modal wire:model="showCreateConversationModal" :closable="false" class="w-full max-w-2xl">
|
||||||
<form wire:submit="createConversation" class="space-y-6">
|
<form wire:submit="createConversation" class="space-y-6">
|
||||||
<div class="flex items-start justify-between gap-4">
|
<div class="flex items-start justify-between gap-4">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -15,6 +15,57 @@
|
|||||||
:key="'conversation-header-'.$conversationId"
|
:key="'conversation-header-'.$conversationId"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@if ($messageSearchOpen)
|
||||||
|
<section class="shrink-0 border-b border-zinc-200 bg-white/95 p-3 backdrop-blur dark:border-zinc-800 dark:bg-zinc-950/95 sm:px-5">
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
<flux:input
|
||||||
|
wire:model.live.debounce.250ms="messageSearch"
|
||||||
|
icon="magnifying-glass"
|
||||||
|
:placeholder="__('Search this conversation')"
|
||||||
|
aria-label="{{ __('Search this conversation') }}"
|
||||||
|
class="flex-1"
|
||||||
|
/>
|
||||||
|
|
||||||
|
@if ($messageSearch !== '')
|
||||||
|
<flux:tooltip :content="__('Clear search')" position="bottom">
|
||||||
|
<flux:button
|
||||||
|
type="button"
|
||||||
|
variant="ghost"
|
||||||
|
icon="x-mark"
|
||||||
|
wire:click="clearMessageSearch"
|
||||||
|
aria-label="{{ __('Clear search') }}"
|
||||||
|
/>
|
||||||
|
</flux:tooltip>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<flux:tooltip :content="__('Close search')" position="bottom">
|
||||||
|
<flux:button
|
||||||
|
type="button"
|
||||||
|
variant="ghost"
|
||||||
|
icon="chevron-up"
|
||||||
|
wire:click="closeMessageSearch"
|
||||||
|
aria-label="{{ __('Close search') }}"
|
||||||
|
/>
|
||||||
|
</flux:tooltip>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-2 flex min-h-5 items-center justify-between gap-3">
|
||||||
|
<flux:text class="text-xs text-zinc-500 dark:text-zinc-400">
|
||||||
|
@if ($this->messageSearchIsActive())
|
||||||
|
{{ trans_choice(':count matching message|:count matching messages', $this->searchResultsCount, ['count' => $this->searchResultsCount]) }}
|
||||||
|
@else
|
||||||
|
{{ __('Search by message text, file name, sender, or email.') }}
|
||||||
|
@endif
|
||||||
|
</flux:text>
|
||||||
|
|
||||||
|
<div wire:loading.flex wire:target="messageSearch" class="items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400">
|
||||||
|
<flux:icon.arrow-path class="size-3.5 animate-spin" />
|
||||||
|
<span>{{ __('Searching') }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
@endif
|
||||||
|
|
||||||
<div x-ref="messages" class="min-h-0 flex-1 overflow-y-auto scroll-smooth bg-zinc-50/40 px-4 py-6 dark:bg-zinc-950 sm:px-6">
|
<div x-ref="messages" class="min-h-0 flex-1 overflow-y-auto scroll-smooth bg-zinc-50/40 px-4 py-6 dark:bg-zinc-950 sm:px-6">
|
||||||
@if ($this->hasMoreMessages)
|
@if ($this->hasMoreMessages)
|
||||||
<div class="mb-6 flex justify-center">
|
<div class="mb-6 flex justify-center">
|
||||||
@@ -26,7 +77,7 @@
|
|||||||
wire:loading.attr="disabled"
|
wire:loading.attr="disabled"
|
||||||
wire:target="loadEarlier"
|
wire:target="loadEarlier"
|
||||||
>
|
>
|
||||||
{{ __('Load earlier') }}
|
{{ $this->messageSearchIsActive() ? __('Load more results') : __('Load earlier') }}
|
||||||
</flux:button>
|
</flux:button>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@@ -37,9 +88,17 @@
|
|||||||
<div class="mx-auto mb-4 flex size-12 items-center justify-center rounded-lg border border-dashed border-zinc-300 text-zinc-400 dark:border-zinc-700">
|
<div class="mx-auto mb-4 flex size-12 items-center justify-center rounded-lg border border-dashed border-zinc-300 text-zinc-400 dark:border-zinc-700">
|
||||||
<flux:icon.chat-bubble-left-ellipsis class="size-6" />
|
<flux:icon.chat-bubble-left-ellipsis class="size-6" />
|
||||||
</div>
|
</div>
|
||||||
<flux:heading size="sm">{{ __('No messages yet') }}</flux:heading>
|
|
||||||
|
<flux:heading size="sm">
|
||||||
|
{{ $this->messageSearchIsActive() ? __('No matching messages') : __('No messages yet') }}
|
||||||
|
</flux:heading>
|
||||||
|
|
||||||
<flux:text class="mt-2 text-sm text-zinc-500 dark:text-zinc-400">
|
<flux:text class="mt-2 text-sm text-zinc-500 dark:text-zinc-400">
|
||||||
{{ __('Start the conversation with a short note.') }}
|
@if ($this->messageSearchIsActive())
|
||||||
|
{{ __('No messages match your current search.') }}
|
||||||
|
@else
|
||||||
|
{{ __('Start the conversation with a short note.') }}
|
||||||
|
@endif
|
||||||
</flux:text>
|
</flux:text>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -115,7 +174,7 @@
|
|||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span class="min-w-0 flex-1">
|
<span class="min-w-0 flex-1">
|
||||||
<span class="block truncate font-medium">{{ $message->attachmentName() }}</span>
|
<span class="block truncate font-medium">{!! $this->highlightedText($message->attachmentName()) !!}</span>
|
||||||
<span @class([
|
<span @class([
|
||||||
'mt-0.5 block text-xs',
|
'mt-0.5 block text-xs',
|
||||||
'text-white/70 dark:text-zinc-600' => $isMine,
|
'text-white/70 dark:text-zinc-600' => $isMine,
|
||||||
@@ -132,7 +191,7 @@
|
|||||||
]) />
|
]) />
|
||||||
</a>
|
</a>
|
||||||
@else
|
@else
|
||||||
<p class="whitespace-pre-wrap break-words">{{ $message->body }}</p>
|
<p class="whitespace-pre-wrap break-words">{!! $this->highlightedText($message->body) !!}</p>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<div class="flex items-start justify-between gap-3">
|
<div class="flex items-start justify-between gap-3">
|
||||||
<div>
|
<div>
|
||||||
<div class="text-sm font-medium text-zinc-900 dark:text-zinc-100">{{ __('Attachments') }}</div>
|
<div class="text-sm font-medium text-zinc-900 dark:text-zinc-100">{{ __('Attachments') }}</div>
|
||||||
<div class="mt-0.5 text-xs text-zinc-500 dark:text-zinc-400">{{ __('Up to 5 files, 10 MB each') }}</div>
|
<div class="mt-0.5 text-xs text-zinc-500 dark:text-zinc-400">{{ $this->attachmentLimitSummary() }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<flux:button
|
<flux:button
|
||||||
@@ -79,6 +79,27 @@
|
|||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@if ($emojiPickerOpen)
|
||||||
|
<div
|
||||||
|
wire:key="emoji-picker"
|
||||||
|
class="mb-2 rounded-lg border border-zinc-200 bg-white p-2 shadow-sm dark:border-zinc-800 dark:bg-zinc-900"
|
||||||
|
>
|
||||||
|
<div class="grid grid-cols-9 gap-1 sm:grid-cols-12">
|
||||||
|
@foreach ($this->emojiOptions() as $emoji)
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
wire:key="emoji-option-{{ $emoji['code'] }}"
|
||||||
|
wire:click="appendEmoji('{{ $emoji['code'] }}')"
|
||||||
|
class="flex aspect-square min-h-9 items-center justify-center rounded-md text-xl transition hover:bg-zinc-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-accent dark:hover:bg-zinc-800"
|
||||||
|
aria-label="{{ __('Add :emoji emoji', ['emoji' => $emoji['label']]) }}"
|
||||||
|
>
|
||||||
|
{{ html_entity_decode('&#x'.$emoji['code'].';', ENT_QUOTES, 'UTF-8') }}
|
||||||
|
</button>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<div class="flex items-end gap-2 rounded-lg border border-zinc-200 bg-white p-2 shadow-sm transition focus-within:border-zinc-300 focus-within:ring-2 focus-within:ring-accent focus-within:ring-offset-2 focus-within:ring-offset-white dark:border-zinc-800 dark:bg-zinc-900 dark:focus-within:border-zinc-700 dark:focus-within:ring-offset-zinc-950">
|
<div class="flex items-end gap-2 rounded-lg border border-zinc-200 bg-white p-2 shadow-sm transition focus-within:border-zinc-300 focus-within:ring-2 focus-within:ring-accent focus-within:ring-offset-2 focus-within:ring-offset-white dark:border-zinc-800 dark:bg-zinc-900 dark:focus-within:border-zinc-700 dark:focus-within:ring-offset-zinc-950">
|
||||||
<flux:tooltip :content="__('Attach file')" position="top">
|
<flux:tooltip :content="__('Attach file')" position="top">
|
||||||
<flux:button
|
<flux:button
|
||||||
@@ -101,7 +122,14 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<flux:tooltip :content="__('Emoji')" position="top">
|
<flux:tooltip :content="__('Emoji')" position="top">
|
||||||
<flux:button type="button" variant="ghost" icon="face-smile" aria-label="{{ __('Emoji') }}" />
|
<flux:button
|
||||||
|
type="button"
|
||||||
|
variant="ghost"
|
||||||
|
icon="face-smile"
|
||||||
|
wire:click="toggleEmojiPicker"
|
||||||
|
aria-label="{{ __('Emoji') }}"
|
||||||
|
aria-expanded="{{ $emojiPickerOpen ? 'true' : 'false' }}"
|
||||||
|
/>
|
||||||
</flux:tooltip>
|
</flux:tooltip>
|
||||||
|
|
||||||
<flux:button
|
<flux:button
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</flux:button>
|
</flux:button>
|
||||||
</flux:modal.trigger>
|
</flux:modal.trigger>
|
||||||
|
|
||||||
<flux:modal name="confirm-user-deletion" :show="$errors->isNotEmpty()" focusable class="max-w-lg">
|
<flux:modal name="confirm-user-deletion" :show="$errors->isNotEmpty()" :closable="false" focusable class="max-w-lg">
|
||||||
<form method="POST" wire:submit="deleteUser" class="space-y-6">
|
<form method="POST" wire:submit="deleteUser" class="space-y-6">
|
||||||
<div>
|
<div>
|
||||||
<flux:heading size="lg">{{ __('Are you sure you want to delete your account?') }}</flux:heading>
|
<flux:heading size="lg">{{ __('Are you sure you want to delete your account?') }}</flux:heading>
|
||||||
|
|||||||
@@ -78,6 +78,7 @@
|
|||||||
<flux:modal
|
<flux:modal
|
||||||
name="two-factor-setup-modal"
|
name="two-factor-setup-modal"
|
||||||
class="max-w-md md:min-w-md"
|
class="max-w-md md:min-w-md"
|
||||||
|
:closable="false"
|
||||||
@close="closeModal"
|
@close="closeModal"
|
||||||
wire:model="showModal"
|
wire:model="showModal"
|
||||||
>
|
>
|
||||||
|
|||||||
+253
-188
@@ -1,202 +1,267 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="scroll-smooth">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
@include('partials.head', ['title' => 'Fluent Chat'])
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
|
|
||||||
<title>{{ __('Welcome') }} - {{ config('app.name', 'Laravel') }}</title>
|
|
||||||
|
|
||||||
<link rel="icon" href="/favicon.ico" sizes="any">
|
|
||||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
|
||||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
|
||||||
|
|
||||||
@fonts
|
|
||||||
|
|
||||||
<!-- Styles -->
|
|
||||||
<style>
|
|
||||||
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Instrument Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-lime-950:oklch(27.4% .072 132.109);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-green-950:oklch(26.6% .065 152.934);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-teal-50:oklch(98.4% .014 180.72);--color-teal-100:oklch(95.3% .051 180.801);--color-teal-200:oklch(91% .096 180.426);--color-te
Line truncated
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-[#FDFDFC] dark:bg-[#0a0a0a] text-[#1b1b18] flex p-6 lg:p-8 items-center lg:justify-center min-h-screen flex-col">
|
|
||||||
<header class="w-full lg:max-w-4xl max-w-[335px] text-sm mb-6 not-has-[nav]:hidden">
|
|
||||||
@if (Route::has('login'))
|
|
||||||
<nav class="flex items-center justify-end gap-4">
|
|
||||||
@auth
|
|
||||||
<a
|
|
||||||
href="{{ route('dashboard') }}"
|
|
||||||
class="inline-block px-5 py-1.5 dark:text-[#EDEDEC] border-[#19140035] hover:border-[#1915014a] border text-[#1b1b18] dark:border-[#3E3E3A] dark:hover:border-[#62605b] rounded-sm text-sm leading-normal"
|
|
||||||
>
|
|
||||||
Dashboard
|
|
||||||
</a>
|
|
||||||
@else
|
|
||||||
<a
|
|
||||||
href="{{ route('login') }}"
|
|
||||||
class="inline-block px-5 py-1.5 dark:text-[#EDEDEC] text-[#1b1b18] border border-transparent hover:border-[#19140035] dark:hover:border-[#3E3E3A] rounded-sm text-sm leading-normal"
|
|
||||||
>
|
|
||||||
Log in
|
|
||||||
</a>
|
|
||||||
|
|
||||||
@if (Route::has('register'))
|
<body class="bg-zinc-950 font-sans text-white antialiased">
|
||||||
<a
|
<a
|
||||||
href="{{ route('register') }}"
|
href="#content"
|
||||||
class="inline-block px-5 py-1.5 dark:text-[#EDEDEC] border-[#19140035] hover:border-[#1915014a] border text-[#1b1b18] dark:border-[#3E3E3A] dark:hover:border-[#62605b] rounded-sm text-sm leading-normal">
|
class="sr-only focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-50 focus:rounded-md focus:bg-white focus:px-3 focus:py-2 focus:text-sm focus:font-medium focus:text-zinc-950"
|
||||||
Register
|
>
|
||||||
</a>
|
{{ __('Skip to content') }}
|
||||||
@endif
|
</a>
|
||||||
@endauth
|
|
||||||
</nav>
|
<main id="content" class="min-h-dvh overflow-hidden">
|
||||||
@endif
|
<section class="relative isolate min-h-[86svh] overflow-hidden">
|
||||||
</header>
|
<div aria-hidden="true" class="absolute inset-0 bg-zinc-950">
|
||||||
<div class="flex items-center justify-center w-full transition-opacity opacity-100 duration-750 lg:grow starting:opacity-0">
|
<div class="absolute inset-0 bg-[linear-gradient(120deg,rgba(20,184,166,0.18),rgba(250,204,21,0.10)_34%,rgba(244,63,94,0.12)_68%,rgba(10,10,10,0.96))]"></div>
|
||||||
<main class="flex max-w-[335px] w-full flex-col-reverse lg:max-w-4xl lg:flex-row">
|
<div class="absolute inset-0 bg-[linear-gradient(rgba(255,255,255,0.06)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,0.05)_1px,transparent_1px)] bg-[size:72px_72px] opacity-35"></div>
|
||||||
<div class="text-[13px] leading-[20px] flex-1 p-6 pb-12 lg:p-20 bg-white dark:bg-[#161615] dark:text-[#EDEDEC] shadow-[inset_0px_0px_0px_1px_rgba(26,26,0,0.16)] dark:shadow-[inset_0px_0px_0px_1px_#fffaed2d] rounded-es-lg rounded-ee-lg lg:rounded-ss-lg lg:rounded-ee-none">
|
|
||||||
<h1 class="mb-1 font-medium">Let's get started</h1>
|
<div class="absolute left-1/2 top-24 w-[72rem] max-w-none -translate-x-[42%] rotate-[-2deg] opacity-80 sm:top-16">
|
||||||
<p class="mb-2 text-[#706f6c] dark:text-[#A1A09A]">Laravel has an incredibly rich ecosystem. <br>We suggest starting with the following.</p>
|
<div class="overflow-hidden rounded-lg border border-white/15 bg-zinc-950/75 shadow-2xl shadow-black/40 backdrop-blur">
|
||||||
<ul class="flex flex-col mb-4 lg:mb-6">
|
<div class="flex items-center justify-between border-b border-white/10 bg-white/5 px-4 py-3">
|
||||||
<li class="flex items-center gap-4 py-2 relative before:border-l before:border-[#e3e3e0] dark:before:border-[#3E3E3A] before:top-1/2 before:bottom-0 before:left-[0.4rem] before:absolute">
|
<div class="flex items-center gap-2">
|
||||||
<span class="relative py-1 bg-white dark:bg-[#161615]">
|
<span class="size-2 rounded-full bg-rose-400"></span>
|
||||||
<span class="flex items-center justify-center rounded-full bg-[#FDFDFC] dark:bg-[#161615] shadow-[0px_0px_1px_0px_rgba(0,0,0,0.03),0px_1px_2px_0px_rgba(0,0,0,0.06)] w-3.5 h-3.5 border dark:border-[#3E3E3A] border-[#e3e3e0]">
|
<span class="size-2 rounded-full bg-amber-300"></span>
|
||||||
<span class="rounded-full bg-[#dbdbd7] dark:bg-[#3E3E3A] w-1.5 h-1.5"></span>
|
<span class="size-2 rounded-full bg-emerald-400"></span>
|
||||||
</span>
|
</div>
|
||||||
</span>
|
<div class="h-2 w-40 rounded-full bg-white/10"></div>
|
||||||
<span>
|
</div>
|
||||||
Read the
|
|
||||||
<a href="https://laravel.com/docs" target="_blank" class="inline-flex items-center space-x-1 font-medium underline underline-offset-4 text-[#f53003] dark:text-[#FF4433] ms-1">
|
<div class="grid h-[36rem] grid-cols-[18rem_1fr_17rem]">
|
||||||
<span>Documentation</span>
|
<div class="border-r border-white/10 bg-zinc-950/60 p-4">
|
||||||
<svg
|
<div class="mb-5 flex items-center justify-between">
|
||||||
width="10"
|
<div class="h-6 w-28 rounded-md bg-white/15"></div>
|
||||||
height="11"
|
<div class="size-8 rounded-md bg-teal-300/90"></div>
|
||||||
viewBox="0 0 10 11"
|
</div>
|
||||||
fill="none"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
<div class="space-y-3">
|
||||||
class="w-2.5 h-2.5"
|
@foreach ([
|
||||||
>
|
['Launch Room', 'Final asset bundle is attached.', '12'],
|
||||||
<path
|
['Mina Partner', 'Let me check the new mockup.', ''],
|
||||||
d="M7.70833 6.95834V2.79167H3.54167M2.5 8L7.5 3.00001"
|
['Ops Standup', 'Deployment note is ready.', '4'],
|
||||||
stroke="currentColor"
|
['Design Review', 'Updated spacing pass shipped.', ''],
|
||||||
stroke-linecap="square"
|
] as [$name, $preview, $count])
|
||||||
/>
|
<div class="rounded-lg border border-white/10 bg-white/[0.07] p-3">
|
||||||
</svg>
|
<div class="flex items-center gap-3">
|
||||||
</a>
|
<div class="flex size-9 items-center justify-center rounded-full bg-white/15 text-xs font-semibold">{{ mb_substr($name, 0, 1) }}</div>
|
||||||
</span>
|
<div class="min-w-0 flex-1">
|
||||||
</li>
|
<div class="truncate text-sm font-semibold text-white">{{ $name }}</div>
|
||||||
<li class="flex items-center gap-4 py-2 relative before:border-l before:border-[#e3e3e0] dark:before:border-[#3E3E3A] before:bottom-1/2 before:top-0 before:start-[0.4rem] before:absolute">
|
<div class="truncate text-xs text-zinc-300">{{ $preview }}</div>
|
||||||
<span class="relative py-1 bg-white dark:bg-[#161615]">
|
</div>
|
||||||
<span class="flex items-center justify-center rounded-full bg-[#FDFDFC] dark:bg-[#161615] shadow-[0px_0px_1px_0px_rgba(0,0,0,0.03),0px_1px_2px_0px_rgba(0,0,0,0.06)] w-3.5 h-3.5 border dark:border-[#3E3E3A] border-[#e3e3e0]">
|
@if ($count !== '')
|
||||||
<span class="rounded-full bg-[#dbdbd7] dark:bg-[#3E3E3A] w-1.5 h-1.5"></span>
|
<div class="flex size-5 items-center justify-center rounded-full bg-emerald-300 text-[10px] font-bold text-zinc-950">{{ $count }}</div>
|
||||||
</span>
|
@endif
|
||||||
</span>
|
</div>
|
||||||
<span>
|
</div>
|
||||||
Watch video tutorials at
|
@endforeach
|
||||||
<a href="https://laracasts.com" target="_blank" class="inline-flex items-center space-x-1 font-medium underline underline-offset-4 text-[#f53003] dark:text-[#FF4433] ms-1">
|
</div>
|
||||||
<span>Laracasts</span>
|
</div>
|
||||||
<svg
|
|
||||||
width="10"
|
<div class="flex flex-col bg-zinc-900/70">
|
||||||
height="11"
|
<div class="flex items-center justify-between border-b border-white/10 px-5 py-4">
|
||||||
viewBox="0 0 10 11"
|
<div class="flex items-center gap-3">
|
||||||
fill="none"
|
<div class="flex size-10 items-center justify-center rounded-full bg-gradient-to-br from-teal-300 to-emerald-400 text-sm font-bold text-zinc-950">LR</div>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
<div>
|
||||||
class="w-2.5 h-2.5"
|
<div class="text-sm font-semibold">Launch Room</div>
|
||||||
>
|
<div class="text-xs text-emerald-200">8 members online</div>
|
||||||
<path
|
</div>
|
||||||
d="M7.70833 6.95834V2.79167H3.54167M2.5 8L7.5 3.00001"
|
</div>
|
||||||
stroke="currentColor"
|
<div class="flex gap-2">
|
||||||
stroke-linecap="square"
|
<div class="size-8 rounded-md bg-white/10"></div>
|
||||||
/>
|
<div class="size-8 rounded-md bg-white/10"></div>
|
||||||
</svg>
|
</div>
|
||||||
</a>
|
</div>
|
||||||
</span>
|
|
||||||
</li>
|
<div class="flex-1 space-y-4 p-6">
|
||||||
</ul>
|
<div class="max-w-md rounded-lg border border-white/10 bg-white/10 p-4 text-sm text-zinc-100">
|
||||||
<ul class="flex gap-3 text-sm leading-normal">
|
The campaign room is clean now. I pinned the launch notes and grouped the latest files.
|
||||||
<li>
|
</div>
|
||||||
<a href="https://cloud.laravel.com" target="_blank" class="inline-block dark:bg-[#eeeeec] dark:border-[#eeeeec] dark:text-[#1C1C1A] dark:hover:bg-white dark:hover:border-white hover:bg-black hover:border-black px-5 py-1.5 bg-[#1b1b18] rounded-sm border border-black text-white text-sm leading-normal">
|
<div class="ml-auto max-w-sm rounded-lg bg-white p-4 text-sm font-medium text-zinc-950 shadow-xl shadow-black/20">
|
||||||
Deploy now
|
Perfect. Drop the handoff PDF here and I will send it to product.
|
||||||
</a>
|
</div>
|
||||||
</li>
|
<div class="max-w-md rounded-lg border border-white/10 bg-white/10 p-4">
|
||||||
</ul>
|
<div class="mb-3 flex items-center gap-3">
|
||||||
|
<div class="flex size-10 items-center justify-center rounded-md bg-white/10">
|
||||||
|
<flux:icon.document class="size-5 text-amber-200" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="text-sm font-semibold">handoff-notes.pdf</div>
|
||||||
|
<div class="text-xs text-zinc-300">2.4 MB · shared now</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="h-2 overflow-hidden rounded-full bg-white/10">
|
||||||
|
<div class="h-full w-4/5 rounded-full bg-emerald-300"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="border-t border-white/10 p-4">
|
||||||
|
<div class="flex items-center gap-3 rounded-lg border border-white/10 bg-white/10 p-3">
|
||||||
|
<div class="size-8 rounded-md bg-white/10"></div>
|
||||||
|
<div class="h-3 flex-1 rounded-full bg-white/20"></div>
|
||||||
|
<div class="flex size-9 items-center justify-center rounded-md bg-emerald-300 text-zinc-950">
|
||||||
|
<flux:icon.paper-airplane class="size-4" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="border-l border-white/10 bg-zinc-950/65 p-5">
|
||||||
|
<div class="mb-5 flex flex-col items-center text-center">
|
||||||
|
<div class="mb-3 flex size-16 items-center justify-center rounded-lg bg-gradient-to-br from-teal-300 to-amber-200 text-lg font-bold text-zinc-950">LR</div>
|
||||||
|
<div class="font-semibold">Launch Room</div>
|
||||||
|
<div class="text-xs text-zinc-400">Files, people, context</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="space-y-3 text-sm">
|
||||||
|
<div class="rounded-lg border border-white/10 bg-white/[0.07] p-3">
|
||||||
|
<div class="text-xs text-zinc-400">Shared files</div>
|
||||||
|
<div class="mt-1 text-2xl font-semibold">18</div>
|
||||||
|
</div>
|
||||||
|
<div class="rounded-lg border border-white/10 bg-white/[0.07] p-3">
|
||||||
|
<div class="text-xs text-zinc-400">Members</div>
|
||||||
|
<div class="mt-1 text-2xl font-semibold">8</div>
|
||||||
|
</div>
|
||||||
|
<div class="rounded-lg border border-white/10 bg-white/[0.07] p-3">
|
||||||
|
<div class="text-xs text-zinc-400">Unread</div>
|
||||||
|
<div class="mt-1 text-2xl font-semibold">4</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg-[#fff2f2] dark:bg-[#1D0002] relative lg:-ml-px -mb-px lg:mb-0 rounded-t-lg lg:rounded-t-none lg:rounded-r-lg aspect-[335/364] lg:aspect-auto w-full lg:w-[438px] shrink-0 overflow-hidden">
|
|
||||||
{{-- Laravel Logo --}}
|
|
||||||
<svg class="w-full text-[#F53003] dark:text-[#F61500] transition-all translate-y-0 opacity-100 max-w-none duration-750 starting:opacity-0 motion-safe:starting:translate-y-6" viewBox="0 0 438 104" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M17.2036 -3H0V102.197H49.5189V86.7187H17.2036V-3Z" fill="currentColor" />
|
|
||||||
<path d="M110.256 41.6337C108.061 38.1275 104.945 35.3731 100.905 33.3681C96.8667 31.3647 92.8016 30.3618 88.7131 30.3618C83.4247 30.3618 78.5885 31.3389 74.201 33.2923C69.8111 35.2456 66.0474 37.928 62.9059 41.3333C59.7643 44.7401 57.3198 48.6726 55.5754 53.1293C53.8287 57.589 52.9572 62.274 52.9572 67.1813C52.9572 72.1925 53.8287 76.8995 55.5754 81.3069C57.3191 85.7173 59.7636 89.6241 62.9059 93.0293C66.0474 96.4361 69.8119 99.1155 74.201 101.069C78.5885 103.022 83.4247 103.999 88.7131 103.999C92.8016 103.999 96.8667 102.997 100.905 100.994C104.945 98.9911 108.061 96.2359 110.256 92.7282V102.195H126.563V32.1642H110.256V41.6337ZM108.76 75.7472C107.762 78.4531 106.366 80.8078 104.572 82.8112C102.776 84.8161 100.606 86.4183 98.0637 87.6206C95.5202 88.823 92.7004 89.4238 89.6103 89.4238C86.5178 89.4238 83.7252 88.823 81.2324 87.6206C78.7388 86.4183 76.5949 84.8161 74.7998 82.8112C73.004 80.8078 71.6319 78.4531 70.6856 75.7472C69.7356 73.0421 69.2644 70.1868 69.2644 67.1821C69.2644 64.1758 69.7356 61.3205 70.6856 58.6154C71.6319 55.9102 73.004 53.5571 74.7998 51.5522C76.5949 49.5495 78.738 47.9451 81.2324 46.7427C83.7252 45.5404 86.5178 44.9396 89.6103 44.9396C92.7012 44.9396 95.5202 45.5404 98.0637 46.7427C100.606 47.9451 102.776 49.5487 104.572 51.5522C106.367 53.5571 107.762 55.9102 108.76 58.6154C109.756 61.3205 110.256 64.1758 110.256 67.1821C110.256 70.1868 109.756 73.0421 108.76 75.7472Z" fill="currentColor" />
|
|
||||||
<path d="M242.805 41.6337C240.611 38.1275 237.494 35.3731 233.455 33.3681C229.416 31.3647 225.351 30.3618 221.262 30.3618C215.974 30.3618 211.138 31.3389 206.75 33.2923C202.36 35.2456 198.597 37.928 195.455 41.3333C192.314 44.7401 189.869 48.6726 188.125 53.1293C186.378 57.589 185.507 62.274 185.507 67.1813C185.507 72.1925 186.378 76.8995 188.125 81.3069C189.868 85.7173 192.313 89.6241 195.455 93.0293C198.597 96.4361 202.361 99.1155 206.75 101.069C211.138 103.022 215.974 103.999 221.262 103.999C225.351 103.999 229.416 102.997 233.455 100.994C237.494 98.9911 240.611 96.2359 242.805 92.7282V102.195H259.112V32.1642H242.805V41.6337ZM241.31 75.7472C240.312 78.4531 238.916 80.8078 237.122 82.8112C235.326 84.8161 233.156 86.4183 230.614 87.6206C228.07 88.823 225.251 89.4238 222.16 89.4238C219.068 89.4238 216.275 88.823 213.782 87.6206C211.289 86.4183 209.145 84.8161 207.35 82.8112C205.554 80.8078 204.182 78.4531 203.236 75.7472C202.286 73.0421 201.814 70.1868 201.814 67.1821C201.814 64.1758 202.286 61.3205 203.236 58.6154C204.182 55.9102 205.554 53.5571 207.35 51.5522C209.145 49.5495 211.288 47.9451 213.782 46.7427C216.275 45.5404 219.068 44.9396 222.16 44.9396C225.251 44.9396 228.07 45.5404 230.614 46.7427C233.156 47.9451 235.326 49.5487 237.122 51.5522C238.917 53.5571 240.312 55.9102 241.31 58.6154C242.306 61.3205 242.806 64.1758 242.806 67.1821C242.805 70.1868 242.305 73.0421 241.31 75.7472Z" fill="currentColor" />
|
|
||||||
<path d="M438 -3H421.694V102.197H438V-3Z" fill="currentColor" />
|
|
||||||
<path d="M139.43 102.197H155.735V48.2834H183.712V32.1665H139.43V102.197Z" fill="currentColor" />
|
|
||||||
<path d="M324.49 32.1665L303.995 85.794L283.498 32.1665H266.983L293.748 102.197H314.242L341.006 32.1665H324.49Z" fill="currentColor" />
|
|
||||||
<path d="M376.571 30.3656C356.603 30.3656 340.797 46.8497 340.797 67.1828C340.797 89.6597 356.094 104 378.661 104C391.29 104 399.354 99.1488 409.206 88.5848L398.189 80.0226C398.183 80.031 389.874 90.9895 377.468 90.9895C363.048 90.9895 356.977 79.3111 356.977 73.269H411.075C413.917 50.1328 398.775 30.3656 376.571 30.3656ZM357.02 61.0967C357.145 59.7487 359.023 43.3761 376.442 43.3761C393.861 43.3761 395.978 59.7464 396.099 61.0967H357.02Z" fill="currentColor" />
|
|
||||||
</svg>
|
|
||||||
|
|
||||||
{{-- 13 --}}
|
<div class="absolute inset-0 bg-zinc-950/55"></div>
|
||||||
<svg class="w-[438px] max-w-none relative -mt-[6.6rem] -ml-8 lg:ml-0 [--stroke-color:#1B1B18] dark:[--stroke-color:#FF750F]" viewBox="0 0 440 392" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<div class="absolute inset-x-0 bottom-0 h-40 bg-gradient-to-t from-zinc-950 to-transparent"></div>
|
||||||
<g class="mix-blend-darken dark:mix-blend-normal transition-all delay-300 opacity-100 duration-750 starting:opacity-0 text-[#1B1B18] dark:text-black">
|
|
||||||
<mask id="path-1-mask" maskUnits="userSpaceOnUse" x="-0.328613" y="103" width="338" height="299" fill="black">
|
|
||||||
<rect fill="white" x="-0.328613" y="103" width="338" height="299"/>
|
|
||||||
<path d="M234.936 400.8C204.136 400.8 178.936 392.4 159.336 375.6C140.136 358.8 130.536 337 130.536 310.2H200.736C200.736 318.2 203.736 324.8 209.736 330C215.736 335.2 223.736 337.8 233.736 337.8C243.336 337.8 251.136 335 257.136 329.4C263.536 323.8 266.736 316.6 266.736 307.8C266.736 299.8 263.936 293.2 258.336 288C252.736 282.8 245.536 280.2 236.736 280.2H199.536V218.4H236.736C243.536 218.4 249.336 216 254.136 211.2C258.936 206.4 261.336 200.4 261.336 193.2C261.336 184.8 258.736 178.2 253.536 173.4C248.336 168.6 241.736 166.2 233.736 166.2C226.536 166.2 220.336 168.4 215.136 172.8C210.336 177.2 207.936 182.8 207.936 189.6H141.336C141.336 164.8 150.136 144.6 167.736 129C185.336 113 207.936 105 235.536 105C263.136 105 285.536 112.2 302.736 126.6C320.336 141 329.136 160 329.136 183.6C329.136 200.8 324.536 214.8 315.336 225.6C306.136 236 294.336 243.2 279.936 247.2C297.136 252 310.736 260.2 320.736 271.8C331.136 283.4 336.336 298 336.336 315.6C336.336 340.4 326.936 360.8 308.136 376.8C289.336 392.8 264.936 400.8 234.936 400.8Z"/>
|
|
||||||
<path d="M26.8714 167.6H1.67139V105.2H94.6714V400.2H26.8714V167.6Z"/>
|
|
||||||
</mask>
|
|
||||||
<path d="M234.936 400.8C204.136 400.8 178.936 392.4 159.336 375.6C140.136 358.8 130.536 337 130.536 310.2H200.736C200.736 318.2 203.736 324.8 209.736 330C215.736 335.2 223.736 337.8 233.736 337.8C243.336 337.8 251.136 335 257.136 329.4C263.536 323.8 266.736 316.6 266.736 307.8C266.736 299.8 263.936 293.2 258.336 288C252.736 282.8 245.536 280.2 236.736 280.2H199.536V218.4H236.736C243.536 218.4 249.336 216 254.136 211.2C258.936 206.4 261.336 200.4 261.336 193.2C261.336 184.8 258.736 178.2 253.536 173.4C248.336 168.6 241.736 166.2 233.736 166.2C226.536 166.2 220.336 168.4 215.136 172.8C210.336 177.2 207.936 182.8 207.936 189.6H141.336C141.336 164.8 150.136 144.6 167.736 129C185.336 113 207.936 105 235.536 105C263.136 105 285.536 112.2 302.736 126.6C320.336 141 329.136 160 329.136 183.6C329.136 200.8 324.536 214.8 315.336 225.6C306.136 236 294.336 243.2 279.936 247.2C297.136 252 310.736 260.2 320.736 271.8C331.136 283.4 336.336 298 336.336 315.6C336.336 340.4 326.936 360.8 308.136 376.8C289.336 392.8 264.936 400.8 234.936 400.8Z" fill="currentColor"/>
|
|
||||||
<path d="M26.8714 167.6H1.67139V105.2H94.6714V400.2H26.8714V167.6Z" fill="currentColor"/>
|
|
||||||
<path d="M234.936 400.8C204.136 400.8 178.936 392.4 159.336 375.6C140.136 358.8 130.536 337 130.536 310.2H200.736C200.736 318.2 203.736 324.8 209.736 330C215.736 335.2 223.736 337.8 233.736 337.8C243.336 337.8 251.136 335 257.136 329.4C263.536 323.8 266.736 316.6 266.736 307.8C266.736 299.8 263.936 293.2 258.336 288C252.736 282.8 245.536 280.2 236.736 280.2H199.536V218.4H236.736C243.536 218.4 249.336 216 254.136 211.2C258.936 206.4 261.336 200.4 261.336 193.2C261.336 184.8 258.736 178.2 253.536 173.4C248.336 168.6 241.736 166.2 233.736 166.2C226.536 166.2 220.336 168.4 215.136 172.8C210.336 177.2 207.936 182.8 207.936 189.6H141.336C141.336 164.8 150.136 144.6 167.736 129C185.336 113 207.936 105 235.536 105C263.136 105 285.536 112.2 302.736 126.6C320.336 141 329.136 160 329.136 183.6C329.136 200.8 324.536 214.8 315.336 225.6C306.136 236 294.336 243.2 279.936 247.2C297.136 252 310.736 260.2 320.736 271.8C331.136 283.4 336.336 298 336.336 315.6C336.336 340.4 326.936 360.8 308.136 376.8C289.336 392.8 264.936 400.8 234.936 400.8Z" stroke="var(--stroke-color)" stroke-width="2.4" mask="url(#path-1-mask)"/>
|
|
||||||
<path d="M26.8714 167.6H1.67139V105.2H94.6714V400.2H26.8714V167.6Z" stroke="var(--stroke-color)" stroke-width="2.4" mask="url(#path-1-mask)"/>
|
|
||||||
</g>
|
|
||||||
|
|
||||||
<g class="transition-all delay-400 opacity-100 duration-750 starting:opacity-0 motion-safe:starting:-translate-x-[26px] text-[#F3BEC7] dark:text-[#4B0600]">
|
<header class="relative z-10 mx-auto flex max-w-7xl items-center justify-between gap-4 px-5 py-5 sm:px-8">
|
||||||
<mask id="path-2-mask" maskUnits="userSpaceOnUse" x="25.3357" y="103" width="338" height="299" fill="black">
|
<a href="{{ route('home') }}" class="flex items-center gap-3 rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-white/70">
|
||||||
<rect fill="white" x="25.3357" y="103" width="338" height="299"/>
|
<span class="flex size-9 items-center justify-center rounded-lg bg-white text-sm font-bold text-zinc-950">FC</span>
|
||||||
<path d="M260.6 400.8C229.8 400.8 204.6 392.4 185 375.6C165.8 358.8 156.2 337 156.2 310.2H226.4C226.4 318.2 229.4 324.8 235.4 330C241.4 335.2 249.4 337.8 259.4 337.8C269 337.8 276.8 335 282.8 329.4C289.2 323.8 292.4 316.6 292.4 307.8C292.4 299.8 289.6 293.2 284 288C278.4 282.8 271.2 280.2 262.4 280.2H225.2V218.4H262.4C269.2 218.4 275 216 279.8 211.2C284.6 206.4 287 200.4 287 193.2C287 184.8 284.4 178.2 279.2 173.4C274 168.6 267.4 166.2 259.4 166.2C252.2 166.2 246 168.4 240.8 172.8C236 177.2 233.6 182.8 233.6 189.6H167C167 164.8 175.8 144.6 193.4 129C211 113 233.6 105 261.2 105C288.8 105 311.2 112.2 328.4 126.6C346 141 354.8 160 354.8 183.6C354.8 200.8 350.2 214.8 341 225.6C331.8 236 320 243.2 305.6 247.2C322.8 252 336.4 260.2 346.4 271.8C356.8 283.4 362 298 362 315.6C362 340.4 352.6 360.8 333.8 376.8C315 392.8 290.6 400.8 260.6 400.8Z"/>
|
<span class="text-sm font-semibold text-white">Fluent Chat</span>
|
||||||
<path d="M52.5357 167.6H27.3357V105.2H120.336V400.2H52.5357V167.6Z"/>
|
</a>
|
||||||
</mask>
|
|
||||||
<path d="M260.6 400.8C229.8 400.8 204.6 392.4 185 375.6C165.8 358.8 156.2 337 156.2 310.2H226.4C226.4 318.2 229.4 324.8 235.4 330C241.4 335.2 249.4 337.8 259.4 337.8C269 337.8 276.8 335 282.8 329.4C289.2 323.8 292.4 316.6 292.4 307.8C292.4 299.8 289.6 293.2 284 288C278.4 282.8 271.2 280.2 262.4 280.2H225.2V218.4H262.4C269.2 218.4 275 216 279.8 211.2C284.6 206.4 287 200.4 287 193.2C287 184.8 284.4 178.2 279.2 173.4C274 168.6 267.4 166.2 259.4 166.2C252.2 166.2 246 168.4 240.8 172.8C236 177.2 233.6 182.8 233.6 189.6H167C167 164.8 175.8 144.6 193.4 129C211 113 233.6 105 261.2 105C288.8 105 311.2 112.2 328.4 126.6C346 141 354.8 160 354.8 183.6C354.8 200.8 350.2 214.8 341 225.6C331.8 236 320 243.2 305.6 247.2C322.8 252 336.4 260.2 346.4 271.8C356.8 283.4 362 298 362 315.6C362 340.4 352.6 360.8 333.8 376.8C315 392.8 290.6 400.8 260.6 400.8Z" fill="currentColor"/>
|
|
||||||
<path d="M52.5357 167.6H27.3357V105.2H120.336V400.2H52.5357V167.6Z" fill="currentColor"/>
|
|
||||||
<path d="M260.6 400.8C229.8 400.8 204.6 392.4 185 375.6C165.8 358.8 156.2 337 156.2 310.2H226.4C226.4 318.2 229.4 324.8 235.4 330C241.4 335.2 249.4 337.8 259.4 337.8C269 337.8 276.8 335 282.8 329.4C289.2 323.8 292.4 316.6 292.4 307.8C292.4 299.8 289.6 293.2 284 288C278.4 282.8 271.2 280.2 262.4 280.2H225.2V218.4H262.4C269.2 218.4 275 216 279.8 211.2C284.6 206.4 287 200.4 287 193.2C287 184.8 284.4 178.2 279.2 173.4C274 168.6 267.4 166.2 259.4 166.2C252.2 166.2 246 168.4 240.8 172.8C236 177.2 233.6 182.8 233.6 189.6H167C167 164.8 175.8 144.6 193.4 129C211 113 233.6 105 261.2 105C288.8 105 311.2 112.2 328.4 126.6C346 141 354.8 160 354.8 183.6C354.8 200.8 350.2 214.8 341 225.6C331.8 236 320 243.2 305.6 247.2C322.8 252 336.4 260.2 346.4 271.8C356.8 283.4 362 298 362 315.6C362 340.4 352.6 360.8 333.8 376.8C315 392.8 290.6 400.8 260.6 400.8Z" stroke="var(--stroke-color)" stroke-width="2.4" mask="url(#path-2-mask)"/>
|
|
||||||
<path d="M52.5357 167.6H27.3357V105.2H120.336V400.2H52.5357V167.6Z" stroke="var(--stroke-color)" stroke-width="2.4" mask="url(#path-2-mask)"/>
|
|
||||||
</g>
|
|
||||||
|
|
||||||
<g class="mix-blend-color dark:mix-blend-hard-light transition-all delay-400 opacity-100 duration-750 starting:opacity-0 motion-safe:starting:-translate-x-[51px] text-[#F8B803] dark:text-[#391800]">
|
<nav class="flex items-center gap-2">
|
||||||
<mask id="path-3-mask" maskUnits="userSpaceOnUse" x="51" y="103" width="338" height="299" fill="black">
|
@auth
|
||||||
<rect fill="white" x="51" y="103" width="338" height="299"/>
|
<a href="{{ route('dashboard') }}" class="inline-flex items-center gap-2 rounded-md bg-white px-4 py-2 text-sm font-semibold text-zinc-950 shadow-sm transition hover:bg-zinc-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/70">
|
||||||
<path d="M286.264 400.8C255.464 400.8 230.264 392.4 210.664 375.6C191.464 358.8 181.864 337 181.864 310.2H252.064C252.064 318.2 255.064 324.8 261.064 330C267.064 335.2 275.064 337.8 285.064 337.8C294.664 337.8 302.464 335 308.464 329.4C314.864 323.8 318.064 316.6 318.064 307.8C318.064 299.8 315.264 293.2 309.664 288C304.064 282.8 296.864 280.2 288.064 280.2H250.864V218.4H288.064C294.864 218.4 300.664 216 305.464 211.2C310.264 206.4 312.664 200.4 312.664 193.2C312.664 184.8 310.064 178.2 304.864 173.4C299.664 168.6 293.064 166.2 285.064 166.2C277.864 166.2 271.664 168.4 266.464 172.8C261.664 177.2 259.264 182.8 259.264 189.6H192.664C192.664 164.8 201.464 144.6 219.064 129C236.664 113 259.264 105 286.864 105C314.464 105 336.864 112.2 354.064 126.6C371.664 141 380.464 160 380.464 183.6C380.464 200.8 375.864 214.8 366.664 225.6C357.464 236 345.664 243.2 331.264 247.2C348.464 252 362.064 260.2 372.064 271.8C382.464 283.4 387.664 298 387.664 315.6C387.664 340.4 378.264 360.8 359.464 376.8C340.664 392.8 316.264 400.8 286.264 400.8Z"/>
|
{{ __('Dashboard') }}
|
||||||
<path d="M78.2 167.6H53V105.2H146V400.2H78.2V167.6Z"/>
|
<flux:icon.arrow-right class="size-4" />
|
||||||
</mask>
|
</a>
|
||||||
<path d="M286.264 400.8C255.464 400.8 230.264 392.4 210.664 375.6C191.464 358.8 181.864 337 181.864 310.2H252.064C252.064 318.2 255.064 324.8 261.064 330C267.064 335.2 275.064 337.8 285.064 337.8C294.664 337.8 302.464 335 308.464 329.4C314.864 323.8 318.064 316.6 318.064 307.8C318.064 299.8 315.264 293.2 309.664 288C304.064 282.8 296.864 280.2 288.064 280.2H250.864V218.4H288.064C294.864 218.4 300.664 216 305.464 211.2C310.264 206.4 312.664 200.4 312.664 193.2C312.664 184.8 310.064 178.2 304.864 173.4C299.664 168.6 293.064 166.2 285.064 166.2C277.864 166.2 271.664 168.4 266.464 172.8C261.664 177.2 259.264 182.8 259.264 189.6H192.664C192.664 164.8 201.464 144.6 219.064 129C236.664 113 259.264 105 286.864 105C314.464 105 336.864 112.2 354.064 126.6C371.664 141 380.464 160 380.464 183.6C380.464 200.8 375.864 214.8 366.664 225.6C357.464 236 345.664 243.2 331.264 247.2C348.464 252 362.064 260.2 372.064 271.8C382.464 283.4 387.664 298 387.664 315.6C387.664 340.4 378.264 360.8 359.464 376.8C340.664 392.8 316.264 400.8 286.264 400.8Z" fill="currentColor"/>
|
@else
|
||||||
<path d="M78.2 167.6H53V105.2H146V400.2H78.2V167.6Z" fill="currentColor"/>
|
@if (Route::has('login'))
|
||||||
<path d="M286.264 400.8C255.464 400.8 230.264 392.4 210.664 375.6C191.464 358.8 181.864 337 181.864 310.2H252.064C252.064 318.2 255.064 324.8 261.064 330C267.064 335.2 275.064 337.8 285.064 337.8C294.664 337.8 302.464 335 308.464 329.4C314.864 323.8 318.064 316.6 318.064 307.8C318.064 299.8 315.264 293.2 309.664 288C304.064 282.8 296.864 280.2 288.064 280.2H250.864V218.4H288.064C294.864 218.4 300.664 216 305.464 211.2C310.264 206.4 312.664 200.4 312.664 193.2C312.664 184.8 310.064 178.2 304.864 173.4C299.664 168.6 293.064 166.2 285.064 166.2C277.864 166.2 271.664 168.4 266.464 172.8C261.664 177.2 259.264 182.8 259.264 189.6H192.664C192.664 164.8 201.464 144.6 219.064 129C236.664 113 259.264 105 286.864 105C314.464 105 336.864 112.2 354.064 126.6C371.664 141 380.464 160 380.464 183.6C380.464 200.8 375.864 214.8 366.664 225.6C357.464 236 345.664 243.2 331.264 247.2C348.464 252 362.064 260.2 372.064 271.8C382.464 283.4 387.664 298 387.664 315.6C387.664 340.4 378.264 360.8 359.464 376.8C340.664 392.8 316.264 400.8 286.264 400.8Z" stroke="var(--stroke-color)" stroke-width="2.4" mask="url(#path-3-mask)"/>
|
<a href="{{ route('login') }}" class="rounded-md px-3 py-2 text-sm font-medium text-white/85 transition hover:bg-white/10 hover:text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-white/70">
|
||||||
<path d="M78.2 167.6H53V105.2H146V400.2H78.2V167.6Z" stroke="var(--stroke-color)" stroke-width="2.4" mask="url(#path-3-mask)"/>
|
{{ __('Sign in') }}
|
||||||
</g>
|
</a>
|
||||||
|
@endif
|
||||||
|
|
||||||
<g class="mix-blend-multiply dark:mix-blend-normal transition-all delay-400 opacity-100 duration-750 starting:opacity-0 motion-safe:starting:-translate-x-[78px] text-[#F3BEC7] dark:text-[#733000]">
|
@if (Route::has('register'))
|
||||||
<mask id="path-4-mask" maskUnits="userSpaceOnUse" x="76.6643" y="103" width="338" height="299" fill="black">
|
<a href="{{ route('register') }}" class="hidden rounded-md bg-white px-4 py-2 text-sm font-semibold text-zinc-950 shadow-sm transition hover:bg-zinc-100 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/70 sm:inline-flex">
|
||||||
<rect fill="white" x="76.6643" y="103" width="338" height="299"/>
|
{{ __('Create account') }}
|
||||||
<path d="M311.929 400.8C281.129 400.8 255.929 392.4 236.329 375.6C217.129 358.8 207.529 337 207.529 310.2H277.729C277.729 318.2 280.729 324.8 286.729 330C292.729 335.2 300.729 337.8 310.729 337.8C320.329 337.8 328.129 335 334.129 329.4C340.529 323.8 343.729 316.6 343.729 307.8C343.729 299.8 340.929 293.2 335.329 288C329.729 282.8 322.529 280.2 313.729 280.2H276.529V218.4H313.729C320.529 218.4 326.329 216 331.129 211.2C335.929 206.4 338.329 200.4 338.329 193.2C338.329 184.8 335.729 178.2 330.529 173.4C325.329 168.6 318.729 166.2 310.729 166.2C303.529 166.2 297.329 168.4 292.129 172.8C287.329 177.2 284.929 182.8 284.929 189.6H218.329C218.329 164.8 227.129 144.6 244.729 129C262.329 113 284.929 105 312.529 105C340.129 105 362.529 112.2 379.729 126.6C397.329 141 406.129 160 406.129 183.6C406.129 200.8 401.529 214.8 392.329 225.6C383.129 236 371.329 243.2 356.929 247.2C374.129 252 387.729 260.2 397.729 271.8C408.129 283.4 413.329 298 413.329 315.6C413.329 340.4 403.929 360.8 385.129 376.8C366.329 392.8 341.929 400.8 311.929 400.8Z"/>
|
</a>
|
||||||
<path d="M103.864 167.6H78.6643V105.2H171.664V400.2H103.864V167.6Z"/>
|
@endif
|
||||||
</mask>
|
@endauth
|
||||||
<path d="M311.929 400.8C281.129 400.8 255.929 392.4 236.329 375.6C217.129 358.8 207.529 337 207.529 310.2H277.729C277.729 318.2 280.729 324.8 286.729 330C292.729 335.2 300.729 337.8 310.729 337.8C320.329 337.8 328.129 335 334.129 329.4C340.529 323.8 343.729 316.6 343.729 307.8C343.729 299.8 340.929 293.2 335.329 288C329.729 282.8 322.529 280.2 313.729 280.2H276.529V218.4H313.729C320.529 218.4 326.329 216 331.129 211.2C335.929 206.4 338.329 200.4 338.329 193.2C338.329 184.8 335.729 178.2 330.529 173.4C325.329 168.6 318.729 166.2 310.729 166.2C303.529 166.2 297.329 168.4 292.129 172.8C287.329 177.2 284.929 182.8 284.929 189.6H218.329C218.329 164.8 227.129 144.6 244.729 129C262.329 113 284.929 105 312.529 105C340.129 105 362.529 112.2 379.729 126.6C397.329 141 406.129 160 406.129 183.6C406.129 200.8 401.529 214.8 392.329 225.6C383.129 236 371.329 243.2 356.929 247.2C374.129 252 387.729 260.2 397.729 271.8C408.129 283.4 413.329 298 413.329 315.6C413.329 340.4 403.929 360.8 385.129 376.8C366.329 392.8 341.929 400.8 311.929 400.8Z" fill="currentColor"/>
|
</nav>
|
||||||
<path d="M103.864 167.6H78.6643V105.2H171.664V400.2H103.864V167.6Z" fill="currentColor"/>
|
</header>
|
||||||
<path d="M311.929 400.8C281.129 400.8 255.929 392.4 236.329 375.6C217.129 358.8 207.529 337 207.529 310.2H277.729C277.729 318.2 280.729 324.8 286.729 330C292.729 335.2 300.729 337.8 310.729 337.8C320.329 337.8 328.129 335 334.129 329.4C340.529 323.8 343.729 316.6 343.729 307.8C343.729 299.8 340.929 293.2 335.329 288C329.729 282.8 322.529 280.2 313.729 280.2H276.529V218.4H313.729C320.529 218.4 326.329 216 331.129 211.2C335.929 206.4 338.329 200.4 338.329 193.2C338.329 184.8 335.729 178.2 330.529 173.4C325.329 168.6 318.729 166.2 310.729 166.2C303.529 166.2 297.329 168.4 292.129 172.8C287.329 177.2 284.929 182.8 284.929 189.6H218.329C218.329 164.8 227.129 144.6 244.729 129C262.329 113 284.929 105 312.529 105C340.129 105 362.529 112.2 379.729 126.6C397.329 141 406.129 160 406.129 183.6C406.129 200.8 401.529 214.8 392.329 225.6C383.129 236 371.329 243.2 356.929 247.2C374.129 252 387.729 260.2 397.729 271.8C408.129 283.4 413.329 298 413.329 315.6C413.329 340.4 403.929 360.8 385.129 376.8C366.329 392.8 341.929 400.8 311.929 400.8Z" stroke="var(--stroke-color)" stroke-width="2.4" mask="url(#path-4-mask)"/>
|
|
||||||
<path d="M103.864 167.6H78.6643V105.2H171.664V400.2H103.864V167.6Z" stroke="var(--stroke-color)" stroke-width="2.4" mask="url(#path-4-mask)"/>
|
|
||||||
</g>
|
|
||||||
|
|
||||||
<g class="mix-blend-hard-light transition-all delay-400 opacity-100 duration-750 starting:opacity-0 motion-safe:starting:-translate-x-[102px] text-[#F3BEC7] dark:text-[#4B0600]">
|
<div class="relative z-10 mx-auto flex min-h-[68svh] max-w-7xl items-center px-5 pb-16 pt-10 sm:px-8">
|
||||||
<mask id="path-5-mask" maskUnits="userSpaceOnUse" x="102.329" y="103" width="338" height="299" fill="black">
|
<div class="max-w-3xl">
|
||||||
<rect fill="white" x="102.329" y="103" width="338" height="299"/>
|
<div class="mb-5 inline-flex items-center gap-2 rounded-full border border-white/15 bg-white/10 px-3 py-1 text-sm font-medium text-emerald-100 backdrop-blur">
|
||||||
<path d="M337.593 400.8C306.793 400.8 281.593 392.4 261.993 375.6C242.793 358.8 233.193 337 233.193 310.2H303.393C303.393 318.2 306.393 324.8 312.393 330C318.393 335.2 326.393 337.8 336.393 337.8C345.993 337.8 353.793 335 359.793 329.4C366.193 323.8 369.393 316.6 369.393 307.8C369.393 299.8 366.593 293.2 360.993 288C355.393 282.8 348.193 280.2 339.393 280.2H302.193V218.4H339.393C346.193 218.4 351.993 216 356.793 211.2C361.593 206.4 363.993 200.4 363.993 193.2C363.993 184.8 361.393 178.2 356.193 173.4C350.993 168.6 344.393 166.2 336.393 166.2C329.193 166.2 322.993 168.4 317.793 172.8C312.993 177.2 310.593 182.8 310.593 189.6H243.993C243.993 164.8 252.793 144.6 270.393 129C287.993 113 310.593 105 338.193 105C365.793 105 388.193 112.2 405.393 126.6C422.993 141 431.793 160 431.793 183.6C431.793 200.8 427.193 214.8 417.993 225.6C408.793 236 396.993 243.2 382.593 247.2C399.793 252 413.393 260.2 423.393 271.8C433.793 283.4 438.993 298 438.993 315.6C438.993 340.4 429.593 360.8 410.793 376.8C391.993 392.8 367.593 400.8 337.593 400.8Z"/>
|
<span class="size-2 rounded-full bg-emerald-300"></span>
|
||||||
<path d="M129.529 167.6H104.329V105.2H197.329V400.2H129.529V167.6Z"/>
|
{{ __('Private team messaging with files built in') }}
|
||||||
</mask>
|
</div>
|
||||||
<path d="M337.593 400.8C306.793 400.8 281.593 392.4 261.993 375.6C242.793 358.8 233.193 337 233.193 310.2H303.393C303.393 318.2 306.393 324.8 312.393 330C318.393 335.2 326.393 337.8 336.393 337.8C345.993 337.8 353.793 335 359.793 329.4C366.193 323.8 369.393 316.6 369.393 307.8C369.393 299.8 366.593 293.2 360.993 288C355.393 282.8 348.193 280.2 339.393 280.2H302.193V218.4H339.393C346.193 218.4 351.993 216 356.793 211.2C361.593 206.4 363.993 200.4 363.993 193.2C363.993 184.8 361.393 178.2 356.193 173.4C350.993 168.6 344.393 166.2 336.393 166.2C329.193 166.2 322.993 168.4 317.793 172.8C312.993 177.2 310.593 182.8 310.593 189.6H243.993C243.993 164.8 252.793 144.6 270.393 129C287.993 113 310.593 105 338.193 105C365.793 105 388.193 112.2 405.393 126.6C422.993 141 431.793 160 431.793 183.6C431.793 200.8 427.193 214.8 417.993 225.6C408.793 236 396.993 243.2 382.593 247.2C399.793 252 413.393 260.2 423.393 271.8C433.793 283.4 438.993 298 438.993 315.6C438.993 340.4 429.593 360.8 410.793 376.8C391.993 392.8 367.593 400.8 337.593 400.8Z" fill="currentColor"/>
|
|
||||||
<path d="M129.529 167.6H104.329V105.2H197.329V400.2H129.529V167.6Z" fill="currentColor"/>
|
<h1 class="max-w-3xl text-5xl font-semibold leading-none text-white">
|
||||||
<path d="M337.593 400.8C306.793 400.8 281.593 392.4 261.993 375.6C242.793 358.8 233.193 337 233.193 310.2H303.393C303.393 318.2 306.393 324.8 312.393 330C318.393 335.2 326.393 337.8 336.393 337.8C345.993 337.8 353.793 335 359.793 329.4C366.193 323.8 369.393 316.6 369.393 307.8C369.393 299.8 366.593 293.2 360.993 288C355.393 282.8 348.193 280.2 339.393 280.2H302.193V218.4H339.393C346.193 218.4 351.993 216 356.793 211.2C361.593 206.4 363.993 200.4 363.993 193.2C363.993 184.8 361.393 178.2 356.193 173.4C350.993 168.6 344.393 166.2 336.393 166.2C329.193 166.2 322.993 168.4 317.793 172.8C312.993 177.2 310.593 182.8 310.593 189.6H243.993C243.993 164.8 252.793 144.6 270.393 129C287.993 113 310.593 105 338.193 105C365.793 105 388.193 112.2 405.393 126.6C422.993 141 431.793 160 431.793 183.6C431.793 200.8 427.193 214.8 417.993 225.6C408.793 236 396.993 243.2 382.593 247.2C399.793 252 413.393 260.2 423.393 271.8C433.793 283.4 438.993 298 438.993 315.6C438.993 340.4 429.593 360.8 410.793 376.8C391.993 392.8 367.593 400.8 337.593 400.8Z" stroke="var(--stroke-color)" stroke-width="2.4" mask="url(#path-5-mask)"/>
|
Fluent Chat
|
||||||
<path d="M129.529 167.6H104.329V105.2H197.329V400.2H129.529V167.6Z" stroke="var(--stroke-color)" stroke-width="2.4" mask="url(#path-5-mask)"/>
|
</h1>
|
||||||
</g>
|
|
||||||
</svg>
|
<p class="mt-6 max-w-2xl text-lg leading-8 text-zinc-200">
|
||||||
<div class="absolute inset-0 rounded-t-lg lg:rounded-t-none lg:rounded-r-lg shadow-[inset_0px_0px_0px_1px_rgba(26,26,0,0.16)] dark:shadow-[inset_0px_0px_0px_1px_#fffaed2d]"></div>
|
A polished workspace for direct messages, group conversations, secure file sharing, and fast team context without the weight of a noisy collaboration suite.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="mt-8 flex flex-wrap items-center gap-3">
|
||||||
|
@auth
|
||||||
|
<a href="{{ route('dashboard') }}" class="inline-flex items-center gap-2 rounded-md bg-emerald-300 px-5 py-3 text-sm font-semibold text-zinc-950 shadow-lg shadow-emerald-950/30 transition hover:bg-emerald-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-100">
|
||||||
|
{{ __('Open dashboard') }}
|
||||||
|
<flux:icon.arrow-right class="size-4" />
|
||||||
|
</a>
|
||||||
|
@else
|
||||||
|
@if (Route::has('login'))
|
||||||
|
<a href="{{ route('login') }}" class="inline-flex items-center gap-2 rounded-md bg-emerald-300 px-5 py-3 text-sm font-semibold text-zinc-950 shadow-lg shadow-emerald-950/30 transition hover:bg-emerald-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-emerald-100">
|
||||||
|
{{ __('Enter workspace') }}
|
||||||
|
<flux:icon.arrow-right class="size-4" />
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if (Route::has('register'))
|
||||||
|
<a href="{{ route('register') }}" class="inline-flex items-center gap-2 rounded-md border border-white/20 bg-white/10 px-5 py-3 text-sm font-semibold text-white backdrop-blur transition hover:bg-white/15 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/70">
|
||||||
|
{{ __('Create account') }}
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
@endauth
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<dl class="mt-10 grid max-w-2xl grid-cols-2 gap-3 text-sm text-zinc-200 sm:grid-cols-4">
|
||||||
|
<div class="rounded-lg border border-white/10 bg-white/10 p-3 backdrop-blur">
|
||||||
|
<dt class="text-zinc-400">{{ __('Rooms') }}</dt>
|
||||||
|
<dd class="mt-1 font-semibold text-white">{{ __('Direct + group') }}</dd>
|
||||||
|
</div>
|
||||||
|
<div class="rounded-lg border border-white/10 bg-white/10 p-3 backdrop-blur">
|
||||||
|
<dt class="text-zinc-400">{{ __('Files') }}</dt>
|
||||||
|
<dd class="mt-1 font-semibold text-white">{{ __('Private storage') }}</dd>
|
||||||
|
</div>
|
||||||
|
<div class="rounded-lg border border-white/10 bg-white/10 p-3 backdrop-blur">
|
||||||
|
<dt class="text-zinc-400">{{ __('Security') }}</dt>
|
||||||
|
<dd class="mt-1 font-semibold text-white">{{ __('2FA ready') }}</dd>
|
||||||
|
</div>
|
||||||
|
<div class="rounded-lg border border-white/10 bg-white/10 p-3 backdrop-blur">
|
||||||
|
<dt class="text-zinc-400">{{ __('Speed') }}</dt>
|
||||||
|
<dd class="mt-1 font-semibold text-white">{{ __('Livewire powered') }}</dd>
|
||||||
|
</div>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</section>
|
||||||
</div>
|
|
||||||
|
|
||||||
@if (Route::has('login'))
|
<section class="bg-zinc-950 px-5 pb-16 pt-4 text-white sm:px-8">
|
||||||
<div class="h-14.5 hidden lg:block"></div>
|
<div class="mx-auto max-w-7xl">
|
||||||
@endif
|
<div class="grid gap-4 md:grid-cols-3">
|
||||||
|
<article class="rounded-lg border border-white/10 bg-white/[0.06] p-5 shadow-sm">
|
||||||
|
<div class="mb-4 flex size-10 items-center justify-center rounded-lg bg-emerald-300 text-zinc-950">
|
||||||
|
<flux:icon.chat-bubble-left-right class="size-5" />
|
||||||
|
</div>
|
||||||
|
<h2 class="text-base font-semibold">{{ __('Focused conversations') }}</h2>
|
||||||
|
<p class="mt-2 text-sm leading-6 text-zinc-300">
|
||||||
|
Searchable direct and group rooms with clear unread state, smooth selection, and a layout built for daily use.
|
||||||
|
</p>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<article class="rounded-lg border border-white/10 bg-white/[0.06] p-5 shadow-sm">
|
||||||
|
<div class="mb-4 flex size-10 items-center justify-center rounded-lg bg-amber-200 text-zinc-950">
|
||||||
|
<flux:icon.folder class="size-5" />
|
||||||
|
</div>
|
||||||
|
<h2 class="text-base font-semibold">{{ __('Files in context') }}</h2>
|
||||||
|
<p class="mt-2 text-sm leading-6 text-zinc-300">
|
||||||
|
Attachments live beside the conversation and remain available from the details panel when the thread moves on.
|
||||||
|
</p>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<article class="rounded-lg border border-white/10 bg-white/[0.06] p-5 shadow-sm">
|
||||||
|
<div class="mb-4 flex size-10 items-center justify-center rounded-lg bg-rose-300 text-zinc-950">
|
||||||
|
<flux:icon.shield-check class="size-5" />
|
||||||
|
</div>
|
||||||
|
<h2 class="text-base font-semibold">{{ __('Account protection') }}</h2>
|
||||||
|
<p class="mt-2 text-sm leading-6 text-zinc-300">
|
||||||
|
Profile settings, password updates, and two-factor authentication are ready for a real team workspace.
|
||||||
|
</p>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
@fluxScripts
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -123,6 +123,29 @@ test('participants can send messages', function () {
|
|||||||
->exists())->toBeTrue();
|
->exists())->toBeTrue();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('participants can add emojis from the composer picker', function () {
|
||||||
|
$user = User::factory()->create();
|
||||||
|
$conversation = Conversation::factory()
|
||||||
|
->direct()
|
||||||
|
->for($user, 'creator')
|
||||||
|
->create();
|
||||||
|
|
||||||
|
ConversationParticipant::factory()->for($conversation)->for($user)->create();
|
||||||
|
|
||||||
|
$emoji = html_entity_decode('👍', ENT_QUOTES, 'UTF-8');
|
||||||
|
|
||||||
|
$this->actingAs($user);
|
||||||
|
|
||||||
|
Livewire::test(MessageComposer::class, ['conversationId' => $conversation->id])
|
||||||
|
->call('toggleEmojiPicker')
|
||||||
|
->assertSet('emojiPickerOpen', true)
|
||||||
|
->assertSee('Add Thumbs up emoji')
|
||||||
|
->set('body', 'Looks good')
|
||||||
|
->call('appendEmoji', '1F44D')
|
||||||
|
->assertSet('body', 'Looks good '.$emoji)
|
||||||
|
->assertSet('emojiPickerOpen', false);
|
||||||
|
});
|
||||||
|
|
||||||
test('participants can send file messages', function () {
|
test('participants can send file messages', function () {
|
||||||
Storage::fake('local');
|
Storage::fake('local');
|
||||||
|
|
||||||
@@ -157,6 +180,42 @@ test('participants can send file messages', function () {
|
|||||||
Storage::disk('local')->assertExists($message->attachmentPath());
|
Storage::disk('local')->assertExists($message->attachmentPath());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('chat file uploads are configured for two gigabyte attachments', function () {
|
||||||
|
expect(config('chat.attachments.max_file_size_kilobytes'))->toBe(2 * 1024 * 1024)
|
||||||
|
->and(config('livewire.temporary_file_upload.rules'))->toContain('max:2097152')
|
||||||
|
->and(config('livewire.temporary_file_upload.max_upload_time'))->toBe(60);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('participants can send files larger than the previous ten megabyte limit', function () {
|
||||||
|
Storage::fake('local');
|
||||||
|
|
||||||
|
$user = User::factory()->create();
|
||||||
|
$conversation = Conversation::factory()
|
||||||
|
->direct()
|
||||||
|
->for($user, 'creator')
|
||||||
|
->create();
|
||||||
|
|
||||||
|
ConversationParticipant::factory()->for($conversation)->for($user)->create();
|
||||||
|
|
||||||
|
$this->actingAs($user);
|
||||||
|
|
||||||
|
Livewire::test(MessageComposer::class, ['conversationId' => $conversation->id])
|
||||||
|
->set('attachments', [
|
||||||
|
UploadedFile::fake()->create('large-export.zip', 13 * 1024, 'application/zip'),
|
||||||
|
])
|
||||||
|
->call('sendMessage')
|
||||||
|
->assertHasNoErrors();
|
||||||
|
|
||||||
|
$message = Message::query()
|
||||||
|
->where('conversation_id', $conversation->id)
|
||||||
|
->where('user_id', $user->id)
|
||||||
|
->where('type', Message::TypeFile)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
expect($message)->not->toBeNull();
|
||||||
|
expect($message->attachmentName())->toBe('large-export.zip');
|
||||||
|
});
|
||||||
|
|
||||||
test('file metadata is captured before temporary uploads are moved', function () {
|
test('file metadata is captured before temporary uploads are moved', function () {
|
||||||
Storage::fake('local');
|
Storage::fake('local');
|
||||||
|
|
||||||
@@ -262,6 +321,67 @@ test('conversation details files action shows shared files', function () {
|
|||||||
->assertSee('Conversation files');
|
->assertSee('Conversation files');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('participants can mute and pin conversations from details', function () {
|
||||||
|
$user = User::factory()->create();
|
||||||
|
$conversation = Conversation::factory()
|
||||||
|
->direct()
|
||||||
|
->for($user, 'creator')
|
||||||
|
->create();
|
||||||
|
|
||||||
|
$participant = ConversationParticipant::factory()->for($conversation)->for($user)->create();
|
||||||
|
|
||||||
|
$this->actingAs($user);
|
||||||
|
|
||||||
|
Livewire::test(ConversationDetailsPanel::class, ['conversationId' => $conversation->id])
|
||||||
|
->call('toggleMute')
|
||||||
|
->assertSee('Muted')
|
||||||
|
->call('togglePin')
|
||||||
|
->assertSee('Pinned');
|
||||||
|
|
||||||
|
$participant->refresh();
|
||||||
|
|
||||||
|
expect($participant->muted_until)->not->toBeNull()
|
||||||
|
->and($participant->pinned_at)->not->toBeNull();
|
||||||
|
|
||||||
|
Livewire::test(ConversationDetailsPanel::class, ['conversationId' => $conversation->id])
|
||||||
|
->call('toggleMute')
|
||||||
|
->assertSee('Mute')
|
||||||
|
->call('togglePin')
|
||||||
|
->assertSee('Pin');
|
||||||
|
|
||||||
|
$participant->refresh();
|
||||||
|
|
||||||
|
expect($participant->muted_until)->toBeNull()
|
||||||
|
->and($participant->pinned_at)->toBeNull();
|
||||||
|
});
|
||||||
|
|
||||||
|
test('pinned conversations stay at the top of the conversation list', function () {
|
||||||
|
$user = User::factory()->create();
|
||||||
|
$pinnedTeammate = User::factory()->create(['name' => 'Priority Partner']);
|
||||||
|
$regularTeammate = User::factory()->create(['name' => 'Regular Partner']);
|
||||||
|
|
||||||
|
$pinnedConversation = Conversation::factory()
|
||||||
|
->direct()
|
||||||
|
->for($user, 'creator')
|
||||||
|
->create(['updated_at' => now()->subDay()]);
|
||||||
|
|
||||||
|
$regularConversation = Conversation::factory()
|
||||||
|
->direct()
|
||||||
|
->for($user, 'creator')
|
||||||
|
->create(['updated_at' => now()]);
|
||||||
|
|
||||||
|
ConversationParticipant::factory()->for($pinnedConversation)->for($user)->create(['pinned_at' => now()]);
|
||||||
|
ConversationParticipant::factory()->for($pinnedConversation)->for($pinnedTeammate)->create();
|
||||||
|
ConversationParticipant::factory()->for($regularConversation)->for($user)->create();
|
||||||
|
ConversationParticipant::factory()->for($regularConversation)->for($regularTeammate)->create();
|
||||||
|
|
||||||
|
$this->actingAs($user);
|
||||||
|
|
||||||
|
Livewire::test(ConversationList::class)
|
||||||
|
->assertSeeInOrder(['Priority Partner', 'Regular Partner'])
|
||||||
|
->assertSee('Pinned');
|
||||||
|
});
|
||||||
|
|
||||||
test('participants can add people to a direct conversation', function () {
|
test('participants can add people to a direct conversation', function () {
|
||||||
$user = User::factory()->create();
|
$user = User::factory()->create();
|
||||||
$teammate = User::factory()->create(['name' => 'Mina Partner']);
|
$teammate = User::factory()->create(['name' => 'Mina Partner']);
|
||||||
@@ -318,6 +438,60 @@ test('selected conversations render the stream header and details', function ()
|
|||||||
->assertSee('Mina Partner');
|
->assertSee('Mina Partner');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('conversation header search button opens message search', function () {
|
||||||
|
$user = User::factory()->create();
|
||||||
|
$teammate = User::factory()->create(['name' => 'Mina Partner']);
|
||||||
|
$conversation = Conversation::factory()
|
||||||
|
->direct()
|
||||||
|
->for($user, 'creator')
|
||||||
|
->create();
|
||||||
|
|
||||||
|
ConversationParticipant::factory()->for($conversation)->for($user)->create();
|
||||||
|
ConversationParticipant::factory()->for($conversation)->for($teammate)->create();
|
||||||
|
|
||||||
|
$this->actingAs($user);
|
||||||
|
|
||||||
|
Livewire::test(ConversationHeader::class, ['conversationId' => $conversation->id])
|
||||||
|
->call('toggleSearch')
|
||||||
|
->assertDispatched('conversation-search-toggled');
|
||||||
|
|
||||||
|
Livewire::test(ConversationView::class, ['conversationId' => $conversation->id])
|
||||||
|
->dispatch('conversation-search-toggled', conversationId: $conversation->id)
|
||||||
|
->assertSet('messageSearchOpen', true)
|
||||||
|
->assertSee('Search this conversation');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('message search filters the selected conversation', function () {
|
||||||
|
$user = User::factory()->create();
|
||||||
|
$teammate = User::factory()->create();
|
||||||
|
$conversation = Conversation::factory()
|
||||||
|
->direct()
|
||||||
|
->for($user, 'creator')
|
||||||
|
->create();
|
||||||
|
|
||||||
|
ConversationParticipant::factory()->for($conversation)->for($user)->create();
|
||||||
|
ConversationParticipant::factory()->for($conversation)->for($teammate)->create();
|
||||||
|
|
||||||
|
Message::factory()
|
||||||
|
->for($conversation)
|
||||||
|
->for($teammate, 'sender')
|
||||||
|
->create(['body' => 'The deployment checklist is ready.']);
|
||||||
|
|
||||||
|
Message::factory()
|
||||||
|
->for($conversation)
|
||||||
|
->for($teammate, 'sender')
|
||||||
|
->create(['body' => 'Budget review moved to Tuesday.']);
|
||||||
|
|
||||||
|
$this->actingAs($user);
|
||||||
|
|
||||||
|
Livewire::test(ConversationView::class, ['conversationId' => $conversation->id])
|
||||||
|
->dispatch('conversation-search-toggled', conversationId: $conversation->id)
|
||||||
|
->set('messageSearch', 'deployment')
|
||||||
|
->assertSee('1 matching message')
|
||||||
|
->assertSee('deployment')
|
||||||
|
->assertDontSee('Budget review moved to Tuesday.');
|
||||||
|
});
|
||||||
|
|
||||||
test('empty messages are rejected', function () {
|
test('empty messages are rejected', function () {
|
||||||
$user = User::factory()->create();
|
$user = User::factory()->create();
|
||||||
$conversation = Conversation::factory()
|
$conversation = Conversation::factory()
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
test('flux modals hide the built in top right close button', function () {
|
||||||
|
$modalDeclarations = collect([
|
||||||
|
resource_path('views/livewire/chat/conversation-details-panel.blade.php'),
|
||||||
|
resource_path('views/livewire/chat/conversation-list.blade.php'),
|
||||||
|
resource_path('views/livewire/settings/delete-user-form.blade.php'),
|
||||||
|
resource_path('views/livewire/settings/security.blade.php'),
|
||||||
|
])->flatMap(function (string $path): array {
|
||||||
|
preg_match_all('/<flux:modal(?![\\w.-])(?:[^"\'>]|"[^"]*"|\'[^\']*\')*>/s', file_get_contents($path), $matches);
|
||||||
|
|
||||||
|
return $matches[0];
|
||||||
|
});
|
||||||
|
|
||||||
|
expect($modalDeclarations)->not->toBeEmpty();
|
||||||
|
|
||||||
|
$modalDeclarations->each(fn (string $declaration) => expect($declaration)->toContain(':closable="false"'));
|
||||||
|
});
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use App\Models\User;
|
||||||
|
|
||||||
|
test('guests see the branded welcome page', function () {
|
||||||
|
$this->get(route('home'))
|
||||||
|
->assertOk()
|
||||||
|
->assertSee('Fluent Chat')
|
||||||
|
->assertSee('Private team messaging with files built in')
|
||||||
|
->assertSee('Enter workspace')
|
||||||
|
->assertSee('Files in context')
|
||||||
|
->assertSee(route('login'), false);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('authenticated users see the dashboard call to action', function () {
|
||||||
|
$user = User::factory()->create();
|
||||||
|
|
||||||
|
$this->actingAs($user)
|
||||||
|
->get(route('home'))
|
||||||
|
->assertOk()
|
||||||
|
->assertSee('Open dashboard')
|
||||||
|
->assertSee(route('dashboard'), false);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('favicon assets are branded for fluent chat', function () {
|
||||||
|
$svg = file_get_contents(public_path('favicon.svg'));
|
||||||
|
|
||||||
|
expect($svg)
|
||||||
|
->toContain('Fluent Chat')
|
||||||
|
->not->toContain('#FF2D20');
|
||||||
|
|
||||||
|
expect(public_path('favicon.ico'))
|
||||||
|
->toBeFile()
|
||||||
|
->and(filesize(public_path('favicon.ico')))->toBeGreaterThan(1000)
|
||||||
|
->and(public_path('apple-touch-icon.png'))->toBeFile()
|
||||||
|
->and(filesize(public_path('apple-touch-icon.png')))->toBeGreaterThan(1000);
|
||||||
|
});
|
||||||
Reference in new issue
Block a user