A platform for community discussion. Free, open, simple.
UI: Change visibility warning flair when creating a hidden group with an icon or an image (#36304)
Juan David Martínez Cubillosbcbecadbf5b2
diff --git a/frontend/discourse/app/components/group-manage-save-button.gjs b/frontend/discourse/app/components/group-manage-save-button.gjsindex cca53b7b3f5..5e488ecc7d6 100644--- a/frontend/discourse/app/components/group-manage-save-button.gjs+++ b/frontend/discourse/app/components/group-manage-save-button.gjs@@ -13,7 +13,6 @@ import { i18n } from "discourse-i18n";export default class GroupManageSaveButton extends Component {@service modal;@service groupAutomaticMembersDialog;- @service router;saving = null;disabled = false;@@ -29,10 +28,6 @@ export default class GroupManageSaveButton extends Component {this.updateExistingUsers = value;}- get shouldRenderWarningFlair() {- return this.router.currentRouteName !== "group.manage.membership";- }-@actionasync save() {if (this.beforeSave) {@@ -92,9 +87,8 @@ export default class GroupManageSaveButton extends Component {}<template>- {{#if this.shouldRenderWarningFlair}}- <GroupFlairVisibilityWarning @model={{this.model}} />- {{/if}}+ <GroupFlairVisibilityWarning @model={{this.model}} />+<div class="control-group buttons group-manage-save-button"><DButton@action={{this.save}}diff --git a/frontend/discourse/app/components/groups-form-membership-fields.gjs b/frontend/discourse/app/components/groups-form-membership-fields.gjsindex 99ef12c6b30..d253361ecfe 100644--- a/frontend/discourse/app/components/groups-form-membership-fields.gjs+++ b/frontend/discourse/app/components/groups-form-membership-fields.gjs@@ -6,7 +6,6 @@ import { action, computed } from "@ember/object";import { not, or as computedOr, readOnly } from "@ember/object/computed";import ExpandingTextArea from "discourse/components/expanding-text-area";import GroupFlairInputs from "discourse/components/group-flair-inputs";-import GroupFlairVisibilityWarning from "discourse/components/group-flair-visibility-warning";import PluginOutlet from "discourse/components/plugin-outlet";import lazyHash from "discourse/helpers/lazy-hash";import withEventValue from "discourse/helpers/with-event-value";@@ -256,7 +255,7 @@ export default class GroupsFormMembershipFields extends Component {<div class="control-group"><GroupFlairInputs @model={{this.model}} /></div>- <GroupFlairVisibilityWarning @model={{this.model}} />+{{/if}}</template>}diff --git a/frontend/discourse/app/templates/groups/new.gjs b/frontend/discourse/app/templates/groups/new.gjsindex 3253a50c38a..79765f5c438 100644--- a/frontend/discourse/app/templates/groups/new.gjs+++ b/frontend/discourse/app/templates/groups/new.gjs@@ -1,6 +1,7 @@import { hash } from "@ember/helper";import { LinkTo } from "@ember/routing";import DButton from "discourse/components/d-button";+import GroupFlairVisibilityWarning from "discourse/components/group-flair-visibility-warning";import GroupsFormInteractionFields from "discourse/components/groups-form-interaction-fields";import GroupsFormMembershipFields from "discourse/components/groups-form-membership-fields";import GroupsFormProfileFields from "discourse/components/groups-form-profile-fields";@@ -53,6 +54,7 @@ export default <template><GroupsFormMembershipFields @model={{@controller.model}} /><GroupsFormInteractionFields @model={{@controller.model}} />+ <GroupFlairVisibilityWarning @model={{@controller.model}} /><div class="control-group buttons"><DButton@action={{@controller.save}}