Skip to content

Commit 41b29b8

Browse files
committed
fix: Remove missing UI component imports and fix build errors
- Removed Alert component imports that don't exist - Removed toast hook import that doesn't exist - Replaced Alert components with simple styled divs - Replaced toast notifications with browser alerts - Build now completes successfully
1 parent 2418338 commit 41b29b8

File tree

3 files changed

+12
-22
lines changed

3 files changed

+12
-22
lines changed

config/nativephp.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
* usually in the form of a reverse domain name.
1414
* For example: com.nativephp.app
1515
*/
16-
'app_id' => env('NATIVEPHP_APP_ID', 'com.nativephp.app'),
16+
'
17+
' => env('NATIVEPHP_APP_ID', 'com.nativephp.app'),
1718

1819
/**
1920
* If your application allows deep linking, you can specify the scheme
@@ -63,6 +64,8 @@
6364
'GITHUB_*',
6465
'DO_SPACES_*',
6566
'*_SECRET',
67+
'OPENAI_API_KEY',
68+
'VITE_OPENAI_API_KEY',
6669
'ZEPHPYR_*',
6770
'NATIVEPHP_UPDATER_PATH',
6871
'NATIVEPHP_APPLE_ID',

resources/js/pages/Onboarding/Welcome.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script setup lang="ts">
2-
import { Alert, AlertDescription } from '@/components/ui/alert';
32
import { Button } from '@/components/ui/button';
43
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card';
54
import { Input } from '@/components/ui/input';
@@ -87,12 +86,10 @@ const skipOnboarding = () => {
8786
</p>
8887
</div>
8988

90-
<Alert v-if="form.errors.openai_api_key" variant="destructive">
89+
<div v-if="form.errors.openai_api_key" class="flex items-center gap-2 rounded-md border border-red-500 bg-red-50 p-3 text-sm text-red-800 dark:border-red-700 dark:bg-red-950 dark:text-red-200">
9190
<AlertCircle class="h-4 w-4" />
92-
<AlertDescription>
93-
{{ form.errors.openai_api_key }}
94-
</AlertDescription>
95-
</Alert>
91+
<span>{{ form.errors.openai_api_key }}</span>
92+
</div>
9693
</CardContent>
9794

9895
<CardFooter class="flex flex-col gap-3">

resources/js/pages/settings/ApiKeys.vue

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<script setup lang="ts">
2-
import { Alert, AlertDescription } from '@/components/ui/alert';
32
import { Button } from '@/components/ui/button';
43
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
54
import { Input } from '@/components/ui/input';
65
import { Label } from '@/components/ui/label';
7-
import { toast } from '@/hooks/use-toast';
86
import AppLayout from '@/layouts/AppLayout.vue';
97
import SettingsLayout from '@/layouts/settings/Layout.vue';
108
import { type BreadcrumbItem } from '@/types';
@@ -42,10 +40,7 @@ const updateApiKey = () => {
4240
onSuccess: () => {
4341
form.reset();
4442
hasApiKey.value = true;
45-
toast({
46-
title: 'Success',
47-
description: 'Your OpenAI API key has been updated successfully.',
48-
});
43+
alert('Success: Your OpenAI API key has been updated successfully.');
4944
},
5045
onFinish: () => {
5146
isValidating.value = false;
@@ -58,10 +53,7 @@ const deleteApiKey = () => {
5853
form.delete('/settings/api-keys', {
5954
onSuccess: () => {
6055
hasApiKey.value = false;
61-
toast({
62-
title: 'API Key Deleted',
63-
description: 'Your OpenAI API key has been removed.',
64-
});
56+
alert('Your OpenAI API key has been removed.');
6557
},
6658
});
6759
}
@@ -128,12 +120,10 @@ const deleteApiKey = () => {
128120
</p>
129121
</div>
130122

131-
<Alert v-if="form.errors.openai_api_key" variant="destructive">
123+
<div v-if="form.errors.openai_api_key" class="flex items-center gap-2 rounded-md border border-red-500 bg-red-50 p-3 text-sm text-red-800 dark:border-red-700 dark:bg-red-950 dark:text-red-200">
132124
<AlertCircle class="h-4 w-4" />
133-
<AlertDescription>
134-
{{ form.errors.openai_api_key }}
135-
</AlertDescription>
136-
</Alert>
125+
<span>{{ form.errors.openai_api_key }}</span>
126+
</div>
137127
</CardContent>
138128

139129
<CardFooter class="flex gap-3">

0 commit comments

Comments
 (0)