diff --git a/db.sqlite b/db.sqlite index d6868fe..ad30a94 100644 Binary files a/db.sqlite and b/db.sqlite differ diff --git a/db.sqlite-shm b/db.sqlite-shm index 70a5b8d..b401831 100644 Binary files a/db.sqlite-shm and b/db.sqlite-shm differ diff --git a/db.sqlite-wal b/db.sqlite-wal index e94a241..36a9f1c 100644 Binary files a/db.sqlite-wal and b/db.sqlite-wal differ diff --git a/pages/character/[id]/edit.client.vue b/pages/character/[id]/edit.client.vue index 4a3a973..be2344e 100644 --- a/pages/character/[id]/edit.client.vue +++ b/pages/character/[id]/edit.client.vue @@ -71,10 +71,11 @@ const data = ref({ }, abilities: {}, modifiers: {}, + notes: "", }, }); -const peopleOpen = ref(false), trainingOpen = ref(false), modifierOpen = ref(false), abilityOpen = ref(false), trainingTab = ref(0); +const peopleOpen = ref(false), trainingOpen = ref(false), notesOpen = ref(false), abilityOpen = ref(false), trainingTab = ref(0); const raceOptions = computed(() => data.value.progress.race.index !== undefined ? characterConfig.peoples[data.value.progress.race.index!].options : undefined); const selectedRaceOptions = computed(() => raceOptions !== undefined ? data.value.progress.race.progress!.map(e => raceOptions.value![e[0]][e[1]]) : undefined); const trainingPoints = computed(() => raceOptions.value ? data.value.progress.race.progress?.reduce((p, v) => p + (raceOptions.value![v[0]][v[1]].training ?? 0), 0) : 0); @@ -244,7 +245,7 @@ useShortcuts({
- + @@ -267,7 +268,7 @@ useShortcuts({
- + @@ -298,7 +299,7 @@ useShortcuts({ - + @@ -323,6 +324,14 @@ useShortcuts({ + + + + \ No newline at end of file diff --git a/pages/character/[id]/index.client.vue b/pages/character/[id]/index.client.vue index f01cf5b..a056d07 100644 --- a/pages/character/[id]/index.client.vue +++ b/pages/character/[id]/index.client.vue @@ -125,6 +125,10 @@ const { data: character, status, error } = await useAsyncData(() => useRequestFe Aptitudes +
+ Notes + +
diff --git a/server/api/character/[id]/compiled.get.ts b/server/api/character/[id]/compiled.get.ts index 264d0ec..ec70715 100644 --- a/server/api/character/[id]/compiled.get.ts +++ b/server/api/character/[id]/compiled.get.ts @@ -1,7 +1,7 @@ import { and, eq } from 'drizzle-orm'; import useDatabase from '~/composables/useDatabase'; import { characterTable } from '~/db/schema'; -import type { Character, CharacterConfig, CompiledCharacter, DoubleIndex, Feature, MainStat, TrainingLevel, TrainingOption } from '~/types/character'; +import type { Ability, Character, CharacterConfig, CompiledCharacter, DoubleIndex, Feature, MainStat, TrainingLevel, TrainingOption } from '~/types/character'; import characterData from '#shared/character-config.json'; import { users } from '~/drizzle/schema'; @@ -191,13 +191,14 @@ function compileCharacter(character: Character & { username?: string }): Compile }, initiative: 0, aspect: "", + notes: character.progress.notes, }; features.forEach(e => e[1].forEach((_e, i) => applyTrainingOption(e[0], _e, compiled, i === e[1].length - 1))); specialFeatures(compiled, character.progress.training); - Object.entries(character.progress.abilities).forEach(e => compiled.abilities[e[0]] += e[1][0]); - + Object.entries(character.progress.abilities).forEach(e => compiled.abilities[e[0] as Ability]! += e[1][0]); + return compiled; } function applyTrainingOption(stat: MainStat, option: TrainingOption, character: CompiledCharacter, last: boolean) diff --git a/server/tasks/mail.ts b/server/tasks/mail.ts index ebbda7b..bfbb904 100644 --- a/server/tasks/mail.ts +++ b/server/tasks/mail.ts @@ -23,6 +23,8 @@ interface MailPayload data: Record } +console.log(config); + const transport = nodemailer.createTransport({ //@ts-ignore pool: true, diff --git a/types/character.d.ts b/types/character.d.ts index 5f32538..39b3cb1 100644 --- a/types/character.d.ts +++ b/types/character.d.ts @@ -19,6 +19,7 @@ export type Progression = { spells?: string[]; //Spell ID modifiers: Partial>; aspect?: string; + notes: string; }; export type Character = { id: number; @@ -148,4 +149,6 @@ export type CompiledCharacter = { abilities: Partial>; level: number; features: Record; //Currently: List of training option as text. TODO: Update to a more complex structure later + + notes: string; }; \ No newline at end of file