mirror of
https://github.com/discourse/discourse.git
synced 2025-06-20 07:31:33 +08:00

* DEV: Fix the function prototype observers deprecation DEPRECATION: Function prototype extensions have been deprecated, please migrate from function(){}.observes('foo') to observer('foo', function() {}). [deprecation id: function-prototype-extensions.observes] See https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-observes for more details. * DEV: Fix the function prototype event listeners deprecation DEPRECATION: Function prototype extensions have been deprecated, please migrate from function(){}.on('foo') to on('foo', function() {}). [deprecation id: function-prototype-extensions.on] See https://deprecations.emberjs.com/v3.x/#toc_function-prototype-extensions-on for more details. * DEV: Simplify `default as` imports Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
58 lines
1.5 KiB
JavaScript
58 lines
1.5 KiB
JavaScript
import Component from "@ember/component";
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
|
|
|
export default Component.extend({
|
|
init() {
|
|
this._super(...arguments);
|
|
|
|
this.visibilityLevelOptions = [
|
|
{
|
|
name: I18n.t(
|
|
"admin.groups.manage.interaction.visibility_levels.public"
|
|
),
|
|
value: 0
|
|
},
|
|
{
|
|
name: I18n.t(
|
|
"admin.groups.manage.interaction.visibility_levels.logged_on_users"
|
|
),
|
|
value: 1
|
|
},
|
|
{
|
|
name: I18n.t(
|
|
"admin.groups.manage.interaction.visibility_levels.members"
|
|
),
|
|
value: 2
|
|
},
|
|
{
|
|
name: I18n.t("admin.groups.manage.interaction.visibility_levels.staff"),
|
|
value: 3
|
|
},
|
|
{
|
|
name: I18n.t(
|
|
"admin.groups.manage.interaction.visibility_levels.owners"
|
|
),
|
|
value: 4
|
|
}
|
|
];
|
|
|
|
this.aliasLevelOptions = [
|
|
{ name: I18n.t("groups.alias_levels.nobody"), value: 0 },
|
|
{ name: I18n.t("groups.alias_levels.only_admins"), value: 1 },
|
|
{ name: I18n.t("groups.alias_levels.mods_and_admins"), value: 2 },
|
|
{ name: I18n.t("groups.alias_levels.members_mods_and_admins"), value: 3 },
|
|
{ name: I18n.t("groups.alias_levels.owners_mods_and_admins"), value: 4 },
|
|
{ name: I18n.t("groups.alias_levels.everyone"), value: 99 }
|
|
];
|
|
},
|
|
|
|
@discourseComputed(
|
|
"siteSettings.email_in",
|
|
"model.automatic",
|
|
"currentUser.admin"
|
|
)
|
|
showEmailSettings(emailIn, automatic, isAdmin) {
|
|
return emailIn && isAdmin && !automatic;
|
|
}
|
|
});
|