feat: implementing experience page (#718)

* feat: add color scheme toggle
* feat: colorScheme stored in UserSettings model
* feat: add stories
* fix: AnimatePresence exit not working

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
Jérémy M
2023-07-18 19:47:27 +02:00
committed by GitHub
parent 4ec93d4b6a
commit 19e165fc05
137 changed files with 2792 additions and 75 deletions

View File

@ -0,0 +1,10 @@
import { registerEnumType } from '@nestjs/graphql';
export enum ColorScheme {
Light = "Light",
Dark = "Dark",
System = "System"
}
registerEnumType(ColorScheme, { name: 'ColorScheme', description: undefined })

View File

@ -0,0 +1,10 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { ColorScheme } from './color-scheme.enum';
@InputType()
export class EnumColorSchemeFieldUpdateOperationsInput {
@Field(() => ColorScheme, {nullable:true})
set?: keyof typeof ColorScheme;
}

View File

@ -0,0 +1,20 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { ColorScheme } from './color-scheme.enum';
import { NestedEnumColorSchemeFilter } from './nested-enum-color-scheme-filter.input';
@InputType()
export class EnumColorSchemeFilter {
@Field(() => ColorScheme, {nullable:true})
equals?: keyof typeof ColorScheme;
@Field(() => [ColorScheme], {nullable:true})
in?: Array<keyof typeof ColorScheme>;
@Field(() => [ColorScheme], {nullable:true})
notIn?: Array<keyof typeof ColorScheme>;
@Field(() => NestedEnumColorSchemeFilter, {nullable:true})
not?: NestedEnumColorSchemeFilter;
}

View File

@ -0,0 +1,31 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { ColorScheme } from './color-scheme.enum';
import { NestedEnumColorSchemeWithAggregatesFilter } from './nested-enum-color-scheme-with-aggregates-filter.input';
import { NestedIntFilter } from './nested-int-filter.input';
import { NestedEnumColorSchemeFilter } from './nested-enum-color-scheme-filter.input';
@InputType()
export class EnumColorSchemeWithAggregatesFilter {
@Field(() => ColorScheme, {nullable:true})
equals?: keyof typeof ColorScheme;
@Field(() => [ColorScheme], {nullable:true})
in?: Array<keyof typeof ColorScheme>;
@Field(() => [ColorScheme], {nullable:true})
notIn?: Array<keyof typeof ColorScheme>;
@Field(() => NestedEnumColorSchemeWithAggregatesFilter, {nullable:true})
not?: NestedEnumColorSchemeWithAggregatesFilter;
@Field(() => NestedIntFilter, {nullable:true})
_count?: NestedIntFilter;
@Field(() => NestedEnumColorSchemeFilter, {nullable:true})
_min?: NestedEnumColorSchemeFilter;
@Field(() => NestedEnumColorSchemeFilter, {nullable:true})
_max?: NestedEnumColorSchemeFilter;
}

View File

@ -0,0 +1,19 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { ColorScheme } from './color-scheme.enum';
@InputType()
export class NestedEnumColorSchemeFilter {
@Field(() => ColorScheme, {nullable:true})
equals?: keyof typeof ColorScheme;
@Field(() => [ColorScheme], {nullable:true})
in?: Array<keyof typeof ColorScheme>;
@Field(() => [ColorScheme], {nullable:true})
notIn?: Array<keyof typeof ColorScheme>;
@Field(() => NestedEnumColorSchemeFilter, {nullable:true})
not?: NestedEnumColorSchemeFilter;
}

View File

@ -0,0 +1,30 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { ColorScheme } from './color-scheme.enum';
import { NestedIntFilter } from './nested-int-filter.input';
import { NestedEnumColorSchemeFilter } from './nested-enum-color-scheme-filter.input';
@InputType()
export class NestedEnumColorSchemeWithAggregatesFilter {
@Field(() => ColorScheme, {nullable:true})
equals?: keyof typeof ColorScheme;
@Field(() => [ColorScheme], {nullable:true})
in?: Array<keyof typeof ColorScheme>;
@Field(() => [ColorScheme], {nullable:true})
notIn?: Array<keyof typeof ColorScheme>;
@Field(() => NestedEnumColorSchemeWithAggregatesFilter, {nullable:true})
not?: NestedEnumColorSchemeWithAggregatesFilter;
@Field(() => NestedIntFilter, {nullable:true})
_count?: NestedIntFilter;
@Field(() => NestedEnumColorSchemeFilter, {nullable:true})
_min?: NestedEnumColorSchemeFilter;
@Field(() => NestedEnumColorSchemeFilter, {nullable:true})
_max?: NestedEnumColorSchemeFilter;
}