Skip to content

Commit

Permalink
Merge pull request #6976 from savindi7/improve-branding-revert-message
Browse files Browse the repository at this point in the history
Improve the revert Branding confirmation and default app-wise branding messages
  • Loading branch information
savindi7 authored Oct 13, 2024
2 parents 446a407 + bbe9190 commit 04dbfce
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changeset/lovely-weeks-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@wso2is/admin.branding.v1": patch
"@wso2is/console": patch
---

Improve the revert Branding confirmation and default app-wise branding messages.
1 change: 1 addition & 0 deletions apps/console/src/extensions/i18n/models/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1759,6 +1759,7 @@ export interface Extensions {
applicationBrandingtitle: string;
applicationBrandingDescription: string;
applicationListWarning: string;
defaultBrandingAppliedMessage: string;
backButtonText: string;
description: string;
organization: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1353,9 +1353,7 @@ export const extensions: Extensions = {
assertionHint: "Please confirm your action.",
content: "This action is irreversible and will permanently revert your branding preferences.",
header: "Are you sure?",
message:
"If you revert the branding preferences, your users will start to see " +
"{{ productName }} branding on the login flows. Please proceed with caution."
message: "Reverting your branding preferences will apply the default branding from the next available level (such as your organization or parent organization)."
},
unpublishBranding: {
assertionHint: "Please confirm your action.",
Expand Down Expand Up @@ -1985,7 +1983,8 @@ export const extensions: Extensions = {
application: "Application",
applicationBrandingtitle: "Application Branding",
applicationBrandingDescription: "Customize consumer-facing user interfaces of applications.",
applicationListWarning: "Please select an application from the list above to customize the branding preferences.",
applicationListWarning: "Select an application from the list above to customize the branding preferences.",
defaultBrandingAppliedMessage: "Organization branding has been applied to this application because no app-specific branding is set.",
backButtonText: "Go back to Application Settings",
description: "Customize consumer-facing user interfaces of applications in your organization.",
organization: "Organization",
Expand Down
18 changes: 18 additions & 0 deletions features/admin.branding.v1/components/branding-page-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import useAIBrandingPreference from "@wso2is/admin.branding.ai.v1/hooks/use-ai-b
import { AppConstants, AppState, history } from "@wso2is/admin.core.v1";
import { FeatureStatusLabel } from "@wso2is/admin.feature-gate.v1/models/feature-status";
import { useGetCurrentOrganizationType } from "@wso2is/admin.organizations.v1/hooks/use-get-organization-type";
import useGetBrandingPreferenceResolve from "@wso2is/common.branding.v1/api/use-get-branding-preference-resolve";
import { BrandingPreferenceTypes } from "@wso2is/common.branding.v1/models";
import { AlertLevels, IdentifiableComponentInterface } from "@wso2is/core/models";
import { addAlert } from "@wso2is/core/store";
import { DocumentationLink, PageLayout, useDocumentation } from "@wso2is/react-components";
Expand Down Expand Up @@ -77,6 +79,10 @@ const BrandingPageLayout: FunctionComponent<BrandingPageLayoutInterface> = (
updateActiveTab
} = useBrandingPreference();

const {
data: brandingData
} = useGetBrandingPreferenceResolve(selectedApplication, BrandingPreferenceTypes.APP);

const {
data: applicationList,
isLoading: isApplicationListFetchRequestLoading,
Expand Down Expand Up @@ -418,6 +424,18 @@ const BrandingPageLayout: FunctionComponent<BrandingPageLayoutInterface> = (
</Alert>
)
}
{
brandingMode === BrandingModes.APPLICATION &&
selectedApplication &&
brandingData?.type === BrandingPreferenceTypes.ORG && (
<Alert
severity="info"
sx={ { marginBottom: 2 } }
>
{ t("extensions:develop.branding.pageHeader.defaultBrandingAppliedMessage") }
</Alert>
)
}
</motion.div>
{
!brandingDisabledFeatures?.includes(AI_BRANDING_FEATURE_ID) &&
Expand Down

0 comments on commit 04dbfce

Please sign in to comment.