(grammar) make short column header name optional

This commit is contained in:
Valentyne Stigloher 2025-04-19 12:44:11 +02:00
parent bf39ca90a4
commit 58387c710b
2 changed files with 15 additions and 9 deletions

View File

@ -80,10 +80,13 @@ const rowHeaderCount = computed(() => {
<tr>
<th v-if="rowHeaderCount" :colspan="rowHeaderCount"></th>
<th v-for="header in grammarTable.columnHeader" :key="header.name">
<Spelling class="d-none d-md-inline" :text="header.name" />
<Tooltip class="d-md-none" :text="header.name">
<Spelling :text="header.short" />
</Tooltip>
<template v-if="header.short">
<Spelling class="d-none d-md-inline" :text="header.name" />
<Tooltip class="d-md-none" :text="header.name">
<Spelling :text="header.short" />
</Tooltip>
</template>
<Spelling v-else :text="header.name" />
</th>
</tr>
</thead>
@ -95,10 +98,13 @@ const rowHeaderCount = computed(() => {
>
<th v-if="i === 0 && rowHeaderCount >= 1" :rowspan="section.variants.length">
<template v-if="section.header">
<Spelling class="d-none d-md-inline" :text="section.header.name" />
<Tooltip class="d-md-none" :text="section.header.name">
<Spelling :text="section.header.short" />
</Tooltip>
<template v-if="section.header.short">
<Spelling class="d-none d-md-inline" :text="section.header.name" />
<Tooltip class="d-md-none" :text="section.header.name">
<Spelling :text="section.header.short" />
</Tooltip>
</template>
<Spelling v-else :text="section.header.name" />>
</template>
</th>
<template v-if="rowHeaderCount >= 2">

View File

@ -2,7 +2,7 @@ import type { MorphemeValue } from '~/src/language/morphemes.ts';
export interface Header {
name: string;
short: string;
short?: string;
}
export interface GrammarTableDefinition {