diff --git a/src/UI/Settings/UIWindowChangeEmail.js b/src/UI/Settings/UIWindowChangeEmail.js
index 8ddc7c5f..3426f642 100644
--- a/src/UI/Settings/UIWindowChangeEmail.js
+++ b/src/UI/Settings/UIWindowChangeEmail.js
@@ -19,7 +19,9 @@
import UIWindow from '../UIWindow.js'
-async function UIWindowChangeEmail(){
+async function UIWindowChangeEmail(options){
+ options = options ?? {};
+
const internal_id = window.uuidv4();
let h = '';
h += `
`;
@@ -67,7 +69,8 @@ async function UIWindowChangeEmail(){
height: '100%',
'background-color': 'rgb(245 247 249)',
'backdrop-filter': 'blur(3px)',
- }
+ },
+ ...options.window_options
})
$(el_window).find('.change-email-btn').on('click', function(e){
diff --git a/src/UI/Settings/UIWindowConfirmUserDeletion.js b/src/UI/Settings/UIWindowConfirmUserDeletion.js
index b4b85a65..41b0f390 100644
--- a/src/UI/Settings/UIWindowConfirmUserDeletion.js
+++ b/src/UI/Settings/UIWindowConfirmUserDeletion.js
@@ -63,6 +63,7 @@ async function UIWindowConfirmUserDeletion(options){
backgroundColor: 'white',
color: 'black',
},
+ ...options.window_options,
});
$(el_window).find('.generic-close-window-button').on('click', function(){
diff --git a/src/UI/Settings/UIWindowSettings.js b/src/UI/Settings/UIWindowSettings.js
index 40a4f89b..5d245285 100644
--- a/src/UI/Settings/UIWindowSettings.js
+++ b/src/UI/Settings/UIWindowSettings.js
@@ -332,19 +332,40 @@ async function UIWindowSettings(options){
})
$(el_window).find('.change-password').on('click', function (e) {
- UIWindowChangePassword();
+ UIWindowChangePassword({
+ window_options:{
+ parent_uuid: $(el_window).attr('data-element_uuid'),
+ disable_parent_window: true,
+ }
+ });
})
$(el_window).find('.change-email').on('click', function (e) {
- UIWindowChangeEmail();
+ console.log('change email', $(el_window).attr('data-element_uuid'));
+ UIWindowChangeEmail({
+ window_options:{
+ parent_uuid: $(el_window).attr('data-element_uuid'),
+ disable_parent_window: true,
+ }
+ });
})
$(el_window).find('.delete-account').on('click', function (e) {
- UIWindowConfirmUserDeletion();
+ UIWindowConfirmUserDeletion({
+ window_options:{
+ parent_uuid: $(el_window).attr('data-element_uuid'),
+ disable_parent_window: true,
+ }
+ });
})
$(el_window).find('.change-username').on('click', function (e) {
- UIWindowChangeUsername();
+ UIWindowChangeUsername({
+ window_options:{
+ parent_uuid: $(el_window).attr('data-element_uuid'),
+ disable_parent_window: true,
+ }
+ });
})
$(el_window).find('.change-ui-colors').on('click', function (e) {
@@ -352,7 +373,12 @@ async function UIWindowSettings(options){
})
$(el_window).find('.manage-sessions').on('click', function (e) {
- UIWindowManageSessions();
+ UIWindowManageSessions({
+ window_options:{
+ parent_uuid: $(el_window).attr('data-element_uuid'),
+ disable_parent_window: true,
+ }
+ });
})
$(el_window).on('click', '.settings-sidebar-item', function(){
diff --git a/src/UI/UIWindowChangePassword.js b/src/UI/UIWindowChangePassword.js
index a04ffa58..10c33474 100644
--- a/src/UI/UIWindowChangePassword.js
+++ b/src/UI/UIWindowChangePassword.js
@@ -19,7 +19,9 @@
import UIWindow from './UIWindow.js'
-async function UIWindowChangePassword(){
+async function UIWindowChangePassword(options){
+ options = options ?? {};
+
const internal_id = window.uuidv4();
let h = '';
h += `
`;
@@ -77,7 +79,8 @@ async function UIWindowChangePassword(){
height: '100%',
'background-color': 'rgb(245 247 249)',
'backdrop-filter': 'blur(3px)',
- }
+ },
+ ...options.window_options,
})
$(el_window).find('.change-password-btn').on('click', function(e){
diff --git a/src/UI/UIWindowChangeUsername.js b/src/UI/UIWindowChangeUsername.js
index 4fa2bb7e..dadf9d01 100644
--- a/src/UI/UIWindowChangeUsername.js
+++ b/src/UI/UIWindowChangeUsername.js
@@ -20,7 +20,9 @@
import UIWindow from './UIWindow.js'
import update_username_in_gui from '../helpers/update_username_in_gui.js'
-async function UIWindowChangeUsername(){
+async function UIWindowChangeUsername(options){
+ options = options ?? {};
+
const internal_id = window.uuidv4();
let h = '';
h += `
`;
@@ -68,7 +70,8 @@ async function UIWindowChangeUsername(){
height: '100%',
'background-color': 'rgb(245 247 249)',
'backdrop-filter': 'blur(3px)',
- }
+ },
+ ...options.window_options,
})
$(el_window).find('.change-username-btn').on('click', function(e){
diff --git a/src/UI/UIWindowManageSessions.js b/src/UI/UIWindowManageSessions.js
index b985f8cb..11f631bb 100644
--- a/src/UI/UIWindowManageSessions.js
+++ b/src/UI/UIWindowManageSessions.js
@@ -1,7 +1,9 @@
import UIAlert from "./UIAlert.js";
import UIWindow from "./UIWindow.js";
-const UIWindowManageSessions = async function UIWindowManageSessions () {
+const UIWindowManageSessions = async function UIWindowManageSessions (options) {
+ options = options ?? {};
+
const services = globalThis.services;
const w = await UIWindow({
@@ -21,8 +23,7 @@ const UIWindowManageSessions = async function UIWindowManageSessions () {
dominant: true,
body_content: '',
// width: 600,
- // parent_uuid: options.parent_uuid,
- // ...options.window_options,
+ ...options.window_options,
});
const SessionWidget = ({ session }) => {
diff --git a/src/UI/UIWindowSessionList.js b/src/UI/UIWindowSessionList.js
index fb128452..a0d8bdb9 100644
--- a/src/UI/UIWindowSessionList.js
+++ b/src/UI/UIWindowSessionList.js
@@ -74,7 +74,7 @@ async function UIWindowSessionList(options){
'display': 'flex',
'flex-direction': 'column',
'justify-content': 'center',
- }
+ },
})
$(el_window).find('.login-c2a-session-list').on('click', async function(e){
const login = await UIWindowLogin({