Fix recording sync (#291)

* delete audio/video/recording in remote

* sync recordings on profile page

* handle recording sync failed
This commit is contained in:
an-lee
2024-02-09 18:24:36 +08:00
committed by GitHub
parent 27c342cabb
commit 338ef82a1e
10 changed files with 115 additions and 25 deletions

View File

@@ -1,9 +1,10 @@
import { useState } from "react";
import { useEffect, useState, useContext } from "react";
import {
RecordingStats,
RecordingCalendar,
RecordingActivities,
} from "@renderer/components";
import { AppSettingsProviderContext } from "@renderer/context";
import { Button } from "@renderer/components/ui";
import { ChevronLeftIcon } from "lucide-react";
import { useNavigate } from "react-router-dom";
@@ -13,11 +14,16 @@ import { t } from "i18next";
export default () => {
const navigate = useNavigate();
const { EnjoyApp } = useContext(AppSettingsProviderContext);
const [range, setRange] = useState<[string, string]>([
dayjs().subtract(7, "day").format(),
dayjs().format(),
]);
useEffect(() => {
EnjoyApp.recordings.syncAll();
}, []);
return (
<div className="h-full px-4 py-6 lg:px-8">
<div className="max-w-5xl mx-auto">