Skip to content

Commit

Permalink
Add notification message on default app-wise branding
Browse files Browse the repository at this point in the history
  • Loading branch information
savindi7 committed Oct 12, 2024
1 parent 229bada commit 926ca4a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
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 @@ -1983,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 926ca4a

Please sign in to comment.