|
|
@@ -54,27 +54,36 @@ enum WidgetTemplates {
|
|
|
]),
|
|
|
]
|
|
|
case .gmail:
|
|
|
- return [
|
|
|
- v("gmail_small", "Inbox Quick", .small, false, .actionsRow, [
|
|
|
- a("compose", "Compose", "square.and.pencil", "/mail/u/0/#inbox?compose=new"),
|
|
|
- a("inbox", "Inbox", "tray", "/mail/u/0/#inbox"),
|
|
|
- a("starred", "Starred", "star", "/mail/u/0/#starred"),
|
|
|
- ]),
|
|
|
- v("gmail_medium", "Mailbox", .medium, true, .actionsGrid(columns: 2), [
|
|
|
- a("inbox", "Inbox", "tray", "/mail/u/0/#inbox"),
|
|
|
- a("important", "Important", "exclamationmark.circle", "/mail/u/0/#imp"),
|
|
|
- a("sent", "Sent", "paperplane", "/mail/u/0/#sent"),
|
|
|
- a("drafts", "Drafts", "doc.plaintext", "/mail/u/0/#drafts"),
|
|
|
- ]),
|
|
|
- v("gmail_large", "Gmail Actions", .large, true, .actionsGrid(columns: 2), [
|
|
|
- a("compose", "Compose", "square.and.pencil", "/mail/u/0/#inbox?compose=new"),
|
|
|
- a("inbox", "Inbox", "tray", "/mail/u/0/#inbox"),
|
|
|
- a("starred", "Starred", "star", "/mail/u/0/#starred"),
|
|
|
- a("sent", "Sent", "paperplane", "/mail/u/0/#sent"),
|
|
|
- a("drafts", "Drafts", "doc.plaintext", "/mail/u/0/#drafts"),
|
|
|
- a("snoozed", "Snoozed", "clock", "/mail/u/0/#snoozed"),
|
|
|
- a("important", "Important", "exclamationmark.circle", "/mail/u/0/#imp"),
|
|
|
- a("trash", "Trash", "trash", "/mail/u/0/#trash"),
|
|
|
+ // Paths use `{{u}}` for the signed-in account slot (0…3); resolved on the desktop widget.
|
|
|
+ func gm(_ path: String) -> String { path }
|
|
|
+ return [
|
|
|
+ v("gmail_small", "Quick triage", .small, false, .actionsRow, [
|
|
|
+ a("compose", "Compose", "square.and.pencil", gm("/mail/u/{{u}}/#inbox?compose=new")),
|
|
|
+ a("unread", "Unread", "envelope.badge", gm("/mail/u/{{u}}/#search/is:unread")),
|
|
|
+ a("search", "Search", "magnifyingglass", gm("/mail/u/{{u}}/#advanced-search")),
|
|
|
+ ]),
|
|
|
+ v("gmail_medium", "Inbox & search", .medium, true, .actionsGrid(columns: 2), [
|
|
|
+ a("inbox", "Inbox", "tray", gm("/mail/u/{{u}}/#inbox")),
|
|
|
+ a("unread", "Unread", "envelope.badge", gm("/mail/u/{{u}}/#search/is:unread")),
|
|
|
+ a("search", "Search", "magnifyingglass", gm("/mail/u/{{u}}/#search")),
|
|
|
+ a("compose", "Compose", "square.and.pencil", gm("/mail/u/{{u}}/#inbox?compose=new")),
|
|
|
+ ]),
|
|
|
+ v("gmail_large", "Gmail hub", .large, true, .actionsGrid(columns: 2), [
|
|
|
+ a("compose", "Compose", "square.and.pencil", gm("/mail/u/{{u}}/#inbox?compose=new")),
|
|
|
+ a("inbox", "Inbox", "tray", gm("/mail/u/{{u}}/#inbox")),
|
|
|
+ a("unread", "Unread", "envelope.badge", gm("/mail/u/{{u}}/#search/is:unread")),
|
|
|
+ a("search", "Search", "magnifyingglass", gm("/mail/u/{{u}}/#search")),
|
|
|
+ a("starred", "Starred", "star", gm("/mail/u/{{u}}/#starred")),
|
|
|
+ a("drafts", "Drafts", "doc.plaintext", gm("/mail/u/{{u}}/#drafts")),
|
|
|
+ a("sent", "Sent", "paperplane", gm("/mail/u/{{u}}/#sent")),
|
|
|
+ a("spam", "Spam", "exclamationmark.triangle", gm("/mail/u/{{u}}/#spam")),
|
|
|
+ a("allmail", "All Mail", "archivebox", gm("/mail/u/{{u}}/#all")),
|
|
|
+ a("scheduled", "Scheduled", "calendar.badge.clock", gm("/mail/u/{{u}}/#scheduled")),
|
|
|
+ a("attachments", "Attachments", "paperclip", gm("/mail/u/{{u}}/#search/has:attachment")),
|
|
|
+ a("contacts", "Contacts", "person.crop.circle", "https://contacts.google.com/"),
|
|
|
+ a("promos", "Promotions", "tag", gm("/mail/u/{{u}}/#category/promotions")),
|
|
|
+ a("settings", "Settings", "gearshape", gm("/mail/u/{{u}}/#settings/general")),
|
|
|
+ a("trash", "Trash", "trash", gm("/mail/u/{{u}}/#trash")),
|
|
|
]),
|
|
|
]
|
|
|
case .drive:
|