Skip to content

Build your personal knowledge base with Trilium Notes

style/protected session password request: improve layout and appearance

Adorian Doran134422802f57
diff --git a/apps/client/src/widgets/note_types.tsx b/apps/client/src/widgets/note_types.tsx
index e58960d708..d0209bf5a2 100644
--- a/apps/client/src/widgets/note_types.tsx
+++ b/apps/client/src/widgets/note_types.tsx
@@ -43,7 +43,8 @@ export const TYPE_MAPPINGS: Record<ExtendedNoteType, NoteTypeMapping> = {
},
protectedSession: {
view: () => import("./type_widgets/ProtectedSession"),
- className: "protected-session-password-component"
+ className: "protected-session-password-component",
+ isFullHeight: true
},
book: {
view: () => import("./type_widgets/Book"),
diff --git a/apps/client/src/widgets/type_widgets/ProtectedSession.css b/apps/client/src/widgets/type_widgets/ProtectedSession.css
index 0ade6a39aa..ec4012dc00 100644
--- a/apps/client/src/widgets/type_widgets/ProtectedSession.css
+++ b/apps/client/src/widgets/type_widgets/ProtectedSession.css
@@ -1,9 +1,35 @@
.protected-session-password-component {
- width: 300px;
- margin: 30px auto auto;
+ display: flex;
+ margin-inline: 40px;
+ flex-direction: column;
+ justify-content: center;
+
+ .protected-session-password-form {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ margin-bottom: 20vh;
+ }
+
+ .form-group {
+ text-align: center;
+ color: var(--muted-text-color);
+ }
+
+ .form-icon {
+ font-size: 140px;
+ color: var(--main-border-color);
+ }
+
+ .protected-session-password {
+ margin-inline: auto;
+ max-width: 350px;
+ text-align: center;
+ }
+
+ input,
+ button {
+ margin-top: 12px;
+ }
}
-.protected-session-password-component input,
-.protected-session-password-component button {
- margin-top: 12px;
-}
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/ProtectedSession.tsx b/apps/client/src/widgets/type_widgets/ProtectedSession.tsx
index b7af4aebc6..f852396d2a 100644
--- a/apps/client/src/widgets/type_widgets/ProtectedSession.tsx
+++ b/apps/client/src/widgets/type_widgets/ProtectedSession.tsx
@@ -21,6 +21,8 @@ export default function ProtectedSession() {
return (
<form class="protected-session-password-form" onSubmit={submitCallback}>
+ <span class="form-icon bx bx-key" />
+
<FormGroup name="protected-session-password-in-detail" label={t("protected_session.enter_password_instruction")}>
<FormTextBox
type="password"
@@ -37,4 +39,4 @@ export default function ProtectedSession() {
/>
</form>
)
-}
+}
\ No newline at end of file