Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

feat: Introduce a self-hosted mode, refactor email notifications to use Mailable classes with new templates, and update the project README.

Paulo Castellanoa6517f4b5b6e
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 000000000..ba1ec0dd5
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1 @@
+github: [trypost-it]
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 000000000..e6f594969
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,65 @@
+# TryPost License
+
+## Functional Source License, Version 1.1, MIT
+
+### Licensor
+
+TryPost
+
+### Software
+
+TryPost - Social Media Scheduling Platform
+
+### Use Limitation
+
+You may not use the Software to provide a commercial service that allows third parties to schedule, manage, or publish content to social media platforms, where such service competes with or substitutes for TryPost or any product or service provided by Licensor.
+
+### License Grant
+
+Licensor hereby grants you the right to copy, modify, create derivative works, redistribute, and make non-production use of the Software. If your use of the Software does not violate the Use Limitation, Licensor hereby grants you the right to make production use of the Software.
+
+### Permitted Uses
+
+The following uses are expressly permitted:
+
+1. **Personal Use**: Using TryPost for your own personal social media management
+2. **Internal Business Use**: Using TryPost within your organization to manage your company's social media accounts
+3. **Educational Use**: Using TryPost for learning, teaching, or research purposes
+4. **Development**: Modifying, studying, or contributing to the TryPost codebase
+5. **Self-Hosting**: Deploying TryPost on your own infrastructure for personal or internal business use
+
+### Prohibited Uses
+
+The following uses are expressly prohibited:
+
+1. **Competing SaaS**: Offering TryPost (or a modified version) as a hosted service to third parties
+2. **White-Label Services**: Rebranding and selling TryPost as your own product
+3. **Managed Service Provider**: Operating TryPost as a service for multiple clients or customers
+
+### Corollary
+
+For clarity, the Use Limitation does not prohibit:
+
+- Using TryPost to manage social media for your own business or clients (as a social media manager)
+- Integrating TryPost into internal tools that are not offered as a competing service
+- Contributing improvements back to the TryPost project
+
+### Notice
+
+You must ensure that anyone who receives a copy of any part of the Software from you also receives a copy of this License.
+
+### No Other Rights
+
+These terms do not grant you any right in any trademark or logo of Licensor or its affiliates.
+
+### Patent
+
+To the extent your use qualifies as a Permitted Use, Licensor grants you a license under any patent claims it can license that are necessarily infringed by the Software, to make, use, and distribute the Software.
+
+### Disclaimer
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+---
+
+Copyright (c) 2025 TryPost
diff --git a/README.md b/README.md
index 387cff9ea..6a53f435e 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,199 @@
+<p align="center">
+ <img src="public/images/trypost/logo-dark.png" alt="TryPost" width="200">
+</p>
-## Migration with base seed
-```sh
-php artisan migrate:fresh --seed
+<h1 align="center">TryPost</h1>
+
+<p align="center">
+ <strong>The open-source social media scheduling platform</strong>
+</p>
+
+<p align="center">
+ Schedule, manage, and publish content to all your social media accounts from one place.
+ <br />
+ Self-hosted. Privacy-focused. No limits.
+</p>
+
+<p align="center">
+ <a href="https://github.com/trypost-it/trypost/stargazers"><img src="https://img.shields.io/github/stars/trypost-it/trypost" alt="Stars"></a>
+ <a href="https://github.com/trypost-it/trypost/blob/main/LICENSE.md"><img src="https://img.shields.io/badge/license-FSL-blue" alt="License"></a>
+ <a href="https://github.com/trypost-it/trypost/releases"><img src="https://img.shields.io/github/v/release/trypost-it/trypost" alt="Release"></a>
+</p>
+
+<p align="center">
+ <a href="#features">Features</a> •
+ <a href="#supported-platforms">Platforms</a> •
+ <a href="#quick-start">Quick Start</a> •
+ <a href="#self-hosting">Self-Hosting</a> •
+ <a href="#contributing">Contributing</a>
+</p>
+
+---
+
+## Why TryPost?
+
+Tired of paying expensive monthly fees for social media scheduling tools? Want full control over your data? TryPost is the solution.
+
+- **100% Open Source** - Inspect the code, contribute, make it yours
+- **Self-Hosted** - Your data stays on your servers
+- **No Limits** - Schedule unlimited posts, connect unlimited accounts
+- **Privacy First** - No tracking, no analytics, no data selling
+
+## Features
+
+- **Visual Calendar** - Drag and drop posts across your content calendar
+- **Post Composer** - Create and preview posts for multiple platforms at once
+- **Media Library** - Upload images and videos with automatic optimization
+- **Team Collaboration** - Invite team members with role-based permissions
+- **Workspaces** - Manage multiple brands or clients separately
+- **Smart Scheduling** - Schedule posts for optimal engagement times
+- **Multi-Platform Preview** - See exactly how your post will look on each platform
+
+## Supported Platforms
+
+<table>
+ <tr>
+ <td align="center"><img src="public/images/accounts/x.png" width="40"><br><b>X (Twitter)</b></td>
+ <td align="center"><img src="public/images/accounts/linkedin.png" width="40"><br><b>LinkedIn</b></td>
+ <td align="center"><img src="public/images/accounts/facebook.png" width="40"><br><b>Facebook</b></td>
+ <td align="center"><img src="public/images/accounts/instagram.png" width="40"><br><b>Instagram</b></td>
+ <td align="center"><img src="public/images/accounts/tiktok.png" width="40"><br><b>TikTok</b></td>
+ </tr>
+ <tr>
+ <td align="center"><img src="public/images/accounts/youtube.png" width="40"><br><b>YouTube</b></td>
+ <td align="center"><img src="public/images/accounts/pinterest.png" width="40"><br><b>Pinterest</b></td>
+ <td align="center"><img src="public/images/accounts/threads.png" width="40"><br><b>Threads</b></td>
+ <td align="center"><img src="public/images/accounts/bluesky.png" width="40"><br><b>Bluesky</b></td>
+ <td align="center"><img src="public/images/accounts/mastodon.png" width="40"><br><b>Mastodon</b></td>
+ </tr>
+</table>
+
+## Quick Start
+
+### Requirements
+
+- PHP 8.2+
+- Node.js 18+
+- MySQL 8.0+ or PostgreSQL 14+
+- Redis
+- Composer
+
+### Installation
+
+```bash
+# Clone the repository
+git clone https://github.com/trypost-it/trypost.git
+cd trypost
+
+# Install dependencies
+composer install
+npm install
+
+# Setup environment
+cp .env.example .env
+php artisan key:generate
+
+# Configure your database in .env, then run migrations
+php artisan migrate --seed
+
+# Build assets
+npm run build
+
+# Start the server
+php artisan serve
+```
+
+Visit `http://localhost:8000` and create your account!
+
+## Self-Hosting
+
+TryPost is designed to be self-hosted. Enable self-hosted mode in your `.env`:
+
+```env
+SELF_HOSTED=true
```
-# Start queue worker
-```sh
+This skips payment/subscription requirements and gives you full access.
+
+### Running in Production
+
+```bash
+# Start the queue worker
+php artisan horizon
+
+# Or use the watcher for development
php artisan horizon:watch
```
-# Share with Ngrok:
-```sh
-ngrok http --host-header=rewrite trypost.test:443
-```
\ No newline at end of file
+### Docker (Coming Soon)
+
+```bash
+docker-compose up -d
+```
+
+## Tech Stack
+
+| Layer | Technology |
+|-------|------------|
+| **Backend** | Laravel 12, PHP 8.4 |
+| **Frontend** | Vue 3, Inertia.js, TypeScript |
+| **Styling** | Tailwind CSS 4 |
+| **Database** | MySQL / PostgreSQL |
+| **Queue** | Redis + Laravel Horizon |
+| **Real-time** | Laravel Reverb |
+
+## Roadmap
+
+Check out our [public roadmap](https://github.com/orgs/trypost-it/projects/1) to see what's coming next and vote on features!
+
+## Contributing
+
+We love contributions! Whether it's:
+
+- Bug reports
+- Feature requests
+- Documentation improvements
+- Code contributions
+
+### Development Setup
+
+```bash
+# Install dependencies
+composer install
+npm install
+
+# Start development server
+npm run dev
+
+# Run tests
+php artisan test
+```
+
+## Community
+
+- [GitHub Discussions](https://github.com/trypost-it/trypost/discussions) - Ask questions, share ideas
+- [GitHub Issues](https://github.com/trypost-it/trypost/issues) - Report bugs, request features
+
+## License
+
+TryPost is licensed under the [Functional Source License (FSL)](LICENSE.md).
+
+**You can:**
+- Use TryPost for personal or internal business use
+- Self-host for your own social media management
+- Modify and contribute to the codebase
+
+**You cannot:**
+- Offer TryPost as a competing SaaS product
+- White-label and resell TryPost
+
+---
+
+<p align="center">
+ <strong>If TryPost helps you, please give us a star!</strong>
+ <br />
+ <br />
+ <a href="https://github.com/trypost-it/trypost">
+ <img src="https://img.shields.io/github/stars/trypost-it/trypost?style=social" alt="Star on GitHub">
+ </a>
+</p>
diff --git a/app/Enums/WorkspaceInvite/Status.php b/app/Enums/WorkspaceInvite/Status.php
index fcca09597..e9ae4d1e8 100644
--- a/app/Enums/WorkspaceInvite/Status.php
+++ b/app/Enums/WorkspaceInvite/Status.php
@@ -6,26 +6,4 @@ enum Status: string
{
case Pending = 'pending';
case Accepted = 'accepted';
- case Expired = 'expired';
- case Cancelled = 'cancelled';
-
- public function label(): string
- {
- return match ($this) {
- self::Pending => 'Pending',
- self::Accepted => 'Accepted',
- self::Expired => 'Expired',
- self::Cancelled => 'Cancelled',
- };
- }
-
- public function color(): string
- {
- return match ($this) {
- self::Pending => 'yellow',
- self::Accepted => 'green',
- self::Expired => 'gray',
- self::Cancelled => 'red',
- };
- }
}
diff --git a/app/Http/Controllers/OnboardingController.php b/app/Http/Controllers/OnboardingController.php
index 28e3c9f05..3ebcdfe64 100644
--- a/app/Http/Controllers/OnboardingController.php
+++ b/app/Http/Controllers/OnboardingController.php
@@ -74,12 +74,24 @@ class OnboardingController extends Controller
}
/**
- * Store step 2 and redirect to Stripe checkout.
+ * Store step 2 and redirect to Stripe checkout (or complete if self-hosted).
*/
- public function storeStep2(Request $request): SymfonyResponse
+ public function storeStep2(Request $request): SymfonyResponse|RedirectResponse
{
$user = $request->user();
+ // Skip payment for self-hosted mode
+ if (config('trypost.self_hosted')) {
+ $user->update([
+ 'setup' => Setup::Completed,
+ ]);
+
+ session()->flash('flash.banner', 'Welcome to TryPost!');
+ session()->flash('flash.bannerStyle', 'success');
+
+ return redirect()->route('calendar');
+ }
+
$user->update([
'setup' => Setup::Subscription,
]);
diff --git a/app/Http/Controllers/WorkspaceInviteController.php b/app/Http/Controllers/WorkspaceInviteController.php
index fb39a00ba..1f96b8c26 100644
--- a/app/Http/Controllers/WorkspaceInviteController.php
+++ b/app/Http/Controllers/WorkspaceInviteController.php
@@ -4,10 +4,11 @@ namespace App\Http\Controllers;
use App\Enums\UserWorkspace\Role as WorkspaceRole;
use App\Http\Requests\StoreWorkspaceInviteRequest;
+use App\Mail\WorkspaceInvite as WorkspaceInviteMail;
use App\Models\WorkspaceInvite;
-use App\Notifications\WorkspaceInviteNotification;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
+use Illuminate\Support\Facades\Mail;
use Inertia\Inertia;
use Inertia\Response;
@@ -86,9 +87,12 @@ class WorkspaceInviteController extends Controller
'role' => $request->role ?? WorkspaceRole::Member,
]);
- $invite->notify(new WorkspaceInviteNotification($invite));
+ Mail::to($invite->email)->send(new WorkspaceInviteMail($invite));
- return back()->with('success', 'Invite sent successfully!');
+ session()->flash('flash.banner', 'Invite sent successfully!');
+ session()->flash('flash.bannerStyle', 'success');
+
+ return back();
}
public function destroy(Request $request, WorkspaceInvite $invite): RedirectResponse
@@ -105,23 +109,65 @@ class WorkspaceInviteController extends Controller
abort(404);
}
- $invite->cancel();
+ $invite->delete();
+
+ session()->flash('flash.banner', 'Invite deleted.');
+ session()->flash('flash.bannerStyle', 'success');
+
+ return back();
+ }
+
+ public function show(Request $request, string $token): Response|RedirectResponse
+ {
+ $invite = WorkspaceInvite::where('token', $token)
+ ->with(['workspace', 'inviter'])
+ ->firstOrFail();
+
+ if (! $invite->isPending()) {
+ session()->flash('flash.banner', 'This invite is no longer valid.');
+ session()->flash('flash.bannerStyle', 'danger');
+
+ return redirect()->route('login');
+ }
+
+ $user = $request->user();
- return back()->with('success', 'Invite cancelled.');
+ // Store token in session for after login/register
+ session(['pending_invite_token' => $token]);
+
+ return Inertia::render('invites/Accept', [
+ 'invite' => [
+ 'id' => $invite->id,
+ 'token' => $invite->token,
+ 'email' => $invite->email,
+ 'role' => [
+ 'value' => $invite->role->value,
+ 'label' => $invite->role->label(),
+ ],
+ 'workspace' => [
+ 'id' => $invite->workspace->id,
+ 'name' => $invite->workspace->name,
+ ],
+ 'inviter' => [
+ 'id' => $invite->inviter->id,
+ 'name' => $invite->inviter->name,
+ 'email' => $invite->inviter->email,
+ ],
+ ],
+ 'isAuthenticated' => (bool) $user,
+ 'userEmail' => $user?->email,
+ ]);
}
public function accept(Request $request, string $token): RedirectResponse
{
$invite = WorkspaceInvite::where('token', $token)->firstOrFail();
- if (! $invite->isValid()) {
- if ($invite->isExpired()) {
- return redirect()->route('dashboard')
- ->withErrors(['invite' => 'This invite has expired.']);
- }
+ if (! $invite->isPending()) {
+ session()->flash('flash.banner', 'This invite is no longer valid.');
+ session()->flash('flash.bannerStyle', 'danger');
- return redirect()->route('dashboard')
- ->withErrors(['invite' => 'This invite is no longer valid.']);
+ return redirect()->route('login');
}
$user = $request->user();
@@ -129,25 +175,28 @@ class WorkspaceInviteController extends Controller
if (! $user) {
session(['pending_invite_token' => $token]);
- return redirect()->route('login')
- ->with('message', 'Please log in to accept the invite.');
+ return redirect()->route('login');
}
+ // Clear the pending token
+ session()->forget('pending_invite_token');
+
if ($invite->workspace->hasMember($user)) {
- // Switch to this workspace
$user->switchWorkspace($invite->workspace);
- return redirect()->route('calendar')
- ->with('message', 'You are already a member of this workspace.');
+ session()->flash('flash.banner', 'You are already a member of this workspace.');
+ session()->flash('flash.bannerStyle', 'info');
+
+ return redirect()->route('calendar');
}
$invite->accept($user);
-
- // Switch to the new workspace
$user->switchWorkspace($invite->workspace);
- return redirect()->route('calendar')
- ->with('success', 'You are now a member of the workspace!');
+ session()->flash('flash.banner', 'You are now a member of the workspace!');
+ session()->flash('flash.bannerStyle', 'success');
+
+ return redirect()->route('calendar');
}
public function removeMember(Request $request, string $userId): RedirectResponse
@@ -166,6 +215,9 @@ class WorkspaceInviteController extends Controller
$workspace->members()->detach($userId);
- return back()->with('success', 'Member removed successfully.');
+ session()->flash('flash.banner', 'Member removed successfully.');
+ session()->flash('flash.bannerStyle', 'success');
+
+ return back();
}
}
diff --git a/app/Http/Middleware/EnsureSubscribed.php b/app/Http/Middleware/EnsureSubscribed.php
index 14590c547..72ffa63c1 100644
--- a/app/Http/Middleware/EnsureSubscribed.php
+++ b/app/Http/Middleware/EnsureSubscribed.php
@@ -15,6 +15,11 @@ class EnsureSubscribed
*/
public function handle(Request $request, Closure $next): Response
{
+ // Skip subscription check for self-hosted mode
+ if (config('trypost.self_hosted')) {
+ return $next($request);
+ }
+
$user = $request->user();
if (! $user) {
diff --git a/app/Http/Middleware/HandleInertiaRequests.php b/app/Http/Middleware/HandleInertiaRequests.php
index 38816abcd..5746e574c 100644
--- a/app/Http/Middleware/HandleInertiaRequests.php
+++ b/app/Http/Middleware/HandleInertiaRequests.php
@@ -49,6 +49,7 @@ class HandleInertiaRequests extends Middleware
'flash' => $request->session()->get('flash', []),
'env' => config('app.env'),
'locale' => app()->getLocale(),
+ 'selfHosted' => config('trypost.self_hosted'),
];
}
}
diff --git a/app/Http/Responses/LoginResponse.php b/app/Http/Responses/LoginResponse.php
index c0b6c633e..1ae1bfbe9 100644
--- a/app/Http/Responses/LoginResponse.php
+++ b/app/Http/Responses/LoginResponse.php
@@ -12,6 +12,11 @@ class LoginResponse implements LoginResponseContract
{
$user = $request->user();
+ // Check for pending invite token
+ if ($token = session('pending_invite_token')) {
+ return redirect()->route('invites.show', $token);
+ }
+
// Determine redirect based on setup status
$redirect = match ($user->setup) {
Setup::Completed => route('calendar'),
diff --git a/app/Http/Responses/RegisterResponse.php b/app/Http/Responses/RegisterResponse.php
index 0a200043b..9bfb28a96 100644
--- a/app/Http/Responses/RegisterResponse.php
+++ b/app/Http/Responses/RegisterResponse.php
@@ -9,6 +9,11 @@ class RegisterResponse implements RegisterResponseContract
{
public function toResponse($request): Response
{
+ // Check for pending invite token
+ if ($token = session('pending_invite_token')) {
+ return redirect()->route('invites.show', $token);
+ }
+
return $request->wantsJson()
? response()->json(['two_factor' => false])
: redirect()->route('onboarding.step1');
diff --git a/app/Mail/WorkspaceInvite.php b/app/Mail/WorkspaceInvite.php
new file mode 100644
index 000000000..d3ef6d22c
--- /dev/null
+++ b/app/Mail/WorkspaceInvite.php
@@ -0,0 +1,45 @@
+<?php
+
+namespace App\Mail;
+
+use App\Models\WorkspaceInvite as WorkspaceInviteModel;
+use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Mail\Mailable;
+use Illuminate\Mail\Mailables\Content;
+use Illuminate\Mail\Mailables\Envelope;
+use Illuminate\Queue\SerializesModels;
+
+class WorkspaceInvite extends Mailable implements ShouldQueue
+{
+ use Queueable, SerializesModels;
+
+ public function __construct(
+ public WorkspaceInviteModel $invite
+ ) {}
+
+ public function envelope(): Envelope
+ {
+ return new Envelope(
+ subject: "You've been invited to join {$this->invite->workspace->name}",
+ );
+ }
+
+ public function content(): Content
+ {
+ return new Content(
+ view: 'mail.workspace-invite',
+ with: [
+ 'title' => "You've been invited to join {$this->invite->workspace->name}",
+ 'previewText' => "{$this->invite->inviter->name} has invited you to collaborate on TryPost.",
+ 'invite' => $this->invite,
+ 'url' => route('invites.show', $this->invite->token),
+ ],
+ );
+ }
+
+ public function attachments(): array
+ {
+ return [];
+ }
+}
diff --git a/app/Models/WorkspaceInvite.php b/app/Models/WorkspaceInvite.php
index c96e3cf53..1f6a6bd6b 100644
--- a/app/Models/WorkspaceInvite.php
+++ b/app/Models/WorkspaceInvite.php
@@ -27,7 +27,6 @@ class WorkspaceInvite extends Model
'token',
'role',
'status',
- 'expires_at',
'accepted_at',
];
@@ -39,7 +38,6 @@ class WorkspaceInvite extends Model
return [
'role' => Role::class,
'status' => InviteStatus::class,
- 'expires_at' => 'datetime',
'accepted_at' => 'datetime',
];
}
@@ -50,9 +48,6 @@ class WorkspaceInvite extends Model
if (empty($invite->token)) {
$invite->token = Str::random(64);
}
- if (empty($invite->expires_at)) {
- $invite->expires_at = now()->addDays(7);
- }
});
}
@@ -71,26 +66,11 @@ class WorkspaceInvite extends Model
return $query->where('status', InviteStatus::Pending);
}
- public function scopeValid(Builder $query): Builder
- {
- return $query->pending()->where('expires_at', '>', now());
- }
-
- public function isExpired(): bool
- {
- return $this->expires_at->isPast();
- }
-
public function isPending(): bool
{
return $this->status === InviteStatus::Pending;
}
- public function isValid(): bool
- {
- return $this->isPending() && ! $this->isExpired();
- }
-
public function accept(User $user): void
{
$this->workspace->members()->attach($user->id, [
@@ -103,11 +83,6 @@ class WorkspaceInvite extends Model
]);
}
- public function cancel(): void
- {
- $this->update(['status' => InviteStatus::Cancelled]);
- }
-
public function routeNotificationForMail(): string
{
return $this->email;
diff --git a/app/Notifications/WorkspaceInviteNotification.php b/app/Notifications/WorkspaceInviteNotification.php
deleted file mode 100644
index 4cde61c28..000000000
--- a/app/Notifications/WorkspaceInviteNotification.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-
-namespace App\Notifications;
-
-use App\Models\WorkspaceInvite;
-use Illuminate\Bus\Queueable;
-use Illuminate\Contracts\Queue\ShouldQueue;
-use Illuminate\Notifications\Messages\MailMessage;
-use Illuminate\Notifications\Notification;
-
-class WorkspaceInviteNotification extends Notification implements ShouldQueue
-{
- use Queueable;
-
- /**
- * Create a new notification instance.
- */
- public function __construct(
- public WorkspaceInvite $invite
- ) {}
-
- /**
- * Get the notification's delivery channels.
- *
- * @return array<int, string>
- */
- public function via(object $notifiable): array
- {
- return ['mail'];
- }
-
- /**
- * Get the mail representation of the notification.
- */
- public function toMail(object $notifiable): MailMessage
- {
- $acceptUrl = route('invites.accept', $this->invite->token);
-
- return (new MailMessage)
- ->subject("Convite para o workspace {$this->invite->workspace->name}")
- ->greeting('Olá!')
- ->line("{$this->invite->inviter->name} convidou você para colaborar no workspace **{$this->invite->workspace->name}**.")
- ->line("Você foi convidado como **{$this->invite->role->label()}**.")
- ->action('Aceitar Convite', $acceptUrl)
- ->line('Este convite expira em 7 dias.')
- ->salutation('Obrigado por usar TryPost!');
- }
-
- /**
- * Get the array representation of the notification.
- *
- * @return array<string, mixed>
- */
- public function toArray(object $notifiable): array
- {
- return [
- 'workspace_id' => $this->invite->workspace_id,
- 'workspace_name' => $this->invite->workspace->name,
- 'inviter_name' => $this->invite->inviter->name,
- 'role' => $this->invite->role->value,
- ];
- }
-}
diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php
index c2335325c..b5ec5c07f 100644
--- a/app/Providers/AppServiceProvider.php
+++ b/app/Providers/AppServiceProvider.php
@@ -135,10 +135,10 @@ class AppServiceProvider extends ServiceProvider
VerifyEmail::toMailUsing(function (User $user, string $url) {
return (new MailMessage)
->from(config('mail.from.address'), config('mail.from.name'))
- ->subject('Confirme o seu endereço de e-mail')
+ ->subject('Verify your email address')
->view('mail.email-verification', [
- 'title' => 'Confirme o seu endereço de e-mail',
- 'previewText' => 'Por favor, confirme o seu endereço de e-mail.',
+ 'title' => 'Verify your email address',
+ 'previewText' => 'Please verify your email address.',
'user' => $user,
'url' => $url,
]);
@@ -153,10 +153,10 @@ class AppServiceProvider extends ServiceProvider
return (new MailMessage)
->from(config('mail.from.address'), config('mail.from.name'))
- ->subject('Redefina sua senha')
+ ->subject('Reset your password')
->view('mail.password-reset', [
- 'title' => 'Redefina sua senha',
- 'previewText' => 'Por favor, redefina sua senha.',
+ 'title' => 'Reset your password',
+ 'previewText' => 'Reset your password.',
'user' => $user,
'url' => $url,
]);
diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php
index 9e74fe30b..3e3f66afd 100644
--- a/app/Providers/FortifyServiceProvider.php
+++ b/app/Providers/FortifyServiceProvider.php
@@ -56,6 +56,7 @@ class FortifyServiceProvider extends ServiceProvider
'canResetPassword' => Features::enabled(Features::resetPasswords()),
'canRegister' => Features::enabled(Features::registration()),
'status' => $request->session()->get('status'),
+ 'email' => $request->query('email'),
]));
Fortify::resetPasswordView(fn (Request $request) => Inertia::render('auth/ResetPassword', [
@@ -71,7 +72,9 @@ class FortifyServiceProvider extends ServiceProvider
'status' => $request->session()->get('status'),
]));
- Fortify::registerView(fn () => Inertia::render('auth/Register'));
+ Fortify::registerView(fn (Request $request) => Inertia::render('auth/Register', [
+ 'email' => $request->query('email'),
+ ]));
Fortify::twoFactorChallengeView(fn () => Inertia::render('auth/TwoFactorChallenge'));
diff --git a/config/trypost.php b/config/trypost.php
index 9ec91df4e..95a9f76dc 100644
--- a/config/trypost.php
+++ b/config/trypost.php
@@ -2,6 +2,18 @@
return [
+ /*
+ |--------------------------------------------------------------------------
+ | Self-Hosted Mode
+ |--------------------------------------------------------------------------
+ |
+ | When enabled, the application runs in self-hosted mode which skips
+ | payment/subscription requirements during onboarding.
+ |
+ */
+
+ 'self_hosted' => env('SELF_HOSTED', true),
+
/*
|--------------------------------------------------------------------------
| Social Platforms
diff --git a/lang/php_en.json b/lang/php_en.json
new file mode 100644
index 000000000..0ef12bdac
--- /dev/null
+++ b/lang/php_en.json
@@ -0,0 +1 @@
+{"auth.failed":"These credentials do not match our records.","auth.password":"The provided password is incorrect.","auth.throttle":"Too many login attempts. Please try again in :seconds seconds.","pagination.previous":"&laquo; Previous","pagination.next":"Next &raquo;","passwords.reset":"Your password has been reset.","passwords.sent":"We have emailed your password reset link.","passwords.throttled":"Please wait before retrying.","passwords.token":"This password reset token is invalid.","passwords.user":"We can't find a user with that email address.","validation.accepted":"The :attribute field must be accepted.","validation.accepted_if":"The :attribute field must be accepted when :other is :value.","validation.active_url":"The :attribute field must be a valid URL.","validation.after":"The :attribute field must be a date after :date.","validation.after_or_equal":"The :attribute field must be a date after or equal to :date.","validation.alpha":"The :attribute field must only contain letters.","validation.alpha_dash":"The :attribute field must only contain letters, numbers, dashes, and underscores.","validation.alpha_num":"The :attribute field must only contain letters and numbers.","validation.any_of":"The :attribute field is invalid.","validation.array":"The :attribute field must be an array.","validation.ascii":"The :attribute field must only contain single-byte alphanumeric characters and symbols.","validation.before":"The :attribute field must be a date before :date.","validation.before_or_equal":"The :attribute field must be a date before or equal to :date.","validation.between.array":"The :attribute field must have between :min and :max items.","validation.between.file":"The :attribute field must be between :min and :max kilobytes.","validation.between.numeric":"The :attribute field must be between :min and :max.","validation.between.string":"The :attribute field must be between :min and :max characters.","validation.boolean":"The :attribute field must be true or false.","validation.can":"The :attribute field contains an unauthorized value.","validation.confirmed":"The :attribute field confirmation does not match.","validation.contains":"The :attribute field is missing a required value.","validation.current_password":"The password is incorrect.","validation.date":"The :attribute field must be a valid date.","validation.date_equals":"The :attribute field must be a date equal to :date.","validation.date_format":"The :attribute field must match the format :format.","validation.decimal":"The :attribute field must have :decimal decimal places.","validation.declined":"The :attribute field must be declined.","validation.declined_if":"The :attribute field must be declined when :other is :value.","validation.different":"The :attribute field and :other must be different.","validation.digits":"The :attribute field must be :digits digits.","validation.digits_between":"The :attribute field must be between :min and :max digits.","validation.dimensions":"The :attribute field has invalid image dimensions.","validation.distinct":"The :attribute field has a duplicate value.","validation.doesnt_contain":"The :attribute field must not contain any of the following: :values.","validation.doesnt_end_with":"The :attribute field must not end with one of the following: :values.","validation.doesnt_start_with":"The :attribute field must not start with one of the following: :values.","validation.email":"The :attribute field must be a valid email address.","validation.encoding":"The :attribute field must be encoded in :encoding.","validation.ends_with":"The :attribute field must end with one of the following: :values.","validation.enum":"The selected :attribute is invalid.","validation.exists":"The selected :attribute is invalid.","validation.extensions":"The :attribute field must have one of the following extensions: :values.","validation.file":"The :attribute field must be a file.","validation.filled":"The :attribute field must have a value.","validation.gt.array":"The :attribute field must have more than :value items.","validation.gt.file":"The :attribute field must be greater than :value kilobytes.","validation.gt.numeric":"The :attribute field must be greater than :value.","validation.gt.string":"The :attribute field must be greater than :value characters.","validation.gte.array":"The :attribute field must have :value items or more.","validation.gte.file":"The :attribute field must be greater than or equal to :value kilobytes.","validation.gte.numeric":"The :attribute field must be greater than or equal to :value.","validation.gte.string":"The :attribute field must be greater than or equal to :value characters.","validation.hex_color":"The :attribute field must be a valid hexadecimal color.","validation.image":"The :attribute field must be an image.","validation.in":"The selected :attribute is invalid.","validation.in_array":"The :attribute field must exist in :other.","validation.in_array_keys":"The :attribute field must contain at least one of the following keys: :values.","validation.integer":"The :attribute field must be an integer.","validation.ip":"The :attribute field must be a valid IP address.","validation.ipv4":"The :attribute field must be a valid IPv4 address.","validation.ipv6":"The :attribute field must be a valid IPv6 address.","validation.json":"The :attribute field must be a valid JSON string.","validation.list":"The :attribute field must be a list.","validation.lowercase":"The :attribute field must be lowercase.","validation.lt.array":"The :attribute field must have less than :value items.","validation.lt.file":"The :attribute field must be less than :value kilobytes.","validation.lt.numeric":"The :attribute field must be less than :value.","validation.lt.string":"The :attribute field must be less than :value characters.","validation.lte.array":"The :attribute field must not have more than :value items.","validation.lte.file":"The :attribute field must be less than or equal to :value kilobytes.","validation.lte.numeric":"The :attribute field must be less than or equal to :value.","validation.lte.string":"The :attribute field must be less than or equal to :value characters.","validation.mac_address":"The :attribute field must be a valid MAC address.","validation.max.array":"The :attribute field must not have more than :max items.","validation.max.file":"The :attribute field must not be greater than :max kilobytes.","validation.max.numeric":"The :attribute field must not be greater than :max.","validation.max.string":"The :attribute field must not be greater than :max characters.","validation.max_digits":"The :attribute field must not have more than :max digits.","validation.mimes":"The :attribute field must be a file of type: :values.","validation.mimetypes":"The :attribute field must be a file of type: :values.","validation.min.array":"The :attribute field must have at least :min items.","validation.min.file":"The :attribute field must be at least :min kilobytes.","validation.min.numeric":"The :attribute field must be at least :min.","validation.min.string":"The :attribute field must be at least :min characters.","validation.min_digits":"The :attribute field must have at least :min digits.","validation.missing":"The :attribute field must be missing.","validation.missing_if":"The :attribute field must be missing when :other is :value.","validation.missing_unless":"The :attribute field must be missing unless :other is :value.","validation.missing_with":"The :attribute field must be missing when :values is present.","validation.missing_with_all":"The :attribute field must be missing when :values are present.","validation.multiple_of":"The :attribute field must be a multiple of :value.","validation.not_in":"The selected :attribute is invalid.","validation.not_regex":"The :attribute field format is invalid.","validation.numeric":"The :attribute field must be a number.","validation.password.letters":"The :attribute field must contain at least one letter.","validation.password.mixed":"The :attribute field must contain at least one uppercase and one lowercase letter.","validation.password.numbers":"The :attribute field must contain at least one number.","validation.password.symbols":"The :attribute field must contain at least one symbol.","validation.password.uncompromised":"The given :attribute has appeared in a data leak. Please choose a different :attribute.","validation.present":"The :attribute field must be present.","validation.present_if":"The :attribute field must be present when :other is :value.","validation.present_unless":"The :attribute field must be present unless :other is :value.","validation.present_with":"The :attribute field must be present when :values is present.","validation.present_with_all":"The :attribute field must be present when :values are present.","validation.prohibited":"The :attribute field is prohibited.","validation.prohibited_if":"The :attribute field is prohibited when :other is :value.","validation.prohibited_if_accepted":"The :attribute field is prohibited when :other is accepted.","validation.prohibited_if_declined":"The :attribute field is prohibited when :other is declined.","validation.prohibited_unless":"The :attribute field is prohibited unless :other is in :values.","validation.prohibits":"The :attribute field prohibits :other from being present.","validation.regex":"The :attribute field format is invalid.","validation.required":"The :attribute field is required.","validation.required_array_keys":"The :attribute field must contain entries for: :values.","validation.required_if":"The :attribute field is required when :other is :value.","validation.required_if_accepted":"The :attribute field is required when :other is accepted.","validation.required_if_declined":"The :attribute field is required when :other is declined.","validation.required_unless":"The :attribute field is required unless :other is in :values.","validation.required_with":"The :attribute field is required when :values is present.","validation.required_with_all":"The :attribute field is required when :values are present.","validation.required_without":"The :attribute field is required when :values is not present.","validation.required_without_all":"The :attribute field is required when none of :values are present.","validation.same":"The :attribute field must match :other.","validation.size.array":"The :attribute field must contain :size items.","validation.size.file":"The :attribute field must be :size kilobytes.","validation.size.numeric":"The :attribute field must be :size.","validation.size.string":"The :attribute field must be :size characters.","validation.starts_with":"The :attribute field must start with one of the following: :values.","validation.string":"The :attribute field must be a string.","validation.timezone":"The :attribute field must be a valid timezone.","validation.unique":"The :attribute has already been taken.","validation.uploaded":"The :attribute failed to upload.","validation.uppercase":"The :attribute field must be uppercase.","validation.url":"The :attribute field must be a valid URL.","validation.ulid":"The :attribute field must be a valid ULID.","validation.uuid":"The :attribute field must be a valid UUID.","validation.custom.attribute-name.rule-name":"custom-message"}
\ No newline at end of file
diff --git a/maizzle/components/footer.html b/maizzle/components/footer.html
index e68f94aa7..e184c7692 100644
--- a/maizzle/components/footer.html
+++ b/maizzle/components/footer.html
@@ -7,29 +7,7 @@
<tr>
<td align="center" class="text-center text-zinc-600 text-xs p-6">
<p class="m-0 mb-2">
- Enviado por <a href="https://clinyx.com.br" class="text-zinc-600">Clinyx</a> - Sistema para gestão de clínicas e consultórios
- </p>
-
- <p class="m-0 cursor-default">
- <a href="https://www.linkedin.com/company/clinyx" target="_blank"
- class="text-zinc-600 [text-decoration:none] hover:![text-decoration:underline]">
- LinkedIn
- </a>
- &bull;
- <a href="https://www.facebook.com/clinyx" target="_blank"
- class="text-zinc-600 [text-decoration:none] hover:![text-decoration:underline]">
- Facebook
- </a>
- &bull;
- <a href="https://instagram.com/useclinyx" target="_blank"
- class="text-zinc-600 [text-decoration:none] hover:![text-decoration:underline]">
- Instagram
- </a>
- &bull;
- <a href="https://youtube.com/@useclinyx" target="_blank"
- class="text-zinc-600 [text-decoration:none] hover:![text-decoration:underline]">
- YouTube
- </a>
+ Open-source social media scheduling tool
</p>
@if(isset($unsubscribe_url))
diff --git a/maizzle/components/header.html b/maizzle/components/header.html
index ca8c3b825..7803f18d9 100644
--- a/maizzle/components/header.html
+++ b/maizzle/components/header.html
@@ -1,5 +1,5 @@
<div class="my-12 sm:my-8 text-center">
<a href="https://trypost.it" target="_blank">
- <img src="@{{ asset('/images/emails/trypost/logo-header.png') }}" width="160" alt="Trypost">
+ <img src="@{{ asset('/images/emails/logo-header.png') }}" width="160" alt="Trypost">
</a>
</div>
\ No newline at end of file
diff --git a/maizzle/layouts/main.html b/maizzle/layouts/main.html
index 8a0e3e1b5..c40135134 100644
--- a/maizzle/layouts/main.html
+++ b/maizzle/layouts/main.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html lang="pt-BR" xmlns:v="urn:schemas-microsoft-com:vml">
+<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta charset="utf-8">
@@ -39,15 +39,15 @@
</head>
<body class="m-0 p-0 w-full [word-break:break-word] [-webkit-font-smoothing:antialiased] {{ page.bodyClass || '' }}">
- @if(isset($preheader))
+ @if(isset($previewText))
<div class="hidden">
- @{{ $preheader }}
+ @{{ $previewText }}
<each loop="item in Array.from(Array(150))">&#8199;&#65279;&#847; </each>
</div>
@endif
- <div role="article" aria-roledescription="email" aria-label="@{{ $title }}" lang="pt-BR">
+ <div role="article" aria-roledescription="email" aria-label="@{{ $title }}" lang="en">
<yield />
</div>
</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/maizzle/templates/email-verification.html b/maizzle/templates/email-verification.html
index 07ac831d0..fe7a23440 100644
--- a/maizzle/templates/email-verification.html
+++ b/maizzle/templates/email-verification.html
@@ -8,30 +8,30 @@
<tr>
<td class="p-12 sm:px-6 text-base text-zinc-800 bg-white rounded shadow-sm">
<p class="leading-6 mt-0">
- Olá @{{$user->name}},
+ Hi @{{ $user->name }},
</p>
<p class="leading-6">
- Por favor, confirme seu endereço de e-mail clicando no botão abaixo:
+ Please confirm your email address by clicking the button below:
</p>
<x-spacer height="24px" />
<div class="text-center">
<x-button href="@{{ $url }}">
- Confirmar Endereço de E-mail &rarr;
+ Verify Email Address &rarr;
</x-button>
</div>
<x-spacer height="24px" />
<p class="leading-6">
- Se você não criou esta conta, pode ignorar este e-mail com segurança.
+ If you did not create an account, you can safely ignore this email.
</p>
<p class="leading-6 mb-0">
- Atenciosamente,
+ Best regards,
<br />
- Equipe Clinyx
+ The TryPost Team
</p>
</td>
</tr>
@@ -41,4 +41,4 @@
</tr>
</table>
</div>
-</x-main>
\ No newline at end of file
+</x-main>
diff --git a/maizzle/templates/password-reset.html b/maizzle/templates/password-reset.html
index c7e40ef4f..a0b3b0a8d 100644
--- a/maizzle/templates/password-reset.html
+++ b/maizzle/templates/password-reset.html
@@ -8,30 +8,30 @@
<tr>
<td class="p-12 sm:px-6 text-base text-zinc-800 bg-white rounded shadow-sm">
<p class="leading-6 mt-0">
- Olá @{{$user->name}},
+ Hi @{{ $user->name }},
</p>
<p class="leading-6">
- Recebemos uma solicitação para redefinir a senha da sua conta. Clique no botão abaixo para criar uma nova senha:
+ We received a request to reset your password. Click the button below to create a new password:
</p>
<x-spacer height="24px" />
<div class="text-center">
<x-button href="@{{ $url }}">
- Redefinir Senha &rarr;
+ Reset Password &rarr;
</x-button>
</div>
<x-spacer height="24px" />
<p class="leading-6">
- Este link expira em 60 minutos. Se você não solicitou a redefinição de senha, pode ignorar este e-mail com segurança.
+ This link expires in 60 minutes. If you didn't request a password reset, you can safely ignore this email.
</p>
<p class="leading-6 mb-0">
- Atenciosamente,
+ Best regards,
<br />
- Equipe Clinyx
+ The TryPost Team
</p>
</td>
</tr>
diff --git a/maizzle/templates/invite.html b/maizzle/templates/workspace-invite.html
similarity index 57%
rename from maizzle/templates/invite.html
rename to maizzle/templates/workspace-invite.html
index c177c2ecd..64f9f919f 100644
--- a/maizzle/templates/invite.html
+++ b/maizzle/templates/workspace-invite.html
@@ -1,7 +1,3 @@
----
-bodyClass: bg-slate-50
-preheader: Convite para o sistema da Clinyx
----
<x-main>
<div class="bg-zinc-50 sm:px-4 font-sans">
<table align="center">
@@ -13,23 +9,30 @@ preheader: Convite para o sistema da Clinyx
<tr>
<td class="p-12 sm:px-6 text-base text-zinc-700 bg-white rounded shadow-sm">
<h1 class="m-0 mb-6 text-2xl sm:leading-8 text-black font-semibold">
- Olá 👋
+ You've been invited!
</h1>
<p class="m-0 leading-6">
- Você foi convidado para acessar o sistema da Clinyx.
- <br />
- <br />
- Para aceitar o convite e começar a utilizar a plataforma, clique no botão abaixo.
+ <strong>@{{ $invite->inviter->name }}</strong> has invited you to collaborate on the <strong>@{{ $invite->workspace->name }}</strong> workspace.
+ </p>
+
+ <p class="m-0 mt-4 leading-6">
+ You've been invited as <strong>@{{ $invite->role->label() }}</strong>.
</p>
<x-spacer height="24px" />
<div class="flex items-center justify-center">
<x-button href="@{{ $url }}">
- Aceitar convite &rarr;
+ Accept Invite &rarr;
</x-button>
</div>
+
+ <x-spacer height="24px" />
+
+ <p class="m-0 leading-6 text-zinc-500 text-sm">
+ This invite expires in 7 days.
+ </p>
</td>
</tr>
</table>
@@ -38,4 +41,4 @@ preheader: Convite para o sistema da Clinyx
</tr>
</table>
</div>
-</x-main>
\ No newline at end of file
+</x-main>
diff --git a/public/images/emails/logo.png b/public/images/emails/logo.png
new file mode 100644
index 000000000..8636fa403
Binary files /dev/null and b/public/images/emails/logo.png differ
diff --git a/resources/js/layouts/settings/Layout.vue b/resources/js/layouts/settings/Layout.vue
index eed816c66..3715f5832 100644
--- a/resources/js/layouts/settings/Layout.vue
+++ b/resources/js/layouts/settings/Layout.vue
@@ -1,5 +1,6 @@
<script setup lang="ts">
-import { Link } from '@inertiajs/vue3';
+import { Link, usePage } from '@inertiajs/vue3';
+import { computed } from 'vue';
import Heading from '@/components/Heading.vue';
import { useActiveUrl } from '@/composables/useActiveUrl';
@@ -11,38 +12,47 @@ import { edit as editProfile } from '@/routes/profile';
import { show } from '@/routes/two-factor';
import { edit as editPassword } from '@/routes/user-password';
import { settings as workspaceSettings } from '@/routes/workspace';
-import { type NavItem } from '@/types';
+import { type NavItem, type SharedData } from '@/types';
-const navItems: NavItem[] = [
- {
- title: 'Profile',
- href: editProfile(),
- },
- {
- title: 'Password',
- href: editPassword(),
- },
- {
- title: 'Two-Factor Auth',
- href: show(),
- },
- {
- title: 'Appearance',
- href: editAppearance(),
- },
- {
- title: 'Workspace',
- href: workspaceSettings(),
- },
- {
- title: 'Members',
- href: members(),
- },
- {
- title: 'Billing',
- href: billing(),
- },
-];
+const page = usePage<SharedData>();
+
+const navItems = computed<NavItem[]>(() => {
+ const items: NavItem[] = [
+ {
+ title: 'Profile',
+ href: editProfile(),
+ },
+ {
+ title: 'Password',
+ href: editPassword(),
+ },
+ {
+ title: 'Two-Factor Auth',
+ href: show(),
+ },
+ {
+ title: 'Appearance',
+ href: editAppearance(),
+ },
+ {
+ title: 'Workspace',
+ href: workspaceSettings(),
+ },
+ {
+ title: 'Members',
+ href: members(),
+ },
+ ];
+
+ if (!page.props.selfHosted) {
+ items.push({
+ title: 'Billing',
+ href: billing(),
+ });
+ }
+
+ return items;
+});
const { urlIsActive } = useActiveUrl();
</script>
diff --git a/resources/js/pages/auth/Login.vue b/resources/js/pages/auth/Login.vue
index e38bc42b2..cb7581eea 100644
--- a/resources/js/pages/auth/Login.vue
+++ b/resources/js/pages/auth/Login.vue
@@ -17,6 +17,7 @@ defineProps<{
status?: string;
canResetPassword: boolean;
canRegister: boolean;
+ email?: string | null;
}>();
</script>
@@ -52,6 +53,7 @@ defineProps<{
:tabindex="1"
autocomplete="email"
placeholder="[email protected]"
+ :default-value="email ?? ''"
/>
<InputError :message="errors.email" />
</div>
diff --git a/resources/js/pages/auth/Register.vue b/resources/js/pages/auth/Register.vue
index 55088de7f..d8034d0c7 100644
--- a/resources/js/pages/auth/Register.vue
+++ b/resources/js/pages/auth/Register.vue
@@ -10,6 +10,10 @@ import { Spinner } from '@/components/ui/spinner';
import AuthBase from '@/layouts/AuthLayout.vue';
import { login } from '@/routes';
import { store } from '@/routes/register';
+
+defineProps<{
+ email?: string | null;
+}>();
</script>
<template>
@@ -51,6 +55,7 @@ import { store } from '@/routes/register';
autocomplete="email"
name="email"
placeholder="[email protected]"
+ :default-value="email ?? ''"
/>
<InputError :message="errors.email" />
</div>
diff --git a/resources/js/pages/invites/Accept.vue b/resources/js/pages/invites/Accept.vue
new file mode 100644
index 000000000..298cddd77
--- /dev/null
+++ b/resources/js/pages/invites/Accept.vue
@@ -0,0 +1,138 @@
+<script setup lang="ts">
+import { Head, Link, router } from '@inertiajs/vue3';
+
+import { Button } from '@/components/ui/button';
+import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
+import { Spinner } from '@/components/ui/spinner';
+import { login, register } from '@/routes';
+import { ref } from 'vue';
+
+const props = defineProps<{
+ invite: {
+ id: string;
+ token: string;
+ email: string;
+ role: {
+ value: string;
+ label: string;
+ };
+ workspace: {
+ id: string;
+ name: string;
+ };
+ inviter: {
+ id: string;
+ name: string;
+ email: string;
+ };
+ };
+ isAuthenticated: boolean;
+ userEmail?: string;
+}>();
+
+const accepting = ref(false);
+
+const acceptInvite = () => {
+ accepting.value = true;
+ router.post(`/invites/${props.invite.token}/accept`, {}, {
+ onFinish: () => {
+ accepting.value = false;
+ },
+ });
+};
+</script>
+
+<template>
+ <div class="flex min-h-svh flex-col items-center justify-center gap-6 bg-background p-6 md:p-10">
+ <Head title="Accept Invite" />
+
+ <div class="w-full max-w-md">
+ <div class="flex flex-col gap-8">
+ <div class="flex flex-col items-center gap-4">
+ <Link href="/" class="flex flex-col items-center gap-2 font-medium">
+ <img src="/images/trypost/logo-light.png" alt="TryPost" class="dark:hidden h-8 w-auto" />
+ <img src="/images/trypost/logo-dark.png" alt="TryPost" class="hidden dark:block h-8 w-auto" />
+ </Link>
+ </div>
+
+ <Card>
+ <CardHeader class="text-center">
+ <CardTitle class="text-xl">You've been invited!</CardTitle>
+ <CardDescription>
+ <span class="font-medium text-foreground">{{ invite.inviter.name }}</span>
+ has invited you to join the
+ <span class="font-medium text-foreground">{{ invite.workspace.name }}</span>
+ workspace.
+ </CardDescription>
+ </CardHeader>
+ <CardContent class="space-y-6">
+ <div class="rounded-lg bg-muted p-4 space-y-2">
+ <div class="flex justify-between text-sm">
+ <span class="text-muted-foreground">Workspace</span>
+ <span class="font-medium">{{ invite.workspace.name }}</span>
+ </div>
+ <div class="flex justify-between text-sm">
+ <span class="text-muted-foreground">Your role</span>
+ <span class="font-medium">{{ invite.role.label }}</span>
+ </div>
+ <div class="flex justify-between text-sm">
+ <span class="text-muted-foreground">Invited by</span>
+ <span class="font-medium">{{ invite.inviter.name }}</span>
+ </div>
+ </div>
+
+ <!-- Authenticated user -->
+ <template v-if="isAuthenticated">
+ <p class="text-sm text-muted-foreground text-center">
+ You're logged in as <span class="font-medium text-foreground">{{ userEmail }}</span>
+ </p>
+ <Button
+ @click="acceptInvite"
+ class="w-full"
+ size="lg"
+ :disabled="accepting"
+ >
+ <Spinner v-if="accepting" class="mr-2" />
+ Accept Invite
+ </Button>
+ </template>
+
+ <!-- Not authenticated -->
+ <template v-else>
+ <div class="space-y-3">
+ <p class="text-sm text-muted-foreground text-center">
+ To accept this invite, please log in or create an account.
+ </p>
+ <div class="grid gap-2">
+ <Button
+ as-child
+ class="w-full"
+ size="lg"
+ >
+ <Link :href="login({ query: { email: invite.email } })">
+ Log in to accept
+ </Link>
+ </Button>
+ <Button
+ as-child
+ variant="outline"
+ class="w-full"
+ size="lg"
+ >
+ <Link :href="register({ query: { email: invite.email } })">
+ Create an account
+ </Link>
+ </Button>
+ </div>
+ </div>
+ </template>
+ </CardContent>
+ </Card>
+
+ <p class="text-center text-xs text-muted-foreground">
+ This invite was sent to <span class="font-medium">{{ invite.email }}</span>
+ </p>
+ </div>
+ </div>
+ </div>
+</template>
diff --git a/resources/js/pages/settings/Members.vue b/resources/js/pages/settings/Members.vue
index b620047ea..1d42cdfe2 100644
--- a/resources/js/pages/settings/Members.vue
+++ b/resources/js/pages/settings/Members.vue
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { Head, useForm, router } from '@inertiajs/vue3';
-import { UserPlus, Users, Mail, Clock, Trash2, Crown, User, Shield } from 'lucide-vue-next';
+import { UserPlus, Users, Mail, Trash2, Crown, User, Shield } from 'lucide-vue-next';
import HeadingSmall from '@/components/HeadingSmall.vue';
import { Badge } from '@/components/ui/badge';
@@ -31,9 +31,8 @@ interface Member {
interface Invite {
id: string;
email: string;
- role: { value: string; label: string };
- status: { value: string; label: string; color: string };
- expires_at: string;
+ role: string;
+ status: string;
inviter: { name: string };
}
@@ -86,22 +85,29 @@ function handleRemoveMember(memberId: string) {
}
}
-function formatDate(dateString: string): string {
- return new Date(dateString).toLocaleDateString('en-US', {
- month: 'short',
- day: 'numeric',
- year: 'numeric',
- });
+function getStatusLabel(status: string): string {
+ const labels: Record<string, string> = {
+ pending: 'Pending',
+ accepted: 'Accepted',
+ };
+ return labels[status] || status;
}
-function getStatusColor(color: string): string {
+function getStatusColor(status: string): string {
const colors: Record<string, string> = {
- yellow: 'bg-yellow-100 text-yellow-800',
- green: 'bg-green-100 text-green-800',
- gray: 'bg-gray-100 text-gray-800',
- red: 'bg-red-100 text-red-800',
+ pending: 'bg-yellow-100 text-yellow-800',
+ accepted: 'bg-green-100 text-green-800',
+ };
+ return colors[status] || 'bg-gray-100 text-gray-800';
+}
+
+function getRoleLabel(role: string): string {
+ const labels: Record<string, string> = {
+ owner: 'Owner',
+ admin: 'Admin',
+ member: 'Member',
};
- return colors[color] || 'bg-gray-100 text-gray-800';
+ return labels[role] || role;
}
function getRoleIcon(role: string) {
@@ -178,7 +184,7 @@ function getRoleIcon(role: string) {
<Card>
<CardHeader>
<CardTitle class="flex items-center gap-2">
- <Clock class="h-5 w-5" />
+ <Mail class="h-5 w-5" />
Pending Invites
</CardTitle>
<CardDescription>
@@ -199,18 +205,15 @@ function getRoleIcon(role: string) {
<p class="font-medium truncate">{{ invite.email }}</p>
<div class="flex items-center gap-2 mt-1">
<Badge variant="outline" class="text-xs">
- {{ invite.role.label }}
+ {{ getRoleLabel(invite.role) }}
</Badge>
- <Badge :class="getStatusColor(invite.status.color)" class="text-xs">
- {{ invite.status.label }}
+ <Badge :class="getStatusColor(invite.status)" class="text-xs">
+ {{ getStatusLabel(invite.status) }}
</Badge>
</div>
- <p class="text-xs text-muted-foreground mt-1">
- Expires {{ formatDate(invite.expires_at) }}
- </p>
</div>
<Button
- v-if="invite.status.value === 'pending'"
+ v-if="invite.status === 'pending'"
variant="ghost"
size="icon"
@click="cancelInvite(invite.id)"
diff --git a/resources/js/types/index.d.ts b/resources/js/types/index.d.ts
index 3030210cb..8b3ea5a31 100644
--- a/resources/js/types/index.d.ts
+++ b/resources/js/types/index.d.ts
@@ -17,14 +17,17 @@ export interface NavItem {
isActive?: boolean;
}
-export type AppPageProps<
- T extends Record<string, unknown> = Record<string, unknown>,
-> = T & {
+export interface SharedData {
name: string;
auth: Auth;
sidebarOpen: boolean;
+ selfHosted: boolean;
[key: string]: unknown;
-};
+}
+
+export type AppPageProps<
+ T extends Record<string, unknown> = Record<string, unknown>,
+> = T & SharedData;
export interface User {
id: number;
diff --git a/resources/views/mail/email-verification.blade.php b/resources/views/mail/email-verification.blade.php
new file mode 100644
index 000000000..5f9d0cfd8
--- /dev/null
+++ b/resources/views/mail/email-verification.blade.php
@@ -0,0 +1,116 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml">
+<head>
+ <meta charset="utf-8">
+ <meta name="x-apple-disable-message-reformatting">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="format-detection" content="telephone=no, date=no, address=no, email=no, url=no">
+ <meta name="color-scheme" content="light">
+ <meta name="supported-color-schemes" content="light">
+ <!--[if mso]>
+ <noscript>
+ <xml>
+ <o:OfficeDocumentSettings xmlns:o="urn:schemas-microsoft-com:office:office">
+ <o:PixelsPerInch>96</o:PixelsPerInch>
+ </o:OfficeDocumentSettings>
+ </xml>
+ </noscript>
+ <style>
+ td,th,div,p,a,h1,h2,h3,h4,h5,h6 {font-family: "Segoe UI", sans-serif; mso-line-height-rule: exactly;}
+ </style>
+ <![endif]-->
+ @if(isset($title))
+ <title>{{ $title }}</title>
+ @endif
+ <link rel="preconnect" href="https://fonts.googleapis.com">
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet" media="screen">
+ <style>
+ .hover-i-text-decoration-underline:hover {
+ text-decoration: underline !important
+ }
+ @media (max-width: 600px) {
+ .sm-my-8 {
+ margin-top: 32px !important;
+ margin-bottom: 32px !important
+ }
+ .sm-px-4 {
+ padding-left: 16px !important;
+ padding-right: 16px !important
+ }
+ .sm-px-6 {
+ padding-left: 24px !important;
+ padding-right: 24px !important
+ }
+ }
+ </style>
+</head>
+<body style="margin: 0; width: 100%; padding: 0; -webkit-font-smoothing: antialiased; word-break: break-word">
+ @if(isset($previewText))
+ <div style="display: none">
+ {{ $previewText }}
+ &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847;
+ </div>
+ @endif
+ <div role="article" aria-roledescription="email" aria-label="{{ $title }}" lang="en">
+ <div class="sm-px-4" style="background-color: #fafafa; font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif">
+ <table align="center" cellpadding="0" cellspacing="0" role="none">
+ <tr>
+ <td style="width: 552px; max-width: 100%">
+ <div class="sm-my-8" style="margin-top: 48px; margin-bottom: 48px; text-align: center">
+ <a href="https://trypost.it" target="_blank">
+ <img src="{{ asset('/images/emails/logo-header.png') }}" width="160" alt="Trypost" style="max-width: 100%; vertical-align: middle">
+ </a>
+ </div>
+ <table style="width: 100%" cellpadding="0" cellspacing="0" role="none">
+ <tr>
+ <td class="sm-px-6" style="border-radius: 4px; background-color: #fffffe; padding: 48px; font-size: 16px; color: #27272a; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05)">
+ <p style="margin-top: 0; line-height: 24px">
+ Hi {{ $user->name }},
+ </p>
+ <p style="line-height: 24px">
+ Please confirm your email address by clicking the button below:
+ </p>
+ <div role="separator" style="line-height: 24px">&zwj;</div>
+ <div style="text-align: center">
+ <div>
+ <a href="{{ $url }}" style="display: inline-block; text-decoration: none; padding: 16px 24px; font-size: 16px; line-height: 1; border-radius: 8px; background-color: #262626; color: #ffffff">
+ <!--[if mso]><i style="mso-font-width: 150%; mso-text-raise: 31px" hidden>&emsp;</i><![endif]-->
+ <span style="mso-text-raise: 16px">Verify Email Address &rarr;</span>
+ <!--[if mso]><i hidden style="mso-font-width: 150%">&emsp;&#8203;</i><![endif]-->
+ </a>
+ </div>
+ </div>
+ <div role="separator" style="line-height: 24px">&zwj;</div>
+ <p style="line-height: 24px">
+ If you did not create an account, you can safely ignore this email.
+ </p>
+ <p style="margin-bottom: 0; line-height: 24px">
+ Best regards,
+ <br>
+ The TryPost Team
+ </p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td align="center" style="padding: 24px; text-align: center; font-size: 12px; color: #52525b">
+ <p style="margin: 0 0 8px">
+ Open-source social media scheduling tool
+ </p>
+ @if(isset($unsubscribe_url))
+ <p style="margin: 8px 0 0">
+ <a href="{{ unsubscribe_url }}" target="_blank" class="hover-i-text-decoration-underline" style="color: #52525b; text-decoration: none">
+ Unsubscribe
+ </a>
+ </p>
+ @endif
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+</body>
+</html>
\ No newline at end of file
diff --git a/resources/views/mail/password-reset.blade.php b/resources/views/mail/password-reset.blade.php
new file mode 100644
index 000000000..4901dab40
--- /dev/null
+++ b/resources/views/mail/password-reset.blade.php
@@ -0,0 +1,116 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml">
+<head>
+ <meta charset="utf-8">
+ <meta name="x-apple-disable-message-reformatting">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="format-detection" content="telephone=no, date=no, address=no, email=no, url=no">
+ <meta name="color-scheme" content="light">
+ <meta name="supported-color-schemes" content="light">
+ <!--[if mso]>
+ <noscript>
+ <xml>
+ <o:OfficeDocumentSettings xmlns:o="urn:schemas-microsoft-com:office:office">
+ <o:PixelsPerInch>96</o:PixelsPerInch>
+ </o:OfficeDocumentSettings>
+ </xml>
+ </noscript>
+ <style>
+ td,th,div,p,a,h1,h2,h3,h4,h5,h6 {font-family: "Segoe UI", sans-serif; mso-line-height-rule: exactly;}
+ </style>
+ <![endif]-->
+ @if(isset($title))
+ <title>{{ $title }}</title>
+ @endif
+ <link rel="preconnect" href="https://fonts.googleapis.com">
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet" media="screen">
+ <style>
+ .hover-i-text-decoration-underline:hover {
+ text-decoration: underline !important
+ }
+ @media (max-width: 600px) {
+ .sm-my-8 {
+ margin-top: 32px !important;
+ margin-bottom: 32px !important
+ }
+ .sm-px-4 {
+ padding-left: 16px !important;
+ padding-right: 16px !important
+ }
+ .sm-px-6 {
+ padding-left: 24px !important;
+ padding-right: 24px !important
+ }
+ }
+ </style>
+</head>
+<body style="margin: 0; width: 100%; padding: 0; -webkit-font-smoothing: antialiased; word-break: break-word">
+ @if(isset($previewText))
+ <div style="display: none">
+ {{ $previewText }}
+ &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847;
+ </div>
+ @endif
+ <div role="article" aria-roledescription="email" aria-label="{{ $title }}" lang="en">
+ <div class="sm-px-4" style="background-color: #fafafa; font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif">
+ <table align="center" cellpadding="0" cellspacing="0" role="none">
+ <tr>
+ <td style="width: 552px; max-width: 100%">
+ <div class="sm-my-8" style="margin-top: 48px; margin-bottom: 48px; text-align: center">
+ <a href="https://trypost.it" target="_blank">
+ <img src="{{ asset('/images/emails/logo-header.png') }}" width="160" alt="Trypost" style="max-width: 100%; vertical-align: middle">
+ </a>
+ </div>
+ <table style="width: 100%" cellpadding="0" cellspacing="0" role="none">
+ <tr>
+ <td class="sm-px-6" style="border-radius: 4px; background-color: #fffffe; padding: 48px; font-size: 16px; color: #27272a; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05)">
+ <p style="margin-top: 0; line-height: 24px">
+ Hi {{ $user->name }},
+ </p>
+ <p style="line-height: 24px">
+ We received a request to reset your password. Click the button below to create a new password:
+ </p>
+ <div role="separator" style="line-height: 24px">&zwj;</div>
+ <div style="text-align: center">
+ <div>
+ <a href="{{ $url }}" style="display: inline-block; text-decoration: none; padding: 16px 24px; font-size: 16px; line-height: 1; border-radius: 8px; background-color: #262626; color: #ffffff">
+ <!--[if mso]><i style="mso-font-width: 150%; mso-text-raise: 31px" hidden>&emsp;</i><![endif]-->
+ <span style="mso-text-raise: 16px">Reset Password &rarr;</span>
+ <!--[if mso]><i hidden style="mso-font-width: 150%">&emsp;&#8203;</i><![endif]-->
+ </a>
+ </div>
+ </div>
+ <div role="separator" style="line-height: 24px">&zwj;</div>
+ <p style="line-height: 24px">
+ This link expires in 60 minutes. If you didn't request a password reset, you can safely ignore this email.
+ </p>
+ <p style="margin-bottom: 0; line-height: 24px">
+ Best regards,
+ <br>
+ The TryPost Team
+ </p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td align="center" style="padding: 24px; text-align: center; font-size: 12px; color: #52525b">
+ <p style="margin: 0 0 8px">
+ Open-source social media scheduling tool
+ </p>
+ @if(isset($unsubscribe_url))
+ <p style="margin: 8px 0 0">
+ <a href="{{ unsubscribe_url }}" target="_blank" class="hover-i-text-decoration-underline" style="color: #52525b; text-decoration: none">
+ Unsubscribe
+ </a>
+ </p>
+ @endif
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+</body>
+</html>
\ No newline at end of file
diff --git a/resources/views/mail/workspace-invite.blade.php b/resources/views/mail/workspace-invite.blade.php
new file mode 100644
index 000000000..ba6c13d3d
--- /dev/null
+++ b/resources/views/mail/workspace-invite.blade.php
@@ -0,0 +1,117 @@
+<!DOCTYPE html>
+<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml">
+<head>
+ <meta charset="utf-8">
+ <meta name="x-apple-disable-message-reformatting">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="format-detection" content="telephone=no, date=no, address=no, email=no, url=no">
+ <meta name="color-scheme" content="light">
+ <meta name="supported-color-schemes" content="light">
+ <!--[if mso]>
+ <noscript>
+ <xml>
+ <o:OfficeDocumentSettings xmlns:o="urn:schemas-microsoft-com:office:office">
+ <o:PixelsPerInch>96</o:PixelsPerInch>
+ </o:OfficeDocumentSettings>
+ </xml>
+ </noscript>
+ <style>
+ td,th,div,p,a,h1,h2,h3,h4,h5,h6 {font-family: "Segoe UI", sans-serif; mso-line-height-rule: exactly;}
+ </style>
+ <![endif]-->
+ @if(isset($title))
+ <title>{{ $title }}</title>
+ @endif
+ <link rel="preconnect" href="https://fonts.googleapis.com">
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet" media="screen">
+ <style>
+ .hover-i-text-decoration-underline:hover {
+ text-decoration: underline !important
+ }
+ @media (max-width: 600px) {
+ .sm-my-8 {
+ margin-top: 32px !important;
+ margin-bottom: 32px !important
+ }
+ .sm-px-4 {
+ padding-left: 16px !important;
+ padding-right: 16px !important
+ }
+ .sm-px-6 {
+ padding-left: 24px !important;
+ padding-right: 24px !important
+ }
+ .sm-leading-8 {
+ line-height: 32px !important
+ }
+ }
+ </style>
+</head>
+<body style="margin: 0; width: 100%; padding: 0; -webkit-font-smoothing: antialiased; word-break: break-word">
+ @if(isset($previewText))
+ <div style="display: none">
+ {{ $previewText }}
+ &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847;
+ </div>
+ @endif
+ <div role="article" aria-roledescription="email" aria-label="{{ $title }}" lang="en">
+ <div class="sm-px-4" style="background-color: #fafafa; font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif">
+ <table align="center" cellpadding="0" cellspacing="0" role="none">
+ <tr>
+ <td style="width: 552px; max-width: 100%">
+ <div class="sm-my-8" style="margin-top: 48px; margin-bottom: 48px; text-align: center">
+ <a href="https://trypost.it" target="_blank">
+ <img src="{{ asset('/images/emails/logo-header.png') }}" width="160" alt="Trypost" style="max-width: 100%; vertical-align: middle">
+ </a>
+ </div>
+ <table style="width: 100%" cellpadding="0" cellspacing="0" role="none">
+ <tr>
+ <td class="sm-px-6" style="border-radius: 4px; background-color: #fffffe; padding: 48px; font-size: 16px; color: #3f3f46; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05)">
+ <h1 class="sm-leading-8" style="margin: 0 0 24px; font-size: 24px; font-weight: 600; color: #000001">
+ You've been invited!
+ </h1>
+ <p style="margin: 0; line-height: 24px">
+ <strong>{{ $invite->inviter->name }}</strong> has invited you to collaborate on the <strong>{{ $invite->workspace->name }}</strong> workspace.
+ </p>
+ <p style="margin: 16px 0 0; line-height: 24px">
+ You've been invited as <strong>{{ $invite->role->label() }}</strong>.
+ </p>
+ <div role="separator" style="line-height: 24px">&zwj;</div>
+ <div style="display: flex; align-items: center; justify-content: center">
+ <div>
+ <a href="{{ $url }}" style="display: inline-block; text-decoration: none; padding: 16px 24px; font-size: 16px; line-height: 1; border-radius: 8px; background-color: #262626; color: #ffffff">
+ <!--[if mso]><i style="mso-font-width: 150%; mso-text-raise: 31px" hidden>&emsp;</i><![endif]-->
+ <span style="mso-text-raise: 16px">Accept Invite &rarr;</span>
+ <!--[if mso]><i hidden style="mso-font-width: 150%">&emsp;&#8203;</i><![endif]-->
+ </a>
+ </div>
+ </div>
+ <div role="separator" style="line-height: 24px">&zwj;</div>
+ <p style="margin: 0; font-size: 14px; line-height: 24px; color: #71717a">
+ This invite expires in 7 days.
+ </p>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td align="center" style="padding: 24px; text-align: center; font-size: 12px; color: #52525b">
+ <p style="margin: 0 0 8px">
+ Open-source social media scheduling tool
+ </p>
+ @if(isset($unsubscribe_url))
+ <p style="margin: 8px 0 0">
+ <a href="{{ unsubscribe_url }}" target="_blank" class="hover-i-text-decoration-underline" style="color: #52525b; text-decoration: none">
+ Unsubscribe
+ </a>
+ </p>
+ @endif
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+</body>
+</html>
\ No newline at end of file
diff --git a/routes/web.php b/routes/web.php
index 8ca96868e..50a7bfb2e 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -158,8 +158,10 @@ Route::middleware(['auth', 'verified', 'subscribed', EnsureUserSetupIsComplete::
Route::get('billing/portal', [BillingController::class, 'portal'])->name('billing.portal');
});
-// Accept invite (accessible with or without auth)
-Route::get('invites/{token}/accept', [WorkspaceInviteController::class, 'accept'])
+// Invite routes (accessible with or without auth)
+Route::get('invites/{token}/accept', [WorkspaceInviteController::class, 'show'])
+ ->name('invites.show');
+Route::post('invites/{token}/accept', [WorkspaceInviteController::class, 'accept'])
->name('invites.accept');
require __DIR__.'/settings.php';