diff --git a/.github/workflows/partial-frontend.yaml b/.github/workflows/partial-frontend.yaml index f84940644..c793c62aa 100644 --- a/.github/workflows/partial-frontend.yaml +++ b/.github/workflows/partial-frontend.yaml @@ -15,7 +15,7 @@ jobs: - uses: pnpm/action-setup@v3.0.0 with: - version: 6.0.2 + version: 9.12.2 - name: Install dependencies run: pnpm install --shamefully-hoist @@ -54,7 +54,7 @@ jobs: - uses: pnpm/action-setup@v3.0.0 with: - version: 6.0.2 + version: 9.12.2 - name: Install dependencies run: pnpm install diff --git a/frontend/assets/css/main.css b/frontend/assets/css/main.css index 8a9d8fa72..185c47f5f 100644 --- a/frontend/assets/css/main.css +++ b/frontend/assets/css/main.css @@ -28,3 +28,61 @@ ::-webkit-scrollbar-thumb:hover { background-color: #9B9B9B; } + +.scroll-bg::-webkit-scrollbar { + width: 0.5rem; +} + +.scroll-bg::-webkit-scrollbar-thumb { + border-radius: 0.25rem; + @apply bg-base-300; +} + +.markdown > :first-child { + margin-top: 0px !important; +} + +.markdown :where(p, ul, ol, dl, blockquote, h1, h2, h3, h4, h5, h6) { + margin-top: var(--y-gap); + margin-bottom: var(--y-gap); +} + +.markdown :where(ul) { + list-style: disc; + margin-left: 2rem; +} + +.markdown :where(ol) { + list-style: decimal; + margin-left: 2rem; +} +/* Heading Styles */ +.markdown :where(h1) { + font-size: 2rem; + font-weight: 700; +} + +.markdown :where(h2) { + font-size: 1.5rem; + font-weight: 700; +} + +.markdown :where(h3) { + font-size: 1.25rem; + font-weight: 700; +} + +.markdown :where(h4) { + font-size: 1rem; + font-weight: 700; +} + +.markdown :where(h5) { + font-size: 0.875rem; + font-weight: 700; +} + +.markdown :where(h6) { + font-size: 0.75rem; + font-weight: 700; +} diff --git a/frontend/components/Base/SectionHeader.vue b/frontend/components/Base/SectionHeader.vue index 387d160fc..9f1a86f25 100644 --- a/frontend/components/Base/SectionHeader.vue +++ b/frontend/components/Base/SectionHeader.vue @@ -4,7 +4,6 @@ class="flex items-center text-3xl font-bold tracking-tight" :class="{ 'text-neutral-content': dark, - 'text-content': !dark, }" > diff --git a/frontend/components/Form/Autocomplete2.vue b/frontend/components/Form/Autocomplete2.vue index 92fef222a..552c5da5c 100644 --- a/frontend/components/Form/Autocomplete2.vue +++ b/frontend/components/Form/Autocomplete2.vue @@ -85,7 +85,10 @@ type Props = { label: string; modelValue: SupportValues | null | undefined; - items: string[] | object[]; + items: { + id: string; + treeString: string; + }[]; display?: string; multiple?: boolean; }; @@ -156,7 +159,7 @@ const matches = index.value.search("*" + search.value + "*"); - let resultIDs = [] + const resultIDs = []; for (let i = 0; i < matches.length; i++) { const match = matches[i]; const item = props.items[parseInt(match.ref)]; @@ -170,9 +173,11 @@ * Resolve the issue of language not being supported */ for (let i = 0; i < props.items.length; i++) { - const item = props.items[i] - if(resultIDs.find(item_ => item_ === item.id) != undefined){continue} - if(item.treeString.indexOf(search.value) > -1){ + const item = props.items[i]; + if (resultIDs.find(item_ => item_ === item.id) !== undefined) { + continue; + } + if (item.treeString.includes(search.value)) { const display = extractDisplay(item); list.push({ id: i, display, value: item }); } diff --git a/frontend/components/Form/TextArea.vue b/frontend/components/Form/TextArea.vue index f208b3274..87207415a 100644 --- a/frontend/components/Form/TextArea.vue +++ b/frontend/components/Form/TextArea.vue @@ -6,10 +6,10 @@ :class="{ 'text-red-600': typeof value === 'string' && - ((maxLength && value.length > maxLength) || (minLength && value.length < minLength)), + ((maxLength !== -1 && value.length > maxLength) || (minLength !== -1 && value.length < minLength)), }" > - {{ typeof value === "string" && (maxLength || minLength) ? `${value.length}/${maxLength}` : "" }} + {{ typeof value === "string" && (maxLength !== -1 || minLength !== -1) ? `${value.length}/${maxLength}` : "" }}