mirror of
https://github.com/panatgithub/AnkiHeadingSync.git
synced 2026-07-22 06:51:43 +00:00
fix(settings): tighten QA group mapping row layout
中文: 缩减问答题(多级列表)设置行中模板和题目字段区域的宽度,并让问题/答案字段识别摘要保持单行显示。 English: Tighten the QA group note type and title field columns, and keep the detected Q/A slot summary on one line.
This commit is contained in:
parent
ffad94dd18
commit
dc07ca9817
1 changed files with 7 additions and 3 deletions
|
|
@ -274,7 +274,9 @@ export class AnkiHeadingSyncSettingTab extends PluginSettingTab {
|
|||
|
||||
const ankiRow = blockEl.createDiv();
|
||||
ankiRow.style.display = "grid";
|
||||
ankiRow.style.gridTemplateColumns = "minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr)";
|
||||
ankiRow.style.gridTemplateColumns = configId === "qa-group"
|
||||
? "minmax(0, 1.1fr) minmax(0, 0.75fr) minmax(220px, 0.95fr)"
|
||||
: "minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr)";
|
||||
ankiRow.style.alignItems = "center";
|
||||
ankiRow.style.columnGap = "16px";
|
||||
ankiRow.style.rowGap = "8px";
|
||||
|
|
@ -347,13 +349,15 @@ export class AnkiHeadingSyncSettingTab extends PluginSettingTab {
|
|||
}
|
||||
|
||||
const slotFieldGroup = this.createGridControlSlot(containerEl, t("settings.cards.cardTypes.labels.qaGroupSlotFields"));
|
||||
slotFieldGroup.createEl("span", {
|
||||
const slotSummaryEl = slotFieldGroup.createEl("span", {
|
||||
text: qaGroupState.mapping
|
||||
? t("settings.cards.cardTypes.qaGroup.detectedSlots", {
|
||||
count: qaGroupState.mapping.slots.length,
|
||||
})
|
||||
: (selectedModelName.length > 0 ? t("settings.cards.cardTypes.qaGroup.unavailable") : t("settings.cards.cardTypes.qaGroup.noModel")),
|
||||
}).dataset.qaGroupSlotSummary = configId;
|
||||
});
|
||||
slotSummaryEl.dataset.qaGroupSlotSummary = configId;
|
||||
this.applyFluidEllipsis(slotSummaryEl);
|
||||
|
||||
if (qaGroupState.error) {
|
||||
const errorEl = containerEl.createDiv({
|
||||
|
|
|
|||
Loading…
Reference in a new issue