mirror of
https://ghfast.top/https://github.com/discourse/docker_manager.git
synced 2026-05-21 23:54:02 +08:00
gjs, helper invocation case, typos, latest license template, unnecessary tracking, concatClass, unnecessary service injection, new imports, whitespace, pure function helper, htmlSafe calling convention, this. in template, unused vars in ruby, update linting, qunit-dom
28 lines
603 B
JavaScript
28 lines
603 B
JavaScript
import { tracked } from "@glimmer/tracking";
|
|
import Controller from "@ember/controller";
|
|
import { action } from "@ember/object";
|
|
import { TrackedArray } from "@ember-compat/tracked-built-ins";
|
|
|
|
export default class Upgrade extends Controller {
|
|
@tracked bannerDismissed = false;
|
|
banner = new TrackedArray();
|
|
|
|
get showBanner() {
|
|
if (this.bannerDismissed) {
|
|
return false;
|
|
}
|
|
|
|
return this.banner?.length > 0;
|
|
}
|
|
|
|
appendBannerHtml(html) {
|
|
if (!this.banner.includes(html)) {
|
|
this.banner.push(html);
|
|
}
|
|
}
|
|
|
|
@action
|
|
dismiss() {
|
|
this.bannerDismissed = true;
|
|
}
|
|
}
|