Merge branch 'main' of github.com:appwrite/console into refactor-billing-endpoints

This commit is contained in:
Arman
2024-02-21 13:45:57 +01:00
7 changed files with 15 additions and 11 deletions
+3
View File
@@ -3,7 +3,10 @@
<head>
<meta charset="utf-8" />
<meta name="description" content="" />
<link rel="icon" type="image/svg+xml" href="/logos/appwrite-icon.svg" />
<link rel="mask-icon" type="image/png" href="/logos/appwrite-icon.png" />
<link
rel="preload"
href="/fonts/inter/inter-v8-latin-600.woff2"
+1 -1
View File
@@ -24,7 +24,7 @@
{#if single}
<article class="card u-grid u-cross-center u-width-full-line common-section">
<div
class="u-flex u-flex-vertical u-cross-center u-gap-24 u-width-full-line u-overflow-hidden">
class="u-flex u-flex-vertical u-cross-center u-gap-24 u-width-full-line u-overflow-hidden u-padding-block-8">
{#if !noMedia}
<button
type="button"
+4 -3
View File
@@ -4,6 +4,7 @@
import { page } from '$app/stores';
import { log } from '$lib/stores/logs';
import { wizard } from '$lib/stores/wizard';
import { activeHeaderAlert } from '$routes/console/store';
export let isOpen = false;
export let showSideNavigation = false;
@@ -47,9 +48,9 @@
class:grid-with-side={showSideNavigation}
class:is-open={isOpen}
class:u-hide={$wizard.show || $log.show || $wizard.cover}
class:is-fixed-layout={$$slots.alert}>
{#if $$slots.alert}
<slot name="alert" />
class:is-fixed-layout={$activeHeaderAlert?.show}>
{#if $activeHeaderAlert?.show}
<svelte:component this={$activeHeaderAlert.component} />
{/if}
<header class="main-header u-padding-inline-end-0">
<button
+6 -1
View File
@@ -19,7 +19,12 @@ export async function initializeStripe() {
isStripeInitialized.set(true);
const methods = await sdk.forConsole.billing.listPaymentMethods();
clientSecret = methods.paymentMethods[0]?.clientSecret;
// Get the client secret from empty payment method if available
clientSecret = methods.paymentMethods?.filter(
(method) => !!method?.clientSecret && !method?.providerMethodId
)[0]?.clientSecret;
// If there is no payment method, create an empty one and get the client secret
if (!clientSecret) {
paymentMethod = await sdk.forConsole.billing.createPaymentMethod();
-5
View File
@@ -299,11 +299,6 @@
!$page.url.pathname.includes('/console/account') &&
!$page.url.pathname.includes('/console/card') &&
!$page.url.pathname.includes('/console/onboarding')}>
<svelte:fragment slot="alert">
{#if $activeHeaderAlert?.show}
<svelte:component this={$activeHeaderAlert.component} />
{/if}
</svelte:fragment>
<Header slot="header" />
<SideNavigation slot="side" bind:isOpen />
<slot />
@@ -19,7 +19,7 @@ export const load: LayoutLoad = async ({ params, depends }) => {
if (isCloud) {
await failedInvoice.load(params.organization);
if (!get(failedInvoice)) {
if (get(failedInvoice)) {
headerAlert.add({
show: true,
component: ProjectsAtRisk,
Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B