FEATURE: Add enable_bookmark_at_desktop_reminders site setting (#9198)

Add enable_bookmark_at_desktop_reminders site setting default to false a new hidden site setting to hide the "At Desktop" reminder option so we can restrict this further until it is polished.
This commit is contained in:
Martin Brennan 2020-03-13 16:29:09 +10:00 committed by GitHub
parent dc02586d99
commit ac8d8e3b62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

View File

@ -5,7 +5,6 @@ import discourseComputed from "discourse-common/utils/decorators";
import { popupAjaxError } from "discourse/lib/ajax-error";
import { htmlSafe } from "@ember/template";
import { ajax } from "discourse/lib/ajax";
import { reads } from "@ember/object/computed";
const START_OF_DAY_HOUR = 8;
const REMINDER_TYPES = {
@ -52,9 +51,16 @@ export default Controller.extend(ModalFunctionality, {
}
},
usingMobileDevice: reads("site.mobileView"),
showBookmarkReminderControls: true,
@discourseComputed()
showAtDesktop() {
return (
this.siteSettings.enable_bookmark_at_desktop_reminders &&
this.site.mobileView
);
},
@discourseComputed("selectedReminderType")
customDateTimeSelected(selectedReminderType) {
return selectedReminderType === REMINDER_TYPES.CUSTOM;

View File

@ -24,7 +24,7 @@
{{#if userHasTimezoneSet}}
{{#tap-tile-grid activeTile=selectedReminderType as |grid|}}
{{#if usingMobileDevice}}
{{#if showAtDesktop}}
{{tap-tile icon="desktop" text=(i18n "bookmarks.reminders.at_desktop") tileId=reminderTypes.AT_DESKTOP activeTile=grid.activeTile onChange=(action "selectReminderType")}}
{{/if}}

View File

@ -293,6 +293,10 @@ basic:
client: true
default: false
hidden: true
enable_bookmark_at_desktop_reminders:
client: true
default: false
hidden: true
push_notifications_prompt:
default: true
client: true