mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-19 06:04:05 +00:00
ux(finder): add navigation shortcuts
This commit is contained in:
committed by
Carlos Valente
parent
ae65ec97d6
commit
daa032e92c
@@ -54,17 +54,51 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 1rem;
|
||||||
font-size: calc(1rem - 2px);
|
font-size: calc(1rem - 2px);
|
||||||
color: $label-gray;
|
color: $label-gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.filterHint {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
.em {
|
.em {
|
||||||
color: $ui-white;
|
color: $ui-white;
|
||||||
margin-inline: 0.25rem;
|
margin-inline: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hints {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 0.5rem 1rem;
|
||||||
|
color: $label-gray;
|
||||||
|
font-size: calc(1rem - 3px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hintItem {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
.scrollContainer {
|
.scrollContainer {
|
||||||
max-height: 70vh;
|
max-height: 70vh;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
padding-top: 1rem;
|
padding-top: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 680px) {
|
||||||
|
.footer {
|
||||||
|
align-items: flex-start;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filterHint {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { SupportedEntry } from 'ontime-types';
|
|||||||
import { KeyboardEvent, useState } from 'react';
|
import { KeyboardEvent, useState } from 'react';
|
||||||
|
|
||||||
import Input from '../../../common/components/input/input/Input';
|
import Input from '../../../common/components/input/input/Input';
|
||||||
|
import Kbd from '../../../common/components/kbd/Kbd';
|
||||||
import Modal from '../../../common/components/modal/Modal';
|
import Modal from '../../../common/components/modal/Modal';
|
||||||
import useFinder from './useFinder';
|
import useFinder from './useFinder';
|
||||||
|
|
||||||
@@ -96,8 +97,25 @@ export default function Finder({ isOpen, onClose }: FinderProps) {
|
|||||||
}
|
}
|
||||||
footerElements={
|
footerElements={
|
||||||
<div className={style.footer}>
|
<div className={style.footer}>
|
||||||
Use the keywords <span className={style.em}>cue</span>, <span className={style.em}>index</span> or
|
<div className={style.hints}>
|
||||||
<span className={style.em}>title</span> to filter search.
|
<span className={style.hintItem}>
|
||||||
|
<Kbd>↑</Kbd>
|
||||||
|
<Kbd>↓</Kbd>
|
||||||
|
Navigate
|
||||||
|
</span>
|
||||||
|
<span className={style.hintItem}>
|
||||||
|
<Kbd>Enter</Kbd>
|
||||||
|
Go
|
||||||
|
</span>
|
||||||
|
<span className={style.hintItem}>
|
||||||
|
<Kbd>Esc</Kbd>
|
||||||
|
Close
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className={style.filterHint}>
|
||||||
|
Filter by <span className={style.em}>cue</span>, <span className={style.em}>index</span>, or
|
||||||
|
<span className={style.em}>title</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user