refactor: Fix function and variable typos

This commit is contained in:
data-miner00
2024-09-29 07:41:01 +08:00
parent 3ed9c35408
commit 44a7bbd3d7
4 changed files with 15 additions and 15 deletions
+3 -3
View File
@@ -36,7 +36,7 @@ export async function initializeStripe() {
// Set up the options for the stripe elements
const options = {
clientSecret: clientSecret,
appearance: get(app).themeInUse === 'dark' ? apperanceDark : apperanceLight
appearance: get(app).themeInUse === 'dark' ? appearanceDark : appearanceLight
};
// Set up Elements and then create form
elements = get(stripe).elements(options);
@@ -184,7 +184,7 @@ export async function confirmSetup(
}
}
const apperanceLight = {
const appearanceLight = {
variables: {
colorPrimary: '#606a7b',
colorText: 'rgb(107, 107, 112)',
@@ -213,7 +213,7 @@ const apperanceLight = {
}
};
const apperanceDark = {
const appearanceDark = {
variables: {
colorPrimary: '#606a7b',
colorText: 'rgb(195, 195, 198)',
@@ -10,10 +10,10 @@
import { sdk } from '$lib/stores/sdk';
import { user } from './store';
let showVerifcationDropdown = false;
let showVerificationDropdown = false;
async function updateVerificationEmail() {
showVerifcationDropdown = false;
showVerificationDropdown = false;
try {
await sdk.forProject.users.updateEmailVerification($user.$id, !$user.emailVerification);
await invalidate(Dependencies.USER);
@@ -33,7 +33,7 @@
}
}
async function updateVerificationPhone() {
showVerifcationDropdown = false;
showVerificationDropdown = false;
try {
await sdk.forProject.users.updatePhoneVerification($user.$id, !$user.phoneVerification);
await invalidate(Dependencies.USER);
@@ -135,10 +135,10 @@
</Button>
{#if $user.status}
{#if $user.phone && $user.email}
<DropList bind:show={showVerifcationDropdown} placement="top-start">
<DropList bind:show={showVerificationDropdown} placement="top-start">
<Button
secondary
on:click={() => (showVerifcationDropdown = !showVerifcationDropdown)}>
on:click={() => (showVerificationDropdown = !showVerificationDropdown)}>
{$user.emailVerification && $user.phoneVerification ? 'Unverify' : 'Verify'}
account
</Button>
@@ -4,7 +4,7 @@
export let content = '';
export let classes = '';
function getIntials(name: string) {
function getInitials(name: string) {
let words = name.split(' ');
// If there is only one word, split it by underscore
if (words.length === 1) {
@@ -32,7 +32,7 @@
<div class="phone {classes}">
<div class="avatar-initials u-text-center u-width-full-line u-line-height-1-5 u-medium u-bold">
{getIntials($project.name)}
{getInitials($project.name)}
</div>
<div class="project-name u-text-center u-x-small u-width-full-line">{$project.name}</div>
<div class="chat u-text-center u-width-full-line">
@@ -16,7 +16,7 @@
let time: string;
let dateTime: Date;
let docsUrl = `https://appwrite.io/docs/products/messaging`;
let showConfimation = false;
let showConfirmation = false;
let totalTargets = $messageParams[$providerType].targets?.length ?? 0;
@@ -60,14 +60,14 @@
async function askForConfirmation() {
$wizard.interceptorNotificationEnabled = false;
showConfimation = true;
showConfirmation = true;
throw 'Show confirmation';
}
async function submit() {
$wizard.interceptorNotificationEnabled = true;
await $wizard.finalAction();
showConfimation = false;
showConfirmation = false;
}
$: if (when === 'now') {
@@ -127,14 +127,14 @@
</Helper>
</WizardStep>
<Modal title="Send message" bind:show={showConfimation} headerDivider={false} onSubmit={submit}>
<Modal title="Send message" bind:show={showConfirmation} headerDivider={false} onSubmit={submit}>
<p>
You are about to send a message to an estimated <span class="u-bold">{totalTargets}</span> recipients.
Would you like to proceed?
</p>
<p class="u-bold">This action is irreversible.</p>
<svelte:fragment slot="footer">
<Button text on:click={() => (showConfimation = false)}>Cancel</Button>
<Button text on:click={() => (showConfirmation = false)}>Cancel</Button>
<Button secondary submit>Send</Button>
</svelte:fragment>
</Modal>