mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-01-22 08:03:55 +00:00
Add tags to history table
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
47ab753959
commit
70ab02431c
3 changed files with 9 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
|||
"signOut": "Sign Out",
|
||||
"exploreFeatures": "Explore all features",
|
||||
"selectTags": "Select tags…",
|
||||
"tags": "Tags",
|
||||
"searchKeywords": "Search keyword…",
|
||||
"sortByTitle": "Sort by title",
|
||||
"title": "Title",
|
||||
|
|
|
@ -4,6 +4,7 @@ import {CloseButton} from "../common/close-button";
|
|||
import {useTranslation} from "react-i18next";
|
||||
import {HistoryEntryProps} from "../history-content/history-content";
|
||||
import {formatHistoryDate} from "../../../../../utils/historyUtils";
|
||||
import {Badge} from "react-bootstrap";
|
||||
|
||||
export const HistoryTableRow: React.FC<HistoryEntryProps> = ({entry, onPinClick}) => {
|
||||
useTranslation()
|
||||
|
@ -11,6 +12,12 @@ export const HistoryTableRow: React.FC<HistoryEntryProps> = ({entry, onPinClick}
|
|||
<tr>
|
||||
<td>{entry.title}</td>
|
||||
<td>{formatHistoryDate(entry.lastVisited)}</td>
|
||||
<td>
|
||||
{
|
||||
entry.tags.map((tag) => <Badge variant={"dark"} className={"mr-1 mb-1"}
|
||||
key={tag}>{tag}</Badge>)
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<PinButton isDark={true} isPinned={entry.pinned} onPinClick={() => {
|
||||
onPinClick(entry.id)
|
||||
|
|
|
@ -11,6 +11,7 @@ const HistoryTable: React.FC<HistoryEntriesProps> = ({entries, onPinClick}) => {
|
|||
<tr>
|
||||
<th><Trans i18nKey={"title"}/></th>
|
||||
<th><Trans i18nKey={"lastVisit"}/></th>
|
||||
<th><Trans i18nKey={"tags"}/></th>
|
||||
<th><Trans i18nKey={"actions"}/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
Loading…
Reference in a new issue