This commit is contained in:
parent
1fa9b1e8b0
commit
5934ee3832
|
@ -1,4 +1,4 @@
|
||||||
hedera-web (22.48.3) stable; urgency=low
|
hedera-web (22.48.4) stable; urgency=low
|
||||||
|
|
||||||
* Initial Release.
|
* Initial Release.
|
||||||
|
|
||||||
|
|
|
@ -464,28 +464,42 @@ module.exports = new Class({
|
||||||
|
|
||||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++ Supplant
|
//++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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() {
|
,async supplantInit() {
|
||||||
var user = sessionStorage.getItem('supplantUser');
|
var user = sessionStorage.getItem('supplantUser');
|
||||||
if (user == null) return;
|
if (user == null) return;
|
||||||
|
await this.supplantUser(user);
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++ Destroy
|
//++++++++++++++++++++++++++++++++++++++++++++++++++++++ Destroy
|
||||||
|
|
|
@ -96,24 +96,6 @@ module.exports = new Class({
|
||||||
this.clearToken();
|
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
|
* Executes the specified REST service with the given params and calls
|
||||||
* the callback when response is received.
|
* the callback when response is received.
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "hedera-web",
|
"name": "hedera-web",
|
||||||
"version": "22.46.19",
|
"version": "22.48.4",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "hedera-web",
|
"name": "hedera-web",
|
||||||
"version": "22.46.19",
|
"version": "22.48.4",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"js-yaml": "^3.12.1",
|
"js-yaml": "^3.12.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hedera-web",
|
"name": "hedera-web",
|
||||||
"version": "22.48.3",
|
"version": "22.48.4",
|
||||||
"description": "Verdnatura web page",
|
"description": "Verdnatura web page",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Loading…
Reference in New Issue