mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
address comments.
This commit is contained in:
1 parent
21a4d714a4
commit
b0ad92a19b
4 files changed
+5
-29
No files matched your search
@@ -70,8 +70,7 @@
|
||||
class={resolvedClasses}
|
||||
style="pointer-events: {internalDisabled ? 'none' : 'auto'};"
|
||||
aria-label={ariaLabel}
|
||||
use:multiAction={actions}
|
||||
{...$$restProps}>
|
||||
use:multiAction={actions}>
|
||||
<slot />
|
||||
</a>
|
||||
{:else}
|
||||
@@ -82,8 +81,7 @@
|
||||
class={resolvedClasses}
|
||||
aria-label={ariaLabel}
|
||||
type={submit ? 'submit' : 'button'}
|
||||
use:multiAction={actions}
|
||||
{...$$restProps}>
|
||||
use:multiAction={actions}>
|
||||
{#if $isSubmitting && submissionLoader}
|
||||
<span
|
||||
class="loader is-small"
|
||||
|
||||
@@ -8,10 +8,8 @@
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { organization, currentPlan } from '$lib/stores/organization';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { onMount, tick } from 'svelte';
|
||||
import { onMount } from 'svelte';
|
||||
import BudgetAlert from './budgetAlert.svelte';
|
||||
import { page } from '$app/stores';
|
||||
import { scrollToUpdateBudget } from './store';
|
||||
|
||||
let capActive = false;
|
||||
let budget: number;
|
||||
@@ -49,22 +47,9 @@
|
||||
$: if (!capActive) {
|
||||
budget = null;
|
||||
}
|
||||
|
||||
let formHolderElement: HTMLDivElement;
|
||||
|
||||
$: if ($scrollToUpdateBudget) {
|
||||
// clean the url in the search bar.
|
||||
history.replaceState(null, '', $page.url.pathname);
|
||||
|
||||
tick().then(() => {
|
||||
const elementTop = formHolderElement.getBoundingClientRect().top + window.scrollY;
|
||||
// Offset 60 to prevent misalignment.
|
||||
window.scrollTo({ top: elementTop - 60 });
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="update-budget-section" bind:this={formHolderElement} style:padding-block-start="1.5rem">
|
||||
<div id="update-budget" style:padding-block-start="1.5rem">
|
||||
<Form onSubmit={updateBudget}>
|
||||
<CardGrid>
|
||||
<Heading tag="h2" size="6">Budget cap</Heading>
|
||||
|
||||
@@ -16,7 +16,3 @@ export const addCreditWizardStore = writable<{ coupon: string; paymentMethodId:
|
||||
|
||||
export const selectedInvoice = writable<Invoice>(null);
|
||||
export const showRetryModal = writable(false);
|
||||
|
||||
export const scrollToUpdateBudget = derived(page, ($page) =>
|
||||
$page.url.hash.includes('#update-budget')
|
||||
);
|
||||
@@ -8,7 +8,6 @@
|
||||
import { base } from '$app/paths';
|
||||
|
||||
$: redirectUrl = `${base}/organization-${$organization.$id}/billing#update-budget`;
|
||||
$: isSameUrl = $page.url.pathname === new URL(redirectUrl, window.location.origin).pathname;
|
||||
</script>
|
||||
|
||||
{#if $showBudgetAlert && $organization?.$id && $organization?.billingPlan !== BillingPlan.FREE && $readOnly && !hideBillingHeaderRoutes.includes($page.url.pathname)}
|
||||
@@ -21,9 +20,7 @@
|
||||
<Button href={`${base}/organization-${$organization.$id}/usage`} text fullWidthMobile>
|
||||
<span class="text">View usage</span>
|
||||
</Button>
|
||||
|
||||
<!-- target="_self" for same page navigation -->
|
||||
<Button secondary fullWidthMobile href={redirectUrl} target={isSameUrl ? '_self' : ''}>
|
||||
<Button secondary fullWidthMobile href={redirectUrl}>
|
||||
<span class="text">Update limit</span>
|
||||
</Button>
|
||||
</svelte:fragment>
|
||||
|
||||
Reference in new issue
Block a user