mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:08:26 +00:00
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:
parent
dc02586d99
commit
ac8d8e3b62
@ -5,7 +5,6 @@ import discourseComputed from "discourse-common/utils/decorators";
|
|||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
import { htmlSafe } from "@ember/template";
|
import { htmlSafe } from "@ember/template";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { reads } from "@ember/object/computed";
|
|
||||||
|
|
||||||
const START_OF_DAY_HOUR = 8;
|
const START_OF_DAY_HOUR = 8;
|
||||||
const REMINDER_TYPES = {
|
const REMINDER_TYPES = {
|
||||||
@ -52,9 +51,16 @@ export default Controller.extend(ModalFunctionality, {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
usingMobileDevice: reads("site.mobileView"),
|
|
||||||
showBookmarkReminderControls: true,
|
showBookmarkReminderControls: true,
|
||||||
|
|
||||||
|
@discourseComputed()
|
||||||
|
showAtDesktop() {
|
||||||
|
return (
|
||||||
|
this.siteSettings.enable_bookmark_at_desktop_reminders &&
|
||||||
|
this.site.mobileView
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
@discourseComputed("selectedReminderType")
|
@discourseComputed("selectedReminderType")
|
||||||
customDateTimeSelected(selectedReminderType) {
|
customDateTimeSelected(selectedReminderType) {
|
||||||
return selectedReminderType === REMINDER_TYPES.CUSTOM;
|
return selectedReminderType === REMINDER_TYPES.CUSTOM;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
{{#if userHasTimezoneSet}}
|
{{#if userHasTimezoneSet}}
|
||||||
{{#tap-tile-grid activeTile=selectedReminderType as |grid|}}
|
{{#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")}}
|
{{tap-tile icon="desktop" text=(i18n "bookmarks.reminders.at_desktop") tileId=reminderTypes.AT_DESKTOP activeTile=grid.activeTile onChange=(action "selectReminderType")}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -293,6 +293,10 @@ basic:
|
|||||||
client: true
|
client: true
|
||||||
default: false
|
default: false
|
||||||
hidden: true
|
hidden: true
|
||||||
|
enable_bookmark_at_desktop_reminders:
|
||||||
|
client: true
|
||||||
|
default: false
|
||||||
|
hidden: true
|
||||||
push_notifications_prompt:
|
push_notifications_prompt:
|
||||||
default: true
|
default: true
|
||||||
client: true
|
client: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user