Skip to content

Commit 13f2d39

Browse files
FIX (storages): Do not prefill 445 port for NAS as default value just in UI
1 parent 59692cd commit 13f2d39

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

frontend/src/features/storages/ui/edit/EditStorageComponent.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export function EditStorageComponent({
102102
if (type === StorageType.NAS) {
103103
storage.nasStorage = {
104104
host: '',
105-
port: 0,
105+
port: 445,
106106
share: '',
107107
username: '',
108108
password: '',
@@ -138,9 +138,13 @@ export function EditStorageComponent({
138138
}, [editingStorage]);
139139

140140
const isAllDataFilled = () => {
141-
if (!storage) return false;
141+
if (!storage) {
142+
return false;
143+
}
142144

143-
if (!storage.name) return false;
145+
if (!storage.name) {
146+
return false;
147+
}
144148

145149
if (storage.type === StorageType.LOCAL) {
146150
return true; // No additional settings required for local storage

frontend/src/features/storages/ui/edit/storages/EditNASStorageComponent.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@ interface Props {
1212
export function EditNASStorageComponent({ storage, setStorage, setIsUnsaved }: Props) {
1313
return (
1414
<>
15-
<div className="mb-2 flex items-center">
16-
<div className="min-w-[110px]" />
17-
18-
<div className="text-xs text-blue-600">
19-
<a href="https://postgresus.com/nas-storage" target="_blank" rel="noreferrer">
20-
How to connect NAS storage?
21-
</a>
22-
</div>
23-
</div>
24-
2515
<div className="mb-1 flex items-center">
2616
<div className="min-w-[110px]">Host</div>
2717
<Input
@@ -47,7 +37,7 @@ export function EditNASStorageComponent({ storage, setStorage, setIsUnsaved }: P
4737
<div className="mb-1 flex items-center">
4838
<div className="min-w-[110px]">Port</div>
4939
<InputNumber
50-
value={storage?.nasStorage?.port || 445}
40+
value={storage?.nasStorage?.port}
5141
onChange={(value) => {
5242
if (!storage?.nasStorage || !value) return;
5343

0 commit comments

Comments
 (0)