Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 19 additions & 35 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,43 +47,27 @@ php artisan optimize
php artisan storage:link || true

# Ensure default assets exist in volume
if [ -d "docker/defaults/assets/images" ]; then
for img in docker/defaults/assets/images/*; do
base=$(basename "$img")
target="storage/app/public/assets/images/$base"
if [ ! -f "$target" ]; then
log "entrypoint" "INFO" "Restoring default assets image $base"
mkdir -p "$(dirname "$target")"
cp -n "$img" "$target" || true
fi
done
fi
restore_assets() {
SRC=$1
DEST=$2
NAME=$3

if [ -d "$SRC" ]; then
log "entrypoint" "INFO" "Syncing $NAME assets..."
mkdir -p "$DEST"
cp -rup "$SRC/." "$DEST/"
log "entrypoint" "INFO" "$NAME assets synced."
fi
}

# Copy default banner images if missing
if [ -d "docker/defaults/banner-images" ]; then
for img in docker/defaults/banner-images/*; do
base=$(basename "$img")
target="storage/app/public/banner-images/$base"
if [ ! -f "$target" ]; then
log "entrypoint" "INFO" "Restoring default banner image $base"
mkdir -p "$(dirname "$target")"
cp -n "$img" "$target" || true
fi
done
fi
# 1. Restore Main Images
restore_assets "docker/defaults/images" "storage/app/public/assets/images" "General"

# Copy default product images if missing
if [ -d "docker/defaults/product-images" ]; then
for img in docker/defaults/product-images/*; do
base=$(basename "$img")
target="storage/app/public/product-images/$base"
if [ ! -f "$target" ]; then
log "entrypoint" "INFO" "Restoring default product image $base"
mkdir -p "$(dirname "$target")"
cp -n "$img" "$target" || true
fi
done
fi
# 2. Restore Banner Images
restore_assets "docker/defaults/banner-images" "storage/app/public/banner-images" "Banner"

# 3. Restore Product Images
restore_assets "docker/defaults/product-images" "storage/app/public/product-images" "Product"

# Fix permission
chown -R www-data:www-data storage bootstrap/cache public/build
Expand Down
22 changes: 12 additions & 10 deletions resources/js/Components/AuthCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ export default function AuthCard({
return (
<Card
className={cn(
'w-full max-w-[640px] overflow-hidden rounded-[32px] border border-gray-100 bg-white shadow-sm',
'w-full max-w-[640px] overflow-hidden rounded-[32px] border border-gray-100 shadow-sm dark:border-muted-foreground dark:bg-primary-50',
className,
)}
>
<CardContent className="p-6 sm:p-10">
<div className="mb-8 text-center">
<h2 className="mb-2 text-2xl font-bold text-[#1A1A1A]">
<h2 className="mb-2 text-2xl font-bold text-foreground">
{isLogin ? 'Login' : 'Register'}
</h2>
{isLogin && (
<p className="text-xl font-semibold text-[#1A1A1A]">
<p className="text-xl font-semibold text-foreground">
Welcome back!
</p>
)}
Expand All @@ -66,7 +66,7 @@ export default function AuthCard({
<div className="space-y-1.5">
<Label
htmlFor="name"
className="text-sm font-medium text-[#1A1A1A]"
className="text-sm font-medium text-foreground"
>
Name
</Label>
Expand All @@ -87,7 +87,7 @@ export default function AuthCard({
<div className="space-y-1.5">
<Label
htmlFor="email"
className="text-sm font-medium text-[#1A1A1A]"
className="text-sm font-medium text-foreground"
>
Email
</Label>
Expand All @@ -105,7 +105,7 @@ export default function AuthCard({
<div className="space-y-1.5">
<Label
htmlFor="password"
className="text-sm font-medium text-[#1A1A1A]"
className="text-sm font-medium text-foreground"
>
Password
</Label>
Expand Down Expand Up @@ -140,7 +140,7 @@ export default function AuthCard({
<div className="space-y-1.5">
<Label
htmlFor="password_confirmation"
className="text-sm font-medium text-[#1A1A1A]"
className="text-sm font-medium text-foreground"
>
Confirm Password
</Label>
Expand Down Expand Up @@ -205,7 +205,7 @@ export default function AuthCard({
</form>

<div className="mt-6 text-center">
<p className="text-base text-[#1A1A1A]">
<p className="text-base text-foreground">
{isLogin
? "Don't have an account? "
: 'Already have an account? '}
Expand All @@ -223,15 +223,17 @@ export default function AuthCard({
<span className="w-full border-t border-gray-300" />
</div>
<div className="relative flex justify-center text-sm uppercase">
<span className="bg-white px-4 text-[#1A1A1A]">OR</span>
<span className="bg-primary-50 px-4 text-foreground">
OR
</span>
</div>
</div>

<Button
variant="outline"
type="button"
onClick={onGoogleContinue}
className="flex h-12 w-full items-center justify-center gap-3 rounded-xl border-gray-300 text-base font-bold text-[#1A1A1A] hover:bg-gray-50 hover:text-[#1A1A1A]"
className="flex h-12 w-full items-center justify-center gap-3 rounded-xl border-gray-300 text-base font-bold text-foreground hover:bg-gray-50 hover:text-foreground dark:hover:bg-primary-200"
>
<svg className="h-5 w-5" viewBox="0 0 24 24">
<path
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Components/ForgotPasswordCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function ForgotPasswordCard({
>
<CardContent className="space-y-8 p-6 sm:p-10">
<div className="space-y-2">
<h2 className="text-2xl font-bold text-[#1A1A1A]">
<h2 className="text-2xl font-bold text-foreground">
Reset your password
</h2>
<p className="text-base leading-relaxed text-gray-500">
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Layouts/GuestLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PropsWithChildren } from 'react';

export default function Guest({ children }: PropsWithChildren) {
return (
<div className="flex min-h-screen flex-col items-center justify-center bg-white">
<div className="flex min-h-screen flex-col items-center justify-center bg-background">
{/* <GoogleOneTap /> */}
{children}
</div>
Expand Down
Loading