fix(libsql): update database name handling and input disabling for libsql support

- Modified the database name assignment in the RestoreBackup component to include 'iku.db' for the 'libsql' database type.
- Updated input disabling logic in both HandleBackup and RestoreBackup components to disable inputs for both 'web-server' and 'libsql' database types, enhancing user experience and preventing invalid input.
This commit is contained in:
Mauricio Siu
2026-03-23 01:27:06 -06:00
parent a09d7d5663
commit fa028dcf1e
2 changed files with 3 additions and 3 deletions

View File

@@ -585,7 +585,7 @@ export const HandleBackup = ({
<FormLabel>Database</FormLabel> <FormLabel>Database</FormLabel>
<FormControl> <FormControl>
<Input <Input
disabled={databaseType === "web-server"} disabled={databaseType === "web-server" || databaseType === "libsql"}
placeholder={"dokploy"} placeholder={"dokploy"}
{...field} {...field}
/> />

View File

@@ -211,7 +211,7 @@ export const RestoreBackup = ({
defaultValues: { defaultValues: {
destinationId: "", destinationId: "",
backupFile: "", backupFile: "",
databaseName: databaseType === "web-server" ? "dokploy" : "", databaseName: databaseType === "web-server" ? "dokploy" : databaseType === "libsql" ? "iku.db" : "",
databaseType: databaseType:
backupType === "compose" ? ("postgres" as DatabaseType) : databaseType, backupType === "compose" ? ("postgres" as DatabaseType) : databaseType,
backupType: backupType, backupType: backupType,
@@ -523,7 +523,7 @@ export const RestoreBackup = ({
<Input <Input
placeholder="Enter database name" placeholder="Enter database name"
{...field} {...field}
disabled={databaseType === "web-server"} disabled={databaseType === "web-server" || databaseType === "libsql"}
/> />
</FormControl> </FormControl>
<FormMessage /> <FormMessage />