mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-01 20:55:16 +09:00
Rework the filters and fields drawer
The header repeated its own tabs ("Filters and fields" over tabs
reading Filters and Fields, a subtitle restating both counts), and an
empty filter list still showed a Match all/any sentence with nothing
to match.
The pane switch is now the header. An empty Filters pane offers the
filterable fields as one-tap chips; with conditions, the and/or switch
sits between them and Add condition follows the list. The footer
reports how many rows the conditions leave. Fields lists only named
columns and counts shown of total.
ds/Drawer gains `headless` for bodies that bring their own header; the
title stays for assistive tech.
This commit is contained in:
1 parent
026b963c41
commit
ebf19e8a9e
20 files changed
+293
-347
No files matched your search
@@ -23,6 +23,10 @@ import { cn } from '@/lib/utils';
|
||||
// <footer>…</footer>
|
||||
// </form>
|
||||
// </Drawer>
|
||||
//
|
||||
// Pass `headless` when the body opens with its own header (a tab switch, a
|
||||
// toolbar) that already says what the drawer is: the title is then kept for
|
||||
// assistive tech only, instead of stacking a heading above the real one.
|
||||
export function Drawer({
|
||||
open,
|
||||
onOpenChange,
|
||||
@@ -36,24 +40,29 @@ export function Drawer({
|
||||
className,
|
||||
bodyClassName,
|
||||
flush = false,
|
||||
headless = false,
|
||||
children,
|
||||
}) {
|
||||
return (
|
||||
<Sheet open={open} onOpenChange={onOpenChange}>
|
||||
<SheetContent side={side} className={cn('sk-drawer', className)} style={{ width }}>
|
||||
<div className="sk-drawer__head">
|
||||
{icon && (
|
||||
<span className="sk-drawer__ico" style={iconColor ? { color: iconColor } : undefined}>
|
||||
{icon}
|
||||
</span>
|
||||
)}
|
||||
<div>
|
||||
{/* SheetTitle is required by Radix for a11y; keep it as the visible title. */}
|
||||
<SheetTitle className="sk-drawer__title">{title}</SheetTitle>
|
||||
{subtitle && <div className="sk-drawer__sub">{subtitle}</div>}
|
||||
{headless ? (
|
||||
<SheetTitle className="sr-only">{title}</SheetTitle>
|
||||
) : (
|
||||
<div className="sk-drawer__head">
|
||||
{icon && (
|
||||
<span className="sk-drawer__ico" style={iconColor ? { color: iconColor } : undefined}>
|
||||
{icon}
|
||||
</span>
|
||||
)}
|
||||
<div>
|
||||
{/* SheetTitle is required by Radix for a11y; keep it as the visible title. */}
|
||||
<SheetTitle className="sk-drawer__title">{title}</SheetTitle>
|
||||
{subtitle && <div className="sk-drawer__sub">{subtitle}</div>}
|
||||
</div>
|
||||
{headerExtra}
|
||||
</div>
|
||||
{headerExtra}
|
||||
</div>
|
||||
)}
|
||||
<div className={cn('sk-drawer__body', flush && 'sk-drawer__body--flush', bodyClassName)}>
|
||||
{children}
|
||||
</div>
|
||||
|
||||
@@ -7,14 +7,18 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@
|
||||
import { cn } from '@/lib/utils';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
OPS, byKey, columnLabel, coerceValue, emptyValueFor,
|
||||
isFilterable, isSortable, optionsFor,
|
||||
OPS, applyFilters, byKey, columnLabel, coerceValue, emptyValueFor,
|
||||
isDecorative, isFilterable, isSortable, optionsFor,
|
||||
} from './fields';
|
||||
|
||||
// Two panes behind one drawer, because they are the two halves of "what am I
|
||||
// looking at": FILTERS decides which rows, FIELDS decides which columns (and in
|
||||
// what order, at what density, with which detail line). The header menu is the
|
||||
// fast path for one column; this is the whole picture at once.
|
||||
//
|
||||
// The pane switch IS the drawer's header: a title saying "Filters and fields"
|
||||
// above tabs reading "Filters" and "Fields" only repeated them. The footer
|
||||
// answers the question a filter always raises: how many rows are left.
|
||||
export function GridFilterDrawer({
|
||||
open, onOpenChange, columns, rows, cfg, grid, noun = 'rows',
|
||||
// Hosts whose table auto-sizes its columns and has no sub-detail line
|
||||
@@ -30,6 +34,19 @@ export function GridFilterDrawer({
|
||||
const map = byKey(columns);
|
||||
const rules = cfg.filters.rules;
|
||||
const filterable = columns.filter(isFilterable);
|
||||
// A rule can outlive its column's filterability (a saved view from before
|
||||
// a column changed shape); those are skipped everywhere below.
|
||||
const liveRules = rules.filter((rule) => isFilterable(map.get(rule.field)));
|
||||
const allRows = rows || [];
|
||||
const total = allRows.length;
|
||||
const matching = applyFilters(allRows, cfg.filters, columns).length;
|
||||
const singular = noun.replace(/s$/, '');
|
||||
const nounFor = (count) => (count === 1 ? singular : noun);
|
||||
// Action / chevron columns have no name and nothing to toggle, so they are
|
||||
// neither listed nor counted.
|
||||
const namedColumns = columns.filter((column) => !isDecorative(column));
|
||||
const shownCount = cfg.cols.filter((key) => !isDecorative(map.get(key))).length;
|
||||
const hiddenCount = namedColumns.length - shownCount;
|
||||
|
||||
const patchRule = (id, patch) => grid.setRules(
|
||||
rules.map((r) => (r.id === id ? { ...r, ...patch } : r)),
|
||||
@@ -99,126 +116,156 @@ export function GridFilterDrawer({
|
||||
);
|
||||
};
|
||||
|
||||
const panes = [
|
||||
{ key: 'filters', icon: Filter, label: t('app.gridFilterDrawer.filters', 'Filters'), count: liveRules.length || null },
|
||||
{
|
||||
key: 'fields',
|
||||
icon: Layers,
|
||||
label: t('app.gridFilterDrawer.fieldsTab', 'Fields'),
|
||||
// Only worth a badge when something is hidden.
|
||||
count: hiddenCount > 0 ? `${shownCount}/${namedColumns.length}` : null,
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<Drawer
|
||||
open={open}
|
||||
onOpenChange={onOpenChange}
|
||||
title={t('app.gridFilterDrawer.filtersFields', 'Filters and fields')}
|
||||
subtitle={`${t('app.gridFilterDrawer.conditions', { count: rules.length, defaultValue_one: '1 condition', defaultValue_other: '{{count}} conditions' })} · ${t('app.gridFilterDrawer.fieldsShown', { count: cfg.cols.length, defaultValue_one: '1 field shown', defaultValue_other: '{{count}} fields shown' })}`}
|
||||
icon={<Filter size={18} />}
|
||||
iconColor="var(--accent-bright)"
|
||||
headless
|
||||
width={470}
|
||||
flush
|
||||
className="sk-griddrawer"
|
||||
>
|
||||
<div className="sk-griddrawer__tabs">
|
||||
{[['filters', Filter, 'Filters', rules.length], ['fields', Layers, 'Fields', cfg.cols.length]]
|
||||
.map(([key, Icon, text, n]) => (
|
||||
<div className="sk-griddrawer__head">
|
||||
<div className="sk-gridseg sk-griddrawer__switch" role="tablist" aria-label={t('app.gridFilterDrawer.filtersFields', 'Filters and fields')}>
|
||||
{panes.map(({ key, icon: Icon, label, count }) => (
|
||||
<Button variant="unstyled"
|
||||
key={key}
|
||||
type="button"
|
||||
role="tab"
|
||||
aria-selected={tab === key}
|
||||
className={cn(tab === key && 'is-on')}
|
||||
onClick={() => setTab(key)}
|
||||
>
|
||||
<Icon size={14} />{text}<span className="n">{n}</span>
|
||||
<Icon size={14} aria-hidden="true" />{label}
|
||||
{count != null && <span className="sk-griddrawer__n">{count}</span>}
|
||||
</Button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="sk-griddrawer__body">
|
||||
{tab === 'filters' && (
|
||||
<div className="sk-gridsec">
|
||||
<div className="sk-gridsec__head">
|
||||
<div className="sk-gridsec__t">{t('app.gridFilterDrawer.conditions', 'Conditions')}</div>
|
||||
<Button variant="unstyled" type="button" className="sk-gridsec__add" onClick={() => grid.addRule(columns)}>
|
||||
<Plus size={13} />{t('app.gridFilterDrawer.addCondition', 'Add condition')}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div className="sk-gridmatch">
|
||||
{t('app.gridFilterDrawer.match', 'Match')}
|
||||
<div className="sk-gridseg">
|
||||
{['all', 'any'].map((value) => (
|
||||
<Button variant="unstyled"
|
||||
key={value}
|
||||
type="button"
|
||||
className={cn(cfg.filters.match === value && 'is-on')}
|
||||
onClick={() => grid.setMatch(value)}
|
||||
>
|
||||
{value}
|
||||
</Button>
|
||||
))}
|
||||
</div>
|
||||
{t('app.gridFilterDrawer.ofTheFollowing', 'of the following')}
|
||||
</div>
|
||||
|
||||
{rules.length === 0 && (
|
||||
<div className="sk-gridsec__none">
|
||||
{t('app.gridFilterDrawer.noConditionsThisViewShowsEvery', 'No conditions. This view shows every')} {noun.replace(/s$/, '')}.
|
||||
</div>
|
||||
)}
|
||||
|
||||
{rules.map((rule, i) => {
|
||||
const column = map.get(rule.field);
|
||||
// A rule can outlive its column's filterability — a
|
||||
// saved view from before a column changed shape, or
|
||||
// a column whose data went empty. Skip it rather
|
||||
// than look up OPS[undefined] and crash the drawer.
|
||||
if (!column || !isFilterable(column)) return null;
|
||||
return (
|
||||
<div key={rule.id}>
|
||||
{i > 0 && (
|
||||
<div className="sk-gridrule__join">
|
||||
{cfg.filters.match === 'all' ? 'and' : 'or'}
|
||||
{liveRules.length === 0 ? (
|
||||
<div className="sk-gridstart">
|
||||
<p className="sk-gridstart__lead">
|
||||
{t('app.gridFilterDrawer.nothingFiltered', {
|
||||
count: total,
|
||||
noun: nounFor(total),
|
||||
defaultValue_one: 'The only {{noun}} is showing.',
|
||||
defaultValue_other: 'All {{count}} {{noun}} are showing.',
|
||||
})}
|
||||
</p>
|
||||
{filterable.length > 0 && (
|
||||
<>
|
||||
<div className="sk-gridsec__t">{t('app.gridFilterDrawer.filterBy', 'Filter by')}</div>
|
||||
<div className="sk-gridsec__tags">
|
||||
{filterable.map((column) => (
|
||||
<Button variant="unstyled"
|
||||
key={column.key}
|
||||
type="button"
|
||||
className="sk-gridrule__tag sk-gridstart__field"
|
||||
onClick={() => grid.addRule([column])}
|
||||
>
|
||||
<Plus size={12} aria-hidden="true" />{columnLabel(column)}
|
||||
</Button>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
<div className="sk-gridrule">
|
||||
<Select
|
||||
value={rule.field}
|
||||
onValueChange={(key) => {
|
||||
const next = map.get(key);
|
||||
patchRule(rule.id, {
|
||||
field: next.key,
|
||||
op: OPS[next.type][0][0],
|
||||
value: emptyValueFor(next.type),
|
||||
});
|
||||
}}
|
||||
>
|
||||
<SelectTrigger size="sm" className="sk-gridrule__sel" aria-label={t('app.gridFilterDrawer.field', 'Field')}>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{filterable.map((c) => (
|
||||
<SelectItem key={c.key} value={c.key}>{columnLabel(c)}</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Select
|
||||
value={rule.op}
|
||||
onValueChange={(op) => patchRule(rule.id, { op })}
|
||||
>
|
||||
<SelectTrigger size="sm" className="sk-gridrule__sel" aria-label={t('app.gridFilterDrawer.operator', 'Operator')}>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{OPS[column.type].map(([op, text]) => (
|
||||
<SelectItem key={op} value={op}>{text}</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Button variant="unstyled"
|
||||
type="button"
|
||||
className="sk-gridrule__del"
|
||||
onClick={() => grid.removeRule(rule.id)}
|
||||
aria-label={t('app.gridFilterDrawer.removeCondition', 'Remove condition')}
|
||||
>
|
||||
<X size={14} />
|
||||
</Button>
|
||||
<div className="sk-gridrule__value">{valueEditor(rule)}</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
{liveRules.map((rule, i) => {
|
||||
const column = map.get(rule.field);
|
||||
return (
|
||||
<div key={rule.id}>
|
||||
{i > 0 && (
|
||||
// The word between two conditions is the switch for how
|
||||
// they combine; it applies to the whole list.
|
||||
<div className="sk-gridrule__join">
|
||||
<div className="sk-gridseg" role="group" aria-label={t('app.gridFilterDrawer.combine', 'How conditions combine')}>
|
||||
{[
|
||||
['all', t('app.gridFilterDrawer.and', 'and')],
|
||||
['any', t('app.gridFilterDrawer.or', 'or')],
|
||||
].map(([value, text]) => (
|
||||
<Button variant="unstyled"
|
||||
key={value}
|
||||
type="button"
|
||||
aria-pressed={cfg.filters.match === value}
|
||||
className={cn(cfg.filters.match === value && 'is-on')}
|
||||
onClick={() => grid.setMatch(value)}
|
||||
>
|
||||
{text}
|
||||
</Button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<div className="sk-gridrule">
|
||||
<Select
|
||||
value={rule.field}
|
||||
onValueChange={(key) => {
|
||||
const next = map.get(key);
|
||||
patchRule(rule.id, {
|
||||
field: next.key,
|
||||
op: OPS[next.type][0][0],
|
||||
value: emptyValueFor(next.type),
|
||||
});
|
||||
}}
|
||||
>
|
||||
<SelectTrigger size="sm" className="sk-gridrule__sel" aria-label={t('app.gridFilterDrawer.field', 'Field')}>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{filterable.map((c) => (
|
||||
<SelectItem key={c.key} value={c.key}>{columnLabel(c)}</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Select
|
||||
value={rule.op}
|
||||
onValueChange={(op) => patchRule(rule.id, { op })}
|
||||
>
|
||||
<SelectTrigger size="sm" className="sk-gridrule__sel" aria-label={t('app.gridFilterDrawer.operator', 'Operator')}>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{OPS[column.type].map(([op, text]) => (
|
||||
<SelectItem key={op} value={op}>{text}</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Button variant="unstyled"
|
||||
type="button"
|
||||
className="sk-gridrule__del"
|
||||
onClick={() => grid.removeRule(rule.id)}
|
||||
aria-label={t('app.gridFilterDrawer.removeCondition', 'Remove condition')}
|
||||
>
|
||||
<X size={14} />
|
||||
</Button>
|
||||
<div className="sk-gridrule__value">{valueEditor(rule)}</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
<Button variant="unstyled" type="button" className="sk-gridsec__add" onClick={() => grid.addRule(columns)}>
|
||||
<Plus size={13} aria-hidden="true" />{t('app.gridFilterDrawer.addCondition', 'Add condition')}
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -226,18 +273,21 @@ export function GridFilterDrawer({
|
||||
<>
|
||||
<div className="sk-gridsec">
|
||||
<div className="sk-gridsec__head">
|
||||
<div className="sk-gridsec__t">{t('app.gridFilterDrawer.fields', 'Fields ·')} {cfg.cols.length} shown</div>
|
||||
<div className="sk-gridsec__t">{t('app.gridFilterDrawer.columns', 'Columns')}</div>
|
||||
<span className="sk-gridsec__meta">
|
||||
{t('app.gridFilterDrawer.shownOf', '{{shown}} of {{total}} shown', { shown: shownCount, total: namedColumns.length })}
|
||||
</span>
|
||||
</div>
|
||||
{ordered.map((key, i) => {
|
||||
const column = map.get(key);
|
||||
if (!column) return null;
|
||||
if (!column || isDecorative(column)) return null;
|
||||
const on = cfg.cols.includes(key);
|
||||
const locked = !!column.locked || column.hideable === false;
|
||||
return (
|
||||
<div
|
||||
key={key}
|
||||
draggable={!locked && on}
|
||||
className={cn('sk-gridcol', !on && 'is-off', dragging === i && 'is-drag')}
|
||||
className={cn('sk-gridcol', !on && 'is-off', locked && 'is-locked', dragging === i && 'is-drag')}
|
||||
onDragStart={() => setDragging(i)}
|
||||
onDragEnd={() => setDragging(null)}
|
||||
onDragOver={(e) => {
|
||||
@@ -248,7 +298,7 @@ export function GridFilterDrawer({
|
||||
<span className="sk-gridcol__grip"><GripVertical size={13} /></span>
|
||||
<span className="sk-gridcol__nm">{columnLabel(column)}</span>
|
||||
{locked
|
||||
? <span className="sk-gridcol__lock">pinned</span>
|
||||
? <span className="sk-gridcol__lock">{t('app.gridFilterDrawer.pinned', 'pinned')}</span>
|
||||
: (
|
||||
<Switch
|
||||
checked={on}
|
||||
@@ -313,10 +363,16 @@ export function GridFilterDrawer({
|
||||
</div>
|
||||
|
||||
<div className="sk-griddrawer__foot">
|
||||
{/* What the filters leave: the number this drawer exists to change. */}
|
||||
<span className="sk-griddrawer__count" role="status">
|
||||
{matching === total
|
||||
? t('app.gridFilterDrawer.countAll', '{{count}} {{noun}}', { count: total, noun: nounFor(total) })
|
||||
: t('app.gridFilterDrawer.countOf', '{{matching}} of {{total}} {{noun}}', { matching, total, noun: nounFor(total) })}
|
||||
</span>
|
||||
<span className="sk-griddrawer__sp" />
|
||||
<Button variant="ghost" size="sm" onClick={grid.resetToView}>
|
||||
<History size={14} /> {t('app.gridFilterDrawer.reset', 'Reset')}
|
||||
</Button>
|
||||
<span className="sk-griddrawer__sp" />
|
||||
<Button size="sm" onClick={() => onOpenChange(false)}>{t('common.actions.done', 'Done')}</Button>
|
||||
</div>
|
||||
</Drawer>
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "إضافة شرط",
|
||||
"conditions": "شروط",
|
||||
"conditions_one": "شرط واحد",
|
||||
"conditions_other": "{{count}} شرط",
|
||||
"density": "كثافة",
|
||||
"extraFieldsPrintedUnderTheFirst": "الحقول الإضافية المطبوعة تحت العمود الأول.",
|
||||
"field": "مجال",
|
||||
"fields": "الحقول ·",
|
||||
"fieldsShown_one": "حقل واحد ظاهر",
|
||||
"fieldsShown_other": "{{count}} حقل ظاهر",
|
||||
"filtersFields": "المرشحات والحقول",
|
||||
"match": "مباراة",
|
||||
"noConditionsThisViewShowsEvery": "لا توجد شروط - يظهر هذا العرض كل",
|
||||
"ofTheFollowing": "مما يلي",
|
||||
"off": "عن",
|
||||
"operator": "المشغل",
|
||||
"removeCondition": "إزالة الشرط",
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "শর্ত যোগ করুন",
|
||||
"conditions": "শর্তাবলী",
|
||||
"conditions_one": "1টি শর্ত",
|
||||
"conditions_other": "{{count}}টি শর্ত",
|
||||
"density": "ঘনত্ব",
|
||||
"extraFieldsPrintedUnderTheFirst": "প্রথম কলামের অধীনে অতিরিক্ত ক্ষেত্র মুদ্রিত।",
|
||||
"field": "মাঠ",
|
||||
"fields": "ক্ষেত্র ·",
|
||||
"fieldsShown_one": "1টি ফিল্ড দেখানো হচ্ছে",
|
||||
"fieldsShown_other": "{{count}}টি ফিল্ড দেখানো হচ্ছে",
|
||||
"filtersFields": "ফিল্টার এবং ক্ষেত্র",
|
||||
"match": "ম্যাচ",
|
||||
"noConditionsThisViewShowsEvery": "কোন শর্ত নেই — এই দৃশ্য প্রতিটি দেখায়",
|
||||
"ofTheFollowing": "নিম্নলিখিত",
|
||||
"off": "বন্ধ",
|
||||
"operator": "অপারেটর",
|
||||
"removeCondition": "শর্ত সরান",
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "Bedingung hinzufügen",
|
||||
"conditions": "Bedingungen",
|
||||
"conditions_one": "1 Bedingung",
|
||||
"conditions_other": "{{count}} Bedingungen",
|
||||
"density": "Dichte",
|
||||
"extraFieldsPrintedUnderTheFirst": "Zusätzliche Felder werden unter der ersten Spalte gedruckt.",
|
||||
"field": "Feld",
|
||||
"fields": "Felder ·",
|
||||
"fieldsShown_one": "1 Feld angezeigt",
|
||||
"fieldsShown_other": "{{count}} Felder angezeigt",
|
||||
"filtersFields": "Filter und Felder",
|
||||
"match": "Spiel",
|
||||
"noConditionsThisViewShowsEvery": "Keine Bedingungen – diese Ansicht zeigt alle",
|
||||
"ofTheFollowing": "des Folgenden",
|
||||
"off": "Aus",
|
||||
"operator": "Betreiber",
|
||||
"removeCondition": "Bedingung entfernen",
|
||||
|
||||
@@ -3043,25 +3043,29 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "Add condition",
|
||||
"conditions": "Conditions",
|
||||
"conditions_one": "1 condition",
|
||||
"conditions_other": "{{count}} conditions",
|
||||
"and": "and",
|
||||
"columns": "Columns",
|
||||
"combine": "How conditions combine",
|
||||
"countAll": "{{count}} {{noun}}",
|
||||
"countOf": "{{matching}} of {{total}} {{noun}}",
|
||||
"density": "Density",
|
||||
"extraFieldsPrintedUnderTheFirst": "Extra fields printed under the first column.",
|
||||
"field": "Field",
|
||||
"fields": "Fields ·",
|
||||
"fieldsShown_one": "1 field shown",
|
||||
"fieldsShown_other": "{{count}} fields shown",
|
||||
"fieldsTab": "Fields",
|
||||
"filterBy": "Filter by",
|
||||
"filters": "Filters",
|
||||
"filtersFields": "Filters and fields",
|
||||
"match": "Match",
|
||||
"noConditionsThisViewShowsEvery": "No conditions. This view shows every",
|
||||
"ofTheFollowing": "of the following",
|
||||
"nothingFiltered_one": "The only {{noun}} is showing.",
|
||||
"nothingFiltered_other": "All {{count}} {{noun}} are showing.",
|
||||
"off": "Off",
|
||||
"operator": "Operator",
|
||||
"or": "or",
|
||||
"pinned": "pinned",
|
||||
"removeCondition": "Remove condition",
|
||||
"reset": "Reset",
|
||||
"rowDetail": "Row detail",
|
||||
"show": "Show {{value}}"
|
||||
"show": "Show {{value}}",
|
||||
"shownOf": "{{shown}} of {{total}} shown"
|
||||
},
|
||||
"gridFooter": {
|
||||
"firstPage": "First page",
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "Añadir condición",
|
||||
"conditions": "Condiciones",
|
||||
"conditions_one": "1 condición",
|
||||
"conditions_other": "{{count}} condiciones",
|
||||
"density": "Densidad",
|
||||
"extraFieldsPrintedUnderTheFirst": "Los campos adicionales se muestran debajo de la primera columna.",
|
||||
"field": "Campo",
|
||||
"fields": "Campos ·",
|
||||
"fieldsShown_one": "1 campo visible",
|
||||
"fieldsShown_other": "{{count}} campos visibles",
|
||||
"filtersFields": "Filtros y campos",
|
||||
"match": "Cumplir",
|
||||
"noConditionsThisViewShowsEvery": "Sin condiciones — esta vista muestra cada",
|
||||
"ofTheFollowing": "de las siguientes",
|
||||
"off": "Desactivado",
|
||||
"operator": "Operador",
|
||||
"removeCondition": "Quitar condición",
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "Ajouter une condition",
|
||||
"conditions": "Conditions",
|
||||
"conditions_one": "1 condition",
|
||||
"conditions_other": "{{count}} conditions",
|
||||
"density": "Densité",
|
||||
"extraFieldsPrintedUnderTheFirst": "Champs supplémentaires imprimés sous la première colonne.",
|
||||
"field": "Champ",
|
||||
"fields": "Champs ·",
|
||||
"fieldsShown_one": "1 champ affiché",
|
||||
"fieldsShown_other": "{{count}} champs affichés",
|
||||
"filtersFields": "Filtres et champs",
|
||||
"match": "Correspondre",
|
||||
"noConditionsThisViewShowsEvery": "Aucune condition : cette vue affiche chaque",
|
||||
"ofTheFollowing": "des éléments suivants",
|
||||
"off": "Désactivé",
|
||||
"operator": "Opérateur",
|
||||
"removeCondition": "Supprimer la condition",
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "Tambahkan kondisi",
|
||||
"conditions": "Kondisi",
|
||||
"conditions_one": "1 kondisi",
|
||||
"conditions_other": "{{count}} kondisi",
|
||||
"density": "Kepadatan",
|
||||
"extraFieldsPrintedUnderTheFirst": "Bidang tambahan dicetak di bawah kolom pertama.",
|
||||
"field": "Bidang",
|
||||
"fields": "Bidang ·",
|
||||
"fieldsShown_one": "1 kolom ditampilkan",
|
||||
"fieldsShown_other": "{{count}} kolom ditampilkan",
|
||||
"filtersFields": "Filter & bidang",
|
||||
"match": "Cocok",
|
||||
"noConditionsThisViewShowsEvery": "Tanpa syarat — tampilan ini menunjukkan semuanya",
|
||||
"ofTheFollowing": "berikut ini",
|
||||
"off": "Mati",
|
||||
"operator": "Operator",
|
||||
"removeCondition": "Hapus kondisi",
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "Aggiungi condizione",
|
||||
"conditions": "Condizioni",
|
||||
"conditions_one": "1 condizione",
|
||||
"conditions_other": "{{count}} condizioni",
|
||||
"density": "Densità",
|
||||
"extraFieldsPrintedUnderTheFirst": "Campi aggiuntivi stampati sotto la prima colonna.",
|
||||
"field": "Campo",
|
||||
"fields": "Campi ·",
|
||||
"fieldsShown_one": "1 campo mostrato",
|
||||
"fieldsShown_other": "{{count}} campi mostrati",
|
||||
"filtersFields": "Filtri e campi",
|
||||
"match": "Incontro",
|
||||
"noConditionsThisViewShowsEvery": "Nessuna condizione: questa visualizzazione mostra ogni",
|
||||
"ofTheFollowing": "di quanto segue",
|
||||
"off": "Spento",
|
||||
"operator": "Operatore",
|
||||
"removeCondition": "Rimuovi condizione",
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "조건 추가",
|
||||
"conditions": "조건",
|
||||
"conditions_one": "조건 1개",
|
||||
"conditions_other": "조건 {{count}}개",
|
||||
"density": "밀도",
|
||||
"extraFieldsPrintedUnderTheFirst": "첫 번째 열 아래에 추가 필드가 인쇄됩니다.",
|
||||
"field": "필드",
|
||||
"fields": "분야 ·",
|
||||
"fieldsShown_one": "필드 1개 표시됨",
|
||||
"fieldsShown_other": "필드 {{count}}개 표시됨",
|
||||
"filtersFields": "필터 및 필드",
|
||||
"match": "경기",
|
||||
"noConditionsThisViewShowsEvery": "조건 없음 - 이 보기에는 모든 조건이 표시됩니다.",
|
||||
"ofTheFollowing": "다음 중",
|
||||
"off": "끄기",
|
||||
"operator": "운영자",
|
||||
"removeCondition": "조건 제거",
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "Dodaj warunek",
|
||||
"conditions": "Warunki",
|
||||
"conditions_one": "1 warunek",
|
||||
"conditions_other": "Warunki: {{count}}",
|
||||
"density": "Gęstość",
|
||||
"extraFieldsPrintedUnderTheFirst": "Dodatkowe pola wydrukowane pod pierwszą kolumną.",
|
||||
"field": "Pole",
|
||||
"fields": "Pola ·",
|
||||
"fieldsShown_one": "Pokazano 1 pole",
|
||||
"fieldsShown_other": "Pokazane pola: {{count}}",
|
||||
"filtersFields": "Filtry i pola",
|
||||
"match": "Mecz",
|
||||
"noConditionsThisViewShowsEvery": "Brak warunków — ten widok pokazuje wszystkie",
|
||||
"ofTheFollowing": "z poniższych",
|
||||
"off": "Wyłączony",
|
||||
"operator": "Operator",
|
||||
"removeCondition": "Usuń warunek",
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "Adicionar condição",
|
||||
"conditions": "Condições",
|
||||
"conditions_one": "1 condição",
|
||||
"conditions_other": "{{count}} condições",
|
||||
"density": "Densidade",
|
||||
"extraFieldsPrintedUnderTheFirst": "Campos extras impressos na primeira coluna.",
|
||||
"field": "Campo",
|
||||
"fields": "Campos ·",
|
||||
"fieldsShown_one": "1 campo exibido",
|
||||
"fieldsShown_other": "{{count}} campos exibidos",
|
||||
"filtersFields": "Filtros e campos",
|
||||
"match": "Partida",
|
||||
"noConditionsThisViewShowsEvery": "Sem condições — esta visualização mostra todos",
|
||||
"ofTheFollowing": "dos seguintes",
|
||||
"off": "Desligado",
|
||||
"operator": "Operador",
|
||||
"removeCondition": "Remover condição",
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "Добавить условие",
|
||||
"conditions": "Условия",
|
||||
"conditions_one": "1 условие",
|
||||
"conditions_other": "Условий: {{count}}",
|
||||
"density": "Плотность",
|
||||
"extraFieldsPrintedUnderTheFirst": "Дополнительные поля печатаются под первым столбцом.",
|
||||
"field": "Поле",
|
||||
"fields": "Поля ·",
|
||||
"fieldsShown_one": "Показано 1 поле",
|
||||
"fieldsShown_other": "Показано полей: {{count}}",
|
||||
"filtersFields": "Фильтры и поля",
|
||||
"match": "Соответствовать",
|
||||
"noConditionsThisViewShowsEvery": "Никаких условий — в этом представлении отображаются все",
|
||||
"ofTheFollowing": "из следующих",
|
||||
"off": "Выкл.",
|
||||
"operator": "Оператор",
|
||||
"removeCondition": "Удалить условие",
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "เพิ่มเงื่อนไข",
|
||||
"conditions": "เงื่อนไข",
|
||||
"conditions_one": "1 เงื่อนไข",
|
||||
"conditions_other": "{{count}} เงื่อนไข",
|
||||
"density": "ความหนาแน่น",
|
||||
"extraFieldsPrintedUnderTheFirst": "ช่องพิเศษที่พิมพ์ใต้คอลัมน์แรก",
|
||||
"field": "สนาม",
|
||||
"fields": "ทุ่งนา ·",
|
||||
"fieldsShown_one": "แสดง 1 ฟิลด์",
|
||||
"fieldsShown_other": "แสดง {{count}} ฟิลด์",
|
||||
"filtersFields": "ตัวกรองและฟิลด์",
|
||||
"match": "จับคู่",
|
||||
"noConditionsThisViewShowsEvery": "ไม่มีเงื่อนไข — มุมมองนี้แสดงทุกรายการ",
|
||||
"ofTheFollowing": "ดังต่อไปนี้",
|
||||
"off": "ปิด",
|
||||
"operator": "ผู้ดำเนินการ",
|
||||
"removeCondition": "ถอนเงื่อนไข",
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "Koşul ekle",
|
||||
"conditions": "Koşullar",
|
||||
"conditions_one": "1 koşul",
|
||||
"conditions_other": "{{count}} koşul",
|
||||
"density": "Yoğunluk",
|
||||
"extraFieldsPrintedUnderTheFirst": "İlk sütunun altına yazdırılan ekstra alanlar.",
|
||||
"field": "Alan",
|
||||
"fields": "Alanlar ·",
|
||||
"fieldsShown_one": "1 alan gösteriliyor",
|
||||
"fieldsShown_other": "{{count}} alan gösteriliyor",
|
||||
"filtersFields": "Filtreler ve alanlar",
|
||||
"match": "Kibrit",
|
||||
"noConditionsThisViewShowsEvery": "Koşul yok — bu görünüm her koşulu gösterir",
|
||||
"ofTheFollowing": "aşağıdakilerden",
|
||||
"off": "Kapalı",
|
||||
"operator": "Operatör",
|
||||
"removeCondition": "Koşulu kaldır",
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "Thêm điều kiện",
|
||||
"conditions": "Điều kiện",
|
||||
"conditions_one": "1 điều kiện",
|
||||
"conditions_other": "{{count}} điều kiện",
|
||||
"density": "Tỉ trọng",
|
||||
"extraFieldsPrintedUnderTheFirst": "Các trường bổ sung được in dưới cột đầu tiên.",
|
||||
"field": "Cánh đồng",
|
||||
"fields": "Cánh đồng ·",
|
||||
"fieldsShown_one": "Hiển thị 1 trường",
|
||||
"fieldsShown_other": "Hiển thị {{count}} trường",
|
||||
"filtersFields": "Bộ lọc & trường",
|
||||
"match": "Cuộc thi đấu",
|
||||
"noConditionsThisViewShowsEvery": "Không có điều kiện - chế độ xem này hiển thị mọi",
|
||||
"ofTheFollowing": "những điều sau đây",
|
||||
"off": "Tắt",
|
||||
"operator": "Toán tử",
|
||||
"removeCondition": "Xóa điều kiện",
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "添加条件",
|
||||
"conditions": "状况",
|
||||
"conditions_one": "1 个条件",
|
||||
"conditions_other": "{{count}} 个条件",
|
||||
"density": "密度",
|
||||
"extraFieldsPrintedUnderTheFirst": "额外字段打印在第一列下。",
|
||||
"field": "场地",
|
||||
"fields": "领域 ·",
|
||||
"fieldsShown_one": "显示 1 个字段",
|
||||
"fieldsShown_other": "显示 {{count}} 个字段",
|
||||
"filtersFields": "过滤器和字段",
|
||||
"match": "匹配",
|
||||
"noConditionsThisViewShowsEvery": "无条件 — 该视图显示了所有",
|
||||
"ofTheFollowing": "以下的",
|
||||
"off": "关闭",
|
||||
"operator": "操作员",
|
||||
"removeCondition": "删除条件",
|
||||
|
||||
@@ -2970,19 +2970,10 @@
|
||||
},
|
||||
"gridFilterDrawer": {
|
||||
"addCondition": "新增條件",
|
||||
"conditions": "條件",
|
||||
"conditions_one": "1 個條件",
|
||||
"conditions_other": "{{count}} 個條件",
|
||||
"density": "密度",
|
||||
"extraFieldsPrintedUnderTheFirst": "其他欄位顯示在第一欄下方。",
|
||||
"field": "欄位",
|
||||
"fields": "欄位 ·",
|
||||
"fieldsShown_one": "顯示 1 個欄位",
|
||||
"fieldsShown_other": "顯示 {{count}} 個欄位",
|
||||
"filtersFields": "篩選器和欄位",
|
||||
"match": "相符",
|
||||
"noConditionsThisViewShowsEvery": "無條件 — 此檢視顯示了所有",
|
||||
"ofTheFollowing": "以下的",
|
||||
"off": "關閉",
|
||||
"operator": "運算子",
|
||||
"removeCondition": "刪除條件",
|
||||
|
||||
@@ -825,55 +825,31 @@
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&__tabs {
|
||||
// The pane switch is the drawer's header. The right padding keeps it clear
|
||||
// of the sheet's close button, which sits in the same corner.
|
||||
&__head {
|
||||
display: flex;
|
||||
gap: $space-hair;
|
||||
padding: 0 $space-4;
|
||||
align-items: center;
|
||||
padding: $space-4 calc(#{$space-4} + #{$control-sm} + #{$space-3}) $space-4 $space-4;
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: var(--surface-0);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
button {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: $space-2;
|
||||
height: $control-lg; // underline tabs: 40
|
||||
padding: 0 $space-3;
|
||||
border: none;
|
||||
background: transparent;
|
||||
font-size: $text-sm;
|
||||
font-weight: $font-weight-medium;
|
||||
font-family: inherit;
|
||||
color: var(--text-faint);
|
||||
cursor: pointer;
|
||||
transition: color 0.13s;
|
||||
&__switch button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: $space-2;
|
||||
font-size: $text-sm;
|
||||
}
|
||||
|
||||
&:hover { color: var(--text-dim); }
|
||||
&.is-on { color: var(--text); }
|
||||
|
||||
&.is-on::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 8px;
|
||||
right: 8px;
|
||||
bottom: -1px;
|
||||
height: 2px;
|
||||
border-radius: $radius-badge $radius-badge 0 0;
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.n {
|
||||
font-size: $text-xs;
|
||||
color: var(--text-ghost);
|
||||
background: var(--surface-2);
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: $radius-control;
|
||||
padding: 1px $space-tight;
|
||||
}
|
||||
|
||||
&.is-on .n { color: var(--text-dim); background: var(--surface-3); border-color: var(--border); }
|
||||
}
|
||||
// Count beside a pane's name: active conditions, or shown/total fields.
|
||||
&__n {
|
||||
padding: 0 $space-tight;
|
||||
border-radius: $radius-control;
|
||||
background: var(--surface-2);
|
||||
color: var(--text-dim);
|
||||
font-size: $text-xs;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
&__body { flex: 1; overflow-y: auto; }
|
||||
@@ -882,15 +858,48 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: $space-2;
|
||||
padding: $space-4 $space-5;
|
||||
padding: $space-3 $space-5;
|
||||
border-top: 1px solid var(--border);
|
||||
background: var(--surface-0);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
// How many rows the current conditions leave.
|
||||
&__count {
|
||||
font-size: $text-sm;
|
||||
color: var(--text-dim);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
&__sp { flex: 1; }
|
||||
}
|
||||
|
||||
// Empty filters pane: what is showing, and one tap to start narrowing it.
|
||||
.sk-gridstart {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: $space-3;
|
||||
|
||||
&__lead {
|
||||
margin: 0;
|
||||
font-size: $text-sm;
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
// A field chip that adds a condition on that field. Doubled class: it is
|
||||
// also a .sk-gridrule__tag, whose capitalize would turn "Last seen" into
|
||||
// "Last Seen".
|
||||
&__field.sk-gridrule__tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: $space-tight;
|
||||
text-transform: none;
|
||||
|
||||
svg { color: var(--text-ghost); }
|
||||
&:hover svg { color: var(--accent-bright); }
|
||||
}
|
||||
}
|
||||
|
||||
.sk-gridsec {
|
||||
padding: $space-5 $space-5;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
@@ -910,30 +919,35 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
// Right-hand figure on a section head ("9 of 12 shown").
|
||||
&__meta {
|
||||
font-size: $text-xs;
|
||||
color: var(--text-ghost);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
// "Add condition": sits where the next condition will appear.
|
||||
&__add {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: $space-tight;
|
||||
font-size: $text-xs;
|
||||
font-family: inherit;
|
||||
color: var(--accent-bright);
|
||||
height: $control-sm;
|
||||
padding: 0 $space-2;
|
||||
border: none;
|
||||
border-radius: $radius-control;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover { background: var(--accent-bg); }
|
||||
}
|
||||
|
||||
&__none {
|
||||
padding: $space-4;
|
||||
width: 100%;
|
||||
height: $control-md;
|
||||
margin-top: $space-3;
|
||||
border: 1px dashed var(--border);
|
||||
border-radius: $radius-card;
|
||||
text-align: center;
|
||||
background: transparent;
|
||||
color: var(--text-dim);
|
||||
font-size: $text-sm;
|
||||
color: var(--text-ghost);
|
||||
font-family: inherit;
|
||||
cursor: pointer;
|
||||
transition: 0.12s;
|
||||
|
||||
&:hover {
|
||||
border-color: var(--accent-dim);
|
||||
@include status-variant(var(--accent-bright), var(--accent-bg));
|
||||
}
|
||||
}
|
||||
|
||||
&__hint {
|
||||
@@ -945,15 +959,6 @@
|
||||
&__tags { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
}
|
||||
|
||||
.sk-gridmatch {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: $space-2;
|
||||
font-size: $text-sm;
|
||||
color: var(--text-faint);
|
||||
margin-bottom: $space-3;
|
||||
}
|
||||
|
||||
.sk-gridseg {
|
||||
display: inline-flex;
|
||||
gap: $space-hair;
|
||||
@@ -980,12 +985,16 @@
|
||||
&--wide { width: fit-content; }
|
||||
}
|
||||
|
||||
// One condition: field, operator and remove on a row, its value underneath.
|
||||
.sk-gridrule {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 116px $control-md;
|
||||
gap: $space-tight;
|
||||
grid-template-columns: 1fr 132px $control-md;
|
||||
gap: $space-2 $space-tight;
|
||||
align-items: center;
|
||||
margin-bottom: $space-2;
|
||||
padding: $space-3;
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: $radius-card;
|
||||
background: var(--surface-0);
|
||||
|
||||
&__value { grid-column: 1 / -1; }
|
||||
|
||||
@@ -1027,10 +1036,20 @@
|
||||
&:hover { @include status-variant(var(--red), var(--red-bg)); }
|
||||
}
|
||||
|
||||
// Between two conditions: the and/or switch, on a hairline that ties the
|
||||
// two cards together.
|
||||
&__join {
|
||||
font-size: $text-xs;
|
||||
color: var(--text-ghost);
|
||||
padding: 1px 0 $space-tight $space-hair;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: $space-2;
|
||||
margin-block: $space-2;
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
flex: 1;
|
||||
border-top: 1px solid var(--border-soft);
|
||||
}
|
||||
}
|
||||
|
||||
&__enum { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
@@ -1071,6 +1090,8 @@
|
||||
&:hover { background: var(--surface-2); border-color: var(--border); }
|
||||
&.is-drag { opacity: 0.35; }
|
||||
&.is-off .sk-gridcol__nm { color: var(--text-ghost); }
|
||||
// A pinned column cannot be moved, so it offers no handle.
|
||||
&.is-locked .sk-gridcol__grip { visibility: hidden; }
|
||||
|
||||
&__grip { color: var(--text-ghost); display: grid; place-items: center; cursor: grab; }
|
||||
&__nm { flex: 1; min-width: 0; }
|
||||
|
||||
Reference in new issue
Block a user