Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

style(app): restyle billing sections for the plutonium page

Hampus8bd4ee78695c
diff --git a/fluxer_app/src/features/app/components/dialogs/components/PerksButton.module.css b/fluxer_app/src/features/app/components/dialogs/components/PerksButton.module.css
index fa3801f7d..f58156584 100644
--- a/fluxer_app/src/features/app/components/dialogs/components/PerksButton.module.css
+++ b/fluxer_app/src/features/app/components/dialogs/components/PerksButton.module.css
@@ -8,7 +8,15 @@
color: inherit;
font: inherit;
line-height: inherit;
- font-weight: 500;
- text-decoration: underline;
- text-decoration-color: rgb(255 255 255 / 0.6);
+ font-weight: 700;
+ text-decoration-line: underline;
+ text-decoration-thickness: 2px;
+ text-decoration-color: color-mix(in oklab, currentColor 45%, transparent);
+ text-underline-offset: 4px;
+}
+
+@media (hover: hover) {
+ .link:hover {
+ text-decoration-color: currentColor;
+ }
}
diff --git a/fluxer_app/src/features/app/components/dialogs/components/plutonium/InvoiceList.module.css b/fluxer_app/src/features/app/components/dialogs/components/plutonium/InvoiceList.module.css
index 3842575bf..32e14f89d 100644
--- a/fluxer_app/src/features/app/components/dialogs/components/plutonium/InvoiceList.module.css
+++ b/fluxer_app/src/features/app/components/dialogs/components/plutonium/InvoiceList.module.css
@@ -1,12 +1,18 @@
/* SPDX-License-Identifier: AGPL-3.0-or-later */
.list {
- display: flex;
- flex-direction: column;
+ display: grid;
+ grid-template-columns: minmax(8rem, 1fr) minmax(5rem, auto) minmax(5rem, auto) auto;
overflow: hidden;
- border: 0.0625rem solid var(--background-modifier-accent);
- border-radius: 0.5rem;
- background: color-mix(in srgb, var(--background-secondary) 55%, transparent);
+ border-radius: var(--pl-radius-m);
+ background-color: var(--pl-board);
+}
+
+:global(html.theme-light) .list {
+ --pl-btn2-face: var(--pl-paper-face);
+ --pl-btn2-hover: var(--pl-paper-hover);
+ --pl-btn2-press: var(--pl-paper-hover);
+ --pl-btn2-ledge: var(--pl-paper-ledge);
}
.header,
@@ -14,26 +20,25 @@
display: grid;
min-width: 0;
align-items: center;
- gap: 0.5rem;
- padding: 0.75rem;
- grid-template-columns: minmax(8rem, 1fr) minmax(5rem, auto) minmax(5rem, auto) auto;
- border-top: 0.0625rem solid var(--background-modifier-accent);
+ gap: 0.5rem 0.75rem;
+ padding: 0.75rem 1rem;
+ grid-column: 1 / -1;
+ grid-template-columns: subgrid;
+ border-top: 2px solid var(--pl-rule);
}
.header {
border-top: none;
- background: color-mix(in srgb, var(--background-tertiary) 70%, transparent);
- font-size: 0.6875rem;
- font-weight: 700;
- line-height: 1rem;
- color: var(--text-primary-muted);
- text-transform: uppercase;
+ color: var(--pl-on-muted);
+ font-size: 0.875rem;
+ font-weight: 600;
+ line-height: 1.25rem;
}
.row {
- font-size: 0.875rem;
- line-height: 1.25rem;
- color: var(--text-primary);
+ color: var(--pl-on);
+ font-size: 0.9375rem;
+ line-height: 1.375rem;
}
.date,
@@ -45,36 +50,47 @@
}
.amount {
- font-weight: 600;
+ font-weight: 700;
}
.date {
- color: var(--text-primary-muted);
+ color: var(--pl-on-muted);
}
.empty {
margin: 0;
- padding: 0.75rem;
- font-size: 0.875rem;
- line-height: 1.25rem;
- color: var(--text-primary-muted);
+ padding: 0.75rem 1rem;
+ color: var(--pl-on-muted);
+ font-size: 0.9375rem;
+ line-height: 1.375rem;
}
-@media (min-width: 768px) {
- .row > button {
+.row > button {
+ width: auto;
+ margin-bottom: var(--pl-ledge-s);
+}
+
+@container plutonium-page (min-width: 48rem) {
+ .row > button,
+ .header > :last-child {
justify-self: end;
}
}
-@media (max-width: 767px) {
+@container plutonium-page (max-width: 47.99rem) {
.header {
display: none;
}
.row {
- grid-template-columns: 1fr;
- gap: 0.25rem;
- align-items: stretch;
+ grid-template-columns: 1fr auto;
+ gap: 0.25rem 0.75rem;
+ }
+
+ .row > button {
+ grid-column: 2;
+ grid-row: 1 / span 3;
+ align-self: center;
}
.row:first-child {
diff --git a/fluxer_app/src/features/app/components/dialogs/components/plutonium/PurchaseHistorySection.module.css b/fluxer_app/src/features/app/components/dialogs/components/plutonium/PurchaseHistorySection.module.css
index 7953ae76e..535b4aee7 100644
--- a/fluxer_app/src/features/app/components/dialogs/components/plutonium/PurchaseHistorySection.module.css
+++ b/fluxer_app/src/features/app/components/dialogs/components/plutonium/PurchaseHistorySection.module.css
@@ -5,33 +5,39 @@
min-height: 0;
width: 100%;
flex-direction: column;
- gap: 1rem;
+ gap: 1.25rem;
}
.card {
+ --pl-btn2-face: var(--pl-sub-btn2-face);
+ --pl-btn2-hover: var(--pl-sub-btn2-hover);
+ --pl-btn2-press: var(--pl-sub-btn2-hover);
+ --pl-btn2-ledge: var(--pl-sub-btn2-ledge);
width: 100%;
- overflow: hidden;
- border-radius: 0.75rem;
- border: 0.0625rem solid var(--background-modifier-accent);
- padding: 1rem;
+ box-sizing: border-box;
+ padding: 1.25rem;
+ border-radius: var(--pl-radius-l);
+ background-color: var(--pl-sub);
+ box-shadow: 0 var(--pl-ledge-m) 0 var(--pl-sub-ledge);
+ color: var(--pl-on);
}
-@media (min-width: 768px) {
+@container plutonium-page (min-width: 48rem) {
.card {
- padding: 1.25rem;
+ padding: 1.5rem;
}
}
.grid {
display: grid;
- grid-template-columns: 1fr;
- gap: 0.75rem;
+ grid-template-columns: minmax(0, 1fr);
+ gap: 1rem;
}
-@media (min-width: 1024px) {
+@container plutonium-page (min-width: 48rem) {
.grid {
- grid-template-columns: 1fr auto;
- align-items: start;
+ grid-template-columns: minmax(0, 1fr) auto;
+ align-items: center;
}
}
@@ -39,55 +45,41 @@
display: flex;
min-width: 0;
flex-direction: column;
- gap: 0.25rem;
+ gap: 0.375rem;
}
.title {
- font-weight: 600;
- font-size: 1rem;
- line-height: 1.5rem;
- color: var(--text-primary);
+ margin: 0;
+ color: var(--pl-on);
+ font-size: var(--pl-text-heading);
+ font-weight: 700;
+ line-height: 1.25;
}
-@media (min-width: 768px) {
- .description {
- font-size: 0.875rem;
- line-height: 1.25rem;
- }
+.description {
+ margin: 0;
+ color: var(--pl-copy);
+ font-size: 1rem;
+ line-height: 1.6;
+ text-wrap: pretty;
}
.accordionStack {
- margin-top: 0.75rem;
display: flex;
flex-direction: column;
-}
-
-@media (min-width: 768px) {
- .accordionStack {
- margin-top: 1rem;
- }
+ margin-top: 1rem;
}
.accordion {
- padding-top: 0.75rem;
+ padding-top: 1rem;
padding-bottom: 0;
}
-.accordion + .accordion {
- border-top: none;
-}
-
-@media (min-width: 768px) {
- .accordion {
- padding-top: 1rem;
- }
-}
-
.button {
width: 100%;
}
-@media (min-width: 1024px) {
+@container plutonium-page (min-width: 48rem) {
.button {
width: auto;
justify-self: end;
diff --git a/fluxer_app/src/features/app/components/dialogs/components/plutonium/PurchaseHistorySection.tsx b/fluxer_app/src/features/app/components/dialogs/components/plutonium/PurchaseHistorySection.tsx
index 64d7dc57c..1775f0e95 100644
--- a/fluxer_app/src/features/app/components/dialogs/components/plutonium/PurchaseHistorySection.tsx
+++ b/fluxer_app/src/features/app/components/dialogs/components/plutonium/PurchaseHistorySection.tsx
@@ -2,8 +2,8 @@
import {InvoiceList} from '@app/features/app/components/dialogs/components/plutonium/InvoiceList';
import styles from '@app/features/app/components/dialogs/components/plutonium/PurchaseHistorySection.module.css';
+import {PlutoniumPageButton} from '@app/features/premium/components/plutonium_page/PlutoniumPageButton';
import {Accordion} from '@app/features/ui/accordion/Accordion';
-import {Button} from '@app/features/ui/button/Button';
import type {PremiumStateResponse} from '@fluxer/schema/src/domains/premium/PremiumSchemas';
import {Trans} from '@lingui/react/macro';
import {observer} from 'mobx-react-lite';
@@ -29,10 +29,10 @@ export const PurchaseHistorySection: React.FC<PurchaseHistorySectionProps> = obs
<Trans>Purchase history</Trans>
</h3>
</div>
- <Button
+ <PlutoniumPageButton
variant="secondary"
onClick={handleOpenCustomerPortal}
- submitting={loadingPortal}
+ loading={loadingPortal}
small
className={styles.button}
data-flx="app.plutonium.purchase-history-section.button.open-customer-portal"
@@ -40,7 +40,7 @@ export const PurchaseHistorySection: React.FC<PurchaseHistorySectionProps> = obs
<Trans comment="Billing button that opens Stripe customer portal for payment-method management only.">
Manage payment methods
</Trans>
- </Button>
+ </PlutoniumPageButton>
</div>
<div className={styles.accordionStack} data-flx="app.plutonium.purchase-history-section.accordion-stack">
<Accordion
diff --git a/fluxer_app/src/features/app/components/dialogs/components/plutonium/PurchaseHistoryStatus.module.css b/fluxer_app/src/features/app/components/dialogs/components/plutonium/PurchaseHistoryStatus.module.css
index bcb025e81..da727e94c 100644
--- a/fluxer_app/src/features/app/components/dialogs/components/plutonium/PurchaseHistoryStatus.module.css
+++ b/fluxer_app/src/features/app/components/dialogs/components/plutonium/PurchaseHistoryStatus.module.css
@@ -5,42 +5,32 @@
.muted,
.neutral,
.danger {
- display: inline-flex;
- align-items: center;
- width: max-content;
+ display: inline-block;
max-width: 100%;
overflow: hidden;
- border-radius: 62.4375rem;
- padding: 0.125rem 0.5rem;
- font-size: 0.75rem;
- font-weight: 600;
- line-height: 1rem;
- letter-spacing: 0.01em;
+ font-size: 0.9375rem;
+ font-weight: 700;
+ line-height: 1.375rem;
text-overflow: ellipsis;
white-space: nowrap;
}
.success {
- background: color-mix(in srgb, var(--status-online) 14%, transparent);
- color: var(--status-online);
+ color: var(--pl-success-ink);
}
.pending {
- background: color-mix(in srgb, var(--status-warning) 14%, transparent);
- color: var(--status-warning);
+ color: var(--pl-warning-ink);
}
.muted {
- background: var(--background-modifier-accent);
- color: var(--text-primary-muted);
+ color: var(--pl-on-muted);
}
.neutral {
- background: var(--background-modifier-accent);
- color: var(--text-primary);
+ color: var(--pl-on);
}
.danger {
- background: color-mix(in srgb, var(--status-danger) 14%, transparent);
- color: var(--status-danger);
+ color: var(--pl-danger-text);
}
diff --git a/fluxer_app/src/features/app/components/dialogs/components/plutonium/SubscriptionCard.module.css b/fluxer_app/src/features/app/components/dialogs/components/plutonium/SubscriptionCard.module.css
index ea3e26ca1..bc85e5d11 100644
--- a/fluxer_app/src/features/app/components/dialogs/components/plutonium/SubscriptionCard.module.css
+++ b/fluxer_app/src/features/app/components/dialogs/components/plutonium/SubscriptionCard.module.css
@@ -1,29 +1,35 @@
/* SPDX-License-Identifier: AGPL-3.0-or-later */
.card {
+ --pl-btn2-face: var(--pl-sub-btn2-face);
+ --pl-btn2-hover: var(--pl-sub-btn2-hover);
+ --pl-btn2-press: var(--pl-sub-btn2-hover);
+ --pl-btn2-ledge: var(--pl-sub-btn2-ledge);
position: relative;
width: 100%;
- border: 0.0625rem solid var(--background-modifier-accent);
- border-radius: 0.75rem;
- padding: 1rem;
- color: var(--text-primary);
+ box-sizing: border-box;
+ padding: 1.25rem;
+ border-radius: var(--pl-radius-l);
+ background-color: var(--pl-sub);
+ box-shadow: 0 var(--pl-ledge-m) 0 var(--pl-sub-ledge);
+ color: var(--pl-on);
}
-@media (min-width: 768px) {
+@container plutonium-page (min-width: 48rem) {
.card {
- padding: 1.25rem;
+ padding: 1.5rem;
}
}
.grid {
display: grid;
- grid-template-columns: 1fr;
- gap: 1rem;
+ grid-template-columns: minmax(0, 1fr);
+ gap: 1.25rem;
}
-@media (min-width: 1024px) {
+@container plutonium-page (min-width: 64rem) {
.grid {
- grid-template-columns: 1fr auto;
+ grid-template-columns: minmax(0, 1fr) auto;
align-items: start;
}
}
@@ -32,72 +38,51 @@
display: flex;
min-width: 0;
flex-direction: column;
- gap: 0.5rem;
-}
-
-@media (min-width: 768px) {
- .content {
- gap: 0.75rem;
- }
+ gap: 0.75rem;
}
.header {
display: flex;
flex-wrap: wrap;
- align-items: center;
- gap: 0.5rem;
+ align-items: baseline;
+ gap: 0.25rem 0.75rem;
}
.title {
- font-weight: 600;
- font-size: 1rem;
- line-height: 1.5rem;
- color: var(--text-primary);
+ margin: 0;
+ color: var(--pl-on);
+ font-size: var(--pl-text-heading);
+ font-weight: 700;
+ line-height: 1.25;
}
-.description {
- font-size: 0.8125rem;
- line-height: 1.25rem;
- color: var(--text-primary-muted);
-}
-
-@media (min-width: 768px) {
- .description {
- font-size: 0.875rem;
- line-height: 1.375rem;
- }
+.description,
+.renewalInfo {
+ color: var(--pl-copy);
+ font-size: 1rem;
+ line-height: 1.6;
+ text-wrap: pretty;
}
-.description strong {
- color: var(--text-primary);
- font-weight: 600;
+.description strong,
+.renewalInfo strong,
+.pendingChangeInfo strong {
+ color: var(--pl-on);
+ font-weight: 700;
}
.renewalInfo {
- font-size: 0.8125rem;
- line-height: 1.25rem;
- color: var(--text-primary-muted);
-}
-
-.renewalInfo strong {
- color: var(--text-primary);
- font-weight: 600;
+ color: var(--pl-on-muted);
}
.pendingChangeInfo {
max-width: 42rem;
- border: 0.0625rem solid var(--background-modifier-accent);
- border-radius: 0.5rem;
- padding: 0.625rem 0.75rem;
- background: var(--background-modifier-hover);
- font-size: 0.8125rem;
- line-height: 1.25rem;
- color: var(--text-primary-muted);
-}
-
-.pendingChangeInfo strong {
- color: var(--text-primary);
- font-weight: 600;
+ padding: 0.75rem 1rem;
+ border-radius: var(--pl-radius-s);
+ background-color: var(--pl-board);
+ color: var(--pl-copy);
+ font-size: 0.9375rem;
+ line-height: 1.5;
}
.actions {
@@ -105,24 +90,22 @@
width: 100%;
flex-direction: column;
align-items: stretch;
- gap: 0.5rem;
+ gap: 0.5rem 0.75rem;
}
-@media (min-width: 768px) {
+@container plutonium-page (min-width: 40rem) {
.actions {
flex-direction: row;
flex-wrap: wrap;
align-items: center;
- justify-content: flex-end;
}
}
-@media (min-width: 1024px) {
+@container plutonium-page (min-width: 64rem) {
.actions {
min-width: 12.5rem;
flex-direction: column;
- align-items: flex-end;
- justify-content: flex-start;
+ align-items: stretch;
}
}
@@ -130,29 +113,24 @@
width: 100%;
}
-@media (min-width: 768px) {
+@container plutonium-page (min-width: 40rem) {
.actionButton {
width: auto;
}
}
-@media (min-width: 1024px) {
+@container plutonium-page (min-width: 64rem) {
.actionButton {
- width: auto;
+ width: 100%;
}
}
.legacyRateBadge {
- display: inline-flex;
- align-items: center;
- margin-left: 0.375rem;
- padding: 0.0625rem 0.4375rem;
- border-radius: 62.4375rem;
- background: var(--background-modifier-accent);
- color: var(--text-primary-muted);
- font-size: 0.6875rem;
- font-weight: 600;
- letter-spacing: 0.01em;
+ margin-inline-start: 0.375rem;
+ color: var(--pl-accent);
+ font-weight: 700;
+ text-decoration-line: underline;
+ text-decoration-style: dotted;
+ text-underline-offset: 3px;
cursor: help;
- vertical-align: middle;
}