mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-11 06:53:20 -05:00
Web application URL improvement.
This commit is contained in:
parent
648ed24d6e
commit
6b086f8abb
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "meshcentral",
|
||||
"version": "0.4.7-p",
|
||||
"version": "0.4.7-q",
|
||||
"keywords": [
|
||||
"Remote Management",
|
||||
"Intel AMT",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1199,6 +1199,9 @@
|
||||
QV('autoconnectbutton1', debugmode); // Desktop
|
||||
//QV('DeskClip', debugmode); // Clipboard feature, not completed so show in in debug mode only.
|
||||
|
||||
// Clean up the URL
|
||||
try { window.history.replaceState({}, document.title, window.location.pathname); } catch (ex) { }
|
||||
|
||||
if (nightMode) { QC('body').add('night'); QS('body')['background-color'] = '#000'; }
|
||||
toggleFullScreen();
|
||||
|
||||
@ -1770,7 +1773,10 @@
|
||||
|
||||
if (xxcurrentView == -1) { if ('{{viewmode}}' != '') { go(parseInt('{{viewmode}}')); } else { setDialogMode(0); go(1); } }
|
||||
if ('{{currentNode}}' != '') { gotoDevice('{{currentNode}}',parseInt('{{viewmode}}'));}
|
||||
else if (args.gotonode != null) { goBackStack.push(1); gotoDevice('node/' + domain + '/' + args.gotonode,parseInt('{{viewmode}}')); delete args.gotonode; }
|
||||
else if (args.gotonode != null) {
|
||||
goBackStack.push(1);
|
||||
gotoDevice('node/' + domain + '/' + args.gotonode, parseInt('{{viewmode}}'));
|
||||
delete args.gotonode; }
|
||||
break;
|
||||
}
|
||||
case 'powertimeline': {
|
||||
@ -4799,7 +4805,7 @@
|
||||
x += ' <a href=# onclick=p10showDeleteNodeDialog("' + node._id + '") title=\"' + "Remove this device" + '\">' + "Delete Device" + '</a>';
|
||||
}
|
||||
x += '</div><div class="p10html3left">';
|
||||
x += '<img title=\"' + "Place link to this device in the clipboard" + '\" src="images/link1.png" style=cursor:pointer onclick=p10deviceLinkToClipboard() /> ';
|
||||
//x += '<img title=\"' + "Place link to this device in the clipboard" + '\" src="images/link1.png" style=cursor:pointer onclick=p10deviceLinkToClipboard() /> ';
|
||||
if (mesh.mtype == 2) x += '<a href=# onclick=p10showNodeNetInfoDialog("' + node._id + '") title=\"' + "Show device network interface information" + '\">' + "Interfaces" + '</a> ';
|
||||
if (xxmap != null) x += '<a href=# onclick=p10showNodeLocationDialog("' + node._id + '") title=\"' + "Show device locations information" + '\">' + "Location" + '</a> ';
|
||||
if ((terminalAccess) && ((meshrights & 8) != 0) && (mesh.mtype == 2)) x += '<a href=# onclick=p10showMeshCmdDialog(1,"' + node._id + '") title=\"' + "Traffic router used to connect to a device thru this server" + '.\">' + "Router" + '</a> ';
|
||||
@ -4904,6 +4910,13 @@
|
||||
var lastTab = getstore('_curPluginPage', null);
|
||||
if (lastTab != null && Q('p19ph-' + lastTab) != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab));
|
||||
}
|
||||
|
||||
// Change the URL
|
||||
var urlviewmode = '';
|
||||
if ((xxcurrentView >= 10) && (xxcurrentView <= 19) && (currentNode != null)) {
|
||||
urlviewmode = '?viewmode=' + xxcurrentView + '&gotonode=' + currentNode._id.split('/')[2];
|
||||
try { window.history.replaceState({}, document.title, window.location.pathname + urlviewmode); } catch (ex) { }
|
||||
}
|
||||
}
|
||||
setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching.
|
||||
if (!panel) panel = 10;
|
||||
@ -5264,7 +5277,7 @@
|
||||
function p10showMqttLoginDialog(nodeid) { meshserver.send({ action: 'getmqttlogin', nodeid: nodeid }); }
|
||||
|
||||
// Place a device link URL in the clipboard
|
||||
function p10deviceLinkToClipboard() { copyTextToClip2(document.URL.split('?')[0].split('#')[0] + '?gotonode=' + currentNode._id.split('/')[2] + '&viewmode=10'); }
|
||||
//function p10deviceLinkToClipboard() { copyTextToClip2(document.URL.split('?')[0].split('#')[0] + '?gotonode=' + currentNode._id.split('/')[2] + '&viewmode=10'); }
|
||||
|
||||
// Open XTerm
|
||||
function p10openxterm(e, nodeid) {
|
||||
@ -10322,6 +10335,15 @@
|
||||
for (var i = 0; i < 52; i++) { QV('p' + i, i == x); }
|
||||
xxcurrentView = x;
|
||||
|
||||
// Change the URL
|
||||
if (xxcurrentView > 0) {
|
||||
var urlviewmode = '';
|
||||
if ((xxcurrentView >= 10) && (xxcurrentView <= 19)) {
|
||||
if (currentNode != null) { urlviewmode = '?viewmode=' + xxcurrentView + '&gotonode=' + currentNode._id.split('/')[2]; }
|
||||
} else if (xxcurrentView > 1) { urlviewmode = '?viewmode=' + xxcurrentView; }
|
||||
try { window.history.replaceState({}, document.title, window.location.pathname + urlviewmode); } catch (ex) { }
|
||||
}
|
||||
|
||||
// Remove top bar selection
|
||||
var mainBarItems = ['MainMenuMyDevices', 'MainMenuMyAccount', 'MainMenuMyEvents', 'MainMenuMyFiles', 'MainMenuMyUsers', 'MainMenuMyServer'];
|
||||
for (var i in mainBarItems) {
|
||||
|
Loading…
Reference in New Issue
Block a user