Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

refactor: reorganise client "issues" feature #161

Draft
wants to merge 47 commits into
base: development
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
6017e5e
build: don't comment out api services via script
stefanprobst Jul 8, 2023
04c7297
build: bump node version to 18
stefanprobst Jul 8, 2023
a1fe06f
chore: update tiptap packages to not use beta version
stefanprobst Jul 8, 2023
ac662cc
chore: remove node-fetch which is no longer needed in node 18, bump deps
stefanprobst Jul 8, 2023
a072603
refactor: validate client env vars, update api client codegen, clean …
stefanprobst Jul 8, 2023
05aff3d
chore: add script for e2e test of local production build
stefanprobst Jul 8, 2023
de934b3
chore: consistently use import path aliases
stefanprobst Jul 8, 2023
7a06294
refactor: use regular css instead of stylus [skip ci]
stefanprobst Jul 8, 2023
da4a283
chore: update stylelint config
stefanprobst Jul 8, 2023
d1ff4dc
fix: improve script compat on windows [skip ci]
stefanprobst Jul 8, 2023
156d992
refactor: move script blocks to top in sfc
stefanprobst Jul 8, 2023
d4fee99
chore: prefer named exports for vue plugins
stefanprobst Jul 8, 2023
55ece00
refactor: move router and plugins to lib folder
stefanprobst Jul 9, 2023
6692593
refactor: wrap issue page in explicit page component (for easier futu…
stefanprobst Jul 9, 2023
3b6407d
docs: split contributing guidelines from readme
stefanprobst Jul 9, 2023
8605e19
chore: remove unused assets folder with vue logo
stefanprobst Jul 9, 2023
7192370
refactor: move issues section to feature folder [skip ci]
stefanprobst Jul 10, 2023
240facd
chore: add stylelint disable for autoprefixer
stefanprobst Jul 10, 2023
088e220
build: disable vue runtime compiler
stefanprobst Jul 10, 2023
42e0a7b
build: run validate action on node 18 [skip ci]
stefanprobst Jul 10, 2023
eb9fd46
fix: fix wrong import
stefanprobst Jul 10, 2023
c77b906
refactor: remove date container class [skip ci]
stefanprobst Jul 10, 2023
25342e0
refactor: extract app global css
stefanprobst Jul 10, 2023
befbab9
fix: update tiptap to upstream breaking changes
stefanprobst Jul 11, 2023
471080a
refactor: move app.vue to composition api [skip ci]
stefanprobst Jul 11, 2023
8c85e72
refactor: define types for emits
stefanprobst Jul 11, 2023
42a91b0
revert: pin openapi-typescript-codegen version for now
stefanprobst Jul 11, 2023
2c25de5
refactor: spinner and drawer [skip ci]
stefanprobst Jul 11, 2023
d4e9574
refactor: move global-search and sidebar to composition api [skip ci]
stefanprobst Jul 12, 2023
4e76724
refactor: move more components to composition api [skip ci]
stefanprobst Jul 13, 2023
de7f575
refactor: move more components to composition api [skip ci]
stefanprobst Jul 13, 2023
90e7770
refactor: replace human-readable-numbers with intl.numberformat
stefanprobst Jul 13, 2023
3a5d90f
refactor: move more components to composition api
stefanprobst Jul 14, 2023
d05bf2f
chore: delete unused issue-navigation component
stefanprobst Jul 14, 2023
c71b0cf
refactor: move another component to composition api
stefanprobst Jul 14, 2023
241a516
refactor: move even more components to composition api
stefanprobst Jul 14, 2023
f9c78dd
chore: remove unused column-matcher
stefanprobst Jul 14, 2023
11a2c35
chore: remove unused component lobid-gnd-search-results
stefanprobst Jul 14, 2023
6940396
refactor: move more components to composition api
stefanprobst Jul 14, 2023
769828a
refactor: move rest of lemma feature to composition api [skip ci]
stefanprobst Jul 15, 2023
83eb712
refactor: move last components to composition api, always check for n…
stefanprobst Jul 15, 2023
e85aea1
chore: cleanup [skip ci]
stefanprobst Jul 17, 2023
1e4fc6d
fix: don't immediately update date field [skip ci]
stefanprobst Jul 18, 2023
62118bd
fix: use bearer prefix for token authentication
stefanprobst Jul 18, 2023
bf4c513
chore: cleanup [skip ci]
stefanprobst Jul 18, 2023
5c80356
fix: call next in navigation guards [skip ci]
stefanprobst Jul 21, 2023
3b00a43
fix: integrate changes from dev branch [skip ci]
stefanprobst Jul 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: move more components to composition api [skip ci]
stefanprobst committed Jul 13, 2023
commit de7f57560fa742b6ac163c9288c27e127ad12490
4 changes: 2 additions & 2 deletions src/features/common/global-search.vue
Original file line number Diff line number Diff line change
@@ -133,9 +133,9 @@ function onOpenSelectedResult() {
store.search.addRecentSearchItem(selectedLemma.value);

if (item.list != null) {
router.push({ path: `/lemmas/list/${item.list.id}`, query: { focus: String(item.id) } });
router.push({ path: `/lemmata/list/${item.list.id}`, query: { focus: String(item.id) } });
} else {
router.push({ path: "/lemmas", query: { focus: String(item.id) } });
router.push({ path: "/lemmata", query: { focus: String(item.id) } });
}
}

51 changes: 23 additions & 28 deletions src/features/common/lemma-details.vue
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ const emit = defineEmits<{
}>();

const showGndSearch = ref(false);
const detailPage = ref(0);
const detailPage = ref(0); /** "Dateien" tab. */
const genderOptions = Object.values(GenderAe0Enum);

const zoteroSections = [
@@ -76,7 +76,7 @@ function onDragEnter(event: DragEvent) {
const target = event.currentTarget as HTMLElement;
dragEventDepth++;
target.classList.add(dragClassName);
detailPage.value = 1;
detailPage.value = 1; /** "Dateien" tab. */
}
}

@@ -114,6 +114,7 @@ function isValidFile(file: File) {
return file.type !== "";
}

// FIXME: how are these actually uploaded?
function uploadFiles(fileList: FileList) {
const { valid, invalid } = groupBy([...fileList], (file) =>
isValidFile(file) ? "valid" : "invalid",
@@ -247,47 +248,46 @@ const debouncedUpdateData = debounce(updateData, 300);

<VDivider />

<!-- FIXME: why button-toggle+window instead of tabs? -->
<div class="overflow-y-auto flex-grow-1">
<VWindow :value="detailPage">
<VWindowItem>
<h4
class="py-2 px-5 background darken-1 d-flex"
:style="{
zIndex: 1,
background: '',
position: 'sticky',
top: 0,
background: '',
zIndex: 1,
}"
>
Basisdaten
<VSpacer />
<SelectMenu
btn-class="px-2 background darken-2"
:items="store.lemma.lemmaLists"
key-description="editor.name"
key-name="title"
key-value="id"
no-selection-text="keine Liste"
prepend-icon="mdi-format-list-bulleted"
search-placeholder="Liste suchen …"
no-selection-text="keine Liste"
:show-chevron="true"
:value="value.list || null"
:items="store.lemma.lemmaLists"
key-name="title"
key-description="editor.name"
key-value="id"
@input="updateList"
/>
</h4>

<VCardText>
<!-- @vue-expect-error -->
<TextField
:required="true"
:label="lemmaRowTranslations.firstName.de"
:required="true"
:value="value.firstName"
@input="debouncedUpdateData({ firstName: $event })"
/>
<!-- @vue-expect-error -->
<TextField
:required="true"
:label="lemmaRowTranslations.lastName.de"
:required="true"
:value="value.lastName"
@input="debouncedUpdateData({ lastName: $event })"
/>
@@ -297,15 +297,14 @@ const debouncedUpdateData = debounce(updateData, 300);
:value="value.alternativeNames"
@submit="updateUserColumns('alternativeNames', $event)"
/>
<!-- @vue-expect-error -->
<TextField :label="lemmaRowTranslations.gender.de">
<template #input>
<VBtnToggle
class="transparent mt-1 ml-1"
active-class="background darken-3"
:value="value.gender"
borderless
class="transparent mt-1 ml-1"
max="1"
:value="value.gender"
@change="debouncedUpdateData({ gender: $event })"
>
<div v-for="genderOption in genderOptions" :key="genderOption">
@@ -320,7 +319,7 @@ const debouncedUpdateData = debounce(updateData, 300);
small
class="rounded-lg ml-5"
icon
@click="value.gender = undefined"
@click="debouncedUpdateData({ gender: undefined })"
>
<VIcon>mdi-close-circle-outline</VIcon>
</VBtn>
@@ -359,38 +358,33 @@ const debouncedUpdateData = debounce(updateData, 300);
@input="updateUserColumns('alternativeNobleTitle', $event)"
/>
<VSpacer class="my-5" />
<!-- @vue-expect-error -->
<DateField
:key="'dateOfBirth_' + value.id"
:label="lemmaRowTranslations.dateOfBirth.de"
:date="value.dateOfBirth"
:label="lemmaRowTranslations.dateOfBirth.de"
@submit="debouncedUpdateData({ dateOfBirth: $event })"
/>
<!-- @vue-expect-error -->
<DateField
:key="'dateOfDeath_' + value.id"
:label="lemmaRowTranslations.dateOfDeath.de"
:date="value.dateOfDeath"
:label="lemmaRowTranslations.dateOfDeath.de"
@submit="debouncedUpdateData({ dateOfDeath: $event })"
/>
<VSpacer class="my-5" />
<!-- @vue-expect-error -->
<TextField
style="min-height: 60px"
:label="lemmaRowTranslations.kinship.de"
:allow-new-line="true"
:value="value.kinship"
@input="debouncedUpdateData({ kinship: $event })"
/>
<!-- @vue-expect-error -->
<TextField
style="min-height: 60px"
:label="lemmaRowTranslations.bioNote.de"
:allow-new-line="true"
:value="value.bioNote"
@input="debouncedUpdateData({ bioNote: $event })"
/>
<!-- @vue-expect-error -->
<TextField
style="min-height: 60px"
:label="lemmaRowTranslations.religion.de"
@@ -399,7 +393,6 @@ const debouncedUpdateData = debounce(updateData, 300);
@input="debouncedUpdateData({ religion: $event })"
/>
<VSpacer class="my-5" />
<!-- @vue-expect-error -->
<TextField
style="min-height: 60px"
:label="lemmaRowTranslations.professionDetail.de"
@@ -414,7 +407,6 @@ const debouncedUpdateData = debounce(updateData, 300);
@input="debouncedUpdateData({ professionGroup: $event })"
/>
<VSpacer class="my-5" />
<!-- @vue-expect-error -->
<TextField
style="min-height: 60px"
:label="lemmaRowTranslations.notes.de"
@@ -433,7 +425,6 @@ const debouncedUpdateData = debounce(updateData, 300);
background: '',
}"
>
<!-- @vue-expect-error -->
{{ lemmaRowTranslations.columns_user.de }}
</h4>
<VCardText class="pt-0">
@@ -446,6 +437,7 @@ const debouncedUpdateData = debounce(updateData, 300);
/>
</VCardText>
</VWindowItem>

<VWindowItem>
<h4 class="py-2 px-5 background d-flex">
Dateien
@@ -463,9 +455,10 @@ const debouncedUpdateData = debounce(updateData, 300);
</VBtn>
</h4>
<VCardText class="flex-grow-1">
<vue-file-list :value="files" @input="files = $event" />
<VueFileList :value="files" @input="files = $event" />
</VCardText>
</VWindowItem>

<VWindowItem>
<VExpansionPanels accordion flat>
<ZoteroManager
@@ -477,6 +470,7 @@ const debouncedUpdateData = debounce(updateData, 300);
@submit="debouncedUpdateData({ [zoteroSection.column]: $event })"
/>
</VExpansionPanels>

<VCard flat class="rounded-lg" color="transparent">
<VCardTitle class="pt-0 background">Legacy (Gideon)</VCardTitle>
<VCardText class="pt-0 background">
@@ -494,6 +488,7 @@ const debouncedUpdateData = debounce(updateData, 300);
</VCardText>
</VCard>
</VWindowItem>

<VWindowItem>
<h4 class="py-2 px-5 background d-flex">
GND: {{ value.gnd[0] }}
Loading