mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	chore(react/settings): start porting protected session timeout
This commit is contained in:
		| @@ -11,12 +11,12 @@ import OptionsSection from "./components/OptionsSection" | |||||||
| import protected_session_holder from "../../../services/protected_session_holder" | import protected_session_holder from "../../../services/protected_session_holder" | ||||||
| import { ChangePasswordResponse } from "@triliumnext/commons" | import { ChangePasswordResponse } from "@triliumnext/commons" | ||||||
| import dialog from "../../../services/dialog" | import dialog from "../../../services/dialog" | ||||||
| import { reloadFrontendApp } from "../../../services/utils" |  | ||||||
|  |  | ||||||
| export default function PasswordSettings() { | export default function PasswordSettings() { | ||||||
|     return ( |     return ( | ||||||
|         <> |         <> | ||||||
|             <ChangePassword /> |             <ChangePassword /> | ||||||
|  |             <ProtectedSessionTimeout /> | ||||||
|         </> |         </> | ||||||
|     ) |     ) | ||||||
| } | } | ||||||
| @@ -102,3 +102,13 @@ function ChangePassword() { | |||||||
|         </OptionsSection> |         </OptionsSection> | ||||||
|     ) |     ) | ||||||
| } | } | ||||||
|  |  | ||||||
|  | function ProtectedSessionTimeout() { | ||||||
|  |     return ( | ||||||
|  |         <OptionsSection title={t("password.protected_session_timeout")}> | ||||||
|  |             {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")} | ||||||
|  |         </OptionsSection> | ||||||
|  |     ) | ||||||
|  | } | ||||||
| @@ -1,12 +1,9 @@ | |||||||
| import { t } from "../../../../services/i18n.js"; |  | ||||||
| import TimeSelector from "../time_selector.js"; | import TimeSelector from "../time_selector.js"; | ||||||
|  |  | ||||||
| const TPL = /*html*/` | const TPL = /*html*/` | ||||||
| <div class="options-section"> | <div class="options-section"> | ||||||
|     <h4>${t("password.protected_session_timeout")}</h4> |  | ||||||
|  |  | ||||||
|     <p class="form-text"> |     <p class="form-text"> | ||||||
|         ${t("password.protected_session_timeout_description")} <a class="tn-link" href="https://triliumnext.github.io/Docs/Wiki/protected-notes.html" class="external">${t("password.wiki")}</a> ${t("password.for_more_info")} |  | ||||||
|     </p> |     </p> | ||||||
|     <div id="time-selector-placeholder"></div> |     <div id="time-selector-placeholder"></div> | ||||||
| </div>`; | </div>`; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user