Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Cal Video links #732

Merged
merged 2 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "calcom_icon.png",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions MeetingBar/MeetingServices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ enum MeetingServices: String, Codable, CaseIterable {
case pumble = "Pumble"
case suitConference = "Suit Conference"
case doxyMe = "Doxy.me"
case calcom = "Cal Video"
case zmPage = "zm.page"
case other = "Other"

Expand Down Expand Up @@ -322,6 +323,7 @@ struct LinksRegex {
let pumble = try! NSRegularExpression(pattern: #"https?://meet\.pumble\.com/[a-z-]+"#)
let suitConference = try! NSRegularExpression(pattern: #"https?://([a-z0-9.]+)?conference\.istesuit\.com/[^\s]*+"#)
let doxyMe = try! NSRegularExpression(pattern: #"https://([a-z0-9.]+)?doxy\.me/[^\s]*"#)
let calcom = try! NSRegularExpression(pattern: #"https?://app.cal\.com/video/[A-Za-z0-9./]+"#)
let zmPage = try! NSRegularExpression(pattern: #"https?://([a-zA-Z0-9.]+)\.zm\.page"#)
}

Expand Down Expand Up @@ -627,6 +629,10 @@ func getIconForMeetingService(_ meetingService: MeetingServices?) -> NSImage {
image = NSImage(named: "gather_icon")!
image.size = NSSize(width: 16, height: 16)

case .some(.calcom):
image = NSImage(named: "calcom_icon")!
image.size = NSSize(width: 16, height: 16)

case .some(.url):
image = NSImage(named: NSImage.touchBarOpenInBrowserTemplateName)!
image.size = NSSize(width: 16, height: 16)
Expand Down
1 change: 1 addition & 0 deletions MeetingBarTests/MeetingServicesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ let meetings = [
MeetingLink(service: .pumble, url: URL(string: "https://meet.pumble.com/vly-hggs-xsn")!),
MeetingLink(service: .suitConference, url: URL(string: "https://turkcell.conference.istesuit.com/username")!),
MeetingLink(service: .doxyMe, url: URL(string: "https://bbc.doxy.me/dr.who")!),
MeetingLink(service: .calcom, url: URL(string: "https://app.cal.com/video/1de4BmdXEb983kIUHomUnA")!),
MeetingLink(service: .zmPage, url: URL(string: "https://meetingbar.zm.page")!)
]

Expand Down
Loading