mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 18:26:15 +01:00
feat: #11537, copy ip on click
This commit is contained in:
@@ -160,6 +160,7 @@
|
||||
"edited": "Edited",
|
||||
"disabled": "Disabled",
|
||||
"select": "Select",
|
||||
"copied": "Copied",
|
||||
|
||||
"user-search-prompt": "Type something here to find users...",
|
||||
"hidden": "Hidden",
|
||||
|
||||
@@ -110,7 +110,12 @@ define('forum/chats', [
|
||||
if (err) {
|
||||
return alerts.error(err);
|
||||
}
|
||||
ipEl.html(ip);
|
||||
ipEl.text(ip);
|
||||
ipEl.on('click', () => {
|
||||
navigator.clipboard.writeText(ip);
|
||||
ipEl.translateText('[[global:copied]]');
|
||||
setTimeout(() => ipEl.text(ip), 2000);
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user