Add terms of use translations, sync detection, and refactor book components
- Introduced new translations for terms of use in French and English locales. - Added sync status detection logic for books in `BookList` and `BookCard` components. - Refactored `BookCard` to handle additional props and improve layout flexibility. - Enhanced `TermsOfUse` component with complete localization support and refuse functionality. - Updated data decryption logic in Rust services to handle optional fields and additional metadata consistently. - Improved offline/online synchronization workflows with extended context properties.
This commit is contained in:
@@ -12,10 +12,12 @@ import ImportBookForm from "@/components/book/ImportBookForm";
|
||||
import {SessionContext, SessionContextProps} from "@/context/SessionContext";
|
||||
import {useTranslations} from '@/lib/i18n';
|
||||
import InsetPanel from "@/components/ui/InsetPanel";
|
||||
import OfflineContext, {OfflineContextType} from "@/context/OfflineContext";
|
||||
|
||||
export default function ScribeLeftBar() {
|
||||
const {book}: BookContextProps = useContext<BookContextProps>(BookContext);
|
||||
const {session}: SessionContextProps = useContext<SessionContextProps>(SessionContext);
|
||||
const {isCurrentlyOffline}: OfflineContextType = useContext<OfflineContextType>(OfflineContext);
|
||||
const t = useTranslations();
|
||||
|
||||
const [panelHidden, setPanelHidden] = useState<boolean>(false);
|
||||
@@ -100,7 +102,9 @@ export default function ScribeLeftBar() {
|
||||
}}
|
||||
/>
|
||||
)) : (
|
||||
homeComponents.map((component: PanelComponent) => (
|
||||
homeComponents.filter((component: PanelComponent): boolean => {
|
||||
return !(isCurrentlyOffline() && component.id === 2);
|
||||
}).map((component: PanelComponent) => (
|
||||
<IconButton
|
||||
key={component.id}
|
||||
icon={component.icon}
|
||||
|
||||
Reference in New Issue
Block a user