style: fixed indent -> everything into 2 spaces
This commit is contained in:
parent
d2e064d40f
commit
2981887224
@ -1,5 +1,5 @@
|
||||
{
|
||||
"useTabs": true,
|
||||
"useTabs": false,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all",
|
||||
"printWidth": 100,
|
||||
|
||||
@ -2,5 +2,5 @@
|
||||
@import 'tailwindcss';
|
||||
|
||||
* {
|
||||
font-family: "Inter", sans-serif;
|
||||
font-family: 'Inter', sans-serif;
|
||||
}
|
||||
2
src/app.d.ts
vendored
2
src/app.d.ts
vendored
@ -1,6 +1,6 @@
|
||||
// See https://svelte.dev/docs/kit/types#app.d.ts
|
||||
|
||||
import type { Guard } from "$lib/server/guard";
|
||||
import type { Guard } from '$lib/server/guard';
|
||||
import 'unplugin-icons/types/svelte';
|
||||
|
||||
// for information about these interfaces
|
||||
|
||||
@ -2,9 +2,9 @@ import { JSONFilePreset } from 'lowdb/node';
|
||||
import type { Device } from '../../types/device';
|
||||
import type { Group } from '../../types/group';
|
||||
import type { User } from '../../types/user';
|
||||
import { LowUserRepo } from './userRepo';
|
||||
import { LowGroupRepo } from './groupRepo';
|
||||
import { LowDeviceRepo } from './deviceRepo';
|
||||
import { LowGroupRepo } from './groupRepo';
|
||||
import { LowUserRepo } from './userRepo';
|
||||
|
||||
const db = await JSONFilePreset<LowStorage.LowData>('./data/db.json', {
|
||||
users: [],
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import type { IDeviceRepo } from '../deviceRepo';
|
||||
import type { Low } from 'lowdb';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { type New, type Updated } from '../../types';
|
||||
import { type Device, type DeviceError, DeviceErrors } from '../../types/device';
|
||||
import { nanoid } from 'nanoid';
|
||||
import type { IDeviceRepo } from '../deviceRepo';
|
||||
import type { LowStorage } from './_init';
|
||||
|
||||
export class LowDeviceRepo implements IDeviceRepo {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import type { IGroupRepo } from '../groupRepo';
|
||||
import type { Low } from 'lowdb';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { type New, type Updated } from '../../types';
|
||||
import { type Group, type GroupError, GroupErrors } from '../../types/group';
|
||||
import { nanoid } from 'nanoid';
|
||||
import type { IGroupRepo } from '../groupRepo';
|
||||
import type { LowStorage } from './_init';
|
||||
|
||||
export class LowGroupRepo implements IGroupRepo {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import type { Low } from 'lowdb';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { type New, type Updated } from '../../types';
|
||||
import { UserErrors, type User } from '../../types/user';
|
||||
import type { IUserRepo } from '../userRepo';
|
||||
import { nanoid } from 'nanoid';
|
||||
import type { LowStorage } from './_init';
|
||||
|
||||
export class LowUserRepo implements IUserRepo {
|
||||
|
||||
@ -22,7 +22,9 @@
|
||||
duration-300 ease-in-out cursor-pointer"
|
||||
>
|
||||
<IconCheck
|
||||
class="transition-all duration-300 ease-in-out {checked ? 'opacity-100' : 'opacity-0'} test"
|
||||
class="transition-all duration-300 ease-in-out {checked
|
||||
? 'opacity-100'
|
||||
: 'opacity-0'} test"
|
||||
/>
|
||||
</div>
|
||||
{/snippet}
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/state';
|
||||
import { pageTitle } from '$lib/v2/globalStores.js';
|
||||
import { slideFade } from '$lib/v2/transitions/slideFade.js';
|
||||
import NavBar from '$lib/v2/ui/NavBar.svelte';
|
||||
import NavBarLink from '$lib/v2/ui/NavBarLink.svelte';
|
||||
import { Button, DropdownMenu } from 'bits-ui';
|
||||
import IconChevronDown from '~icons/tabler/chevron-down';
|
||||
import IconChevronRight from '~icons/tabler/chevron-right';
|
||||
import IconDeviceDesktopPin from '~icons/tabler/device-desktop-pin';
|
||||
import IconHome from '~icons/tabler/home';
|
||||
import IconLogout from '~icons/tabler/logout';
|
||||
import IconUsers from '~icons/tabler/users';
|
||||
import IconUsersGroup from '~icons/tabler/users-group';
|
||||
import IconDeviceDesktopPin from '~icons/tabler/device-desktop-pin';
|
||||
import IconLogout from '~icons/tabler/logout';
|
||||
import { slideFade } from '$lib/v2/transitions/slideFade.js';
|
||||
|
||||
let { data, children } = $props();
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { users } from '$lib/server/db';
|
||||
import { toPublicUser, type User } from '$lib/server/db/types/user';
|
||||
import { toPublicUser } from '$lib/server/db/types/user';
|
||||
import type { ServerLoad } from '@sveltejs/kit';
|
||||
|
||||
export const load: ServerLoad = async ({ locals: { guard } }) => {
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { dev } from '$app/environment';
|
||||
import { users } from '$lib/server/db';
|
||||
import { createSession } from '$lib/server/sessions';
|
||||
import { fail, redirect } from '@sveltejs/kit';
|
||||
import bcrypt from 'bcryptjs';
|
||||
import type { Actions } from './$types';
|
||||
import { dev } from '$app/environment';
|
||||
|
||||
export const actions = {
|
||||
default: async ({ cookies, request, locals: { guard } }) => {
|
||||
|
||||
@ -7,11 +7,11 @@
|
||||
<form method="POST">
|
||||
<label>
|
||||
Username
|
||||
<input name="username" type="text">
|
||||
<input name="username" type="text" />
|
||||
</label>
|
||||
<label>
|
||||
Password
|
||||
<input name="password" type="password">
|
||||
<input name="password" type="password" />
|
||||
</label>
|
||||
<button>Log in</button>
|
||||
</form>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { deleteSession } from "$lib/server/sessions";
|
||||
import { redirect, type ServerLoad } from "@sveltejs/kit";
|
||||
import { deleteSession } from '$lib/server/sessions';
|
||||
import { redirect, type ServerLoad } from '@sveltejs/kit';
|
||||
|
||||
export const load: ServerLoad = async ({ cookies }) => {
|
||||
deleteSession(cookies.get("session"));
|
||||
cookies.delete("session", { path: "/" });
|
||||
redirect(302, "/login");
|
||||
deleteSession(cookies.get('session'));
|
||||
cookies.delete('session', { path: '/' });
|
||||
redirect(302, '/login');
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user