Skip to content

Commit d39e5f0

Browse files
add/edit connection: add mini alert when master password is on
1 parent f4b626a commit d39e5f0

2 files changed

Lines changed: 47 additions & 17 deletions

File tree

frontend/src/app/components/connect-db/master-encryption-password/master-encryption-password.component.css

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,35 @@
88

99
.encription-password {
1010
display: flex;
11+
flex-direction: column;
1112
margin-top: 32px;
12-
margin-bottom: 20px;
1313
width: 100%;
1414
}
1515

16-
.encription-password__copy-button {
17-
margin-top: 4px;
18-
margin-left: 12px;
16+
.docs-notification {
17+
display: flex;
18+
gap: 8px;
19+
background-color: var(--bg-color);
20+
border-left: 12px solid #FF6F00;
21+
color: var(--mat-sidenav-content-text-color);
22+
margin-top: -8px;
23+
padding: 16px 12px;
24+
}
25+
26+
@media (prefers-color-scheme: dark) {
27+
.docs-notification {
28+
--bg-color: #292929;
29+
}
30+
}
31+
32+
@media (prefers-color-scheme: light) {
33+
.docs-notification {
34+
--bg-color: #F4F4F4;
35+
}
36+
}
37+
38+
.docs-link {
39+
color: #EF6C00;
40+
font-weight: 500;
41+
text-decoration: none;
1942
}

frontend/src/app/components/connect-db/master-encryption-password/master-encryption-password.component.html

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,26 @@
1616
name="masterPassword" #masterPassword="ngModel"
1717
readonly
1818
[(ngModel)]="masterKey">
19-
<mat-hint>Rocketadmin does not store the key.
20-
Please save this password on your computer in protected place,
21-
we recommend using password managers.
22-
Share this password with all users of the connection.
23-
</mat-hint>
2419
</mat-form-field>
25-
<button type="button" data-testid="connection-master-password-copy-button"
26-
mat-icon-button
27-
class="encription-password__copy-button"
28-
matTooltip="Copy master password"
29-
[cdkCopyToClipboard]="masterKey"
30-
(cdkCopyToClipboardCopied)="showCopyNotification('Master password was copied to clipboard.')">
31-
<mat-icon>content_copy</mat-icon>
32-
</button>
20+
21+
<div class="docs-notification">
22+
<div>
23+
<p style="margin-bottom: 8px">
24+
Rocketadmin does not store the key.
25+
Please save this password in protected place.
26+
Share this password with all users of the connection.
27+
</p>
28+
<a href="https://docs.rocketadmin.com/Reference/MasterPassword"
29+
target="_blank" class="docs-link">
30+
Open docs
31+
</a>
32+
</div>
33+
<button mat-button type="button" data-testid="connection-master-password-copy-button"
34+
[cdkCopyToClipboard]="masterKey"
35+
(cdkCopyToClipboardCopied)="showCopyNotification('Master password was copied to clipboard.')">
36+
Copy
37+
</button>
38+
39+
</div>
3340
</div>
3441
</div>

0 commit comments

Comments
 (0)