diff --git a/config/tomato-admin.php b/config/tomato-admin.php index 1d72ee0..6391933 100644 --- a/config/tomato-admin.php +++ b/config/tomato-admin.php @@ -72,5 +72,7 @@ ], "flag" => "🇩🇪" ] - ] + ], + + "global_search" => true, ]; diff --git a/publish/Models/User.php b/publish/Models/User.php index 4e65f32..242871e 100644 --- a/publish/Models/User.php +++ b/publish/Models/User.php @@ -2,20 +2,22 @@ namespace App\Models; - use Illuminate\Contracts\Auth\MustVerifyEmail; +use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; +use Laravel\Fortify\TwoFactorAuthenticatable; use Laravel\Jetstream\HasProfilePhoto; use Laravel\Jetstream\HasTeams; use Laravel\Sanctum\HasApiTokens; - use Spatie\Permission\Traits\HasRoles; +use Spatie\Permission\Traits\HasRoles; class User extends Authenticatable { use HasApiTokens, HasFactory, Notifiable; use HasTeams; use HasProfilePhoto; + use TwoFactorAuthenticatable; /** * The attributes that are mass assignable. diff --git a/resources/lang/ar.json b/resources/lang/ar.json new file mode 100644 index 0000000..c7e04b0 --- /dev/null +++ b/resources/lang/ar.json @@ -0,0 +1,69 @@ +{ + "Current Team": "الفريق الحالي", + "Manage Team": "إدارة الفريق", + "Team Settings": "إعدادات الفريق", + "Create New Team": "أضافة فريق", + "Switch Teams": "تغيير الفريق الحالي", + "Team Name": "اسم الفريق", + "The team's name and owner information.": "اسم الفريق ومعلومات المالك.", + "Team Owner": "مالك الفريق", + "Add Team Member": "أضافة عضو", + "Please provide the email address of the person you would like to add to this team.": "يرجى تقديم عنوان البريد الإلكتروني للشخص الذي ترغب في إضافته إلى هذا الفريق.", + "Email": "البريد الإلكتروني", + "Role" : "الدور", + "Administrator": "مدير", + "Administrator users can perform any action.": "يمكن لمستخدمي المسؤولين القيام بأي إجراء.", + "Editor": "محرر", + "Editor users have the ability to read, create, and update.": "يمكن لمستخدمي المحررين قراءة وإنشاء وتحديث.", + "Pending Team Invitations": "دعوات الفريق المعلقة", + "These people have been invited to your team and have been sent an invitation email. They may join the team by accepting the email invitation.": "تمت دعوة هؤلاء الأشخاص إلى فريقك وتم إرسال رسالة دعوة إلكترونية لهم. يمكنهم الانضمام إلى الفريق عن طريق قبول دعوة البريد الإلكتروني.", + "Delete Team": "حذف الفريق", + "Permanently delete this team.": "حذف هذا الفريق بشكل دائم.", + "Once a team is deleted, all of its resources and data will be permanently deleted. Before deleting this team, please download any data or information regarding this team that you wish to retain.": "بمجرد حذف الفريق، سيتم حذف جميع الموارد والبيانات الخاصة به بشكل دائم. قبل حذف هذا الفريق، يرجى تنزيل أي بيانات أو معلومات تتعلق بهذا الفريق التي ترغب في الاحتفاظ بها.", + "Delete Team": "حذف الفريق", + "Are you sure you want to delete this team? Once a team is deleted, all of its resources and data will be permanently deleted.": "هل أنت متأكد أنك تريد حذف هذا الفريق؟ بمجرد حذف الفريق، سيتم حذف جميع الموارد والبيانات الخاصة به بشكل دائم.", + "Manage Account": "إدارة الحساب", + "API Tokens": "رموز API", + "Profile Information": "معلومات الملف الشخصي", + "Update your account's profile information and email address.": "تحديث معلومات ملف تعريف حسابك وعنوان بريدك الإلكتروني.", + "Photo": "صورة", + "Select A New Photo": "اختر صورة جديدة", + "Remove Photo": "إزالة الصورة", + "Name": "الاسم", + "Your email address is unverified." : "عنوان بريدك الإلكتروني غير مؤكد.", + "Click here to re-send the verification email." : "انقر هنا لإعادة إرسال رسالة التحقق.", + "Save": "حفظ", + "Two Factor Authentication": "المصادقة الثنائية", + "Add additional security to your account using two factor authentication.": "أضف أمانًا إضافيًا لحسابك باستخدام المصادقة الثنائية.", + "You have not enabled two factor authentication.": "لم تقم بتمكين المصادقة الثنائية.", + "When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from your phone's Google Authenticator application.": "عند تمكين المصادقة الثنائية، سيتم طلب رمز مؤمن وعشوائي أثناء المصادقة. يمكنك استرداد هذا الرمز من تطبيق Google Authenticator على هاتفك.", + "Enable": "تمكين", + "Please confirm your password before continuing": "يرجى تأكيد كلمة المرور الخاصة بك قبل المتابعة", + "Finish enabling two factor authentication.": "إنهاء تمكين المصادقة الثنائية.", + "To finish enabling two factor authentication, scan the following QR code using your phone's authenticator application or enter the setup key and provide the generated OTP code.": "لإنهاء تمكين المصادقة الثنائية، قم بمسح الرمز الشريطي التالي باستخدام تطبيق المصادقة الخاص بهاتفك أو أدخل مفتاح الإعداد وقدم رمز OTP المولد.", + "Setup Key": "مفتاح الإعداد", + "Code": "الرمز", + "Browser Sessions": "جلسات المتصفح", + "Manage and log out your active sessions on other browsers and devices.": "إدارة وتسجيل الخروج من جلساتك النشطة على متصفحات وأجهزة أخرى.", + "If necessary, you may log out of all of your other browser sessions across all of your devices. Some of your recent sessions are listed below; however, this list may not be exhaustive. If you feel your account has been compromised, you should also update your password.": "إذا لزم الأمر، يمكنك تسجيل الخروج من جميع جلسات المتصفح الأخرى عبر جميع أجهزتك. يتم سرد بعض جلساتك الأخيرة أدناه؛ ومع ذلك، قد لا تكون هذه القائمة شاملة. إذا شعرت أن حسابك قد تم تعريضه للخطر، يجب عليك أيضًا تحديث كلمة المرور الخاصة بك.", + "This device" : "هذا الجهاز", + "Log Out Other Browser Sessions": "تسجيل الخروج من جلسات المتصفح الأخرى", + "Password": "كلمة المرور", + "Remember me": "تذكرني", + "Forgot your password?": "نسيت كلمة المرور؟", + "Log in": "تسجيل الدخول", + "Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.": "نسيت كلمة المرور؟ لا مشكلة. فقط أخبرنا بعنوان بريدك الإلكتروني وسنرسل لك رابط إعادة تعيين كلمة المرور الذي سيتيح لك اختيار واحدة جديدة.", + "Email Password Reset Link": "إرسال رابط إعادة تعيين كلمة المرور", + "Create API Token": "إنشاء رمز API", + "API tokens allow third-party services to authenticate with our application on your behalf.": "تسمح رموز API للخدمات الطرفية بالمصادقة على تطبيقنا نيابة عنك.", + "Permissions": "الأذونات", + "Create": "إنشاء", + "Edit": "تحرير", + "Delete": "حذف", + "Please copy your new API token. For your security, it won't be shown again.": "يرجى نسخ رمز API الجديد الخاص بك. لأمانك، لن يتم عرضه مرة أخرى.", + "Manage API Tokens": "إدارة رموز API", + "You may delete any of your existing tokens if they are no longer needed.": "يمكنك حذف أي من الرموز الحالية إذا لم تعد مطلوبة.", + "Permissions": "الأذونات", + "API Token Permissions": "أذونات رمز API", + "A new verification link has been sent to your email address.": "تم إرسال رابط التحقق الجديد إلى عنوان بريدك الإلكتروني." +} diff --git a/resources/lang/en.json b/resources/lang/en.json new file mode 100644 index 0000000..96730a1 --- /dev/null +++ b/resources/lang/en.json @@ -0,0 +1,65 @@ +{ + "Current Team": "Current Team", + "Manage Team": "Manage Team", + "Team Settings": "Team Settings", + "Create New Team": "Create New Team", + "Switch Teams": "Switch Teams", + "Team Name": "Team Name", + "The team's name and owner information.": "The team's name and owner information.", + "Team Owner": "Team Owner", + "Add Team Member": "Add Team Member", + "Please provide the email address of the person you would like to add to this team.": "Please provide the email address of the person you would like to add to this team.", + "Email": "Email", + "Role" : "Role", + "Pending Team Invitations": "Pending Team Invitations", + "These people have been invited to your team and have been sent an invitation email. They may join the team by accepting the email invitation.": "These people have been invited to your team and have been sent an invitation email. They may join the team by accepting the email invitation.", + "Delete Team": "Delete Team", + "Permanently delete this team.": "Permanently delete this team.", + "Once a team is deleted, all of its resources and data will be permanently deleted. Before deleting this team, please download any data or information regarding this team that you wish to retain.": "Once a team is deleted, all of its resources and data will be permanently deleted. Before deleting this team, please download any data or information regarding this team that you wish to retain.", + "Delete Team": "Delete Team", + "Are you sure you want to delete this team? Once a team is deleted, all of its resources and data will be permanently deleted.": "Are you sure you want to delete this team? Once a team is deleted, all of its resources and data will be permanently deleted.", + "Manage Account": "Manage Account", + "API Tokens": "API Tokens", + "Profile Information": "Profile Information", + "Update your account's profile information and email address.": "Update your account's profile information and email address.", + "Photo": "Photo", + "Select A New Photo": "Select A New Photo", + "Remove Photo": "Remove Photo", + "Name": "Name", + "Your email address is unverified." : "Your email address is unverified.", + "Click here to re-send the verification email." : "Click here to re-send the verification email.", + "Save": "Save", + "Two Factor Authentication": "Two Factor Authentication", + "Add additional security to your account using two factor authentication.": "Add additional security to your account using two factor authentication.", + "You have not enabled two factor authentication.": "You have not enabled two factor authentication.", + "When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from your phone's Google Authenticator application.": "When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from your phone's Google Authenticator application.", + "Enable": "Enable", + "Please confirm your password before continuing": "Please confirm your password before continuing", + "Finish enabling two factor authentication.": "Finish enabling two factor authentication.", + "To finish enabling two factor authentication, scan the following QR code using your phone's authenticator application or enter the setup key and provide the generated OTP code.": "To finish enabling two factor authentication, scan the following QR code using your phone's authenticator application or enter the setup key and provide the generated OTP code.", + "Setup Key": "Setup Key", + "Code": "Code", + "Browser Sessions": "Browser Sessions", + "Manage and log out your active sessions on other browsers and devices.": "Manage and log out your active sessions on other browsers and devices.", + "If necessary, you may log out of all of your other browser sessions across all of your devices. Some of your recent sessions are listed below; however, this list may not be exhaustive. If you feel your account has been compromised, you should also update your password.": "If necessary, you may log out of all of your other browser sessions across all of your devices. Some of your recent sessions are listed below; however, this list may not be exhaustive. If you feel your account has been compromised, you should also update your password.", + "This device" : "This device", + "Log Out Other Browser Sessions": "Log Out Other Browser Sessions", + "Password": "Password", + "Remember me": "Remember me", + "Forgot your password?": "Forgot your password?", + "Log in": "Log in", + "Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.": "Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.", + "Email Password Reset Link": "Email Password Reset Link", + "Create API Token": "Create API Token", + "API tokens allow third-party services to authenticate with our application on your behalf.": "API tokens allow third-party services to authenticate with our application on your behalf.", + "Permissions": "Permissions", + "Create": "Create", + "Edit": "Edit", + "Delete": "Delete", + "Please copy your new API token. For your security, it won't be shown again.": "Please copy your new API token. For your security, it won't be shown again.", + "Manage API Tokens": "Manage API Tokens", + "You may delete any of your existing tokens if they are no longer needed.": "You may delete any of your existing tokens if they are no longer needed.", + "Permissions": "Permissions", + "API Token Permissions": "API Token Permissions", + "A new verification link has been sent to your email address.": "A new verification link has been sent to your email address." +} diff --git a/resources/views/api/index.blade.php b/resources/views/api/index.blade.php index c5baed2..931f791 100644 --- a/resources/views/api/index.blade.php +++ b/resources/views/api/index.blade.php @@ -5,15 +5,15 @@
-
+
-
-

+
+

{{ __('Create API Token') }}

-

+

{{ __('API tokens allow third-party services to authenticate with our application on your behalf.') }}

@@ -21,7 +21,7 @@
- +
@@ -29,17 +29,17 @@
@endif -

{{ trans('tomato-admin::global.saved') }}

+

{{ trans('tomato-admin::global.saved') }}

- +
@@ -48,15 +48,15 @@ class="grid grid-cols-1 md:grid-cols-2 gap-1"

@if(count($tokens) > 0) -
+
-

+

{{ __('Manage API Tokens') }}

-

+

{{ __('You may delete any of your existing tokens if they are no longer needed.') }}

@@ -70,7 +70,7 @@ class="grid grid-cols-1 md:grid-cols-2 gap-1"
@if($token['last_used_ago']) -
+
{{ __('Last used') }} {{ $token['last_used_ago'] }}
@endif @@ -79,7 +79,7 @@ class="grid grid-cols-1 md:grid-cols-2 gap-1" {{ __('Permissions') }} @@ -121,7 +121,7 @@ class="cursor-pointer ml-6 text-sm text-gray-400 underline"
-
+
{{ $newToken }}
diff --git a/resources/views/auth/confirm-password.blade.php b/resources/views/auth/confirm-password.blade.php index 0c37767..b2bd759 100644 --- a/resources/views/auth/confirm-password.blade.php +++ b/resources/views/auth/confirm-password.blade.php @@ -1,6 +1,6 @@ -
+
{{ __('This is a secure area of the application. Please confirm your password before continuing.') }}
diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 49de4e3..5cf4c9b 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -14,7 +14,7 @@
@if (Route::has('password.request')) - + {{ __('Forgot your password?') }} @endif diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 0fb627d..2f8c96c 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -11,15 +11,15 @@ @if(\Laravel\Jetstream\Jetstream::hasTermsAndPrivacyPolicyFeature()) {!! __('I agree to the :terms_of_service and :privacy_policy', [ - 'terms_of_service' => ''.__('Terms of Service').'', - 'privacy_policy' => ''.__('Privacy Policy').'', + 'terms_of_service' => ''.__('Terms of Service').'', + 'privacy_policy' => ''.__('Privacy Policy').'', ]) !!} @endif
- + {{ trans('tomato-admin::global.auth.already-registered') }} diff --git a/resources/views/auth/two-factor-challenge.blade.php b/resources/views/auth/two-factor-challenge.blade.php index dc08ada..201821f 100644 --- a/resources/views/auth/two-factor-challenge.blade.php +++ b/resources/views/auth/two-factor-challenge.blade.php @@ -6,7 +6,7 @@
-
+

{{ __('Please confirm access to your account by entering the authentication code provided by your authenticator application.') }}

@@ -26,7 +26,7 @@
- diff --git a/resources/views/components/button.blade.php b/resources/views/components/button.blade.php index 1e6c68d..3fe8060 100644 --- a/resources/views/components/button.blade.php +++ b/resources/views/components/button.blade.php @@ -7,7 +7,7 @@ 'bg-warning-600 hover:bg-warning-500 focus:bg-warning-700 focus:ring-offset-warning-700 text-white border-transparent' => $warning, 'bg-primary-600 hover:bg-primary-500 focus:bg-primary-700 focus:ring-offset-primary-700 text-white border-transparent' => $primary, 'bg-success-600 hover:bg-success-500 focus:bg-success-700 focus:ring-offset-success-700 text-white border-transparent' => $success, - 'bg-white hover:bg-gray-50 focus:bg-gray-100 focus:ring-offset-gray-95 text-gray-950 ring-gray-950/10 dark:bg-gray-800 dark:text-gray-200' => $secondary, + 'bg-white hover:bg-zinc-50 focus:bg-zinc-100 focus:ring-offset-zinc-95 text-zinc-950 ring-zinc-950/10 border border-zinc-200 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-200' => $secondary, 'cursor-pointer transition-colors ease-in-out duration-20' ]) }} :method="$method"> {{$label ?: $slot}} @@ -41,7 +41,7 @@ 'bg-warning-600 hover:bg-warning-500 focus:bg-warning-700 focus:ring-offset-warning-700 text-white border-transparent' => $warning, 'bg-primary-600 hover:bg-primary-500 focus:bg-primary-700 focus:ring-offset-primary-700 text-white border-transparent' => $primary, 'bg-success-600 hover:bg-success-500 focus:bg-success-700 focus:ring-offset-success-700 text-white border-transparent' => $success, - 'bg-white hover:bg-gray-50 focus:bg-gray-100 focus:ring-offset-gray-95 text-gray-950 ring-gray-950/10 dark:bg-gray-800 dark:text-gray-200' => $secondary, + 'bg-white hover:bg-zinc-50 focus:bg-zinc-100 focus:ring-offset-zinc-95 text-zinc-950 ring-zinc-950/10 border-transparent dark:bg-zinc-800 dark:text-zinc-200' => $secondary, ]) }}> {{$label ?: $slot}} diff --git a/resources/views/components/code.blade.php b/resources/views/components/code.blade.php index fc02da9..15ff2d4 100644 --- a/resources/views/components/code.blade.php +++ b/resources/views/components/code.blade.php @@ -7,7 +7,7 @@ @includeWhen($label, 'splade::form.label', ['label' => $label]) @if($prepend) - + {!! $prepend !!} @endif @@ -15,7 +15,7 @@