mirror of
https://github.com/zadam/trilium.git
synced 2026-05-06 17:17:37 +02:00
feat(options/password): use options row for protected session timeout
This commit is contained in:
@@ -1492,10 +1492,10 @@
|
||||
"new_password_confirmation": "New password confirmation",
|
||||
"change_password": "Change password",
|
||||
"protected_session_timeout": "Protected Session Timeout",
|
||||
"protected_session_timeout_description": "Protected session timeout is a time period after which the protected session is wiped from the browser's memory. This is measured from the last interaction with protected notes. See",
|
||||
"protected_session_timeout_description": "Time of inactivity before the session is cleared from browser memory. See",
|
||||
"wiki": "wiki",
|
||||
"for_more_info": "for more info.",
|
||||
"protected_session_timeout_label": "Protected session timeout:",
|
||||
"protected_session_timeout_label": "Auto-close session after",
|
||||
"reset_confirmation": "By resetting the password you will forever lose access to all your existing protected notes. Do you really want to reset the password?",
|
||||
"reset_success_message": "Password has been reset. Please set new password",
|
||||
"change_password_heading": "Change Password",
|
||||
|
||||
@@ -8,11 +8,11 @@ import FormGroup from "../../react/FormGroup"
|
||||
import FormTextBox from "../../react/FormTextBox"
|
||||
import LinkButton from "../../react/LinkButton"
|
||||
import OptionsSection from "./components/OptionsSection"
|
||||
import OptionsRow from "./components/OptionsRow"
|
||||
import protected_session_holder from "../../../services/protected_session_holder"
|
||||
import { ChangePasswordResponse } from "@triliumnext/commons"
|
||||
import dialog from "../../../services/dialog"
|
||||
import TimeSelector from "./components/TimeSelector"
|
||||
import FormText from "../../react/FormText"
|
||||
|
||||
export default function PasswordSettings() {
|
||||
return (
|
||||
@@ -105,19 +105,17 @@ function ChangePassword() {
|
||||
function ProtectedSessionTimeout() {
|
||||
return (
|
||||
<OptionsSection title={t("password.protected_session_timeout")}>
|
||||
<FormText>
|
||||
{t("password.protected_session_timeout_description")}
|
||||
|
||||
<a class="tn-link" href="https://triliumnext.github.io/Docs/Wiki/protected-notes.html" className="external">{t("password.wiki")}</a> {t("password.for_more_info")}
|
||||
</FormText>
|
||||
|
||||
<FormGroup name="protected-session-timeout" label={t("password.protected_session_timeout_label")}>
|
||||
<TimeSelector
|
||||
<OptionsRow
|
||||
name="protected-session-timeout"
|
||||
label={t("password.protected_session_timeout_label")}
|
||||
description={<>{t("password.protected_session_timeout_description")} <a class="tn-link" href="https://triliumnext.github.io/Docs/Wiki/protected-notes.html">{t("password.wiki")}</a> {t("password.for_more_info")}</>}
|
||||
>
|
||||
<TimeSelector
|
||||
name="protected-session-timeout"
|
||||
optionValueId="protectedSessionTimeout" optionTimeScaleId="protectedSessionTimeoutTimeScale"
|
||||
minimumSeconds={60}
|
||||
/>
|
||||
</FormGroup>
|
||||
</OptionsRow>
|
||||
</OptionsSection>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user