mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: linter issues
This commit is contained in:
@@ -37,7 +37,6 @@
|
||||
<Label {required} {hideRequired} {tooltip} {optionalText} hide={!showLabel} for={id}>
|
||||
{label}
|
||||
</Label>
|
||||
<!-- <span class="label" use:label>Hotel Nights</span> -->
|
||||
{/if}
|
||||
<div class="u-flex u-gap-4">
|
||||
{#if showDates}
|
||||
@@ -137,10 +136,10 @@
|
||||
border-radius: 100%;
|
||||
user-select: none;
|
||||
|
||||
[aria-disabled='true'] {
|
||||
pointer-events: none;
|
||||
opacity: 0.4;
|
||||
}
|
||||
// [aria-disabled='true'] {
|
||||
// pointer-events: none;
|
||||
// opacity: 0.4;
|
||||
// }
|
||||
}
|
||||
.dt-button {
|
||||
aspect-ratio: 1/1;
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
|
||||
let showDropdown = false;
|
||||
|
||||
const { bandwidth, documents, storage, users, executions } = $organization?.billingLimits;
|
||||
const { bandwidth, documents, storage, users, executions } = ($organization ?? {})
|
||||
.billingLimits;
|
||||
const limitedServices = [
|
||||
{ name: 'bandwidth', value: bandwidth },
|
||||
{ name: 'documents', value: documents },
|
||||
|
||||
@@ -25,7 +25,7 @@ function createHeaderAlertStore() {
|
||||
if (n.components.some((c) => c.id === component.id)) return n;
|
||||
else {
|
||||
n.components.push(component);
|
||||
n.components = n.components;
|
||||
n.components = [...n.components];
|
||||
return n;
|
||||
}
|
||||
});
|
||||
|
||||
+16
-20
@@ -18,27 +18,23 @@ export async function initializeStripe() {
|
||||
if (!get(stripe)) return;
|
||||
isStripeInitialized.set(true);
|
||||
|
||||
try {
|
||||
const methods = await sdk.forConsole.billing.listPaymentMethods();
|
||||
clientSecret = methods.paymentMethods[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();
|
||||
clientSecret = paymentMethod.clientSecret;
|
||||
}
|
||||
|
||||
// Set up the options for the stripe elements
|
||||
const options = {
|
||||
clientSecret: clientSecret,
|
||||
appearance: get(app).themeInUse === 'dark' ? apperanceDark : apperanceLight
|
||||
};
|
||||
// Set up Elements and then create form
|
||||
elements = get(stripe).elements(options);
|
||||
paymentElement = elements.create('payment');
|
||||
paymentElement.mount('#payment-element');
|
||||
} catch (e) {
|
||||
throw e;
|
||||
const methods = await sdk.forConsole.billing.listPaymentMethods();
|
||||
clientSecret = methods.paymentMethods[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();
|
||||
clientSecret = paymentMethod.clientSecret;
|
||||
}
|
||||
|
||||
// Set up the options for the stripe elements
|
||||
const options = {
|
||||
clientSecret: clientSecret,
|
||||
appearance: get(app).themeInUse === 'dark' ? apperanceDark : apperanceLight
|
||||
};
|
||||
// Set up Elements and then create form
|
||||
elements = get(stripe).elements(options);
|
||||
paymentElement = elements.create('payment');
|
||||
paymentElement.mount('#payment-element');
|
||||
}
|
||||
|
||||
// TODO: fix redirect
|
||||
|
||||
@@ -248,16 +248,16 @@
|
||||
|
||||
if (isCloud) {
|
||||
if (!$page.url.pathname.includes('/console/onboarding')) {
|
||||
}
|
||||
try {
|
||||
const orgs = await sdk.forConsole.teams.list([
|
||||
Query.equal('billingPlan', 'tier-0')
|
||||
]);
|
||||
try {
|
||||
const orgs = await sdk.forConsole.teams.list([
|
||||
Query.equal('billingPlan', 'tier-0')
|
||||
]);
|
||||
|
||||
checkForPostReleaseProModal(orgs);
|
||||
checkForFreeOrgOverflow(orgs);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
checkForPostReleaseProModal(orgs);
|
||||
checkForFreeOrgOverflow(orgs);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -40,13 +40,13 @@
|
||||
}
|
||||
|
||||
function format(value: number): string {
|
||||
const humanized = humanFileSize(value);
|
||||
switch (metric) {
|
||||
case 'executions':
|
||||
case 'users':
|
||||
return abbreviateNumber(value);
|
||||
case 'storage':
|
||||
case 'bandwidth':
|
||||
const humanized = humanFileSize(value);
|
||||
return humanized.value + humanized.unit;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user