Skip to content

Commit

Permalink
back to danger for alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
ikreymer committed Nov 24, 2024
1 parent aa71058 commit df6cc30
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions frontend/src/features/org/org-status-banner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { OrgReadOnlyReason } from "@/types/org";
import { formatISODateString } from "@/utils/localization";

type Alert = {
variant: () => "primary" | "success" | "neutral" | "warning" | "danger";
test: () => boolean;
content: () => {
title: string | TemplateResult;
Expand All @@ -32,7 +31,7 @@ export class OrgStatusBanner extends BtrixElement {
return html`
<div id="banner" class="border-b bg-slate-100 py-5">
<div class="mx-auto box-border w-full max-w-screen-desktop px-3">
<sl-alert variant="${alert.variant()}" open>
<sl-alert variant="danger" open>
<sl-icon slot="icon" name="exclamation-triangle-fill"></sl-icon>
<strong class="block font-semibold">${content.title}</strong>
${content.detail}
Expand Down Expand Up @@ -86,8 +85,6 @@ export class OrgStatusBanner extends BtrixElement {

return [
{
variant: () => "danger",

test: () =>
!readOnly && !readOnlyOnCancel && !!futureCancelDate && !isTrial,

Expand Down Expand Up @@ -118,8 +115,6 @@ export class OrgStatusBanner extends BtrixElement {
},
},
{
variant: () => "neutral",

test: () =>
!readOnly &&
!readOnlyOnCancel &&
Expand All @@ -145,7 +140,7 @@ export class OrgStatusBanner extends BtrixElement {
</p>
<p>
${msg(
str`Your web archive are always yours - you can download any archived items you'd like to keep
str`Your web archives are always yours - you can download any archived items you'd like to keep
before the trial ends!`,
)}
</p>
Expand All @@ -154,8 +149,6 @@ export class OrgStatusBanner extends BtrixElement {
},
},
{
variant: () => "danger",

test: () => !readOnly && readOnlyOnCancel && !!futureCancelDate,

content: () => {
Expand All @@ -181,8 +174,6 @@ export class OrgStatusBanner extends BtrixElement {
},
},
{
variant: () => "danger",

test: () =>
!!readOnly && readOnlyReason === OrgReadOnlyReason.SubscriptionPaused,

Expand All @@ -195,7 +186,6 @@ export class OrgStatusBanner extends BtrixElement {
}),
},
{
variant: () => "danger",
test: () =>
!!readOnly &&
readOnlyReason === OrgReadOnlyReason.SubscriptionCancelled,
Expand All @@ -208,7 +198,6 @@ export class OrgStatusBanner extends BtrixElement {
}),
},
{
variant: () => "danger",
test: () => !!readOnly,

content: () => ({
Expand All @@ -217,7 +206,6 @@ export class OrgStatusBanner extends BtrixElement {
}),
},
{
variant: () => "danger",
test: () => !readOnly && !!storageQuotaReached,
content: () => ({
title: msg(str`Your org has reached its storage limit`),
Expand All @@ -227,7 +215,6 @@ export class OrgStatusBanner extends BtrixElement {
}),
},
{
variant: () => "danger",
test: () => !readOnly && !!execMinutesQuotaReached,
content: () => ({
title: msg(
Expand Down

0 comments on commit df6cc30

Please sign in to comment.