mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-23 06:30:50 +08:00
Sometimes changes to "What's new?" feed items are made or the feed items are removed altogether, and the polling interval to check for new features is 1 day. This is quite long, so this commit introduces a "Check for updates" button for admins to click on the "What's new?" page which will bust the cache for the feed and check again at the new features endpoint. This is limited to 5 times per minute to avoid rapid sending of requests.
14 lines
363 B
JavaScript
Vendored
14 lines
363 B
JavaScript
Vendored
import Controller from "@ember/controller";
|
|
import { action } from "@ember/object";
|
|
|
|
export default class AdminWhatsNewController extends Controller {
|
|
@action
|
|
checkForUpdates() {
|
|
this.checkFeaturesCallback?.({ forceRefresh: true });
|
|
}
|
|
|
|
@action
|
|
bindCheckFeatures(checkFeaturesCallback) {
|
|
this.checkFeaturesCallback = checkFeaturesCallback;
|
|
}
|
|
}
|