2026-01-16 15:36:52 +00:00
|
|
|
<?php
|
|
|
|
|
|
refactor: settings redesign, Spanish translations, language system, strict_types
Settings pages:
- Redesign layout to match Sendkit (max-w-4xl, space-y-12, Separator sections)
- Merge Members page into Workspace settings with Table, invite Dialog, ConfirmDeleteModal
- Add workspace logo upload/delete routes and controller methods
- Translate all hardcoded strings in Workspace.vue modals
Language system:
- Drop languages table, replace language_id FK with locale string column on users
- Create config/languages.php for available languages and default locale
- Add Spanish (es) translations (13 files)
- Simplify HandleInertiaRequests, ProfileController, RegisteredUserController
Code quality:
- Add declare(strict_types=1) to all PHP files
- Fix MastodonPublisher using wrong attribute (filename -> original_filename)
- Fix HasMediaTest for new has_photo/photo_url accessors
- Fix PublishToSocialPlatformTest type error revealed by strict_types
- Remove orphaned Language model from AppServiceProvider morph map
- Update User TypeScript interface (has_photo, photo_url, locale)
- Eager load media relation on workspaces to prevent N+1
- Add 8 new tests for workspace logo upload/delete
- Update workspace settings test to assert members/invitations props
All 710 tests passing.
2026-03-30 03:20:43 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2026-01-16 15:36:52 +00:00
|
|
|
namespace App\Events;
|
|
|
|
|
|
|
|
|
|
use App\Models\PostPlatform;
|
|
|
|
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
|
|
|
|
use Illuminate\Broadcasting\PrivateChannel;
|
2026-05-07 19:02:22 +00:00
|
|
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
2026-01-16 15:36:52 +00:00
|
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
|
|
2026-05-07 19:02:22 +00:00
|
|
|
class PostPlatformStatusUpdated implements ShouldBroadcast
|
2026-01-16 15:36:52 +00:00
|
|
|
{
|
|
|
|
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
|
|
|
|
|
|
|
|
|
public function __construct(public PostPlatform $postPlatform) {}
|
|
|
|
|
|
feat: media gallery picker, custom emoji picker, preview tabs, real platform logos
- gallery: extract /assets tabs (uploads, Unsplash, Giphy) into shared
GalleryBrowser used by both /assets and a new MediaPickerDialog inside the
post editor; add JSON search endpoint for workspace assets with tests
- emoji: replace broken emoji-picker-element web component with a custom
EmojiPicker (full Unicode set, search, categories, recently-used,
light/dark, i18n)
- preview tab: platform selector pills, variant tabs (data-driven from
content_types map) so the user can switch Feed/Reel/Story etc. and have
it autosave through the same handler ScheduleTab uses
- platform logos: shared usePlatformLogo composable (logo + label + content
types); replaces inline maps across 5 components, fixes
instagram-facebook falling back to default.png
- tooltips: hover details (display_name · @username + platform label) on
platform avatars across editor, posts list and calendar
- settings cards: show ` · @username` in the title bar so multiple accounts
on the same network are distinguishable
- routes: drop the throttle:6,1 group middleware on social connect routes
(was 429ing legitimate OAuth retries) and rely on the default limiter
2026-05-01 17:53:49 +00:00
|
|
|
public function broadcastAs(): string
|
|
|
|
|
{
|
2026-05-07 19:02:22 +00:00
|
|
|
return 'post.platform.status.updated';
|
feat: media gallery picker, custom emoji picker, preview tabs, real platform logos
- gallery: extract /assets tabs (uploads, Unsplash, Giphy) into shared
GalleryBrowser used by both /assets and a new MediaPickerDialog inside the
post editor; add JSON search endpoint for workspace assets with tests
- emoji: replace broken emoji-picker-element web component with a custom
EmojiPicker (full Unicode set, search, categories, recently-used,
light/dark, i18n)
- preview tab: platform selector pills, variant tabs (data-driven from
content_types map) so the user can switch Feed/Reel/Story etc. and have
it autosave through the same handler ScheduleTab uses
- platform logos: shared usePlatformLogo composable (logo + label + content
types); replaces inline maps across 5 components, fixes
instagram-facebook falling back to default.png
- tooltips: hover details (display_name · @username + platform label) on
platform avatars across editor, posts list and calendar
- settings cards: show ` · @username` in the title bar so multiple accounts
on the same network are distinguishable
- routes: drop the throttle:6,1 group middleware on social connect routes
(was 429ing legitimate OAuth retries) and rely on the default limiter
2026-05-01 17:53:49 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-16 15:36:52 +00:00
|
|
|
public function broadcastOn(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
2026-05-08 22:22:01 +00:00
|
|
|
new PrivateChannel("post.{$this->postPlatform->post_id}"),
|
|
|
|
|
new PrivateChannel("workspace.{$this->postPlatform->post->workspace_id}"),
|
2026-01-16 15:36:52 +00:00
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-07 19:02:22 +00:00
|
|
|
/**
|
|
|
|
|
* @return array<string, string>
|
|
|
|
|
*/
|
2026-01-16 15:36:52 +00:00
|
|
|
public function broadcastWith(): array
|
|
|
|
|
{
|
|
|
|
|
return [
|
2026-05-07 19:02:22 +00:00
|
|
|
'post_id' => $this->postPlatform->post_id,
|
2026-01-16 15:36:52 +00:00
|
|
|
];
|
|
|
|
|
}
|
2026-05-07 19:02:22 +00:00
|
|
|
|
|
|
|
|
public function broadcastQueue(): string
|
|
|
|
|
{
|
|
|
|
|
return 'broadcasts';
|
|
|
|
|
}
|
2026-01-16 15:36:52 +00:00
|
|
|
}
|