mirror of
https://github.com/discourse/discourse.git
synced 2025-04-09 09:40:58 +08:00
FEATURE: add downloadCalendar to plugin api (#14603)
New download calendar feature should be exposed via api
This commit is contained in:
parent
a85c876dbe
commit
2e09dc8885
@ -92,9 +92,10 @@ import {
|
||||
import { CUSTOM_USER_SEARCH_OPTIONS } from "select-kit/components/user-chooser";
|
||||
import { unsubscribeFromNotifications } from "discourse/initializers/subscribe-user-notifications";
|
||||
import { disableDefaultBadging } from "discourse/initializers/badging";
|
||||
import { downloadCalendar } from "discourse/lib/download-calendar";
|
||||
|
||||
// If you add any methods to the API ensure you bump up this number
|
||||
const PLUGIN_API_VERSION = "0.12.6";
|
||||
const PLUGIN_API_VERSION = "0.13.6";
|
||||
|
||||
// This helper prevents us from applying the same `modifyClass` over and over in test mode.
|
||||
function canModify(klass, type, resolverName, changes) {
|
||||
@ -1426,6 +1427,23 @@ class PluginApi {
|
||||
addSearchSuggestion(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Download calendar modal which allow to pick between ICS and Google Calendar
|
||||
*
|
||||
* ```
|
||||
* api.downloadCalendar("title of the event", [
|
||||
* {
|
||||
startsAt: "2021-10-12T15:00:00.000Z",
|
||||
endsAt: "2021-10-12T16:00:00.000Z",
|
||||
},
|
||||
* ]);
|
||||
* ```
|
||||
*
|
||||
*/
|
||||
downloadCalendar(title, dates) {
|
||||
downloadCalendar(title, dates);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a quick search tip shown randomly when the search dropdown is invoked on desktop.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user