mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 09:42:46 +08:00
FEATURE: Introduce ignore duration selection (#7266)
* FEATURE: Introducing new UI for tracking User's ignored or muted states
This commit is contained in:
@ -90,10 +90,22 @@ export const TIMEFRAMES = [
|
||||
.minute(0),
|
||||
icon: "briefcase"
|
||||
}),
|
||||
buildTimeframe({
|
||||
id: "two_months",
|
||||
format: "MMM D",
|
||||
enabled: opts => opts.includeMidFuture,
|
||||
when: (time, timeOfDay) =>
|
||||
time
|
||||
.add(2, "month")
|
||||
.startOf("month")
|
||||
.hour(timeOfDay)
|
||||
.minute(0),
|
||||
icon: "briefcase"
|
||||
}),
|
||||
buildTimeframe({
|
||||
id: "three_months",
|
||||
format: "MMM D",
|
||||
enabled: opts => opts.includeFarFuture,
|
||||
enabled: opts => opts.includeMidFuture,
|
||||
when: (time, timeOfDay) =>
|
||||
time
|
||||
.add(3, "month")
|
||||
@ -102,6 +114,18 @@ export const TIMEFRAMES = [
|
||||
.minute(0),
|
||||
icon: "briefcase"
|
||||
}),
|
||||
buildTimeframe({
|
||||
id: "four_months",
|
||||
format: "MMM D",
|
||||
enabled: opts => opts.includeMidFuture,
|
||||
when: (time, timeOfDay) =>
|
||||
time
|
||||
.add(4, "month")
|
||||
.startOf("month")
|
||||
.hour(timeOfDay)
|
||||
.minute(0),
|
||||
icon: "briefcase"
|
||||
}),
|
||||
buildTimeframe({
|
||||
id: "six_months",
|
||||
format: "MMM D",
|
||||
@ -139,6 +163,7 @@ export const TIMEFRAMES = [
|
||||
}),
|
||||
buildTimeframe({
|
||||
id: "pick_date_and_time",
|
||||
enabled: opts => opts.includeDateTime,
|
||||
icon: "far-calendar-plus"
|
||||
}),
|
||||
buildTimeframe({
|
||||
@ -192,7 +217,9 @@ export default ComboBoxComponent.extend(DatetimeMixin, {
|
||||
now,
|
||||
day: now.day(),
|
||||
includeWeekend: this.get("includeWeekend"),
|
||||
includeMidFuture: this.get("includeMidFuture") || true,
|
||||
includeFarFuture: this.get("includeFarFuture"),
|
||||
includeDateTime: this.get("includeDateTime"),
|
||||
includeBasedOnLastPost: this.get("statusType") === CLOSE_STATUS_TYPE,
|
||||
canScheduleToday: 24 - now.hour() > 6
|
||||
};
|
||||
|
Reference in New Issue
Block a user