Skip to content

Commit d9edc70

Browse files
committed
fix/admin(global): removing darkmode and adding actions
1 parent adfa299 commit d9edc70

37 files changed

+208
-187
lines changed

.env.ci

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
APP_NAME=Metisio
2+
APP_ENV=local
3+
APP_KEY=base64:xlPMGXEljEP45OCbGHKrmrFL5p7d9xORnwC1Nxn6ULQ=
4+
APP_DEBUG=true
5+
APP_URL=https://metisio-laravel.test/
6+
7+
APP_LOCALE=en
8+
APP_FALLBACK_LOCALE=en
9+
APP_FAKER_LOCALE=en_US
10+
11+
APP_MAINTENANCE_DRIVER=file
12+
# APP_MAINTENANCE_STORE=database
13+
14+
PHP_CLI_SERVER_WORKERS=4
15+
16+
BCRYPT_ROUNDS=12
17+
18+
LOG_CHANNEL=stack
19+
LOG_STACK=single
20+
LOG_DEPRECATIONS_CHANNEL=null
21+
LOG_LEVEL=debug
22+
23+
DB_CONNECTION=pgsql
24+
DB_HOST=127.0.0.1
25+
DB_PORT=5432
26+
DB_DATABASE=phil
27+
DB_USERNAME=
28+
DB_PASSWORD=
29+
30+
SESSION_DRIVER=database
31+
SESSION_LIFETIME=120
32+
SESSION_ENCRYPT=false
33+
SESSION_PATH=/
34+
SESSION_DOMAIN=null
35+
36+
BROADCAST_CONNECTION=log
37+
FILESYSTEM_DISK=local
38+
QUEUE_CONNECTION=database
39+
40+
CACHE_STORE=database
41+
# CACHE_PREFIX=
42+
43+
MEMCACHED_HOST=127.0.0.1
44+
45+
REDIS_CLIENT=phpredis
46+
REDIS_HOST=127.0.0.1
47+
REDIS_PASSWORD=null
48+
REDIS_PORT=6379
49+
50+
MAIL_MAILER=log
51+
MAIL_SCHEME=null
52+
MAIL_HOST=127.0.0.1
53+
MAIL_PORT=2525
54+
MAIL_USERNAME=null
55+
MAIL_PASSWORD=null
56+
MAIL_FROM_ADDRESS="[email protected]"
57+
MAIL_FROM_NAME="${APP_NAME}"
58+
59+
AWS_ACCESS_KEY_ID=
60+
AWS_SECRET_ACCESS_KEY=
61+
AWS_DEFAULT_REGION=us-east-1
62+
AWS_BUCKET=
63+
AWS_USE_PATH_STYLE_ENDPOINT=false
64+
65+
VITE_APP_NAME="${APP_NAME}"
66+
67+
STRIPE_KEY=pk_test_TQXzwMy2mHpxsuWwzNsBNXNu
68+
STRIPE_SECRET=sk_test_3GV6DE3brug6GX1GJjsGLqCk
69+
STRIPE_WEBHOOK_SECRET=whsec_b2c8ba403dbbfb3aa395537d4c9e80a04e2dd32e964eebb2a87b416c66931b7d
70+
CASHIER_CURRENCY=eur
71+
CASHIER_LOGGER=stack
72+
STRIPE_PRODUCT_ID=price_1R7a4FIWRSe7TYLFAjJ1tuXS
73+
74+
75+
GOOGLE_CLIENT_ID=895990939288-ag6mfqr9cq1k892djfpqsvrj6k4h8cfn.apps.googleusercontent.com
76+
GOOGLE_CLIENT_SECRET=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
77+
GOOGLE_REDIRECT="${APP_URL}/auth/social/google/callback"
78+
79+
FACEBOOK_CLIENT_ID=1229328491886413
80+
FACEBOOK_CLIENT_SECRET=57f4275fc84334210332c71eaf365f01
81+
FACEBOOK_REDIRECT="${APP_URL}/auth/social/facebook/callback"

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
run: npm run format
3737

3838
- name: Lint Frontend
39-
run: npm run lint
39+
run: npx prettier --check .
4040

4141
# - name: Commit Changes
4242
# uses: stefanzweifel/git-auto-commit-action@v5

.github/workflows/tests.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,13 @@ jobs:
3131
node-version: "22"
3232
cache: "npm"
3333

34+
- name: Set up MySQL
35+
run: |
36+
sudo systemctl start mysql
37+
mysql --user="root" --password="root" -e "CREATE DATABASE \`DB_DATABASE=metisio_testing\` character set UTF8mb4 collate utf8mb4_bin;"
38+
3439
- name: Install Node Dependencies
35-
run: npm ci
40+
run: npm install
3641

3742
- name: Build Assets
3843
run: npm run build
@@ -46,5 +51,14 @@ jobs:
4651
- name: Generate Application Key
4752
run: php artisan key:generate
4853

54+
- name: Run Migrations
55+
run: php artisan migrate
56+
57+
- name: Start Server
58+
run: php artisan serve --no-reload &
59+
4960
- name: Tests
50-
run: ./vendor/bin/phpunit
61+
run: php artisan test
62+
63+
- name: Browser Tests
64+
run: php artisan dusk

app/Http/Controllers/Auth/SocialitePlusController.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
namespace App\Http\Controllers\Auth;
44

5+
use App\Http\Controllers\Controller;
56
use App\Models\User;
6-
use Illuminate\Http\Request;
77
use Blaspsoft\SocialitePlus\SocialitePlusFactory;
8+
use Illuminate\Http\Request;
89
use Illuminate\Support\Facades\Auth;
9-
use App\Http\Controllers\Controller;
1010

1111
class SocialitePlusController extends Controller
1212
{
@@ -19,8 +19,6 @@ class SocialitePlusController extends Controller
1919

2020
/**
2121
* Create a new SocialLoginController instance.
22-
*
23-
* @param SocialitePlusFactory $socialitePlus
2422
*/
2523
public function __construct(SocialitePlusFactory $socialitePlus)
2624
{
@@ -30,7 +28,6 @@ public function __construct(SocialitePlusFactory $socialitePlus)
3028
/**
3129
* Redirect to the social login page
3230
*
33-
* @param string $provider
3431
* @return \Illuminate\Http\RedirectResponse
3532
*/
3633
public function redirect(string $provider)
@@ -47,20 +44,21 @@ public function redirect(string $provider)
4744
/**
4845
* Handle the social login callback
4946
*
50-
* @param string $provider
51-
* @param Request $request
5247
* @return \Illuminate\Http\RedirectResponse
5348
*/
5449
public function callback(string $provider, Request $request)
5550
{
56-
if (!$request->has('code')) return redirect()->route('login')->with('error', 'Invalid request');
51+
if (! $request->has('code')) {
52+
return redirect()->route('login')->with('error', 'Invalid request');
53+
}
5754

5855
$user = $this->socialitePlus->build($provider)->user();
5956

6057
$existingUser = User::where('email', $user->getEmail())->first();
6158

6259
if ($existingUser) {
6360
Auth::login($existingUser);
61+
6462
return redirect()->intended('/dashboard');
6563
}
6664

database/factories/FileUploadFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ class FileUploadFactory extends Factory
1818
*/
1919
public function definition(): array
2020
{
21-
$filename = Str::uuid() . '.pdf';
21+
$filename = Str::uuid().'.pdf';
2222

2323
return [
2424
'user_id' => User::factory(),
2525
'filename' => $filename,
26-
'original_filename' => $this->faker->word() . '.pdf',
27-
'path' => 'uploads/' . $filename,
26+
'original_filename' => $this->faker->word().'.pdf',
27+
'path' => 'uploads/'.$filename,
2828
'mime_type' => 'application/pdf',
2929
'size' => $this->faker->numberBetween(1000, 5000000),
3030
'status' => $this->faker->randomElement(['uploaded', 'processing', 'processed']),

resources/js/components/app-header.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ const rightNavItems: NavItem[] = [
5656
},
5757
];
5858

59-
const activeItemStyles =
60-
"text-neutral-900 dark:bg-neutral-800 dark:text-neutral-100";
59+
const activeItemStyles = "text-neutral-900";
6160

6261
interface AppHeaderProps {
6362
breadcrumbs?: BreadcrumbItem[];
@@ -91,7 +90,7 @@ export function AppHeader({ breadcrumbs = [] }: AppHeaderProps) {
9190
Navigation Menu
9291
</SheetTitle>
9392
<SheetHeader className="flex justify-start text-left">
94-
<AppLogoIcon className="h-6 w-6 fill-current text-black dark:text-white" />
93+
<AppLogoIcon className="h-6 w-6 fill-current text-black" />
9594
</SheetHeader>
9695
<div className="flex h-full flex-1 flex-col space-y-4 p-4">
9796
<div className="flex h-full flex-col justify-between text-sm">
@@ -173,7 +172,7 @@ export function AppHeader({ breadcrumbs = [] }: AppHeaderProps) {
173172
{item.title}
174173
</Link>
175174
{page.url === item.href && (
176-
<div className="absolute bottom-0 left-0 h-0.5 w-full translate-y-px bg-black dark:bg-white"></div>
175+
<div className="absolute bottom-0 left-0 h-0.5 w-full translate-y-px bg-black"></div>
177176
)}
178177
</NavigationMenuItem>
179178
))}
@@ -234,7 +233,7 @@ export function AppHeader({ breadcrumbs = [] }: AppHeaderProps) {
234233
src={auth.user.avatar}
235234
alt={auth.user.name}
236235
/>
237-
<AvatarFallback className="rounded-lg bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white">
236+
<AvatarFallback className="rounded-lg bg-neutral-200 text-black">
238237
{getInitials(auth.user.name)}
239238
</AvatarFallback>
240239
</Avatar>

resources/js/components/app-logo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default function AppLogo() {
44
return (
55
<>
66
<div className="bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-md">
7-
<AppLogoIcon className="size-5 fill-current text-white dark:text-black" />
7+
<AppLogoIcon className="size-5 fill-current text-white" />
88
</div>
99
<div className="ml-1 grid flex-1 text-left text-sm">
1010
<span className="mb-0.5 truncate leading-none font-semibold">

resources/js/components/appearance-tabs.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function AppearanceToggleTab({
1818
return (
1919
<div
2020
className={cn(
21-
"inline-flex gap-1 rounded-lg bg-neutral-100 p-1 dark:bg-neutral-800",
21+
"inline-flex gap-1 rounded-lg bg-neutral-100 p-1",
2222
className,
2323
)}
2424
{...props}
@@ -30,8 +30,8 @@ export default function AppearanceToggleTab({
3030
className={cn(
3131
"flex items-center rounded-md px-3.5 py-1.5 transition-colors",
3232
appearance === value
33-
? "bg-white shadow-xs dark:bg-neutral-700 dark:text-neutral-100"
34-
: "text-neutral-500 hover:bg-neutral-200/60 hover:text-black dark:text-neutral-400 dark:hover:bg-neutral-700/60",
33+
? "bg-white shadow-xs"
34+
: "text-neutral-500 hover:bg-neutral-200/60 hover:text-black",
3535
)}
3636
>
3737
<Icon className="-ml-1 h-4 w-4" />

resources/js/components/catalyst/checkbox.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ const base = [
5454
// Background color when checked
5555
"group-data-checked:before:bg-(--checkbox-checked-bg)",
5656
// Background color is moved to control and shadow is removed in dark mode so hide `before` pseudo
57-
"dark:before:hidden",
57+
"before:hidden",
5858
// Background color applied to control in dark mode
59-
"dark:bg-white/5 dark:group-data-checked:bg-(--checkbox-checked-bg)",
59+
"bg-white/5",
6060
// Border
6161
"border border-zinc-950/15 group-data-checked:border-transparent group-data-hover:group-data-checked:border-transparent group-data-hover:border-zinc-950/30 group-data-checked:bg-(--checkbox-checked-border)",
62-
"dark:border-white/15 dark:group-data-checked:border-white/5 dark:group-data-hover:group-data-checked:border-white/5 dark:group-data-hover:border-white/30",
62+
"border-white/15",
6363
// Inner highlight shadow
6464
"after:absolute after:inset-0 after:rounded-[calc(0.3125rem-1px)] after:shadow-[inset_0_1px_--theme(--color-white/15%)]",
6565
"dark:after:-inset-px dark:after:hidden dark:after:rounded-[0.3125rem] dark:group-data-checked:after:block",

resources/js/components/catalyst/fieldset.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function Legend({
2727
{...props}
2828
className={clsx(
2929
className,
30-
"text-base/6 font-semibold text-zinc-950 data-disabled:opacity-50 sm:text-sm/6 dark:text-white",
30+
"text-base/6 font-semibold text-zinc-950 data-disabled:opacity-50 sm:text-sm/6",
3131
)}
3232
/>
3333
);
@@ -76,7 +76,7 @@ export function Label({
7676
{...props}
7777
className={clsx(
7878
className,
79-
"text-base/6 text-zinc-950 select-none data-disabled:opacity-50 sm:text-sm/6 dark:text-white",
79+
"text-base/6 text-zinc-950 select-none data-disabled:opacity-50 sm:text-sm/6",
8080
)}
8181
/>
8282
);
@@ -95,7 +95,7 @@ export function Description({
9595
{...props}
9696
className={clsx(
9797
className,
98-
"text-base/6 text-zinc-500 data-disabled:opacity-50 sm:text-sm/6 dark:text-zinc-400",
98+
"text-base/6 text-zinc-500 data-disabled:opacity-50 sm:text-sm/6",
9999
)}
100100
/>
101101
);
@@ -114,7 +114,7 @@ export function ErrorMessage({
114114
{...props}
115115
className={clsx(
116116
className,
117-
"text-base/6 text-red-600 data-disabled:opacity-50 sm:text-sm/6 dark:text-red-500",
117+
"text-base/6 text-red-600 data-disabled:opacity-50 sm:text-sm/6",
118118
)}
119119
/>
120120
);

0 commit comments

Comments
 (0)