ui: support empty hls
This commit is contained in:
parent
4245dd49e8
commit
3a2e822bea
4 changed files with 7 additions and 4 deletions
|
|
@ -8,6 +8,7 @@ import copy from "copy-to-clipboard";
|
||||||
import { Eye, Link } from "lucide-react";
|
import { Eye, Link } from "lucide-react";
|
||||||
import { toast } from "react-toastify";
|
import { toast } from "react-toastify";
|
||||||
import { resentOrDate } from 'App/date'
|
import { resentOrDate } from 'App/date'
|
||||||
|
import { noNoteMsg } from 'App/mstore/notesStore'
|
||||||
|
|
||||||
function HighlightClip({
|
function HighlightClip({
|
||||||
note = 'Highlight note',
|
note = 'Highlight note',
|
||||||
|
|
@ -20,7 +21,7 @@ function HighlightClip({
|
||||||
onItemClick = () => undefined,
|
onItemClick = () => undefined,
|
||||||
onDelete = () => undefined,
|
onDelete = () => undefined,
|
||||||
}: {
|
}: {
|
||||||
note: string;
|
note: string | null;
|
||||||
tag: string;
|
tag: string;
|
||||||
user: string;
|
user: string;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
|
|
@ -30,6 +31,7 @@ function HighlightClip({
|
||||||
onItemClick: (id: any) => any;
|
onItemClick: (id: any) => any;
|
||||||
onDelete: (id: any) => any;
|
onDelete: (id: any) => any;
|
||||||
}) {
|
}) {
|
||||||
|
const noteMsg = note || noNoteMsg
|
||||||
const copyToClipboard = () => {
|
const copyToClipboard = () => {
|
||||||
const currUrl = window.location.href;
|
const currUrl = window.location.href;
|
||||||
const hUrl = `${currUrl}?highlight=${hId}`;
|
const hUrl = `${currUrl}?highlight=${hId}`;
|
||||||
|
|
@ -86,7 +88,7 @@ function HighlightClip({
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<GridItem
|
<GridItem
|
||||||
title={note}
|
title={noteMsg}
|
||||||
onItemClick={onItemClick}
|
onItemClick={onItemClick}
|
||||||
thumbnail={thumbnail}
|
thumbnail={thumbnail}
|
||||||
setLoading={() => null}
|
setLoading={() => null}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ function HighlightsList() {
|
||||||
});
|
});
|
||||||
const { total, notes } = data;
|
const { total, notes } = data;
|
||||||
const debounceTimeout = React.useRef(0);
|
const debounceTimeout = React.useRef(0);
|
||||||
|
|
||||||
const onSearch = (value: string) => {
|
const onSearch = (value: string) => {
|
||||||
notesStore.setQuery(value);
|
notesStore.setQuery(value);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import { TeamBadge } from 'Shared/SessionsTabOverview/components/Notes';
|
||||||
import { Tag, Dropdown, Button } from 'antd'
|
import { Tag, Dropdown, Button } from 'antd'
|
||||||
import { MoreOutlined } from "@ant-design/icons";
|
import { MoreOutlined } from "@ant-design/icons";
|
||||||
import { MessageSquareDot } from 'lucide-react'
|
import { MessageSquareDot } from 'lucide-react'
|
||||||
|
import { noNoteMsg } from 'App/mstore/notesStore'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
note: Note;
|
note: Note;
|
||||||
|
|
@ -92,7 +93,7 @@ function NoteEvent(props: Props) {
|
||||||
className="text-base capitalize-first my-3 overflow-y-scroll overflow-x-hidden"
|
className="text-base capitalize-first my-3 overflow-y-scroll overflow-x-hidden"
|
||||||
style={{ maxHeight: 200, maxWidth: 220 }}
|
style={{ maxHeight: 200, maxWidth: 220 }}
|
||||||
>
|
>
|
||||||
{props.note.message}
|
{props.note.message || noNoteMsg}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div className="flex items-center flex-wrap w-full">
|
<div className="flex items-center flex-wrap w-full">
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import { makeAutoObservable } from "mobx";
|
||||||
import { notesService } from "App/services";
|
import { notesService } from "App/services";
|
||||||
import { Note, NotesFilter, WriteNote, iTag } from 'App/services/NotesService';
|
import { Note, NotesFilter, WriteNote, iTag } from 'App/services/NotesService';
|
||||||
|
|
||||||
|
export const noNoteMsg = 'No Comment';
|
||||||
|
|
||||||
export default class NotesStore {
|
export default class NotesStore {
|
||||||
notes: Note[] = []
|
notes: Note[] = []
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue