This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/app/controllers/application.js
Rafael dos Santos Silva 967946378a
FIX: iOS do not have working push notifications yet (#15888)
Stop Discourse from prompting for push notification on latest iOS beta
where the navigators exposes a broken Push object.

We had some feature detection functions that where outside our
pre-initializer that it dedicated for this stuff. All feature detection
now lives on sniff-capabilities file.

Also removed some old browser detection from the push notifications
code, and simplified the function signature because of it.

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2022-03-03 16:19:46 -03:00

29 lines
699 B
JavaScript

import Controller from "@ember/controller";
import discourseComputed from "discourse-common/utils/decorators";
import { inject as service } from "@ember/service";
export default Controller.extend({
showTop: true,
showFooter: false,
router: service(),
@discourseComputed
canSignUp() {
return (
!this.siteSettings.invite_only &&
this.siteSettings.allow_new_registrations &&
!this.siteSettings.enable_discourse_connect
);
},
@discourseComputed
loginRequired() {
return this.siteSettings.login_required && !this.currentUser;
},
@discourseComputed
showFooterNav() {
return this.capabilities.isAppWebview || this.capabilities.isiOSPWA;
},
});