Skip to content

Commit

Permalink
Hardcode message
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Apr 18, 2024
1 parent a1f12ba commit e8140ea
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 22 deletions.
26 changes: 11 additions & 15 deletions admin/src/react-components/pages/system-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,17 @@ const SystemEditorComponent = ({ classes }) => {

return (
<div className="page_wrapper">
{features && features["show_global_notification"] && (
<Card className={`mb-24 ${classes.notificationCard}`}>
<CardSection
className={classes.notificationCardSection}
ctaCallback={() => {
features["global_notification_link"]
? window.open(features["global_notification_link"])
: (window.location.href = "#/app-settings");
}}
cta={features["global_notification_link"] ? "Learn More" : "Go to App Settings"}
body={features["global_notification_body"] || "Notification body empty. Configure it in App Settings."}
showIcon={false}
/>
</Card>
)}
<Card className={`mb-24 ${classes.notificationCard}`}>
<CardSection
className={classes.notificationCardSection}
ctaCallback={() => {
window.open("https://www.mozilla.com");
}}
cta={"Learn More"}
body={"COPY HERE"}
showIcon={false}
/>
</Card>
<Card className="mb-24">
<h2 className="heading-lg mb-24">Getting Started</h2>

Expand Down
7 changes: 3 additions & 4 deletions src/react-components/ui-root.js
Original file line number Diff line number Diff line change
Expand Up @@ -1337,9 +1337,8 @@ class UIRoot extends Component {
}
];

const showGlobalNotification = configs.feature("show_global_notification");
const globalNotificationBody = configs.feature("global_notification_body");
const globalNotificationLink = configs.feature("global_notification_link");
const globalNotificationBody = "COPY HERE";
const globalNotificationLink = "https://www.mozilla.com";

return (
<MoreMenuContextProvider>
Expand Down Expand Up @@ -1462,7 +1461,7 @@ class UIRoot extends Component {
/>
)}
<NotificationsContainer isMobile={isMobile}>
{showGlobalNotification && !this.state.globalNotificationDismissed && (
{!this.state.globalNotificationDismissed && (
<SystemNotification
body={globalNotificationBody}
link={globalNotificationLink}
Expand Down
3 changes: 0 additions & 3 deletions src/schema.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ features.default_room_id = { category = "features", type = "string", name = "Hom
features.enable_spoke = { category = "features", type = "boolean", name = "Enable Scene Editor", description = "Enable Scene Editor for all visitors."}
features.enable_lobby_ghosts = { category = "features", type = "boolean", name = "Enable Lobby Ghosts", description = "Allow people in the lobby to explore the room while remaining invisible and inaudible." }
features.public_api_access = { category = "features", type = "boolean", name = "Public API Access", description = "Enables a publicly-accessible API for managing backend resources programmatically.", internal = "false" }
features.show_global_notification = { category = "features", type = "boolean", name = "Show System Notification", description = "Enable showing a system notification in the admin panel, Spoke and inside Hubs rooms." }
features.global_notification_body = { category = "features", type = "string", name = "Notification Body Text", description = "The notification body." }
features.global_notification_link = { category = "features", type = "string", name = "Notification Link Text", description = "An optional notification link button." }

features.permissive_rooms = { category = "rooms", type = "boolean", name = "Permissive Rooms", description = "Enable full content creation permissions on new rooms." }
features.disable_room_creation = { category = "rooms", type = "boolean", name = "Disable room creation", description = "Disable creating rooms for non-administrators." }
Expand Down

0 comments on commit e8140ea

Please sign in to comment.