fmt: sort imports
This commit is contained in:
parent
0a7ddbbb5e
commit
ed005052c1
20 changed files with 89 additions and 102 deletions
11
src/App.tsx
11
src/App.tsx
|
@ -1,16 +1,15 @@
|
|||
import { A, Route, Router, useNavigate } from "@solidjs/router";
|
||||
import { createEffect, Show, Suspense, type Component } from "solid-js";
|
||||
import { DmId, GroupId, Home, Overview, preloadDmId, Privacy } from "./pages";
|
||||
|
||||
import { type Component, Show, Suspense, createEffect } from "solid-js";
|
||||
import { DmId, GroupId, Home, Overview, Privacy, preloadDmId } from "./pages";
|
||||
import "./app.css";
|
||||
import { ColorModeProvider, ColorModeScript, createLocalStorageManager } from "@kobalte/core";
|
||||
import { MetaProvider } from "@solidjs/meta";
|
||||
import { Portal } from "solid-js/web";
|
||||
import { Callout, CalloutTitle, CalloutContent } from "./components/ui/callout";
|
||||
import { Callout, CalloutContent, CalloutTitle } from "./components/ui/callout";
|
||||
import { ModeToggle } from "./components/ui/mode-toggle";
|
||||
import { dbLoaded } from "./db";
|
||||
import { hasCashedData } from "./lib/db-cache";
|
||||
import { isWasmSupported } from "./lib/utils";
|
||||
import { ColorModeProvider, ColorModeScript, createLocalStorageManager } from "@kobalte/core";
|
||||
import { ModeToggle } from "./components/ui/mode-toggle";
|
||||
|
||||
const NO_DATA_NEEDED_PAGES = ["/", "/privacy"];
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { sql, type NotNull } from "kysely";
|
||||
import { worker, kyselyDb, SELF_ID, DB_FILENAME, setDbLoaded } from "./db";
|
||||
import { cached, clearDbCache } from "../lib/db-cache";
|
||||
import { type NotNull, sql } from "kysely";
|
||||
import type { MainToWorkerMsg, WorkerToMainMsg } from "~/lib/kysely-official-wasm-worker/type";
|
||||
import { cached, clearDbCache } from "../lib/db-cache";
|
||||
import { DB_FILENAME, SELF_ID, kyselyDb, setDbLoaded, worker } from "./db";
|
||||
|
||||
export const loadDb = async (statements: string[], progressCallback?: (percentage: number) => void): Promise<void> => {
|
||||
// try to persist storage, https://web.dev/articles/persistent-storage#request_persistent_storage
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Kysely } from "kysely";
|
||||
import type { DB } from "./db-schema";
|
||||
import { OfficialWasmWorkerDialect } from "~/lib/kysely-official-wasm-worker";
|
||||
import WasmWorker from "./db-worker?worker";
|
||||
import { createSignal } from "solid-js";
|
||||
import { OfficialWasmWorkerDialect } from "~/lib/kysely-official-wasm-worker";
|
||||
import type { DB } from "./db-schema";
|
||||
import WasmWorker from "./db-worker?worker";
|
||||
|
||||
export const SELF_ID = 2;
|
||||
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
import type {
|
||||
DatabaseIntrospector,
|
||||
Dialect,
|
||||
DialectAdapter,
|
||||
Driver,
|
||||
Kysely,
|
||||
QueryCompiler,
|
||||
} from "kysely";
|
||||
import type { DatabaseIntrospector, Dialect, DialectAdapter, Driver, Kysely, QueryCompiler } from "kysely";
|
||||
import { SqliteAdapter, SqliteIntrospector, SqliteQueryCompiler } from "kysely";
|
||||
import { OfficialWasmWorkerDriver } from "./driver";
|
||||
import type { OfficialWasmWorkerDialectConfig } from "./type";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getHourList, getMonthList, getWeekdayList } from "./date";
|
||||
import type { MessageOverview, MessageStats, Recipients } from "~/types";
|
||||
import { getHourList, getMonthList, getWeekdayList } from "./date";
|
||||
|
||||
const hourNames = getHourList();
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { MessageOverview, MessageStats, Recipients } from "~/types";
|
||||
import { cached } from "./db-cache";
|
||||
import { getHourList, getMonthList, getWeekdayList } from "./date";
|
||||
import { cached } from "./db-cache";
|
||||
import MessageStatsWorker from "./messages-worker?worker";
|
||||
|
||||
export const hourNames = getHourList();
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
import { Suspense, type Component } from "solid-js";
|
||||
import { createAsync, type RoutePreloadFunc, type RouteSectionProps } from "@solidjs/router";
|
||||
|
||||
import { dmPartnerRecipientQuery, threadMostUsedWordsQuery, threadSentMessagesOverviewQuery, SELF_ID } from "~/db";
|
||||
import { getNameFromRecipient } from "~/lib/get-name-from-recipient";
|
||||
import { Heading } from "~/components/ui/heading";
|
||||
import { Grid } from "~/components/ui/grid";
|
||||
import { Title } from "@solidjs/meta";
|
||||
import { type RoutePreloadFunc, type RouteSectionProps, createAsync } from "@solidjs/router";
|
||||
import { type Component, Suspense } from "solid-js";
|
||||
import { Flex } from "~/components/ui/flex";
|
||||
import { Grid } from "~/components/ui/grid";
|
||||
import { Heading } from "~/components/ui/heading";
|
||||
import { SELF_ID, dmPartnerRecipientQuery, threadMostUsedWordsQuery, threadSentMessagesOverviewQuery } from "~/db";
|
||||
import { getNameFromRecipient } from "~/lib/get-name-from-recipient";
|
||||
import { createMessageStatsSources } from "~/lib/messages";
|
||||
import type { MessageOverview } from "~/types";
|
||||
import { DmMessagesPerDate } from "./dm-messages-per-date";
|
||||
import { DmOverview } from "./dm-overview";
|
||||
import { DmWordCloud } from "./dm-wordcloud";
|
||||
import { DmMessagesPerMonth } from "./dm-messages-per-month";
|
||||
import { DmMessagesPerDaytime } from "./dm-messages-per-daytime";
|
||||
import { DmMessagesPerMonth } from "./dm-messages-per-month";
|
||||
import { DmMessagesPerRecipient } from "./dm-messages-per-recipients";
|
||||
import { DmMessagesPerWeekday } from "./dm-messages-per-weekday";
|
||||
import type { MessageOverview } from "~/types";
|
||||
import { createMessageStatsSources } from "~/lib/messages";
|
||||
import { Flex } from "~/components/ui/flex";
|
||||
import { DmOverview } from "./dm-overview";
|
||||
import { DmWordCloud } from "./dm-wordcloud";
|
||||
|
||||
const getDmIdData = (dmId: number) => {
|
||||
// the other person in the chat with name and id
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Show, type Accessor, type Component } from "solid-js";
|
||||
import type { ChartData } from "chart.js";
|
||||
import { type Accessor, type Component, Show } from "solid-js";
|
||||
import { LineChart } from "~/components/ui/charts";
|
||||
import type { MessageStats, Recipients } from "~/types";
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Show, type Accessor, type Component } from "solid-js";
|
||||
import type { ChartData } from "chart.js";
|
||||
import { type Accessor, type Component, Show } from "solid-js";
|
||||
import { BarChart } from "~/components/ui/charts";
|
||||
import type { MessageStats, Recipients } from "~/types";
|
||||
import { hourNames } from "~/lib/messages";
|
||||
import type { MessageStats, Recipients } from "~/types";
|
||||
|
||||
export const DmMessagesPerDaytime: Component<{
|
||||
daytimeStats: MessageStats["daytime"] | undefined;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Show, type Accessor, type Component } from "solid-js";
|
||||
import type { ChartData } from "chart.js";
|
||||
import { type Accessor, type Component, Show } from "solid-js";
|
||||
import { RadarChart } from "~/components/ui/charts";
|
||||
import { monthNames } from "~/lib/messages";
|
||||
import type { MessageStats, Recipients } from "~/types";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Show, type Accessor, type Component } from "solid-js";
|
||||
import type { ChartData } from "chart.js";
|
||||
import { type Accessor, type Component, Show } from "solid-js";
|
||||
import { PieChart } from "~/components/ui/charts";
|
||||
import type { MessageStats, Recipients } from "~/types";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Show, type Accessor, type Component } from "solid-js";
|
||||
import type { ChartData } from "chart.js";
|
||||
import { type Accessor, type Component, Show } from "solid-js";
|
||||
import { RadarChart } from "~/components/ui/charts";
|
||||
import { weekdayNames } from "~/lib/messages";
|
||||
import type { MessageStats, Recipients } from "~/types";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Show, type Component } from "solid-js";
|
||||
import { CalendarArrowDown, CalendarArrowUp, CalendarClock, MessagesSquare } from "lucide-solid";
|
||||
import { type Component, Show } from "solid-js";
|
||||
import { Flex } from "~/components/ui/flex";
|
||||
import { Grid } from "~/components/ui/grid";
|
||||
import { CalendarArrowDown, CalendarArrowUp, CalendarClock, MessagesSquare } from "lucide-solid";
|
||||
import { getDistanceBetweenDatesInDays } from "~/lib/date";
|
||||
import type { MessageOverview } from "~/types";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { ChartData } from "chart.js";
|
||||
import { Show, type Accessor, type Component } from "solid-js";
|
||||
import { type Accessor, type Component, Show } from "solid-js";
|
||||
import { WordCloudChart } from "~/components/ui/charts";
|
||||
import type { threadMostUsedWordsQuery } from "~/db";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { Component } from "solid-js";
|
||||
import type { RouteSectionProps } from "@solidjs/router";
|
||||
import type { Component } from "solid-js";
|
||||
|
||||
export const GroupId: Component<RouteSectionProps> = (props) => {
|
||||
const groupId = () => Number(props.params.groupid);
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
import type { RouteSectionProps } from "@solidjs/router";
|
||||
import { type Component, createResource, Show } from "solid-js";
|
||||
|
||||
import { allThreadsOverviewQuery, overallSentMessagesQuery, SELF_ID } from "~/db";
|
||||
|
||||
import { Title } from "@solidjs/meta";
|
||||
import type { RouteSectionProps } from "@solidjs/router";
|
||||
import { type Component, Show, createResource } from "solid-js";
|
||||
import { SELF_ID, allThreadsOverviewQuery, overallSentMessagesQuery } from "~/db";
|
||||
import { getNameFromRecipient } from "~/lib/get-name-from-recipient";
|
||||
import { OverviewTable, type RoomOverview } from "./overview-table";
|
||||
|
||||
|
|
|
@ -1,32 +1,29 @@
|
|||
import { type Component, createSignal, For, Match, Show, Switch } from "solid-js";
|
||||
import { useNavigate, usePreloadRoute } from "@solidjs/router";
|
||||
|
||||
import {
|
||||
type ColumnFiltersState,
|
||||
type FilterFn,
|
||||
type SortDirection,
|
||||
type SortingState,
|
||||
createColumnHelper,
|
||||
createSolidTable,
|
||||
type FilterFn,
|
||||
flexRender,
|
||||
getCoreRowModel,
|
||||
getFilteredRowModel,
|
||||
getPaginationRowModel,
|
||||
getSortedRowModel,
|
||||
type SortDirection,
|
||||
type SortingState,
|
||||
} from "@tanstack/solid-table";
|
||||
import { intlFormatDistance } from "date-fns";
|
||||
import { ArrowDown, ArrowUp, ArrowUpDown } from "lucide-solid";
|
||||
|
||||
import { type Component, For, Match, Show, Switch, createSignal } from "solid-js";
|
||||
import { Badge } from "~/components/ui/badge";
|
||||
import { Button } from "~/components/ui/button";
|
||||
import { Checkbox } from "~/components/ui/checkbox";
|
||||
import { Flex } from "~/components/ui/flex";
|
||||
import { Label } from "~/components/ui/label";
|
||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "~/components/ui/table";
|
||||
import { TextField, TextFieldInput } from "~/components/ui/text-field";
|
||||
|
||||
import { cn } from "~/lib/utils";
|
||||
import { Flex } from "~/components/ui/flex";
|
||||
import { dbLoaded, threadSentMessagesOverviewQuery } from "~/db";
|
||||
import { cn } from "~/lib/utils";
|
||||
|
||||
export interface RoomOverview {
|
||||
threadId: number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue