Skip to content

Commit c7a8c1c

Browse files
author
github-actions[bot]
committed
[Actions] style: improve formatting [skip ci]
1 parent 6fbb0ae commit c7a8c1c

16 files changed

+143
-135
lines changed

episko_gui_backend/src/commands.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ use tokio::sync::Mutex;
44
use uuid::Uuid;
55

66
use episko_lib::{
7-
database::{DatabaseObject, Filter, retrieve_metadata::Pagination},
7+
database::{retrieve_metadata::Pagination, DatabaseObject, Filter},
88
files::File,
9-
metadata::{Category, Language, Metadata, MetadataPreview, metadata_handler::MetadataHandler},
9+
metadata::{metadata_handler::MetadataHandler, Category, Language, Metadata, MetadataPreview},
1010
};
1111

12-
use crate::{AppState, Error, model::MetadataDco, model::MetadataDto};
12+
use crate::{model::MetadataDco, model::MetadataDto, AppState, Error};
1313

1414
static PAGE_SIZE: u32 = 10;
1515

episko_lib/src/database.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ pub mod db_test {
9191

9292
use super::*;
9393
use crate::{
94+
metadata::{property::Property as _, Metadata, *},
9495
ApplyIf as _,
95-
metadata::{Metadata, property::Property as _, *},
9696
};
9797
use chrono::{TimeDelta, Utc};
9898

@@ -164,7 +164,7 @@ pub mod db_test {
164164
mod test {
165165
use sqlx::SqlitePool;
166166

167-
use crate::database::{DatabaseHandler, db_test::fill_db};
167+
use crate::database::{db_test::fill_db, DatabaseHandler};
168168

169169
#[sqlx::test]
170170
async fn setup_test_db(conn: SqlitePool) {

episko_lib/src/database/database_handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
use std::time::Duration;
33

44
use sqlx::{
5-
SqlitePool,
65
migrate::{MigrateDatabase, Migrator},
76
sqlite::{SqliteConnectOptions, SqlitePoolOptions},
7+
SqlitePool,
88
};
99

1010
use sqlx::ConnectOptions;

episko_lib/src/database/database_object.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
use std::{future::Future, pin::Pin};
33

44
use super::Result;
5-
use sqlx::{FromRow, SqliteExecutor, sqlite::SqliteRow};
5+
use sqlx::{sqlite::SqliteRow, FromRow, SqliteExecutor};
66

77
pub type BoxedFuture<'r, T> = Pin<Box<dyn Future<Output = T> + Send + 'r>>;
88
pub use episko_derive::DatabaseObject;

episko_lib/src/database/retrieve_metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::{
2-
DatabaseHandler, Filter, Result,
32
dao::{ConversionError, MetadataDao, MetadataPreviewDao},
3+
DatabaseHandler, Filter, Result,
44
};
55
use crate::metadata::{Metadata, MetadataPreview};
66
use sqlx::{QueryBuilder, Row};

src/app.css

Lines changed: 97 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -4,110 +4,109 @@
44
@config '../tailwind.config.ts';
55

66
@layer base {
7-
:root {
8-
--background: 0 0% 100%;
9-
--foreground: 240 10% 3.9%;
10-
--card: 0 0% 100%;
11-
--card-foreground: 240 10% 3.9%;
12-
--popover: 0 0% 100%;
13-
--popover-foreground: 240 10% 3.9%;
14-
--primary: 142.1 76.2% 36.3%;
15-
--primary-foreground: 355.7 100% 97.3%;
16-
--secondary: 240 4.8% 95.9%;
17-
--secondary-foreground: 240 5.9% 10%;
18-
--muted: 240 4.8% 95.9%;
19-
--muted-foreground: 240 3.8% 46.1%;
20-
--accent: 240 4.8% 95.9%;
21-
--accent-foreground: 240 5.9% 10%;
22-
--destructive: 0 72.22% 50.59%;
23-
--destructive-foreground: 0 0% 98%;
24-
--border: 240 5.9% 90%;
25-
--input: 240 5.9% 90%;
26-
--ring: 142.1 76.2% 36.3%;
27-
--radius: 0.5rem;
28-
--sidebar-background: 0 0% 98%;
29-
--sidebar-foreground: 240 5.3% 26.1%;
30-
--sidebar-primary: 240 5.9% 10%;
31-
--sidebar-primary-foreground: 0 0% 98%;
32-
--sidebar-accent: 240 4.8% 95.9%;
33-
--sidebar-accent-foreground: 240 5.9% 10%;
34-
--sidebar-border: 220 13% 91%;
35-
--sidebar-ring: 217.2 91.2% 59.8%;
36-
}
7+
:root {
8+
--background: 0 0% 100%;
9+
--foreground: 240 10% 3.9%;
10+
--card: 0 0% 100%;
11+
--card-foreground: 240 10% 3.9%;
12+
--popover: 0 0% 100%;
13+
--popover-foreground: 240 10% 3.9%;
14+
--primary: 142.1 76.2% 36.3%;
15+
--primary-foreground: 355.7 100% 97.3%;
16+
--secondary: 240 4.8% 95.9%;
17+
--secondary-foreground: 240 5.9% 10%;
18+
--muted: 240 4.8% 95.9%;
19+
--muted-foreground: 240 3.8% 46.1%;
20+
--accent: 240 4.8% 95.9%;
21+
--accent-foreground: 240 5.9% 10%;
22+
--destructive: 0 72.22% 50.59%;
23+
--destructive-foreground: 0 0% 98%;
24+
--border: 240 5.9% 90%;
25+
--input: 240 5.9% 90%;
26+
--ring: 142.1 76.2% 36.3%;
27+
--radius: 0.5rem;
28+
--sidebar-background: 0 0% 98%;
29+
--sidebar-foreground: 240 5.3% 26.1%;
30+
--sidebar-primary: 240 5.9% 10%;
31+
--sidebar-primary-foreground: 0 0% 98%;
32+
--sidebar-accent: 240 4.8% 95.9%;
33+
--sidebar-accent-foreground: 240 5.9% 10%;
34+
--sidebar-border: 220 13% 91%;
35+
--sidebar-ring: 217.2 91.2% 59.8%;
36+
}
3737

38-
.dark {
39-
--background: 20 14.3% 4.1%;
40-
--foreground: 0 0% 95%;
41-
--card: 24 9.8% 10%;
42-
--card-foreground: 0 0% 95%;
43-
--popover: 0 0% 9%;
44-
--popover-foreground: 0 0% 95%;
45-
--primary: 142.1 70.6% 45.3%;
46-
--primary-foreground: 144.9 80.4% 10%;
47-
--secondary: 240 3.7% 15.9%;
48-
--secondary-foreground: 0 0% 98%;
49-
--muted: 0 0% 15%;
50-
--muted-foreground: 240 5% 64.9%;
51-
--accent: 12 6.5% 15.1%;
52-
--accent-foreground: 0 0% 98%;
53-
--destructive: 0 62.8% 30.6%;
54-
--destructive-foreground: 0 85.7% 97.3%;
55-
--border: 240 3.7% 15.9%;
56-
--input: 240 3.7% 15.9%;
57-
--ring: 142.4 71.8% 29.2%;
58-
--sidebar-background: 240 5.9% 10%;
59-
--sidebar-foreground: 240 4.8% 95.9%;
60-
--sidebar-primary: 0 0% 98%;
61-
--sidebar-primary-foreground: 240 5.9% 10%;
62-
--sidebar-accent: 240 3.7% 15.9%;
63-
--sidebar-accent-foreground: 240 4.8% 95.9%;
64-
--sidebar-border: 240 3.7% 15.9%;
65-
--sidebar-ring: 217.2 91.2% 59.8%;
66-
}
38+
.dark {
39+
--background: 20 14.3% 4.1%;
40+
--foreground: 0 0% 95%;
41+
--card: 24 9.8% 10%;
42+
--card-foreground: 0 0% 95%;
43+
--popover: 0 0% 9%;
44+
--popover-foreground: 0 0% 95%;
45+
--primary: 142.1 70.6% 45.3%;
46+
--primary-foreground: 144.9 80.4% 10%;
47+
--secondary: 240 3.7% 15.9%;
48+
--secondary-foreground: 0 0% 98%;
49+
--muted: 0 0% 15%;
50+
--muted-foreground: 240 5% 64.9%;
51+
--accent: 12 6.5% 15.1%;
52+
--accent-foreground: 0 0% 98%;
53+
--destructive: 0 62.8% 30.6%;
54+
--destructive-foreground: 0 85.7% 97.3%;
55+
--border: 240 3.7% 15.9%;
56+
--input: 240 3.7% 15.9%;
57+
--ring: 142.4 71.8% 29.2%;
58+
--sidebar-background: 240 5.9% 10%;
59+
--sidebar-foreground: 240 4.8% 95.9%;
60+
--sidebar-primary: 0 0% 98%;
61+
--sidebar-primary-foreground: 240 5.9% 10%;
62+
--sidebar-accent: 240 3.7% 15.9%;
63+
--sidebar-accent-foreground: 240 4.8% 95.9%;
64+
--sidebar-border: 240 3.7% 15.9%;
65+
--sidebar-ring: 217.2 91.2% 59.8%;
66+
}
6767
}
6868

6969
@layer base {
70-
* {
71-
border-color: var(--color-base-300);
70+
* {
71+
border-color: var(--color-base-300);
72+
}
7273

73-
}
74-
75-
body {
76-
@apply bg-background text-foreground;
77-
}
74+
body {
75+
@apply bg-background text-foreground;
76+
}
7877
}
7978

8079
@plugin "daisyui/theme" {
81-
name: "forest";
82-
default: true;
83-
prefersdark: true;
84-
color-scheme: "dark";
85-
--color-base-100: oklch(20.84% 0.008 17.911);
86-
--color-base-200: oklch(18.522% 0.007 17.911);
87-
--color-base-300: oklch(16.203% 0.007 17.911);
88-
--color-base-content: oklch(83.768% 0.001 17.911);
89-
--color-primary: oklch(68.628% 0.185 148.958);
90-
--color-primary-content: oklch(0% 0 0);
91-
--color-secondary: oklch(69.776% 0.135 168.327);
92-
--color-secondary-content: oklch(13.955% 0.027 168.327);
93-
--color-accent: oklch(70.628% 0.119 185.713);
94-
--color-accent-content: oklch(14.125% 0.023 185.713);
95-
--color-neutral: oklch(30.698% 0.039 171.364);
96-
--color-neutral-content: oklch(86.139% 0.007 171.364);
97-
--color-info: oklch(72.06% 0.191 231.6);
98-
--color-info-content: oklch(0% 0 0);
99-
--color-success: oklch(64.8% 0.15 160);
100-
--color-success-content: oklch(0% 0 0);
101-
--color-warning: oklch(84.71% 0.199 83.87);
102-
--color-warning-content: oklch(0% 0 0);
103-
--color-error: oklch(71.76% 0.221 22.18);
104-
--color-error-content: oklch(0% 0 0);
105-
--radius-selector: 1rem;
106-
--radius-field: 2rem;
107-
--radius-box: 1rem;
108-
--size-selector: 0.25rem;
109-
--size-field: 0.25rem;
110-
--border: 1px;
111-
--depth: 0;
112-
--noise: 0;
80+
name: 'forest';
81+
default: true;
82+
prefersdark: true;
83+
color-scheme: 'dark';
84+
--color-base-100: oklch(20.84% 0.008 17.911);
85+
--color-base-200: oklch(18.522% 0.007 17.911);
86+
--color-base-300: oklch(16.203% 0.007 17.911);
87+
--color-base-content: oklch(83.768% 0.001 17.911);
88+
--color-primary: oklch(68.628% 0.185 148.958);
89+
--color-primary-content: oklch(0% 0 0);
90+
--color-secondary: oklch(69.776% 0.135 168.327);
91+
--color-secondary-content: oklch(13.955% 0.027 168.327);
92+
--color-accent: oklch(70.628% 0.119 185.713);
93+
--color-accent-content: oklch(14.125% 0.023 185.713);
94+
--color-neutral: oklch(30.698% 0.039 171.364);
95+
--color-neutral-content: oklch(86.139% 0.007 171.364);
96+
--color-info: oklch(72.06% 0.191 231.6);
97+
--color-info-content: oklch(0% 0 0);
98+
--color-success: oklch(64.8% 0.15 160);
99+
--color-success-content: oklch(0% 0 0);
100+
--color-warning: oklch(84.71% 0.199 83.87);
101+
--color-warning-content: oklch(0% 0 0);
102+
--color-error: oklch(71.76% 0.221 22.18);
103+
--color-error-content: oklch(0% 0 0);
104+
--radius-selector: 1rem;
105+
--radius-field: 2rem;
106+
--radius-box: 1rem;
107+
--size-selector: 0.25rem;
108+
--size-field: 0.25rem;
109+
--border: 1px;
110+
--depth: 0;
111+
--noise: 0;
113112
}

src/lib/commands.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
import { invoke } from '@tauri-apps/api/core';
2-
import type { Category, Filter, FormMetadata, Language, Metadata, MetadataPreview, PagedMetadataPreview, Uuid } from './types';
2+
import type {
3+
Category,
4+
Filter,
5+
FormMetadata,
6+
Language,
7+
Metadata,
8+
MetadataPreview,
9+
PagedMetadataPreview,
10+
Uuid
11+
} from './types';
312
import { parseMetadata, parseMetadataDco, parseMetadataPreviewArray } from './schemas/metadata';
413
import { PagedMetadataPreviewSchema } from './schemas/pagedData';
514
import { parseCategoryArray } from './schemas/category';
@@ -14,8 +23,8 @@ export default {
1423
let sanitizedFilter: Filter = {
1524
query: filter.query === '' ? null : filter.query,
1625
category: filter.category === '' ? null : filter.category,
17-
language: filter.language === '' ? null : filter.language,
18-
}
26+
language: filter.language === '' ? null : filter.language
27+
};
1928

2029
return invoke('get_all', { pageNumber: pageNumber, filter: sanitizedFilter }).then((data) =>
2130
PagedMetadataPreviewSchema.parse(data)

src/lib/components/ui/accordion/accordion-content.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
2-
import { Accordion as AccordionPrimitive, type WithoutChild } from "bits-ui";
3-
import { cn } from "$lib/utils.js";
2+
import { Accordion as AccordionPrimitive, type WithoutChild } from 'bits-ui';
3+
import { cn } from '$lib/utils.js';
44
55
let {
66
ref = $bindable(null),
@@ -13,7 +13,7 @@
1313
<AccordionPrimitive.Content
1414
bind:ref
1515
class={cn(
16-
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm transition-all",
16+
'data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm transition-all',
1717
className
1818
)}
1919
{...restProps}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
2-
import { Accordion as AccordionPrimitive } from "bits-ui";
3-
import { cn } from "$lib/utils.js";
2+
import { Accordion as AccordionPrimitive } from 'bits-ui';
3+
import { cn } from '$lib/utils.js';
44
55
let {
66
ref = $bindable(null),
@@ -9,4 +9,4 @@
99
}: AccordionPrimitive.ItemProps = $props();
1010
</script>
1111

12-
<AccordionPrimitive.Item bind:ref class={cn("border-b", className)} {...restProps} />
12+
<AccordionPrimitive.Item bind:ref class={cn('border-b', className)} {...restProps} />

src/lib/components/ui/accordion/accordion-trigger.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
2-
import { Accordion as AccordionPrimitive, type WithoutChild } from "bits-ui";
3-
import ChevronDown from "@lucide/svelte/icons/chevron-down";
4-
import { cn } from "$lib/utils.js";
2+
import { Accordion as AccordionPrimitive, type WithoutChild } from 'bits-ui';
3+
import ChevronDown from '@lucide/svelte/icons/chevron-down';
4+
import { cn } from '$lib/utils.js';
55
66
let {
77
ref = $bindable(null),
@@ -10,15 +10,15 @@
1010
children,
1111
...restProps
1212
}: WithoutChild<AccordionPrimitive.TriggerProps> & {
13-
level?: AccordionPrimitive.HeaderProps["level"];
13+
level?: AccordionPrimitive.HeaderProps['level'];
1414
} = $props();
1515
</script>
1616

1717
<AccordionPrimitive.Header {level} class="flex">
1818
<AccordionPrimitive.Trigger
1919
bind:ref
2020
class={cn(
21-
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
21+
'flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
2222
className
2323
)}
2424
{...restProps}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Accordion as AccordionPrimitive } from "bits-ui";
2-
import Content from "./accordion-content.svelte";
3-
import Item from "./accordion-item.svelte";
4-
import Trigger from "./accordion-trigger.svelte";
1+
import { Accordion as AccordionPrimitive } from 'bits-ui';
2+
import Content from './accordion-content.svelte';
3+
import Item from './accordion-item.svelte';
4+
import Trigger from './accordion-trigger.svelte';
55
const Root = AccordionPrimitive.Root;
66

77
export {
@@ -13,5 +13,5 @@ export {
1313
Root as Accordion,
1414
Content as AccordionContent,
1515
Item as AccordionItem,
16-
Trigger as AccordionTrigger,
16+
Trigger as AccordionTrigger
1717
};

src/lib/schemas/category.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const CategorySchema = z.object({
66
});
77

88
export function parseCategory(data: unknown): Category {
9-
return CategorySchema.parse(data)
9+
return CategorySchema.parse(data);
1010
}
1111

1212
export function parseCategoryArray(data: unknown): Category[] {

src/lib/schemas/language.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const LanguageSchema = z.object({
77
});
88

99
export function parseLanguage(data: unknown): Language {
10-
return LanguageSchema.parse(data)
10+
return LanguageSchema.parse(data);
1111
}
1212

1313
export function parseLanguageArray(data: unknown): Language[] {

0 commit comments

Comments
 (0)