mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added Finnish translation.
This commit is contained in:
parent
cc78d0aac5
commit
64a6d9b257
79 changed files with 2579 additions and 1759 deletions
|
@ -2974,6 +2974,18 @@
|
|||
QV('agentInvitationLinkDiv', true);
|
||||
break;
|
||||
}
|
||||
case 'createDeviceShareLink': { // Remote desktop sharing link
|
||||
if (xxdialogTag) break;
|
||||
var node = getNodeFromId(message.nodeid), x = '';
|
||||
if (node == null) break;
|
||||
x += addHtmlValue("Device", node.name);
|
||||
x += addHtmlValue("Guest Name", message.guestname);
|
||||
x += addHtmlValue("Expire Time", printDateTime(new Date(message.expire)));
|
||||
x += addHtmlValue("User Consent", ["None", "Notify Only", "Prompt for consent"][message.consent]);
|
||||
x += '<div id=agentInvitationLinkDiv style="text-align:center;font-size:large;margin:16px"><a href="' + message.url + '" id=agentInvitationLink target="_blank" style=cursor:pointer>' + "Remote Desktop Link" + '</a> <img src=images/link4.png height=10 width=10 title="' + "Copy link to clipboard" + '" style=cursor:pointer onclick=d2CopyInviteToClip()></div></div>';
|
||||
setDialogMode(2, "Share Device", 1, null, x);
|
||||
break;
|
||||
}
|
||||
case 'getmqttlogin': {
|
||||
if ((currentNode == null) || (currentNode._id != message.nodeid) || (xxdialogMode != null)) return;
|
||||
var x = "These settings can be used to connect MQTT for this device." + '<br /><br />';
|
||||
|
@ -5584,7 +5596,7 @@
|
|||
var groupingTags = '<i>' + "None" + '</i>';
|
||||
if (node.tags != null) { groupingTags = ''; for (var i in node.tags) { groupingTags += '<span class="tagSpan">' + EscapeHtml(node.tags[i]) + '</span>'; } }
|
||||
if ((meshrights & 4) != 0) {
|
||||
x += addDeviceAttribute('Tags', '<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>' + groupingTags + ' <img class=hoverButton src="images/link5.png" /></span>');
|
||||
x += addDeviceAttribute('Tags', '<span onclick=showEditNodeValueDialog(3) style=cursor:pointer>' + groupingTags + ' <img class=hoverButton src="images/link5.png" width=10 height=10 /></span>');
|
||||
} else {
|
||||
x += addDeviceAttribute('Tags', groupingTags);
|
||||
}
|
||||
|
@ -5596,6 +5608,7 @@
|
|||
x += '<input type=button value="' + "Log Event" + '" title="' + "Write an event for this device" + '" onclick=writeDeviceEvent("' + encodeURIComponentEx(node._id) + '") />';
|
||||
if ((connectivity & 1) && (meshrights & 8)) { x += '<input type=button value="' + "Message" + '" title="' + "Display a text message on the remote device" + '" onclick=deviceMessageFunction() />'; }
|
||||
//if ((connectivity & 1) && (meshrights & 8) && (node.agent.id < 5)) { x += '<input type=button value=Toast title="' + "Display a text message of the remote device" + '" onclick=deviceToastFunction() />'; }
|
||||
if ((node.agent.caps & 1) && (connectivity & 1) && (meshrights & 8)) { x += '<input type=button value="' + "Share" + '" title="' + "Create a link to share this device with a guest" + '" onclick=showShareDevice() />'; }
|
||||
|
||||
// Custom UI
|
||||
if ((customui != null) && (customui.devicebuttons != null)) {
|
||||
|
@ -5925,6 +5938,19 @@
|
|||
meshserver.send({ action: 'toast', nodeids: [ currentNode._id ], title: '{{{title}}}', msg: Q('d2devToast').value });
|
||||
}
|
||||
|
||||
function showShareDevice() {
|
||||
if (xxdialogMode) return;
|
||||
var x = "Creates a link that allows a guest without an account to remote desktop into this device for up to 1 hour." + '<br /><br />';
|
||||
x += addHtmlValue("Guest Name", '<input id=d2inviteName style=width:250px maxlength=128 type=text onkeyup=showShareDeviceValidate() />');
|
||||
x += addHtmlValue("Expire Time", '<select id=d2inviteExpire style=float:right;width:250px><option value=5>' + "5 minutes" + '</option><option value=10>' + "10 minutes" + '</option><option value=15>' + "15 minutes" + '</option><option value=30>' + "30 minutes" + '</option><option value=45>' + "45 minutes" + '</option><option value=60>' + "1 hour" + '</option></select>');
|
||||
x += addHtmlValue("User Consent", '<select id=d2userConsent style=float:right;width:250px><option value=2>' + "Prompt for consent" + '</option><option value=1>' + "Notify Only" + '</option></select>');
|
||||
setDialogMode(2, "Share Device", 3, showShareDeviceEx, x);
|
||||
showShareDeviceValidate();
|
||||
}
|
||||
|
||||
function showShareDeviceValidate() { QE('idx_dlgOkButton', Q('d2inviteName').value.length > 1); }
|
||||
function showShareDeviceEx() { meshserver.send({ action: 'createDeviceShareLink', nodeid: currentNode._id, guestname: Q('d2inviteName').value, expire: parseInt(Q('d2inviteExpire').value), consent: parseInt(Q('d2userConsent').value) }); }
|
||||
|
||||
function deviceActionFunction() {
|
||||
if (xxdialogMode) return;
|
||||
var rights = GetNodeRights(currentNode);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<script type="text/javascript" src="scripts/zlib-inflate{{min}}.js"></script>
|
||||
<script type="text/javascript" src="scripts/zlib-adler32{{min}}.js"></script>
|
||||
<script type="text/javascript" src="scripts/zlib-crc32{{min}}.js"></script>
|
||||
<title>{{{title}}}</title>
|
||||
</head>
|
||||
<body style="overflow:hidden;background-color:black">
|
||||
<div id=p11 class="noselect" style="overflow:hidden">
|
||||
|
@ -482,6 +483,7 @@
|
|||
}
|
||||
|
||||
function onDesktopStateChange(xdesktop, state) {
|
||||
console.log('onDesktopStateChange', state);
|
||||
var xstate = state;
|
||||
if ((xstate == 3) && (xdesktop.contype == 2)) { xstate++; }
|
||||
var str = StatusStrs[xstate];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue