More improvements to the passcode lock process
This commit is contained in:
@@ -75,6 +75,7 @@ if (log_lvl > 1) {
|
||||
console.log(`ae_root +layout.svelte data:`, data);
|
||||
}
|
||||
|
||||
let trigger_clear_access: null|boolean = $state(null);
|
||||
|
||||
// let account_id = localStorage.getItem('ae_account_id');
|
||||
// console.log(`account_id = `, account_id);
|
||||
@@ -514,19 +515,6 @@ $effect(() => {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
// function handle_clear_access() {
|
||||
// // NOTE: I think it makes since to reset this to anonymous even if logged in as an admin or similar.
|
||||
// window.localStorage.setItem('access_type', 'anonymous');
|
||||
|
||||
// // $ae_loc.access_type = null; // 'anonymous';
|
||||
// $ae_loc.access_type = 'anonymous';
|
||||
// trigger = 'process_permission_check';
|
||||
|
||||
// $ae_loc.app_cfg.show_element__passcode_input = false;
|
||||
// return true;
|
||||
// }
|
||||
</script>
|
||||
|
||||
{#if $ae_loc?.site_google_tracking_id && $ae_loc?.site_google_tracking_id.length > 0}
|
||||
@@ -757,12 +745,12 @@ max-w-max -->
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
// handle_clear_access();
|
||||
trigger_clear_access = true;
|
||||
|
||||
if ($ae_loc?.app_cfg?.show_element__menu_btn) {
|
||||
$ae_loc.app_cfg.show_element__menu = true;
|
||||
$ae_loc.app_cfg.show_element__menu_btn = false;
|
||||
$ae_loc.app_cfg.show_element__access_type = false;
|
||||
$ae_loc.app_cfg.show_element__access_type = true;
|
||||
} else {
|
||||
$ae_loc.app_cfg.show_element__menu = false;
|
||||
$ae_loc.app_cfg.show_element__menu_btn = true;
|
||||
@@ -891,6 +879,7 @@ max-w-max -->
|
||||
{#if $ae_loc.app_cfg?.show_element__access_type}
|
||||
<Element_access_type
|
||||
show_passcode_input={$ae_loc.app_cfg.show_element__passcode_input}
|
||||
trigger_clear_access={trigger_clear_access}
|
||||
hidden={$ae_loc.iframe && !$ae_loc.trusted_access}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user