Skip to content

Commit

Permalink
style(console): lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlking committed Jul 16, 2024
1 parent d6ff7e8 commit 42cf412
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 22 deletions.
4 changes: 2 additions & 2 deletions apps/console/src/lib/components/layout/sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
import { page } from '$app/stores';
import { i18n } from '$lib/i18n';
import { hrefToCategoryIndex, menuNavLinks } from '$lib/links';
import { getNhostClient } from '$lib/stores/nhost';
import { getNhostClient } from '$lib/stores/nhost';
import { AppRail, AppRailAnchor, AppRailTile, getDrawerStore } from '@skeletonlabs/skeleton';
import { Icon } from '@spectacular/skeleton/components/icons';
// Local
let currentRailCategory: keyof typeof menuNavLinks | undefined = undefined;
const drawerStore = getDrawerStore();
const { user } = getNhostClient()
const { user } = getNhostClient();
function onClickAnchor(): void {
currentRailCategory = undefined;
Expand Down
21 changes: 18 additions & 3 deletions apps/console/src/lib/links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,25 @@ export const menuNavLinks: MenuNavLinks = {
{
title: 'Administration',
list: [
{ href: '/organizations', label: 'Organizations', keywords: 'account, organization', roles: [Roles.Manager, Roles.Supervisor] },
{ href: '/delegation', label: 'Delegations', keywords: 'account, delegation', roles: [Roles.Manager, Roles.Supervisor] },
{
href: '/organizations',
label: 'Organizations',
keywords: 'account, organization',
roles: [Roles.Manager, Roles.Supervisor],
},
{
href: '/delegation',
label: 'Delegations',
keywords: 'account, delegation',
roles: [Roles.Manager, Roles.Supervisor],
},
{ href: '/users', label: 'Users', keywords: 'account, user, admin', roles: [Roles.Manager, Roles.Supervisor] },
{ href: '/groups', label: 'Groups', keywords: 'account, group, admin', roles: [Roles.Manager, Roles.Supervisor] },
{
href: '/groups',
label: 'Groups',
keywords: 'account, group, admin',
roles: [Roles.Manager, Roles.Supervisor],
},
],
},
],
Expand Down
7 changes: 1 addition & 6 deletions apps/console/src/lib/schema/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,7 @@ export const userSchema = z.object({
.min(2, { message: 'Display Name must contain at least 2 character(s)' })
.max(256)
.trim(),
phoneNumber: z
.string()
.regex(phoneRegex, 'Invalid Number!')
.min(10)
.max(15)
.nullable(),
phoneNumber: z.string().regex(phoneRegex, 'Invalid Number!').min(10).max(15).nullable(),
avatarUrl: z.string().url().nullable(),
defaultRole: z.nativeEnum(Roles, { required_error: 'You must have a role' }).default(Roles.User),
plan: z.enum(['free', 'pro', 'enterprise']).default('free'),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<script lang="ts">
import { getNhostClient } from "$lib/stores/nhost";
// import { createEnableMfaMachine, generateQrCodePromise } from '@nhost/nhost-js';
import { getToastStore } from "@skeletonlabs/skeleton";
import { Logger } from "@spectacular/utils";
import { getNhostClient } from '$lib/stores/nhost';
// import { createEnableMfaMachine, generateQrCodePromise } from '@nhost/nhost-js';
import { getToastStore } from '@skeletonlabs/skeleton';
import { Logger } from '@spectacular/utils';
// Variables
const log = new Logger("profile:mfa:browser");
const toastStore = getToastStore();
const nhost = getNhostClient();
// Variables
const log = new Logger('profile:mfa:browser');
const toastStore = getToastStore();
const nhost = getNhostClient();
// const machine = createEnableMfaMachine(nhost.auth.client)
// generateQrCodePromise(machine)
// const machine = createEnableMfaMachine(nhost.auth.client)
// generateQrCodePromise(machine)
</script>

<div class="card p-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ $: loadingState.setFormLoading($delayed);
// copy initialData to superform as soon as data is loaded
// $: $formData = { displayName, email, phoneNumber, defaultRole, locale, plan, avatarUrl };
$: if(id !== PendingValue) {
$: if (id !== PendingValue) {
$formData = { displayName, email, phoneNumber, defaultRole, locale, plan, avatarUrl };
}
</script>
Expand Down

0 comments on commit 42cf412

Please sign in to comment.