mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-19 13:43:22 +00:00
feat(calendar): Can now create Jitsi link when making event
This commit is contained in:
@@ -477,6 +477,13 @@ example.
|
||||
|
||||
Defaults to `YES` when unset.
|
||||
|
||||
|S |SOGoCalendarEnableJitsiLink
|
||||
|Parameter allowing users to create Jitsi link when creating an event.
|
||||
Be aware that a least one of the attendees will need an account from a
|
||||
platform that Jitsi supports: Google, Facebook or Github
|
||||
|
||||
Defaults to `NO` when unset.
|
||||
|
||||
|S |SOGoSAML2PrivateKeyLocation
|
||||
|The location of the SSL private key file on the filesystem that is used
|
||||
by SOGo to sign and encrypt communications with the SAML2 identity
|
||||
|
||||
@@ -55,6 +55,7 @@ static const NSString *kDisableSharingCalendar = @"Calendar";
|
||||
|
||||
- (BOOL) isWebAccessEnabled;
|
||||
- (BOOL) isCalendarDAVAccessEnabled;
|
||||
- (BOOL) isCalendarJitsiLinkEnabled;
|
||||
- (BOOL) isAddressBookDAVAccessEnabled;
|
||||
|
||||
- (BOOL) enableEMailAlarms;
|
||||
|
||||
@@ -441,6 +441,11 @@ _injectConfigurationFromFile (NSMutableDictionary *defaultsDict,
|
||||
return [self boolForKey: @"SOGoCalendarDAVAccessEnabled"];
|
||||
}
|
||||
|
||||
- (BOOL) isCalendarJitsiLinkEnabled
|
||||
{
|
||||
return [self boolForKey: @"SOGoCalendarEnableJitsiLink"];
|
||||
}
|
||||
|
||||
- (BOOL) isAddressBookDAVAccessEnabled
|
||||
{
|
||||
return [self boolForKey: @"SOGoAddressBookDAVAccessEnabled"];
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
"Save and Close" = "Save and Close";
|
||||
"Close" = "Close";
|
||||
"Invite Attendees" = "Invite Attendees";
|
||||
"Create Jitsi Meeting" = "Create Jitsi Meeting";
|
||||
"Attach" = "Attach";
|
||||
"Update" = "Update";
|
||||
"Cancel" = "Cancel";
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
"Save and Close" = "Enregistrer et fermer";
|
||||
"Close" = "Fermer";
|
||||
"Invite Attendees" = "Participants";
|
||||
"Create Jitsi Meeting" = "Créer Une Réunion Jitsi";
|
||||
"Attach" = "Joindre";
|
||||
"Update" = "Mettre à jour";
|
||||
"Cancel" = "Annuler";
|
||||
|
||||
@@ -517,7 +517,15 @@
|
||||
@interface UIxAppointmentEditorTemplate : UIxComponentEditorTemplate
|
||||
@end
|
||||
|
||||
|
||||
@implementation UIxAppointmentEditorTemplate
|
||||
|
||||
- (BOOL) showJitsiLinkCreation
|
||||
{
|
||||
SOGoSystemDefaults *sd;
|
||||
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
return [sd isCalendarJitsiLinkEnabled];
|
||||
}
|
||||
@end
|
||||
|
||||
/* Task Editor */
|
||||
|
||||
@@ -120,6 +120,19 @@
|
||||
label:aria-label="Send Appointment Notifications">
|
||||
<var:string label:value="Send Appointment Notifications"/>
|
||||
</md-checkbox>
|
||||
<!-- create jitsi link-->
|
||||
<var:if condition="showJitsiLinkCreation">
|
||||
<div layout="row" ng-if="!editor.component.hasJitsiUrl()" layout-align="start center">
|
||||
<md-button class="md-icon-button" type="button" ng-click="editor.addJitsiUrl($event)">
|
||||
<md-icon>add_circle</md-icon>
|
||||
</md-button>
|
||||
<label class="button-label">
|
||||
<var:string label:value="Create Jitsi meeting"/>
|
||||
</label>
|
||||
</div>
|
||||
</var:if>
|
||||
|
||||
|
||||
<!-- attach urls -->
|
||||
<div ng-repeat="attach in editor.component.attachUrls">
|
||||
<div layout="row" layout-align="start center">
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user