@mdguggenbichler/slugbase-core 0.0.23 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react';
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { useAuth } from '../../contexts/AuthContext';
|
|
4
4
|
import api from '../../api/client';
|
|
@@ -6,6 +6,11 @@ import { useToast } from '../ui/Toast';
|
|
|
6
6
|
import { Save, Mail, Send } from 'lucide-react';
|
|
7
7
|
import Button from '../ui/Button';
|
|
8
8
|
import { PageLoadingSkeleton } from '../ui/PageLoadingSkeleton';
|
|
9
|
+
import { Switch } from '../ui/switch';
|
|
10
|
+
import { Label } from '../ui/label';
|
|
11
|
+
|
|
12
|
+
// React in scope for package consumers that use classic JSX transform
|
|
13
|
+
void React;
|
|
9
14
|
|
|
10
15
|
export default function AdminSettings() {
|
|
11
16
|
const { t } = useTranslation();
|
|
@@ -106,16 +111,14 @@ export default function AdminSettings() {
|
|
|
106
111
|
|
|
107
112
|
<div className="space-y-4">
|
|
108
113
|
<div className="flex items-center gap-3">
|
|
109
|
-
<
|
|
110
|
-
type="checkbox"
|
|
114
|
+
<Switch
|
|
111
115
|
id="smtp-enabled"
|
|
112
116
|
checked={smtpSettings.enabled}
|
|
113
|
-
|
|
114
|
-
className="w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
117
|
+
onCheckedChange={(checked) => setSmtpSettings({ ...smtpSettings, enabled: checked })}
|
|
115
118
|
/>
|
|
116
|
-
<
|
|
119
|
+
<Label htmlFor="smtp-enabled" className="text-sm font-medium text-gray-900 dark:text-white cursor-pointer">
|
|
117
120
|
{t('smtp.enabled')}
|
|
118
|
-
</
|
|
121
|
+
</Label>
|
|
119
122
|
</div>
|
|
120
123
|
|
|
121
124
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
@@ -212,16 +215,14 @@ export default function AdminSettings() {
|
|
|
212
215
|
</div>
|
|
213
216
|
|
|
214
217
|
<div className="flex items-center gap-3 pt-2">
|
|
215
|
-
<
|
|
216
|
-
type="checkbox"
|
|
218
|
+
<Switch
|
|
217
219
|
id="smtp-secure"
|
|
218
220
|
checked={smtpSettings.secure}
|
|
219
|
-
|
|
220
|
-
className="w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
221
|
+
onCheckedChange={(checked) => setSmtpSettings({ ...smtpSettings, secure: checked })}
|
|
221
222
|
/>
|
|
222
|
-
<
|
|
223
|
+
<Label htmlFor="smtp-secure" className="text-sm font-medium text-gray-900 dark:text-white cursor-pointer">
|
|
223
224
|
{t('smtp.secure')}
|
|
224
|
-
</
|
|
225
|
+
</Label>
|
|
225
226
|
</div>
|
|
226
227
|
|
|
227
228
|
<div className="flex items-center gap-4 pt-4 border-t border-gray-200 dark:border-gray-700">
|