Feat: make notes on caption (#544)
* add segment model * add note model * db handle segment & note * add notes & segments handler * refactor media caption components * segment & note create * fix type * update note column & may sync * display selected words for note * refactor selected words * auto select words when editing note * refactor * refactor caption component * display notes * refactor notes components * fix * refactor segment & notes into context * destroy note * update locale * fix caption switch issue * fix layout * refactor caption layout * remove deprecated code * may share note * improve UI * fix notes list auto update after created * remove console.log * add notes page * refactor note parameters * refactor components * mark note on transcription * handle no notes * improve style * improve style * show context menu on selection text * fix utils
This commit is contained in:
@@ -166,7 +166,7 @@ export class Client {
|
||||
page?: number;
|
||||
items?: number;
|
||||
userId?: string;
|
||||
type?: "all" | "recording" | "medium" | "story" | "prompt" | "text" | "gpt";
|
||||
type?: "all" | "recording" | "medium" | "story" | "prompt" | "text" | "gpt" | "note";
|
||||
by?: "following" | "all";
|
||||
}): Promise<
|
||||
{
|
||||
@@ -232,6 +232,18 @@ export class Client {
|
||||
return this.api.post("/api/transcriptions", decamelizeKeys(transcription));
|
||||
}
|
||||
|
||||
syncSegment(segment: Partial<Omit<SegmentType, "audio" | "video">>) {
|
||||
return this.api.post("/api/segments", decamelizeKeys(segment));
|
||||
}
|
||||
|
||||
syncNote(note: Partial<Omit<NoteType, "segment">>) {
|
||||
return this.api.post("/api/notes", decamelizeKeys(note));
|
||||
}
|
||||
|
||||
deleteNote(id: string) {
|
||||
return this.api.delete(`/api/notes/${id}`);
|
||||
}
|
||||
|
||||
syncRecording(recording: Partial<RecordingType>) {
|
||||
if (!recording) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user