File tree 2 files changed +6
-1
lines changed
resources/js/Pages/Nodes/Partials
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ public function __construct(
12
12
public string $ name ,
13
13
public ?string $ dockerName ,
14
14
public string $ serverAddress ,
15
+ #[RequiredWithout('dockerName ' )]
15
16
public string $ username ,
16
17
#[RequiredWithout('dockerName ' )]
17
18
public ?string $ password
@@ -23,6 +24,6 @@ public function sameAs(?DockerRegistry $other): bool
23
24
return false ;
24
25
}
25
26
26
- return $ this ->serverAddress === $ other ->serverAddress && $ this ->username === $ other -> username && is_null ($ this ->password );
27
+ return $ this ->serverAddress === $ other ->serverAddress && is_null ( $ this ->username ) && is_null ($ this ->password );
27
28
}
28
29
}
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ const { encrypt } = useCrypto();
18
18
const form = useForm ({
19
19
registries: props .swarm .data .registries .map ((registry ) => ({
20
20
... registry,
21
+ username: null ,
21
22
password: null ,
22
23
})),
23
24
});
@@ -41,6 +42,9 @@ const submitForm = async () => {
41
42
for (const registry of formData .registries ) {
42
43
const registryData = {
43
44
... registry,
45
+ username: registry .username
46
+ ? await encrypt (registry .username )
47
+ : null ,
44
48
password: registry .password
45
49
? await encrypt (registry .password )
46
50
: null ,
You can’t perform that action at this time.
0 commit comments