FIX (storages): Do not prefill 445 port for NAS as default value just in UI

This commit is contained in:
Rostislav Dugin
2025-08-11 10:26:17 +03:00
parent 59692cd41b
commit 13f2d3938f
2 changed files with 8 additions and 14 deletions

View File

@@ -102,7 +102,7 @@ export function EditStorageComponent({
if (type === StorageType.NAS) {
storage.nasStorage = {
host: '',
port: 0,
port: 445,
share: '',
username: '',
password: '',
@@ -138,9 +138,13 @@ export function EditStorageComponent({
}, [editingStorage]);
const isAllDataFilled = () => {
if (!storage) return false;
if (!storage) {
return false;
}
if (!storage.name) return false;
if (!storage.name) {
return false;
}
if (storage.type === StorageType.LOCAL) {
return true; // No additional settings required for local storage

View File

@@ -12,16 +12,6 @@ interface Props {
export function EditNASStorageComponent({ storage, setStorage, setIsUnsaved }: Props) {
return (
<>
<div className="mb-2 flex items-center">
<div className="min-w-[110px]" />
<div className="text-xs text-blue-600">
<a href="https://postgresus.com/nas-storage" target="_blank" rel="noreferrer">
How to connect NAS storage?
</a>
</div>
</div>
<div className="mb-1 flex items-center">
<div className="min-w-[110px]">Host</div>
<Input
@@ -47,7 +37,7 @@ export function EditNASStorageComponent({ storage, setStorage, setIsUnsaved }: P
<div className="mb-1 flex items-center">
<div className="min-w-[110px]">Port</div>
<InputNumber
value={storage?.nasStorage?.port || 445}
value={storage?.nasStorage?.port}
onChange={(value) => {
if (!storage?.nasStorage || !value) return;