feat(calendar): Can now create Jitsi link when making event

This commit is contained in:
Hivert Quentin
2025-01-27 14:27:09 +01:00
parent c400f45ef1
commit 42c227beca
9 changed files with 64 additions and 0 deletions
@@ -831,11 +831,33 @@
* @param {number} index - the URL index in the list of attach URLs
*/
Component.prototype.deleteAttachUrl = function(index) {
if (index > -1 && this.attachUrls.length > index) {
this.attachUrls.splice(index, 1);
}
};
/**
* @function hasJitsiUrl
* @memberof Component.prototype
* @desc Check if the there is a jisti url
* @returns true if there is a jisti url
*/
Component.prototype.hasJitsiUrl = function() {
if (angular.isUndefined(this.attachUrls)) {
return false;
}
else {
for (var i = 0; i < this.attachUrls.length; i++) {
if (this.attachUrls[i].value.includes("meet.jit.si")) {
return true;
}
}
}
return false;
};
/**
* @function $addDueDate
* @memberof Component.prototype
@@ -313,6 +313,12 @@
focus('attachUrl_' + i);
};
this.addJitsiUrl = function () {
var jitsiUrl = "https://meet.jit.si/SOGo_meeting/" + crypto.randomUUID();
var i = this.component.addAttachUrl(jitsiUrl);
focus('attachUrl_' + i);
};
this.toggleRecurrenceEditor = function () {
this.showRecurrenceEditor = !this.showRecurrenceEditor;
this.component.$hasCustomRepeat = this.showRecurrenceEditor;