From 87d953422d7f2ec6b58933eb1172ce616a2eefa7 Mon Sep 17 00:00:00 2001 From: Grigory Frolov <2168057+gynsus@users.noreply.github.com> Date: Wed, 26 Aug 2026 15:47:18 +0300 Subject: [PATCH 1/4] feat: visible Terms/Privacy links on the auth screens Social-platform app reviews (TikTok explicitly) require both links to be reachable from the public site without logging in or opening a menu. --- .../Middleware/App/HandleInertiaRequests.php | 4 ++++ config/trypost.php | 16 ++++++++++++++++ lang/ar/auth.php | 5 +++++ lang/de/auth.php | 5 +++++ lang/el/auth.php | 5 +++++ lang/en/auth.php | 5 +++++ lang/es/auth.php | 6 ++++++ lang/fr/auth.php | 5 +++++ lang/it/auth.php | 5 +++++ lang/ja/auth.php | 5 +++++ lang/ko/auth.php | 5 +++++ lang/nl/auth.php | 5 +++++ lang/pl/auth.php | 5 +++++ lang/pt-BR/auth.php | 5 +++++ lang/ru/auth.php | 5 +++++ lang/tr/auth.php | 5 +++++ lang/uk/auth.php | 5 +++++ lang/zh/auth.php | 5 +++++ resources/js/layouts/auth/AuthSplitLayout.vue | 11 +++++++++++ 19 files changed, 112 insertions(+) diff --git a/app/Http/Middleware/App/HandleInertiaRequests.php b/app/Http/Middleware/App/HandleInertiaRequests.php index 77a875e4e..1978e0a4e 100644 --- a/app/Http/Middleware/App/HandleInertiaRequests.php +++ b/app/Http/Middleware/App/HandleInertiaRequests.php @@ -51,6 +51,10 @@ public function share(Request $request): array 'hasActiveSubscription' => $account ? $account->hasActiveSubscription() : false, 'subscriptionPastDue' => $account ? $account->isPastDue() : false, ], + 'legal' => [ + 'terms' => (string) config('trypost.legal.terms_url'), + 'privacy' => (string) config('trypost.legal.privacy_url'), + ], 'usage' => $account && ! $isSelfHosted ? $account->usage() : null, 'features' => $account && ! $isSelfHosted ? $account->featureLimits() : null, 'onboardingProgress' => $this->onboardingProgress($request, $user), diff --git a/config/trypost.php b/config/trypost.php index f9d038e4d..bfad557d0 100644 --- a/config/trypost.php +++ b/config/trypost.php @@ -16,6 +16,22 @@ 'self_hosted' => env('SELF_HOSTED', true), + /* + |-------------------------------------------------------------------------- + | Legal pages + |-------------------------------------------------------------------------- + | + | Linked from the auth screens. Platform app reviews (TikTok explicitly) + | require Terms and Privacy links to be clearly visible; self-hosted + | installs point these at wherever they publish their own documents. + | + */ + + 'legal' => [ + 'terms_url' => env('LEGAL_TERMS_URL', 'https://trypost.it/terms'), + 'privacy_url' => env('LEGAL_PRIVACY_URL', 'https://trypost.it/privacy'), + ], + /* |-------------------------------------------------------------------------- | Meta page walk budget diff --git a/lang/ar/auth.php b/lang/ar/auth.php index 180f90dd2..c00153c76 100644 --- a/lang/ar/auth.php +++ b/lang/ar/auth.php @@ -137,4 +137,9 @@ 'expired_action' => 'الانتقال إلى الصفحة الرئيسية', ], + 'footer' => [ + 'terms' => 'شروط الخدمة', + 'privacy' => 'سياسة الخصوصية', + ], + ]; diff --git a/lang/de/auth.php b/lang/de/auth.php index 33733248f..64cb4c851 100644 --- a/lang/de/auth.php +++ b/lang/de/auth.php @@ -139,4 +139,9 @@ 'expired_action' => 'Zur Startseite', ], + 'footer' => [ + 'terms' => 'Nutzungsbedingungen', + 'privacy' => 'Datenschutzerklärung', + ], + ]; diff --git a/lang/el/auth.php b/lang/el/auth.php index 2b480cda7..a09550de6 100644 --- a/lang/el/auth.php +++ b/lang/el/auth.php @@ -137,4 +137,9 @@ 'expired_action' => 'Αρχική σελίδα', ], + 'footer' => [ + 'terms' => 'Όροι χρήσης', + 'privacy' => 'Πολιτική απορρήτου', + ], + ]; diff --git a/lang/en/auth.php b/lang/en/auth.php index 637a94412..8e7d79865 100644 --- a/lang/en/auth.php +++ b/lang/en/auth.php @@ -137,4 +137,9 @@ 'expired_action' => 'Go to home', ], + 'footer' => [ + 'terms' => 'Terms of Service', + 'privacy' => 'Privacy Policy', + ], + ]; diff --git a/lang/es/auth.php b/lang/es/auth.php index 77445a992..5e07ae0d5 100644 --- a/lang/es/auth.php +++ b/lang/es/auth.php @@ -124,4 +124,10 @@ 'expired_description' => 'El workspace de esta invitación fue eliminado. Pide al propietario de la cuenta una nueva invitación si aún necesitas acceso.', 'expired_action' => 'Ir al inicio', ], + + 'footer' => [ + 'terms' => 'Términos del servicio', + 'privacy' => 'Política de privacidad', + ], + ]; diff --git a/lang/fr/auth.php b/lang/fr/auth.php index 904b4c1c4..ab4b91b96 100644 --- a/lang/fr/auth.php +++ b/lang/fr/auth.php @@ -137,4 +137,9 @@ 'expired_action' => 'Retour à l’accueil', ], + 'footer' => [ + 'terms' => 'Conditions d’utilisation', + 'privacy' => 'Politique de confidentialité', + ], + ]; diff --git a/lang/it/auth.php b/lang/it/auth.php index 44511b142..f6a21a6a8 100644 --- a/lang/it/auth.php +++ b/lang/it/auth.php @@ -137,4 +137,9 @@ 'expired_action' => 'Vai alla home', ], + 'footer' => [ + 'terms' => 'Termini di servizio', + 'privacy' => 'Informativa sulla privacy', + ], + ]; diff --git a/lang/ja/auth.php b/lang/ja/auth.php index 98df02db9..1558d9404 100644 --- a/lang/ja/auth.php +++ b/lang/ja/auth.php @@ -137,4 +137,9 @@ 'expired_action' => 'ホームへ', ], + 'footer' => [ + 'terms' => '利用規約', + 'privacy' => 'プライバシーポリシー', + ], + ]; diff --git a/lang/ko/auth.php b/lang/ko/auth.php index cdf172d59..40ca6152a 100644 --- a/lang/ko/auth.php +++ b/lang/ko/auth.php @@ -137,4 +137,9 @@ 'expired_action' => '홈으로', ], + 'footer' => [ + 'terms' => '서비스 약관', + 'privacy' => '개인정보 처리방침', + ], + ]; diff --git a/lang/nl/auth.php b/lang/nl/auth.php index 471c68013..c4b7f6994 100644 --- a/lang/nl/auth.php +++ b/lang/nl/auth.php @@ -137,4 +137,9 @@ 'expired_action' => 'Naar home', ], + 'footer' => [ + 'terms' => 'Servicevoorwaarden', + 'privacy' => 'Privacybeleid', + ], + ]; diff --git a/lang/pl/auth.php b/lang/pl/auth.php index 1cce8921b..6fc13bd92 100644 --- a/lang/pl/auth.php +++ b/lang/pl/auth.php @@ -137,4 +137,9 @@ 'expired_action' => 'Przejdź do strony głównej', ], + 'footer' => [ + 'terms' => 'Regulamin', + 'privacy' => 'Polityka prywatności', + ], + ]; diff --git a/lang/pt-BR/auth.php b/lang/pt-BR/auth.php index 2ba690c7b..d4d1ec58b 100644 --- a/lang/pt-BR/auth.php +++ b/lang/pt-BR/auth.php @@ -137,4 +137,9 @@ 'expired_action' => 'Ir para o início', ], + 'footer' => [ + 'terms' => 'Termos de serviço', + 'privacy' => 'Política de privacidade', + ], + ]; diff --git a/lang/ru/auth.php b/lang/ru/auth.php index e813ed655..715f2c19d 100644 --- a/lang/ru/auth.php +++ b/lang/ru/auth.php @@ -137,4 +137,9 @@ 'expired_action' => 'На главную', ], + 'footer' => [ + 'terms' => 'Условия использования', + 'privacy' => 'Политика конфиденциальности', + ], + ]; diff --git a/lang/tr/auth.php b/lang/tr/auth.php index d11255b48..a5e37d99a 100644 --- a/lang/tr/auth.php +++ b/lang/tr/auth.php @@ -139,4 +139,9 @@ 'expired_action' => 'Ana sayfaya git', ], + 'footer' => [ + 'terms' => 'Hizmet şartları', + 'privacy' => 'Gizlilik politikası', + ], + ]; diff --git a/lang/uk/auth.php b/lang/uk/auth.php index 33918920f..d5557a206 100644 --- a/lang/uk/auth.php +++ b/lang/uk/auth.php @@ -137,4 +137,9 @@ 'expired_action' => 'На головну', ], + 'footer' => [ + 'terms' => 'Умови використання', + 'privacy' => 'Політика конфіденційності', + ], + ]; diff --git a/lang/zh/auth.php b/lang/zh/auth.php index 4d3528fdc..34d91d2f1 100644 --- a/lang/zh/auth.php +++ b/lang/zh/auth.php @@ -137,4 +137,9 @@ 'expired_action' => '返回首页', ], + 'footer' => [ + 'terms' => '服务条款', + 'privacy' => '隐私政策', + ], + ]; diff --git a/resources/js/layouts/auth/AuthSplitLayout.vue b/resources/js/layouts/auth/AuthSplitLayout.vue index 1450ca41f..d7ee6c51b 100644 --- a/resources/js/layouts/auth/AuthSplitLayout.vue +++ b/resources/js/layouts/auth/AuthSplitLayout.vue @@ -7,9 +7,12 @@ import { IconUsers, IconVideo, } from '@tabler/icons-vue'; +import { usePage } from '@inertiajs/vue3'; import { trans } from 'laravel-vue-i18n'; import { onBeforeUnmount, onMounted, ref, computed } from 'vue'; +const legal = computed(() => (usePage().props.legal ?? {}) as { terms?: string; privacy?: string }); + defineProps<{ title?: string; description?: string; @@ -109,6 +112,14 @@ const platforms = [ + + +
Date: Tue, 1 Sep 2026 17:44:18 -0300 Subject: [PATCH 2/4] Cover the legal links with tests and tidy the layout The links are a compliance artifact an outside reviewer checks, but nothing asserted they exist. A refactor of this layout could drop the footer silently and the next platform submission would fail the same check that prompted the PR. A feature test asserts the shared prop reaches both guest screens and carries whatever the install configured, and a browser test asserts the two links actually render to a logged-out visitor. Declares legal on SharedData, so the props read through the interface rather than its index signature and the inline cast goes away. Adds rel="noopener noreferrer" to both anchors, matching every other target="_blank" in the codebase, and orders the imports the way eslint expects so the file lands clean rather than relying on --fix in CI. Drops the comment explaining why the links are there: that rationale belongs in the commit and the pull request, and the sibling comments in this file describe markup rather than justify decisions. --- resources/js/layouts/auth/AuthSplitLayout.vue | 28 +++++++++--- resources/js/types/index.d.ts | 6 +++ tests/Browser/AuthLegalLinksTest.php | 43 +++++++++++++++++++ tests/Feature/Auth/LegalLinksTest.php | 27 ++++++++++++ 4 files changed, 98 insertions(+), 6 deletions(-) create mode 100644 tests/Browser/AuthLegalLinksTest.php create mode 100644 tests/Feature/Auth/LegalLinksTest.php diff --git a/resources/js/layouts/auth/AuthSplitLayout.vue b/resources/js/layouts/auth/AuthSplitLayout.vue index d7ee6c51b..17e2011d1 100644 --- a/resources/js/layouts/auth/AuthSplitLayout.vue +++ b/resources/js/layouts/auth/AuthSplitLayout.vue @@ -1,4 +1,5 @@ + + diff --git a/resources/js/layouts/auth/AuthSplitLayout.vue b/resources/js/layouts/auth/AuthSplitLayout.vue index 17e2011d1..1450ca41f 100644 --- a/resources/js/layouts/auth/AuthSplitLayout.vue +++ b/resources/js/layouts/auth/AuthSplitLayout.vue @@ -1,5 +1,4 @@