[SSE] Refactoring set action link event

This commit is contained in:
Julia Radzhabova 2022-06-15 20:56:13 +03:00
parent ec328dd48e
commit 75d6ab646f
2 changed files with 13 additions and 0 deletions

View file

@ -1173,6 +1173,9 @@ define([
},
onSetActionLink: function (url) {
if (Common.Utils.InternalSettings.get("sse-dialog-link-visible"))
return;
var me = this;
navigator.clipboard && navigator.clipboard.writeText(url)
.then(function() {

View file

@ -258,6 +258,16 @@ define([
return [this.inputUrl, this.internalList, this.inputRange, this.inputDisplay, this.inputTip];
},
show: function() {
Common.UI.Window.prototype.show.apply(this, arguments);
Common.Utils.InternalSettings.set("sse-dialog-link-visible", true);
},
close: function() {
Common.Utils.InternalSettings.set("sse-dialog-link-visible", false);
Common.UI.Window.prototype.close.apply(this, arguments);
},
setSettings: function(settings) {
if (settings) {
var me = this;