diff --git a/.gitignore b/.gitignore index 98ab12fb..bc3496c8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules build/ config.my.php .vscode/ +.quasar diff --git a/debian/changelog b/debian/changelog index 22d37cba..196bc3ac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (22.48.3) stable; urgency=low +hedera-web (22.48.4) stable; urgency=low * Initial Release. diff --git a/js/hedera/gui.js b/js/hedera/gui.js index 9b724cf4..60c8f130 100644 --- a/js/hedera/gui.js +++ b/js/hedera/gui.js @@ -463,29 +463,43 @@ module.exports = new Class({ } //++++++++++++++++++++++++++++++++++++++++++++++++++++++ Supplant + + /** + * Supplants another user. + * + * @param {String} supplantUser The user name + */ + ,async supplantUser(supplantUser) { + const json = await this._conn.send('client/supplant', {supplantUser}); + this._conn.token = json; + sessionStorage.setItem('supplantUser', supplantUser); + + const resultSet = await this._conn.execQuery( + 'SELECT nickname FROM account.myUser'); + + const userName = resultSet.fetchValue(); + Vn.Node.setText(this.$.supplanted, userName); + this.$.supplant.classList.toggle('show', true); + await this.loadMenu(); + } + + /* + * Ends the user supplanting and restores the original login. + */ + ,async onSupplantExitClick() { + this._conn.post('Accounts/logout'); + this._conn.fetchToken(); + sessionStorage.removeItem('supplantUser'); + + this.$.supplant.classList.toggle('show', false); + await this.loadMenu(); + this._onFormChange(); + } ,async supplantInit() { var user = sessionStorage.getItem('supplantUser'); if (user == null) return; - - await this._conn.supplantUser(user); - sessionStorage.setItem('supplantUser', user); - await this.loadMenu(); - - const res = await this._conn.execQuery( - 'SELECT nickname FROM account.myUser'); - - const userName = res.fetchValue(); - Vn.Node.setText(this.$.supplanted, userName); - this.$.supplant.classList.toggle('show', true); - } - - ,async onSupplantExitClick() { - this.$.supplant.classList.toggle('show', false); - await this._conn.supplantEnd(); - sessionStorage.removeItem('supplantUser'); - await this.loadMenu(); - this._onFormChange(); + await this.supplantUser(user); } //++++++++++++++++++++++++++++++++++++++++++++++++++++++ Destroy diff --git a/js/vn/json-connection.js b/js/vn/json-connection.js index 578582e3..12013dc6 100644 --- a/js/vn/json-connection.js +++ b/js/vn/json-connection.js @@ -96,24 +96,6 @@ module.exports = new Class({ this.clearToken(); }, - /** - * Supplants another user. - * - * @param {String} supplantUser The user name - */ - async supplantUser(supplantUser) { - const json = await this.send('client/supplant', {supplantUser}); - this.token = json; - }, - - /** - * Ends the user supplanting and restores the last login. - */ - async supplantEnd() { - await this.post('Accounts/logout'); - this.fetchToken(); - }, - /** * Executes the specified REST service with the given params and calls * the callback when response is received. diff --git a/package-lock.json b/package-lock.json index b77bc635..a622b162 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "hedera-web", - "version": "22.46.19", + "version": "22.48.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "hedera-web", - "version": "22.46.19", + "version": "22.48.4", "license": "GPL-3.0", "dependencies": { "js-yaml": "^3.12.1", diff --git a/package.json b/package.json index 91ad9e3b..dc6d4f20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "22.48.3", + "version": "22.48.4", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": {