Prevent tooltip on disabled button warning
This commit is contained in:
@@ -7,7 +7,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import { DraggableProvided } from 'react-beautiful-dnd';
|
import { DraggableProvided } from 'react-beautiful-dnd';
|
||||||
import DragHandleIcon from '@mui/icons-material/DragHandle';
|
import DragHandleIcon from '@mui/icons-material/DragHandle';
|
||||||
import EditIcon from '@mui/icons-material/Edit';
|
import EditIcon from '@mui/icons-material/Edit';
|
||||||
@@ -18,6 +17,7 @@ import Card from '@mui/material/Card';
|
|||||||
import CardContent from '@mui/material/CardContent';
|
import CardContent from '@mui/material/CardContent';
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { CategoryType } from '@/lib/graphql/generated/graphql.ts';
|
import { CategoryType } from '@/lib/graphql/generated/graphql.ts';
|
||||||
|
|
||||||
@@ -56,16 +56,16 @@ export const CategorySettingsCard = ({
|
|||||||
{category.name}
|
{category.name}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Stack sx={{ flexDirection: 'row' }}>
|
<Stack sx={{ flexDirection: 'row' }}>
|
||||||
<Tooltip title={t('global.button.edit')}>
|
<CustomTooltip title={t('global.button.edit')}>
|
||||||
<IconButton component={Box} onClick={onEdit} size="large">
|
<IconButton component={Box} onClick={onEdit} size="large">
|
||||||
<EditIcon />
|
<EditIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<Tooltip title={t('chapter.action.download.delete.label.action')}>
|
<CustomTooltip title={t('chapter.action.download.delete.label.action')}>
|
||||||
<IconButton component={Box} onClick={deleteCategory} size="large">
|
<IconButton component={Box} onClick={deleteCategory} size="large">
|
||||||
<DeleteIcon />
|
<DeleteIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</Stack>
|
</Stack>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import { styled } from '@mui/material/styles';
|
import { styled } from '@mui/material/styles';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { ComponentProps, useCallback, useMemo, useState } from 'react';
|
import { ComponentProps, useCallback, useMemo, useState } from 'react';
|
||||||
@@ -19,6 +18,7 @@ import DownloadIcon from '@mui/icons-material/Download';
|
|||||||
import DoneAllIcon from '@mui/icons-material/DoneAll';
|
import DoneAllIcon from '@mui/icons-material/DoneAll';
|
||||||
import PopupState, { bindMenu, bindTrigger } from 'material-ui-popup-state';
|
import PopupState, { bindMenu, bindTrigger } from 'material-ui-popup-state';
|
||||||
import Menu from '@mui/material/Menu';
|
import Menu from '@mui/material/Menu';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { ChapterCard } from '@/modules/chapter/components/cards/ChapterCard.tsx';
|
import { ChapterCard } from '@/modules/chapter/components/cards/ChapterCard.tsx';
|
||||||
import { ResumeFab } from '@/modules/manga/components/ResumeFAB.tsx';
|
import { ResumeFab } from '@/modules/manga/components/ResumeFAB.tsx';
|
||||||
@@ -186,7 +186,10 @@ export const ChapterList = ({
|
|||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Stack direction="row">
|
<Stack direction="row">
|
||||||
<Tooltip title={t('chapter.action.mark_as_read.add.label.action.current')}>
|
<CustomTooltip
|
||||||
|
title={t('chapter.action.mark_as_read.add.label.action.current')}
|
||||||
|
disabled={areAllChaptersRead}
|
||||||
|
>
|
||||||
<IconButton
|
<IconButton
|
||||||
disabled={areAllChaptersRead}
|
disabled={areAllChaptersRead}
|
||||||
onClick={() => Chapters.markAsRead(Chapters.getNonRead(chapters), true, manga.id)}
|
onClick={() => Chapters.markAsRead(Chapters.getNonRead(chapters), true, manga.id)}
|
||||||
@@ -194,11 +197,14 @@ export const ChapterList = ({
|
|||||||
>
|
>
|
||||||
<DoneAllIcon />
|
<DoneAllIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<PopupState variant="popover" popupId="chapterlist-download-button">
|
<PopupState variant="popover" popupId="chapterlist-download-button">
|
||||||
{(popupState) => (
|
{(popupState) => (
|
||||||
<>
|
<>
|
||||||
<Tooltip title={t('chapter.action.download.add.label.action')}>
|
<CustomTooltip
|
||||||
|
title={t('chapter.action.download.add.label.action')}
|
||||||
|
disabled={areAllChaptersRead}
|
||||||
|
>
|
||||||
<IconButton
|
<IconButton
|
||||||
disabled={areAllChaptersDownloaded}
|
disabled={areAllChaptersDownloaded}
|
||||||
{...bindTrigger(popupState)}
|
{...bindTrigger(popupState)}
|
||||||
@@ -206,7 +212,7 @@ export const ChapterList = ({
|
|||||||
>
|
>
|
||||||
<DownloadIcon />
|
<DownloadIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
{popupState.isOpen && (
|
{popupState.isOpen && (
|
||||||
<Menu {...bindMenu(popupState)}>
|
<Menu {...bindMenu(popupState)}>
|
||||||
<ChaptersDownloadActionMenuItems
|
<ChaptersDownloadActionMenuItems
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
import FilterList from '@mui/icons-material/FilterList';
|
import FilterList from '@mui/icons-material/FilterList';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { ChapterOptions } from '@/modules/chapter/components/ChapterOptions.tsx';
|
import { ChapterOptions } from '@/modules/chapter/components/ChapterOptions.tsx';
|
||||||
import { isFilterActive } from '@/modules/chapter/utils/ChapterList.util.tsx';
|
import { isFilterActive } from '@/modules/chapter/utils/ChapterList.util.tsx';
|
||||||
import { ChapterListOptions, ChapterOptionsReducerAction } from '@/modules/chapter/Chapter.types.ts';
|
import { ChapterListOptions, ChapterOptionsReducerAction } from '@/modules/chapter/Chapter.types.ts';
|
||||||
@@ -28,11 +28,11 @@ export const ChaptersToolbarMenu = ({ options, optionsDispatch }: IProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Tooltip title={t('settings.title')}>
|
<CustomTooltip title={t('settings.title')}>
|
||||||
<IconButton onClick={() => setOpen(true)} color="inherit">
|
<IconButton onClick={() => setOpen(true)} color="inherit">
|
||||||
<FilterList color={isFiltered ? 'warning' : undefined} />
|
<FilterList color={isFiltered ? 'warning' : undefined} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<ChapterOptions
|
<ChapterOptions
|
||||||
open={open}
|
open={open}
|
||||||
onClose={() => setOpen(false)}
|
onClose={() => setOpen(false)}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import MoreVertIcon from '@mui/icons-material/MoreVert';
|
|||||||
import CardActionArea from '@mui/material/CardActionArea';
|
import CardActionArea from '@mui/material/CardActionArea';
|
||||||
import Checkbox from '@mui/material/Checkbox';
|
import Checkbox from '@mui/material/Checkbox';
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import Card from '@mui/material/Card';
|
import Card from '@mui/material/Card';
|
||||||
import CardContent from '@mui/material/CardContent';
|
import CardContent from '@mui/material/CardContent';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
@@ -22,6 +21,7 @@ import { Link } from 'react-router-dom';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import PopupState, { bindMenu, bindTrigger } from 'material-ui-popup-state';
|
import PopupState, { bindMenu, bindTrigger } from 'material-ui-popup-state';
|
||||||
import { useLongPress } from 'use-long-press';
|
import { useLongPress } from 'use-long-press';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { getDateString } from '@/util/DateHelper.ts';
|
import { getDateString } from '@/util/DateHelper.ts';
|
||||||
import { DownloadStateIndicator } from '@/modules/core/components/DownloadStateIndicator.tsx';
|
import { DownloadStateIndicator } from '@/modules/core/components/DownloadStateIndicator.tsx';
|
||||||
import { ChapterType } from '@/lib/graphql/generated/graphql.ts';
|
import { ChapterType } from '@/lib/graphql/generated/graphql.ts';
|
||||||
@@ -204,7 +204,7 @@ export const ChapterCard = memo((props: IProps) => {
|
|||||||
|
|
||||||
<Stack sx={{ minHeight: '48px' }}>
|
<Stack sx={{ minHeight: '48px' }}>
|
||||||
{selected === null ? (
|
{selected === null ? (
|
||||||
<Tooltip title={t('global.button.options')}>
|
<CustomTooltip title={t('global.button.options')}>
|
||||||
<IconButton
|
<IconButton
|
||||||
ref={menuButtonRef}
|
ref={menuButtonRef}
|
||||||
{...bindTrigger(popupState)}
|
{...bindTrigger(popupState)}
|
||||||
@@ -220,13 +220,13 @@ export const ChapterCard = memo((props: IProps) => {
|
|||||||
>
|
>
|
||||||
<MoreVertIcon />
|
<MoreVertIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
) : (
|
) : (
|
||||||
<Tooltip
|
<CustomTooltip
|
||||||
title={t(selected ? 'global.button.deselect' : 'global.button.select')}
|
title={t(selected ? 'global.button.deselect' : 'global.button.select')}
|
||||||
>
|
>
|
||||||
<Checkbox checked={selected} />
|
<Checkbox checked={selected} />
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import Checkbox from '@mui/material/Checkbox';
|
import Checkbox from '@mui/material/Checkbox';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
|
|
||||||
export const SelectableCollectionSelectAll = ({
|
export const SelectableCollectionSelectAll = ({
|
||||||
areAllItemsSelected,
|
areAllItemsSelected,
|
||||||
@@ -22,7 +22,7 @@ export const SelectableCollectionSelectAll = ({
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title={t(!areAllItemsSelected ? 'global.button.select_all' : 'global.button.clear')}>
|
<CustomTooltip title={t(!areAllItemsSelected ? 'global.button.select_all' : 'global.button.clear')}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
sx={{
|
sx={{
|
||||||
padding: '8px',
|
padding: '8px',
|
||||||
@@ -35,6 +35,6 @@ export const SelectableCollectionSelectAll = ({
|
|||||||
indeterminate={!areNoItemsSelected && !areAllItemsSelected}
|
indeterminate={!areNoItemsSelected && !areAllItemsSelected}
|
||||||
onChange={(_, checked) => onChange(checked)}
|
onChange={(_, checked) => onChange(checked)}
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import Checkbox from '@mui/material/Checkbox';
|
import Checkbox from '@mui/material/Checkbox';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import ClearIcon from '@mui/icons-material/Clear';
|
import ClearIcon from '@mui/icons-material/Clear';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { SelectableCollectionSelectAll } from '@/modules/collection/components/SelectableCollectionSelectAll.tsx';
|
import { SelectableCollectionSelectAll } from '@/modules/collection/components/SelectableCollectionSelectAll.tsx';
|
||||||
|
|
||||||
export const SelectableCollectionSelectMode = ({
|
export const SelectableCollectionSelectMode = ({
|
||||||
@@ -36,7 +36,7 @@ export const SelectableCollectionSelectMode = ({
|
|||||||
onChange={onSelectAll}
|
onChange={onSelectAll}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Tooltip title={t(!isActive ? 'global.button.select_all' : 'global.button.cancel')}>
|
<CustomTooltip title={t(!isActive ? 'global.button.select_all' : 'global.button.cancel')}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
checkedIcon={<ClearIcon />}
|
checkedIcon={<ClearIcon />}
|
||||||
sx={{
|
sx={{
|
||||||
@@ -49,7 +49,7 @@ export const SelectableCollectionSelectMode = ({
|
|||||||
checked={isActive}
|
checked={isActive}
|
||||||
onChange={(_, checked) => onModeChange(checked)}
|
onChange={(_, checked) => onModeChange(checked)}
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,11 +9,11 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import SearchIcon from '@mui/icons-material/Search';
|
import SearchIcon from '@mui/icons-material/Search';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import { useQueryParam, StringParam } from 'use-query-params';
|
import { useQueryParam, StringParam } from 'use-query-params';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useLocation } from 'react-router-dom';
|
import { useLocation } from 'react-router-dom';
|
||||||
import { useTheme } from '@mui/material/styles';
|
import { useTheme } from '@mui/material/styles';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { SearchTextField } from '@/modules/core/components/inputs/SearchTextField.tsx';
|
import { SearchTextField } from '@/modules/core/components/inputs/SearchTextField.tsx';
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
@@ -124,10 +124,10 @@ export const AppbarSearch: React.FunctionComponent<IProps> = (props) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title={t('search.title.search')}>
|
<CustomTooltip title={t('search.title.search')}>
|
||||||
<IconButton onClick={() => updateSearchOpenState(true)} color="inherit">
|
<IconButton onClick={() => updateSearchOpenState(true)} color="inherit">
|
||||||
<SearchIcon />
|
<SearchIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
20
src/modules/core/components/CustomTooltip.tsx
Normal file
20
src/modules/core/components/CustomTooltip.tsx
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) Contributors to the Suwayomi project
|
||||||
|
*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import Tooltip, { TooltipProps } from '@mui/material/Tooltip';
|
||||||
|
|
||||||
|
export const CustomTooltip = ({
|
||||||
|
children,
|
||||||
|
disabled = false,
|
||||||
|
title,
|
||||||
|
...props
|
||||||
|
}: TooltipProps & { disabled?: boolean }) => (
|
||||||
|
<Tooltip {...props} title={disabled ? '' : title}>
|
||||||
|
{children}
|
||||||
|
</Tooltip>
|
||||||
|
);
|
||||||
@@ -11,10 +11,10 @@ import Menu from '@mui/material/Menu';
|
|||||||
import MenuItem from '@mui/material/MenuItem';
|
import MenuItem from '@mui/material/MenuItem';
|
||||||
import FormControlLabel from '@mui/material/FormControlLabel';
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||||
import Radio from '@mui/material/Radio';
|
import Radio from '@mui/material/Radio';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ViewModuleIcon from '@mui/icons-material/ViewModule';
|
import ViewModuleIcon from '@mui/icons-material/ViewModule';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
|
|
||||||
import { GridLayout } from '@/modules/core/Core.types.ts';
|
import { GridLayout } from '@/modules/core/Core.types.ts';
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ export function GridLayouts({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Tooltip title={t('global.label.display')}>
|
<CustomTooltip title={t('global.label.display')}>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
size="small"
|
size="small"
|
||||||
@@ -55,7 +55,7 @@ export function GridLayouts({
|
|||||||
>
|
>
|
||||||
<ViewModuleIcon />
|
<ViewModuleIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<Menu
|
<Menu
|
||||||
id="basic-menu"
|
id="basic-menu"
|
||||||
anchorEl={anchorEl}
|
anchorEl={anchorEl}
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ import { useEffect, useMemo, useState } from 'react';
|
|||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import RefreshIcon from '@mui/icons-material/Refresh';
|
import RefreshIcon from '@mui/icons-material/Refresh';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import PopupState, { bindMenu, bindTrigger } from 'material-ui-popup-state';
|
import PopupState, { bindMenu, bindTrigger } from 'material-ui-popup-state';
|
||||||
import Menu from '@mui/material/Menu';
|
import Menu from '@mui/material/Menu';
|
||||||
import MenuItem from '@mui/material/MenuItem';
|
import MenuItem from '@mui/material/MenuItem';
|
||||||
import ClearIcon from '@mui/icons-material/Clear';
|
import ClearIcon from '@mui/icons-material/Clear';
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { makeToast } from '@/modules/core/utils/Toast.ts';
|
import { makeToast } from '@/modules/core/utils/Toast.ts';
|
||||||
import { UpdaterSubscription } from '@/lib/graphql/generated/graphql.ts';
|
import { UpdaterSubscription } from '@/lib/graphql/generated/graphql.ts';
|
||||||
@@ -118,7 +118,7 @@ export function UpdateChecker({
|
|||||||
<PopupState variant="popover" popupId="library-update-checker-menu">
|
<PopupState variant="popover" popupId="library-update-checker-menu">
|
||||||
{(popupState) => (
|
{(popupState) => (
|
||||||
<>
|
<>
|
||||||
<Tooltip
|
<CustomTooltip
|
||||||
title={
|
title={
|
||||||
isRunning
|
isRunning
|
||||||
? t('library.action.label.stop_update')
|
? t('library.action.label.stop_update')
|
||||||
@@ -151,7 +151,7 @@ export function UpdateChecker({
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<Menu {...bindMenu(popupState)}>
|
<Menu {...bindMenu(popupState)}>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { MultiValueButtonProps } from '@/modules/core/Core.types.ts';
|
import { MultiValueButtonProps } from '@/modules/core/Core.types.ts';
|
||||||
import { Superscript } from '@/modules/core/components/Superscript.tsx';
|
import { Superscript } from '@/modules/core/components/Superscript.tsx';
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ export const ButtonSelect = <Value extends string | number>({
|
|||||||
: t(valueToDisplayData[displayValue].title);
|
: t(valueToDisplayData[displayValue].title);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip key={displayValue} title={isDefault ? t('reader.settings.active_setting') : ''}>
|
<CustomTooltip key={displayValue} title={isDefault ? t('reader.settings.active_setting') : ''}>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => setValue(displayValue)}
|
onClick={() => setValue(displayValue)}
|
||||||
variant={displayValue === value ? 'contained' : 'outlined'}
|
variant={displayValue === value ? 'contained' : 'outlined'}
|
||||||
@@ -47,7 +47,7 @@ export const ButtonSelect = <Value extends string | number>({
|
|||||||
>
|
>
|
||||||
{isDefault ? <Superscript i18nKey="global.label.footnote" value={text} /> : text}
|
{isDefault ? <Superscript i18nKey="global.label.footnote" value={text} /> : text}
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
import Button, { ButtonProps } from '@mui/material/Button';
|
import Button, { ButtonProps } from '@mui/material/Button';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import RestartAltIcon from '@mui/icons-material/RestartAlt';
|
import RestartAltIcon from '@mui/icons-material/RestartAlt';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import IconButton, { IconButtonProps } from '@mui/material/IconButton';
|
import IconButton, { IconButtonProps } from '@mui/material/IconButton';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
|
|
||||||
type PropsIconButton = { asIconButton: true } & IconButtonProps;
|
type PropsIconButton = { asIconButton: true } & IconButtonProps;
|
||||||
type PropsButton = { asIconButton?: false } & ButtonProps;
|
type PropsButton = { asIconButton?: false } & ButtonProps;
|
||||||
@@ -21,11 +21,11 @@ export const ResetButton = ({ asIconButton, ...props }: Props) => {
|
|||||||
|
|
||||||
if (asIconButton) {
|
if (asIconButton) {
|
||||||
return (
|
return (
|
||||||
<Tooltip title={t('global.button.reset')}>
|
<CustomTooltip title={t('global.button.reset')}>
|
||||||
<IconButton color="inherit" {...props}>
|
<IconButton color="inherit" {...props}>
|
||||||
<RestartAltIcon />
|
<RestartAltIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { ReactNode, useMemo } from 'react';
|
import { ReactNode, useMemo } from 'react';
|
||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { MultiValueButtonProps } from '@/modules/core/Core.types.ts';
|
import { MultiValueButtonProps } from '@/modules/core/Core.types.ts';
|
||||||
import { getNextRotationValue } from '@/modules/core/utils/ValueRotationButton.utils.ts';
|
import { getNextRotationValue } from '@/modules/core/utils/ValueRotationButton.utils.ts';
|
||||||
import { Superscript } from '@/modules/core/components/Superscript.tsx';
|
import { Superscript } from '@/modules/core/components/Superscript.tsx';
|
||||||
@@ -37,7 +37,7 @@ export const ValueRotationButton = <Value extends string | number>({
|
|||||||
}, [value, values]);
|
}, [value, values]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title={tooltip}>
|
<CustomTooltip title={tooltip}>
|
||||||
{isDefault ? (
|
{isDefault ? (
|
||||||
<Button
|
<Button
|
||||||
onClick={() => setValue(values[0])}
|
onClick={() => setValue(values[0])}
|
||||||
@@ -81,6 +81,6 @@ export const ValueRotationButton = <Value extends string | number>({
|
|||||||
: t(valueToDisplayData[value].title)}
|
: t(valueToDisplayData[value].title)}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ import IconButton from '@mui/material/IconButton';
|
|||||||
import FilterListIcon from '@mui/icons-material/FilterList';
|
import FilterListIcon from '@mui/icons-material/FilterList';
|
||||||
import List from '@mui/material/List';
|
import List from '@mui/material/List';
|
||||||
import ListItemText from '@mui/material/ListItemText';
|
import ListItemText from '@mui/material/ListItemText';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import ListItem from '@mui/material/ListItem';
|
import ListItem from '@mui/material/ListItem';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { cloneObject } from '@/util/cloneObject.tsx';
|
import { cloneObject } from '@/util/cloneObject.tsx';
|
||||||
import { translateExtensionLanguage } from '@/modules/extension/Extensions.utils.ts';
|
import { translateExtensionLanguage } from '@/modules/extension/Extensions.utils.ts';
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ export function LangSelect(props: IProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Tooltip title={t('settings.title')}>
|
<CustomTooltip title={t('settings.title')}>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => setOpen(true)}
|
onClick={() => setOpen(true)}
|
||||||
aria-label="display more actions"
|
aria-label="display more actions"
|
||||||
@@ -82,7 +82,7 @@ export function LangSelect(props: IProps) {
|
|||||||
>
|
>
|
||||||
<FilterListIcon />
|
<FilterListIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<Dialog
|
<Dialog
|
||||||
sx={{
|
sx={{
|
||||||
'.MuiDialog-paper': {
|
'.MuiDialog-paper': {
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import ListItem from '@mui/material/ListItem';
|
|||||||
import ListItemButton from '@mui/material/ListItemButton';
|
import ListItemButton from '@mui/material/ListItemButton';
|
||||||
import ListItemText from '@mui/material/ListItemText';
|
import ListItemText from '@mui/material/ListItemText';
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import DialogContent from '@mui/material/DialogContent';
|
import DialogContent from '@mui/material/DialogContent';
|
||||||
@@ -24,6 +23,7 @@ import DeleteIcon from '@mui/icons-material/Delete';
|
|||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import DialogContentText from '@mui/material/DialogContentText';
|
import DialogContentText from '@mui/material/DialogContentText';
|
||||||
import InfoIcon from '@mui/icons-material/Info';
|
import InfoIcon from '@mui/icons-material/Info';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { TextSetting, TextSettingProps } from '@/modules/core/components/settings/text/TextSetting.tsx';
|
import { TextSetting, TextSettingProps } from '@/modules/core/components/settings/text/TextSetting.tsx';
|
||||||
import { TextSettingDialog } from '@/modules/core/components/settings/text/TextSettingDialog.tsx';
|
import { TextSettingDialog } from '@/modules/core/components/settings/text/TextSettingDialog.tsx';
|
||||||
import { makeToast } from '@/modules/core/utils/Toast.ts';
|
import { makeToast } from '@/modules/core/utils/Toast.ts';
|
||||||
@@ -49,11 +49,11 @@ const MutableListItem = ({
|
|||||||
<ListItemText secondary={textSettingProps.value} />
|
<ListItemText secondary={textSettingProps.value} />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
)}
|
)}
|
||||||
<Tooltip title={t('chapter.action.download.delete.label.action')}>
|
<CustomTooltip title={t('chapter.action.download.delete.label.action')} disabled={!deletable}>
|
||||||
<IconButton disabled={!deletable} size="large" onClick={handleDelete}>
|
<IconButton disabled={!deletable} size="large" onClick={handleDelete}>
|
||||||
<DeleteIcon />
|
<DeleteIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import Card from '@mui/material/Card';
|
|||||||
import CardActionArea from '@mui/material/CardActionArea';
|
import CardActionArea from '@mui/material/CardActionArea';
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Box, { BoxProps } from '@mui/material/Box';
|
import Box, { BoxProps } from '@mui/material/Box';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import React, { memo, useCallback, useEffect, useLayoutEffect } from 'react';
|
import React, { memo, useCallback, useEffect, useLayoutEffect } from 'react';
|
||||||
import { DragDropContext, Draggable, DraggableProvided, DropResult } from 'react-beautiful-dnd';
|
import { DragDropContext, Draggable, DraggableProvided, DropResult } from 'react-beautiful-dnd';
|
||||||
@@ -25,6 +24,7 @@ import DeleteSweepIcon from '@mui/icons-material/DeleteSweep';
|
|||||||
import { Virtuoso } from 'react-virtuoso';
|
import { Virtuoso } from 'react-virtuoso';
|
||||||
import CardContent from '@mui/material/CardContent';
|
import CardContent from '@mui/material/CardContent';
|
||||||
import Refresh from '@mui/icons-material/Refresh';
|
import Refresh from '@mui/icons-material/Refresh';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { StrictModeDroppable } from '@/modules/core/components/StrictModeDroppable.tsx';
|
import { StrictModeDroppable } from '@/modules/core/components/StrictModeDroppable.tsx';
|
||||||
import { makeToast } from '@/modules/core/utils/Toast.ts';
|
import { makeToast } from '@/modules/core/utils/Toast.ts';
|
||||||
@@ -93,7 +93,7 @@ const DownloadChapterItem = memo(
|
|||||||
</Stack>
|
</Stack>
|
||||||
<DownloadStateIndicator chapterId={item.chapter.id} />
|
<DownloadStateIndicator chapterId={item.chapter.id} />
|
||||||
{item.state === DownloadState.Error && (
|
{item.state === DownloadState.Error && (
|
||||||
<Tooltip title={t('global.button.retry')}>
|
<CustomTooltip title={t('global.button.retry')}>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -104,9 +104,9 @@ const DownloadChapterItem = memo(
|
|||||||
>
|
>
|
||||||
<Refresh />
|
<Refresh />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
)}
|
)}
|
||||||
<Tooltip title={t('chapter.action.download.delete.label.action')}>
|
<CustomTooltip title={t('chapter.action.download.delete.label.action')}>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -117,7 +117,7 @@ const DownloadChapterItem = memo(
|
|||||||
>
|
>
|
||||||
<DeleteIcon />
|
<DeleteIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</CardActionArea>
|
</CardActionArea>
|
||||||
</Card>
|
</Card>
|
||||||
@@ -165,17 +165,20 @@ export const DownloadQueue: React.FC = () => {
|
|||||||
setTitle(t('download.queue.title'));
|
setTitle(t('download.queue.title'));
|
||||||
setAction(
|
setAction(
|
||||||
<>
|
<>
|
||||||
<Tooltip title={t('download.queue.label.delete_all')}>
|
<CustomTooltip title={t('download.queue.label.delete_all')}>
|
||||||
<IconButton onClick={clearQueue} size="large" color="inherit">
|
<IconButton onClick={clearQueue} size="large" color="inherit">
|
||||||
<DeleteSweepIcon />
|
<DeleteSweepIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
|
|
||||||
<Tooltip title={t(status === DownloaderState.Started ? 'global.button.start' : 'global.button.stop')}>
|
<CustomTooltip
|
||||||
|
title={t(status === DownloaderState.Started ? 'global.button.start' : 'global.button.stop')}
|
||||||
|
disabled={isQueueEmpty}
|
||||||
|
>
|
||||||
<IconButton onClick={toggleQueueStatus} size="large" disabled={isQueueEmpty} color="inherit">
|
<IconButton onClick={toggleQueueStatus} size="large" disabled={isQueueEmpty} color="inherit">
|
||||||
{status === DownloaderState.Stopped ? <PlayArrowIcon /> : <PauseIcon />}
|
{status === DownloaderState.Stopped ? <PlayArrowIcon /> : <PauseIcon />}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</>,
|
</>,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ import AddIcon from '@mui/icons-material/Add';
|
|||||||
import { StringParam, useQueryParam } from 'use-query-params';
|
import { StringParam, useQueryParam } from 'use-query-params';
|
||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { extensionDefaultLangs } from '@/modules/core/utils/Languages.ts';
|
import { extensionDefaultLangs } from '@/modules/core/utils/Languages.ts';
|
||||||
import { useLocalStorage } from '@/modules/core/hooks/useStorage.tsx';
|
import { useLocalStorage } from '@/modules/core/hooks/useStorage.tsx';
|
||||||
@@ -134,11 +134,11 @@ export function Extensions({ tabsMenuHeight }: { tabsMenuHeight: number }) {
|
|||||||
setAction(
|
setAction(
|
||||||
<>
|
<>
|
||||||
<AppbarSearch />
|
<AppbarSearch />
|
||||||
<Tooltip title={t('extension.action.label.install_external')}>
|
<CustomTooltip title={t('extension.action.label.install_external')}>
|
||||||
<IconButton onClick={() => inputRef.current?.click()} size="large" color="inherit">
|
<IconButton onClick={() => inputRef.current?.click()} size="large" color="inherit">
|
||||||
<AddIcon />
|
<AddIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
|
|
||||||
<LangSelect shownLangs={shownLangs} setShownLangs={setShownLangs} allLangs={allLangs} />
|
<LangSelect shownLangs={shownLangs} setShownLangs={setShownLangs} allLangs={allLangs} />
|
||||||
</>,
|
</>,
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
import FilterList from '@mui/icons-material/FilterList';
|
import FilterList from '@mui/icons-material/FilterList';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import { ComponentProps, useState } from 'react';
|
import { ComponentProps, useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { LibraryOptionsPanel } from '@/modules/library/components/LibraryOptionsPanel.tsx';
|
import { LibraryOptionsPanel } from '@/modules/library/components/LibraryOptionsPanel.tsx';
|
||||||
import { useLibraryOptionsContext } from '@/modules/library/contexts/LibraryOptionsContext.tsx';
|
import { useLibraryOptionsContext } from '@/modules/library/contexts/LibraryOptionsContext.tsx';
|
||||||
|
|
||||||
@@ -34,11 +34,11 @@ export const LibraryToolbarMenu = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Tooltip title={t('settings.title')}>
|
<CustomTooltip title={t('settings.title')}>
|
||||||
<IconButton onClick={() => setOpen(!open)} color={active ? 'warning' : 'inherit'}>
|
<IconButton onClick={() => setOpen(!open)} color={active ? 'warning' : 'inherit'}>
|
||||||
<FilterList />
|
<FilterList />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<LibraryOptionsPanel category={category} open={open} onClose={() => setOpen(false)} />
|
<LibraryOptionsPanel category={category} open={open} onClose={() => setOpen(false)} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import PlayArrowIcon from '@mui/icons-material/PlayArrow';
|
import PlayArrowIcon from '@mui/icons-material/PlayArrow';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { ChapterReadInfo, Chapters, ChapterSourceOrderInfo } from '@/modules/chapter/services/Chapters.ts';
|
import { ChapterReadInfo, Chapters, ChapterSourceOrderInfo } from '@/modules/chapter/services/Chapters.ts';
|
||||||
|
|
||||||
export const ContinueReadingButton = ({
|
export const ContinueReadingButton = ({
|
||||||
@@ -32,7 +32,7 @@ export const ContinueReadingButton = ({
|
|||||||
const isFirstChapter = sourceOrder === 1;
|
const isFirstChapter = sourceOrder === 1;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title={t(isFirstChapter ? 'global.button.start' : 'global.button.resume')}>
|
<CustomTooltip title={t(isFirstChapter ? 'global.button.start' : 'global.button.resume')}>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -45,6 +45,6 @@ export const ContinueReadingButton = ({
|
|||||||
>
|
>
|
||||||
<PlayArrowIcon />
|
<PlayArrowIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import { t as translate } from 'i18next';
|
|||||||
import Link from '@mui/material/Link';
|
import Link from '@mui/material/Link';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import Chip from '@mui/material/Chip';
|
import Chip from '@mui/material/Chip';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import LaunchIcon from '@mui/icons-material/Launch';
|
import LaunchIcon from '@mui/icons-material/Launch';
|
||||||
import Collapse from '@mui/material/Collapse';
|
import Collapse from '@mui/material/Collapse';
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
@@ -28,6 +27,7 @@ import { bindPopover, bindTrigger, usePopupState } from 'material-ui-popup-state
|
|||||||
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
|
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
|
||||||
import { Vibrant } from 'node-vibrant/browser';
|
import { Vibrant } from 'node-vibrant/browser';
|
||||||
import { FastAverageColor } from 'fast-average-color';
|
import { FastAverageColor } from 'fast-average-color';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { makeToast } from '@/modules/core/utils/Toast.ts';
|
import { makeToast } from '@/modules/core/utils/Toast.ts';
|
||||||
import { Mangas } from '@/modules/manga/services/Mangas.ts';
|
import { Mangas } from '@/modules/manga/services/Mangas.ts';
|
||||||
import { SpinnerImage } from '@/modules/core/components/SpinnerImage.tsx';
|
import { SpinnerImage } from '@/modules/core/components/SpinnerImage.tsx';
|
||||||
@@ -129,7 +129,7 @@ const OpenSourceButton = ({ url }: { url?: string | null }) => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title={t('global.button.open_site')}>
|
<CustomTooltip title={t('global.button.open_site')} disabled={!url}>
|
||||||
<CustomIconButton
|
<CustomIconButton
|
||||||
size="medium"
|
size="medium"
|
||||||
disabled={!url}
|
disabled={!url}
|
||||||
@@ -141,7 +141,7 @@ const OpenSourceButton = ({ url }: { url?: string | null }) => {
|
|||||||
>
|
>
|
||||||
<LaunchIcon />
|
<LaunchIcon />
|
||||||
</CustomIconButton>
|
</CustomIconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -391,11 +391,11 @@ export const MangaDetails = ({
|
|||||||
<Typography variant="h5" component="h2" sx={{ wordBreak: 'break-word' }}>
|
<Typography variant="h5" component="h2" sx={{ wordBreak: 'break-word' }}>
|
||||||
{manga.title}
|
{manga.title}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Tooltip title={t('global.button.copy')}>
|
<CustomTooltip title={t('global.button.copy')}>
|
||||||
<IconButton onClick={copyTitle} color="inherit">
|
<IconButton onClick={copyTitle} color="inherit">
|
||||||
<ContentCopyIcon fontSize="small" />
|
<ContentCopyIcon fontSize="small" />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Metadata title={t('manga.label.author')} value={getValueOrUnknown(manga.author)} />
|
<Metadata title={t('manga.label.author')} value={getValueOrUnknown(manga.author)} />
|
||||||
<Metadata title={t('manga.label.artist')} value={getValueOrUnknown(manga.artist)} />
|
<Metadata title={t('manga.label.artist')} value={getValueOrUnknown(manga.artist)} />
|
||||||
|
|||||||
@@ -9,12 +9,12 @@
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { BaseSyntheticEvent, MouseEvent, TouchEvent, ChangeEvent, useMemo, forwardRef, ForwardedRef } from 'react';
|
import { BaseSyntheticEvent, MouseEvent, TouchEvent, ChangeEvent, useMemo, forwardRef, ForwardedRef } from 'react';
|
||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import Checkbox from '@mui/material/Checkbox';
|
import Checkbox from '@mui/material/Checkbox';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
||||||
import { PopupState } from 'material-ui-popup-state/hooks';
|
import { PopupState } from 'material-ui-popup-state/hooks';
|
||||||
import { bindTrigger } from 'material-ui-popup-state';
|
import { bindTrigger } from 'material-ui-popup-state';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { SelectableCollectionReturnType } from '@/modules/collection/hooks/useSelectableCollection.ts';
|
import { SelectableCollectionReturnType } from '@/modules/collection/hooks/useSelectableCollection.ts';
|
||||||
import { MediaQuery } from '@/modules/core/utils/MediaQuery.tsx';
|
import { MediaQuery } from '@/modules/core/utils/MediaQuery.tsx';
|
||||||
import { MangaType } from '@/lib/graphql/generated/graphql.ts';
|
import { MangaType } from '@/lib/graphql/generated/graphql.ts';
|
||||||
@@ -71,15 +71,15 @@ export const MangaOptionButton = forwardRef(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title={t(selected ? 'global.button.deselect' : 'global.button.select')}>
|
<CustomTooltip title={t(selected ? 'global.button.deselect' : 'global.button.select')}>
|
||||||
<Checkbox checked={selected} onMouseDown={preventDefaultAction} onChange={handleSelectionChange} />
|
<Checkbox checked={selected} onMouseDown={preventDefaultAction} onChange={handleSelectionChange} />
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (asCheckbox) {
|
if (asCheckbox) {
|
||||||
return (
|
return (
|
||||||
<Tooltip title={t('global.button.options')}>
|
<CustomTooltip title={t('global.button.options')}>
|
||||||
<IconButton
|
<IconButton
|
||||||
ref={ref}
|
ref={ref}
|
||||||
{...bindTriggerProps}
|
{...bindTriggerProps}
|
||||||
@@ -90,12 +90,12 @@ export const MangaOptionButton = forwardRef(
|
|||||||
>
|
>
|
||||||
<MoreVertIcon />
|
<MoreVertIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title={t('global.button.options')}>
|
<CustomTooltip title={t('global.button.options')}>
|
||||||
<Button
|
<Button
|
||||||
ref={ref}
|
ref={ref}
|
||||||
{...bindTriggerProps}
|
{...bindTriggerProps}
|
||||||
@@ -118,7 +118,7 @@ export const MangaOptionButton = forwardRef(
|
|||||||
>
|
>
|
||||||
<MoreVertIcon />
|
<MoreVertIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ import ListItemIcon from '@mui/material/ListItemIcon';
|
|||||||
import ListItemText from '@mui/material/ListItemText';
|
import ListItemText from '@mui/material/ListItemText';
|
||||||
import Menu from '@mui/material/Menu';
|
import Menu from '@mui/material/Menu';
|
||||||
import MenuItem from '@mui/material/MenuItem';
|
import MenuItem from '@mui/material/MenuItem';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import SyncAltIcon from '@mui/icons-material/SyncAlt';
|
import SyncAltIcon from '@mui/icons-material/SyncAlt';
|
||||||
import { useTheme } from '@mui/material/styles';
|
import { useTheme } from '@mui/material/styles';
|
||||||
import useMediaQuery from '@mui/material/useMediaQuery';
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { useCategorySelect } from '@/modules/category/hooks/useCategorySelect.tsx';
|
import { useCategorySelect } from '@/modules/category/hooks/useCategorySelect.tsx';
|
||||||
import { MangaType } from '@/lib/graphql/generated/graphql.ts';
|
import { MangaType } from '@/lib/graphql/generated/graphql.ts';
|
||||||
import { AppRoutes } from '@/modules/core/AppRoute.constants.ts';
|
import { AppRoutes } from '@/modules/core/AppRoute.constants.ts';
|
||||||
@@ -51,7 +51,7 @@ export const MangaToolbarMenu = ({ manga, onRefresh, refreshing }: IProps) => {
|
|||||||
<>
|
<>
|
||||||
{isLargeScreen && (
|
{isLargeScreen && (
|
||||||
<>
|
<>
|
||||||
<Tooltip title={t('manga.label.reload_from_source')}>
|
<CustomTooltip title={t('manga.label.reload_from_source')} disabled={refreshing}>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onRefresh();
|
onRefresh();
|
||||||
@@ -61,10 +61,10 @@ export const MangaToolbarMenu = ({ manga, onRefresh, refreshing }: IProps) => {
|
|||||||
>
|
>
|
||||||
<Refresh />
|
<Refresh />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
{manga.inLibrary && (
|
{manga.inLibrary && (
|
||||||
<>
|
<>
|
||||||
<Tooltip title={t('global.button.migrate')}>
|
<CustomTooltip title={t('global.button.migrate')}>
|
||||||
<Link
|
<Link
|
||||||
to={`${AppRoutes.migrate.childRoutes.search.path(manga.sourceId, manga.id)}?query=${manga.title}`}
|
to={`${AppRoutes.migrate.childRoutes.search.path(manga.sourceId, manga.id)}?query=${manga.title}`}
|
||||||
state={{ mangaTitle: manga.title }}
|
state={{ mangaTitle: manga.title }}
|
||||||
@@ -74,8 +74,8 @@ export const MangaToolbarMenu = ({ manga, onRefresh, refreshing }: IProps) => {
|
|||||||
<SyncAltIcon />
|
<SyncAltIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Link>
|
</Link>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<Tooltip title={t('manga.label.edit_categories')}>
|
<CustomTooltip title={t('manga.label.edit_categories')}>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
openCategorySelect(true);
|
openCategorySelect(true);
|
||||||
@@ -84,7 +84,7 @@ export const MangaToolbarMenu = ({ manga, onRefresh, refreshing }: IProps) => {
|
|||||||
>
|
>
|
||||||
<Label />
|
<Label />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ import Box from '@mui/material/Box';
|
|||||||
import Card from '@mui/material/Card';
|
import Card from '@mui/material/Card';
|
||||||
import CardActionArea from '@mui/material/CardActionArea';
|
import CardActionArea from '@mui/material/CardActionArea';
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import { styled } from '@mui/material/styles';
|
import { styled } from '@mui/material/styles';
|
||||||
import { memo, useRef } from 'react';
|
import { memo, useRef } from 'react';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { SpinnerImage } from '@/modules/core/components/SpinnerImage.tsx';
|
import { SpinnerImage } from '@/modules/core/components/SpinnerImage.tsx';
|
||||||
import { MangaOptionButton } from '@/modules/manga/components/MangaOptionButton.tsx';
|
import { MangaOptionButton } from '@/modules/manga/components/MangaOptionButton.tsx';
|
||||||
import { Mangas } from '@/modules/manga/services/Mangas.ts';
|
import { Mangas } from '@/modules/manga/services/Mangas.ts';
|
||||||
@@ -166,7 +166,7 @@ export const MangaGridCard = memo(
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{gridLayout !== GridLayout.Comfortable && (
|
{gridLayout !== GridLayout.Comfortable && (
|
||||||
<Tooltip title={title} placement="top">
|
<CustomTooltip title={title} placement="top">
|
||||||
<TypographyMaxLines
|
<TypographyMaxLines
|
||||||
component="h3"
|
component="h3"
|
||||||
sx={{
|
sx={{
|
||||||
@@ -176,7 +176,7 @@ export const MangaGridCard = memo(
|
|||||||
>
|
>
|
||||||
{title}
|
{title}
|
||||||
</TypographyMaxLines>
|
</TypographyMaxLines>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
)}
|
)}
|
||||||
{continueReadingButton}
|
{continueReadingButton}
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -185,7 +185,7 @@ export const MangaGridCard = memo(
|
|||||||
</Card>
|
</Card>
|
||||||
{gridLayout === GridLayout.Comfortable && (
|
{gridLayout === GridLayout.Comfortable && (
|
||||||
<Stack sx={{ pb: 1 }}>
|
<Stack sx={{ pb: 1 }}>
|
||||||
<Tooltip title={title} placement="top">
|
<CustomTooltip title={title} placement="top">
|
||||||
<TypographyMaxLines
|
<TypographyMaxLines
|
||||||
component="h3"
|
component="h3"
|
||||||
sx={{
|
sx={{
|
||||||
@@ -197,7 +197,7 @@ export const MangaGridCard = memo(
|
|||||||
>
|
>
|
||||||
{title}
|
{title}
|
||||||
</TypographyMaxLines>
|
</TypographyMaxLines>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</Stack>
|
</Stack>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ import CardActionArea from '@mui/material/CardActionArea';
|
|||||||
import Avatar from '@mui/material/Avatar';
|
import Avatar from '@mui/material/Avatar';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import { Link as RouterLink } from 'react-router-dom';
|
import { Link as RouterLink } from 'react-router-dom';
|
||||||
import { memo, useRef } from 'react';
|
import { memo, useRef } from 'react';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { SpinnerImage } from '@/modules/core/components/SpinnerImage.tsx';
|
import { SpinnerImage } from '@/modules/core/components/SpinnerImage.tsx';
|
||||||
import { TypographyMaxLines } from '@/modules/core/components/TypographyMaxLines.tsx';
|
import { TypographyMaxLines } from '@/modules/core/components/TypographyMaxLines.tsx';
|
||||||
import { SpecificMangaCardProps } from '@/modules/manga/Manga.types.ts';
|
import { SpecificMangaCardProps } from '@/modules/manga/Manga.types.ts';
|
||||||
@@ -103,11 +103,11 @@ export const MangaListCard = memo(
|
|||||||
width: 'min-content',
|
width: 'min-content',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Tooltip title={title} placement="top">
|
<CustomTooltip title={title} placement="top">
|
||||||
<TypographyMaxLines variant="h6" component="h3">
|
<TypographyMaxLines variant="h6" component="h3">
|
||||||
{title}
|
{title}
|
||||||
</TypographyMaxLines>
|
</TypographyMaxLines>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</Box>
|
</Box>
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ import Warning from '@mui/icons-material/Warning';
|
|||||||
import CircularProgress from '@mui/material/CircularProgress';
|
import CircularProgress from '@mui/material/CircularProgress';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import React, { useEffect, useLayoutEffect, useRef } from 'react';
|
import React, { useEffect, useLayoutEffect, useRef } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import { isNetworkRequestInFlight } from '@apollo/client/core/networkStatus';
|
import { isNetworkRequestInFlight } from '@apollo/client/core/networkStatus';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { ChapterList } from '@/modules/chapter/components/ChapterList.tsx';
|
import { ChapterList } from '@/modules/chapter/components/ChapterList.tsx';
|
||||||
import { useRefreshManga } from '@/modules/manga/hooks/useRefreshManga.ts';
|
import { useRefreshManga } from '@/modules/manga/hooks/useRefreshManga.ts';
|
||||||
@@ -78,7 +78,7 @@ export const Manga: React.FC = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{error && !isValidating && !refreshing && (
|
{error && !isValidating && !refreshing && (
|
||||||
<Tooltip
|
<CustomTooltip
|
||||||
title={
|
title={
|
||||||
<>
|
<>
|
||||||
{t('manga.error.label.request_failure')}
|
{t('manga.error.label.request_failure')}
|
||||||
@@ -90,7 +90,7 @@ export const Manga: React.FC = () => {
|
|||||||
<IconButton onClick={() => refetch()}>
|
<IconButton onClick={() => refetch()}>
|
||||||
<Warning color="error" />
|
<Warning color="error" />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
)}
|
)}
|
||||||
{manga && (refreshing || isValidating) && (
|
{manga && (refreshing || isValidating) && (
|
||||||
<IconButton disabled>
|
<IconButton disabled>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import SortByAlphaIcon from '@mui/icons-material/SortByAlpha';
|
|||||||
import TagIcon from '@mui/icons-material/Tag';
|
import TagIcon from '@mui/icons-material/Tag';
|
||||||
import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
|
import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
|
||||||
import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
|
import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { LoadingPlaceholder } from '@/modules/core/components/placeholder/LoadingPlaceholder.tsx';
|
import { LoadingPlaceholder } from '@/modules/core/components/placeholder/LoadingPlaceholder.tsx';
|
||||||
import { EmptyViewAbsoluteCentered } from '@/modules/core/components/placeholder/EmptyViewAbsoluteCentered.tsx';
|
import { EmptyViewAbsoluteCentered } from '@/modules/core/components/placeholder/EmptyViewAbsoluteCentered.tsx';
|
||||||
@@ -123,7 +123,7 @@ export const Migration = ({ tabsMenuHeight }: { tabsMenuHeight: number }) => {
|
|||||||
zIndex: 1,
|
zIndex: 1,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Tooltip title={t(sortByToTranslationKey[sortBy])}>
|
<CustomTooltip title={t(sortByToTranslationKey[sortBy])}>
|
||||||
<IconButton
|
<IconButton
|
||||||
size="large"
|
size="large"
|
||||||
color="inherit"
|
color="inherit"
|
||||||
@@ -133,8 +133,8 @@ export const Migration = ({ tabsMenuHeight }: { tabsMenuHeight: number }) => {
|
|||||||
>
|
>
|
||||||
{sortBy ? <TagIcon /> : <SortByAlphaIcon />}
|
{sortBy ? <TagIcon /> : <SortByAlphaIcon />}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<Tooltip title={t(sortOrderToTranslationKey[sortOrder])}>
|
<CustomTooltip title={t(sortOrderToTranslationKey[sortOrder])}>
|
||||||
<IconButton
|
<IconButton
|
||||||
size="large"
|
size="large"
|
||||||
color="inherit"
|
color="inherit"
|
||||||
@@ -147,7 +147,7 @@ export const Migration = ({ tabsMenuHeight }: { tabsMenuHeight: number }) => {
|
|||||||
>
|
>
|
||||||
{sortOrder ? <ArrowDownwardIcon /> : <ArrowUpwardIcon />}
|
{sortOrder ? <ArrowDownwardIcon /> : <ArrowUpwardIcon />}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</Stack>
|
</Stack>
|
||||||
<List sx={{ p: 0 }}>
|
<List sx={{ p: 0 }}>
|
||||||
{migratableSources.map((migratableSource) => (
|
{migratableSources.map((migratableSource) => (
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import { styled, useTheme } from '@mui/material/styles';
|
|||||||
import { useCallback, useMemo, useRef } from 'react';
|
import { useCallback, useMemo, useRef } from 'react';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import ListItem from '@mui/material/ListItem';
|
import ListItem from '@mui/material/ListItem';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { ListItemLink } from '@/modules/core/components/ListItemLink.tsx';
|
import { ListItemLink } from '@/modules/core/components/ListItemLink.tsx';
|
||||||
import { useGetOptionForDirection } from '@/modules/theme/services/ThemeCreator.ts';
|
import { useGetOptionForDirection } from '@/modules/theme/services/ThemeCreator.ts';
|
||||||
import { useNavBarContext } from '@/modules/navigation-bar/contexts/NavbarContext.tsx';
|
import { useNavBarContext } from '@/modules/navigation-bar/contexts/NavbarContext.tsx';
|
||||||
@@ -55,7 +55,7 @@ const NavigationBarItem = ({ path, title, IconComponent, SelectedIconComponent }
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ListItemLink selected={!isCollapsed && isActive} sx={{ p: 0, m: 0 }} to={path}>
|
<ListItemLink selected={!isCollapsed && isActive} sx={{ p: 0, m: 0 }} to={path}>
|
||||||
<Tooltip title={t(title)} placement="right">
|
<CustomTooltip title={t(title)} placement="right">
|
||||||
<ListItem sx={listItemProps}>
|
<ListItem sx={listItemProps}>
|
||||||
<ListItemIcon sx={listItemIconProps}>
|
<ListItemIcon sx={listItemIconProps}>
|
||||||
<Icon
|
<Icon
|
||||||
@@ -84,7 +84,7 @@ const NavigationBarItem = ({ path, title, IconComponent, SelectedIconComponent }
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</ListItemLink>
|
</ListItemLink>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ import Menu from '@mui/material/Menu';
|
|||||||
import Link from '@mui/material/Link';
|
import Link from '@mui/material/Link';
|
||||||
import { Link as RouterLink } from 'react-router-dom';
|
import { Link as RouterLink } from 'react-router-dom';
|
||||||
import { alpha } from '@mui/material/styles';
|
import { alpha } from '@mui/material/styles';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import Slide from '@mui/material/Slide';
|
import Slide from '@mui/material/Slide';
|
||||||
import { forwardRef, memo } from 'react';
|
import { forwardRef, memo } from 'react';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { useGetOptionForDirection } from '@/modules/theme/services/ThemeCreator.ts';
|
import { useGetOptionForDirection } from '@/modules/theme/services/ThemeCreator.ts';
|
||||||
import { TypographyMaxLines } from '@/modules/core/components/TypographyMaxLines.tsx';
|
import { TypographyMaxLines } from '@/modules/core/components/TypographyMaxLines.tsx';
|
||||||
import { actionToTranslationKey, ChapterAction, Chapters } from '@/modules/chapter/services/Chapters.ts';
|
import { actionToTranslationKey, ChapterAction, Chapters } from '@/modules/chapter/services/Chapters.ts';
|
||||||
@@ -80,15 +80,15 @@ const BaseReaderOverlayHeaderMobile = forwardRef<
|
|||||||
boxShadow: 2,
|
boxShadow: 2,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Tooltip title={t('reader.button.exit')}>
|
<CustomTooltip title={t('reader.button.exit')}>
|
||||||
<IconButton sx={{ marginRight: 2 }} onClick={handleBack} color="inherit">
|
<IconButton sx={{ marginRight: 2 }} onClick={handleBack} color="inherit">
|
||||||
{getOptionForDirection(<ArrowBack />, <ArrowForwardIcon />)}
|
{getOptionForDirection(<ArrowBack />, <ArrowForwardIcon />)}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<Stack sx={{ flexGrow: 1 }}>
|
<Stack sx={{ flexGrow: 1 }}>
|
||||||
{manga && currentChapter ? (
|
{manga && currentChapter ? (
|
||||||
<>
|
<>
|
||||||
<Tooltip title={title}>
|
<CustomTooltip title={title}>
|
||||||
<TypographyMaxLines lines={1} component="h1" variant="h5">
|
<TypographyMaxLines lines={1} component="h1" variant="h5">
|
||||||
<Link
|
<Link
|
||||||
component={RouterLink}
|
component={RouterLink}
|
||||||
@@ -98,20 +98,20 @@ const BaseReaderOverlayHeaderMobile = forwardRef<
|
|||||||
{title}
|
{title}
|
||||||
</Link>
|
</Link>
|
||||||
</TypographyMaxLines>
|
</TypographyMaxLines>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<Tooltip title={name}>
|
<CustomTooltip title={name}>
|
||||||
<TypographyMaxLines lines={1}>{name}</TypographyMaxLines>
|
<TypographyMaxLines lines={1}>{name}</TypographyMaxLines>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<LoadingPlaceholder />
|
<LoadingPlaceholder />
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
<Tooltip title={t(actionToTranslationKey[bookmarkAction].action.single)}>
|
<CustomTooltip title={t(actionToTranslationKey[bookmarkAction].action.single)}>
|
||||||
<IconButton onClick={() => Chapters.performAction(bookmarkAction, [chapterId], {})} color="inherit">
|
<IconButton onClick={() => Chapters.performAction(bookmarkAction, [chapterId], {})} color="inherit">
|
||||||
{isBookmarked ? <BookmarkIcon /> : <BookmarkBorderIcon />}
|
{isBookmarked ? <BookmarkIcon /> : <BookmarkBorderIcon />}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<IconButton {...bindTrigger(popupState)} color="inherit">
|
<IconButton {...bindTrigger(popupState)} color="inherit">
|
||||||
<MoreVertIcon />
|
<MoreVertIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import ArrowBack from '@mui/icons-material/ArrowBack';
|
import ArrowBack from '@mui/icons-material/ArrowBack';
|
||||||
@@ -17,6 +16,7 @@ import PushPinOutlinedIcon from '@mui/icons-material/PushPinOutlined';
|
|||||||
import Divider from '@mui/material/Divider';
|
import Divider from '@mui/material/Divider';
|
||||||
import { memo, useCallback, useLayoutEffect, useRef, useState } from 'react';
|
import { memo, useCallback, useLayoutEffect, useRef, useState } from 'react';
|
||||||
import Drawer from '@mui/material/Drawer';
|
import Drawer from '@mui/material/Drawer';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { useGetOptionForDirection } from '@/modules/theme/services/ThemeCreator.ts';
|
import { useGetOptionForDirection } from '@/modules/theme/services/ThemeCreator.ts';
|
||||||
import { ReaderNavBarDesktopProps } from '@/modules/reader/types/ReaderOverlay.types.ts';
|
import { ReaderNavBarDesktopProps } from '@/modules/reader/types/ReaderOverlay.types.ts';
|
||||||
import { ReaderNavContainer } from '@/modules/reader/components/overlay/navigation/desktop/ReaderNavContainer.tsx';
|
import { ReaderNavContainer } from '@/modules/reader/components/overlay/navigation/desktop/ReaderNavContainer.tsx';
|
||||||
@@ -111,12 +111,12 @@ const BaseReaderNavBarDesktop = ({
|
|||||||
<ReaderNavContainer sx={{ backgroundColor: 'background.paper', pointerEvents: 'all' }}>
|
<ReaderNavContainer sx={{ backgroundColor: 'background.paper', pointerEvents: 'all' }}>
|
||||||
<Stack sx={{ p: 2, gap: 2, backgroundColor: 'action.hover' }}>
|
<Stack sx={{ p: 2, gap: 2, backgroundColor: 'action.hover' }}>
|
||||||
<Stack sx={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
|
<Stack sx={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||||
<Tooltip title={t('reader.button.exit')}>
|
<CustomTooltip title={t('reader.button.exit')}>
|
||||||
<IconButton onClick={exit} color="inherit">
|
<IconButton onClick={exit} color="inherit">
|
||||||
{getOptionForDirection(<ArrowBack />, <ArrowForwardIcon />)}
|
{getOptionForDirection(<ArrowBack />, <ArrowForwardIcon />)}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<Tooltip title={t('reader.settings.label.static_navigation')}>
|
<CustomTooltip title={t('reader.settings.label.static_navigation')}>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setReaderNavBarWidth(0);
|
setReaderNavBarWidth(0);
|
||||||
@@ -126,7 +126,7 @@ const BaseReaderNavBarDesktop = ({
|
|||||||
>
|
>
|
||||||
{isStaticNav ? <PushPinIcon /> : <PushPinOutlinedIcon />}
|
{isStaticNav ? <PushPinIcon /> : <PushPinOutlinedIcon />}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</Stack>
|
</Stack>
|
||||||
{manga && currentChapter ? (
|
{manga && currentChapter ? (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import BookmarkIcon from '@mui/icons-material/Bookmark';
|
import BookmarkIcon from '@mui/icons-material/Bookmark';
|
||||||
@@ -17,6 +16,7 @@ import DownloadIcon from '@mui/icons-material/Download';
|
|||||||
import ReplayIcon from '@mui/icons-material/Replay';
|
import ReplayIcon from '@mui/icons-material/Replay';
|
||||||
import { memo, useMemo, useRef } from 'react';
|
import { memo, useMemo, useRef } from 'react';
|
||||||
import DeleteIcon from '@mui/icons-material/Delete';
|
import DeleteIcon from '@mui/icons-material/Delete';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { actionToTranslationKey, ChapterAction, Chapters } from '@/modules/chapter/services/Chapters.ts';
|
import { actionToTranslationKey, ChapterAction, Chapters } from '@/modules/chapter/services/Chapters.ts';
|
||||||
import { ReaderStateChapters } from '@/modules/reader/types/Reader.types.ts';
|
import { ReaderStateChapters } from '@/modules/reader/types/Reader.types.ts';
|
||||||
import { DownloadStateIndicator } from '@/modules/core/components/DownloadStateIndicator.tsx';
|
import { DownloadStateIndicator } from '@/modules/core/components/DownloadStateIndicator.tsx';
|
||||||
@@ -32,11 +32,11 @@ const DownloadButton = ({ currentChapter }: Required<Pick<ReaderStateChapters, '
|
|||||||
|
|
||||||
if (currentChapter && Chapters.isDownloaded(currentChapter)) {
|
if (currentChapter && Chapters.isDownloaded(currentChapter)) {
|
||||||
return (
|
return (
|
||||||
<Tooltip title={t(actionToTranslationKey.delete.action.single)}>
|
<CustomTooltip title={t(actionToTranslationKey.delete.action.single)}>
|
||||||
<IconButton onClick={() => Chapters.performAction('delete', [currentChapter.id], {})} color="inherit">
|
<IconButton onClick={() => Chapters.performAction('delete', [currentChapter.id], {})} color="inherit">
|
||||||
<DeleteIcon />
|
<DeleteIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ const DownloadButton = ({ currentChapter }: Required<Pick<ReaderStateChapters, '
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title={t(actionToTranslationKey.download.action.single)}>
|
<CustomTooltip title={t(actionToTranslationKey.download.action.single)} disabled={!currentChapter}>
|
||||||
<IconButton
|
<IconButton
|
||||||
disabled={!currentChapter}
|
disabled={!currentChapter}
|
||||||
onClick={() => Chapters.performAction('download', [currentChapter?.id ?? -1], {})}
|
onClick={() => Chapters.performAction('download', [currentChapter?.id ?? -1], {})}
|
||||||
@@ -53,7 +53,7 @@ const DownloadButton = ({ currentChapter }: Required<Pick<ReaderStateChapters, '
|
|||||||
>
|
>
|
||||||
<DownloadIcon />
|
<DownloadIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -82,12 +82,12 @@ const BaseReaderNavBarDesktopActions = memo(
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack sx={{ flexDirection: 'row', justifyContent: 'center', gap: 1 }}>
|
<Stack sx={{ flexDirection: 'row', justifyContent: 'center', gap: 1 }}>
|
||||||
<Tooltip title={t(actionToTranslationKey[bookmarkAction].action.single)}>
|
<CustomTooltip title={t(actionToTranslationKey[bookmarkAction].action.single)}>
|
||||||
<IconButton onClick={() => Chapters.performAction(bookmarkAction, [id], {})} color="inherit">
|
<IconButton onClick={() => Chapters.performAction(bookmarkAction, [id], {})} color="inherit">
|
||||||
{isBookmarked ? <BookmarkIcon /> : <BookmarkBorderIcon />}
|
{isBookmarked ? <BookmarkIcon /> : <BookmarkBorderIcon />}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<Tooltip title={t('reader.button.retry_load_pages')}>
|
<CustomTooltip title={t('reader.button.retry_load_pages')} disabled={!haveSomePagesFailedToLoad}>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setPageLoadStates((statePageLoadStates) =>
|
setPageLoadStates((statePageLoadStates) =>
|
||||||
@@ -104,9 +104,9 @@ const BaseReaderNavBarDesktopActions = memo(
|
|||||||
>
|
>
|
||||||
<ReplayIcon />
|
<ReplayIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<DownloadButton currentChapter={currentChapter} />
|
<DownloadButton currentChapter={currentChapter} />
|
||||||
<Tooltip title={t('chapter.action.label.open_on_source')}>
|
<CustomTooltip title={t('chapter.action.label.open_on_source')} disabled={!realUrl}>
|
||||||
<IconButton
|
<IconButton
|
||||||
disabled={!realUrl}
|
disabled={!realUrl}
|
||||||
href={realUrl ?? ''}
|
href={realUrl ?? ''}
|
||||||
@@ -116,7 +116,7 @@ const BaseReaderNavBarDesktopActions = memo(
|
|||||||
>
|
>
|
||||||
<OpenInNewIcon />
|
<OpenInNewIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import Link from '@mui/material/Link';
|
import Link from '@mui/material/Link';
|
||||||
|
|
||||||
import { Link as RouterLink } from 'react-router-dom';
|
import { Link as RouterLink } from 'react-router-dom';
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { TypographyMaxLines } from '@/modules/core/components/TypographyMaxLines';
|
import { TypographyMaxLines } from '@/modules/core/components/TypographyMaxLines';
|
||||||
import { AppRoutes } from '@/modules/core/AppRoute.constants.ts';
|
import { AppRoutes } from '@/modules/core/AppRoute.constants.ts';
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ export const ReaderNavBarDesktopMetadata = memo(
|
|||||||
scanlator?: string | null;
|
scanlator?: string | null;
|
||||||
}) => (
|
}) => (
|
||||||
<Stack>
|
<Stack>
|
||||||
<Tooltip title={mangaTitle} placement="right">
|
<CustomTooltip title={mangaTitle} placement="right">
|
||||||
<TypographyMaxLines lines={3} variant="h6" component="h1" sx={{ textAlign: 'center' }}>
|
<TypographyMaxLines lines={3} variant="h6" component="h1" sx={{ textAlign: 'center' }}>
|
||||||
<Link
|
<Link
|
||||||
component={RouterLink}
|
component={RouterLink}
|
||||||
@@ -38,14 +38,14 @@ export const ReaderNavBarDesktopMetadata = memo(
|
|||||||
{mangaTitle}
|
{mangaTitle}
|
||||||
</Link>
|
</Link>
|
||||||
</TypographyMaxLines>
|
</TypographyMaxLines>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<Tooltip title={chapterTitle} placement="right">
|
<CustomTooltip title={chapterTitle} placement="right">
|
||||||
<TypographyMaxLines lines={4} variant="body1" component="h2" sx={{ textAlign: 'center' }}>
|
<TypographyMaxLines lines={4} variant="body1" component="h2" sx={{ textAlign: 'center' }}>
|
||||||
{chapterTitle}
|
{chapterTitle}
|
||||||
</TypographyMaxLines>
|
</TypographyMaxLines>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
{scanlator && (
|
{scanlator && (
|
||||||
<Tooltip title={scanlator} placement="right">
|
<CustomTooltip title={scanlator} placement="right">
|
||||||
<TypographyMaxLines
|
<TypographyMaxLines
|
||||||
lines={4}
|
lines={4}
|
||||||
variant="body2"
|
variant="body2"
|
||||||
@@ -55,7 +55,7 @@ export const ReaderNavBarDesktopMetadata = memo(
|
|||||||
>
|
>
|
||||||
{scanlator}
|
{scanlator}
|
||||||
</TypographyMaxLines>
|
</TypographyMaxLines>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -6,23 +6,29 @@
|
|||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import { ComponentProps } from 'react';
|
import { ComponentProps } from 'react';
|
||||||
import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft';
|
import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft';
|
||||||
import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
|
import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { CustomIconButton } from '@/modules/core/components/buttons/CustomIconButton';
|
import { CustomIconButton } from '@/modules/core/components/buttons/CustomIconButton';
|
||||||
|
|
||||||
export const ReaderNavBarDesktopNextPreviousButton = ({
|
export const ReaderNavBarDesktopNextPreviousButton = ({
|
||||||
title,
|
title,
|
||||||
type,
|
type,
|
||||||
|
disabled,
|
||||||
...customIconButtonProps
|
...customIconButtonProps
|
||||||
}: Omit<ComponentProps<typeof CustomIconButton>, 'children'> & {
|
}: Omit<ComponentProps<typeof CustomIconButton>, 'children'> & {
|
||||||
title: string;
|
title: string;
|
||||||
type: 'previous' | 'next';
|
type: 'previous' | 'next';
|
||||||
}) => (
|
}) => (
|
||||||
<Tooltip title={title}>
|
<CustomTooltip title={title} disabled={disabled}>
|
||||||
<CustomIconButton sx={{ minWidth: 0, px: 1, flexBasis: '15%' }} variant="contained" {...customIconButtonProps}>
|
<CustomIconButton
|
||||||
|
sx={{ minWidth: 0, px: 1, flexBasis: '15%' }}
|
||||||
|
variant="contained"
|
||||||
|
disabled={disabled}
|
||||||
|
{...customIconButtonProps}
|
||||||
|
>
|
||||||
{type === 'previous' ? <KeyboardArrowLeftIcon /> : <KeyboardArrowRightIcon />}
|
{type === 'previous' ? <KeyboardArrowLeftIcon /> : <KeyboardArrowRightIcon />}
|
||||||
</CustomIconButton>
|
</CustomIconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import FitScreenIcon from '@mui/icons-material/FitScreen';
|
import FitScreenIcon from '@mui/icons-material/FitScreen';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { CustomIconButton } from '@/modules/core/components/buttons/CustomIconButton.tsx';
|
import { CustomIconButton } from '@/modules/core/components/buttons/CustomIconButton.tsx';
|
||||||
import { ValueRotationButton } from '@/modules/core/components/buttons/ValueRotationButton.tsx';
|
import { ValueRotationButton } from '@/modules/core/components/buttons/ValueRotationButton.tsx';
|
||||||
import {
|
import {
|
||||||
@@ -51,7 +51,7 @@ export const ReaderNavBarDesktopPageScale = ({
|
|||||||
defaultIcon={PAGE_SCALE_VALUE_TO_DISPLAY_DATA[pageScaleMode.value].icon}
|
defaultIcon={PAGE_SCALE_VALUE_TO_DISPLAY_DATA[pageScaleMode.value].icon}
|
||||||
/>
|
/>
|
||||||
{READER_PAGE_SCALE_MODE_TO_SCALING_ALLOWED[pageScaleMode.value] && (
|
{READER_PAGE_SCALE_MODE_TO_SCALING_ALLOWED[pageScaleMode.value] && (
|
||||||
<Tooltip title={t('reader.settings.page_scale.stretch')}>
|
<CustomTooltip title={t('reader.settings.page_scale.stretch')}>
|
||||||
<CustomIconButton
|
<CustomIconButton
|
||||||
onClick={() => updateSetting('shouldStretchPage', !shouldStretchPage.value)}
|
onClick={() => updateSetting('shouldStretchPage', !shouldStretchPage.value)}
|
||||||
sx={{ minWidth: 0 }}
|
sx={{ minWidth: 0 }}
|
||||||
@@ -60,7 +60,7 @@ export const ReaderNavBarDesktopPageScale = ({
|
|||||||
>
|
>
|
||||||
<FitScreenIcon />
|
<FitScreenIcon />
|
||||||
</CustomIconButton>
|
</CustomIconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ import { alpha } from '@mui/material/styles';
|
|||||||
import { bindDialog, bindTrigger, usePopupState } from 'material-ui-popup-state/hooks';
|
import { bindDialog, bindTrigger, usePopupState } from 'material-ui-popup-state/hooks';
|
||||||
import Dialog from '@mui/material/Dialog';
|
import Dialog from '@mui/material/Dialog';
|
||||||
import DialogContent from '@mui/material/DialogContent';
|
import DialogContent from '@mui/material/DialogContent';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import Slide from '@mui/material/Slide';
|
import Slide from '@mui/material/Slide';
|
||||||
import { memo, useCallback, useLayoutEffect, useRef, useState } from 'react';
|
import { memo, useCallback, useLayoutEffect, useRef, useState } from 'react';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { ReaderBottomBarMobileProps } from '@/modules/reader/types/ReaderOverlay.types.ts';
|
import { ReaderBottomBarMobileProps } from '@/modules/reader/types/ReaderOverlay.types.ts';
|
||||||
import { MobileReaderProgressBar } from '@/modules/reader/components/overlay/progress-bar/variants/MobileReaderProgressBar.tsx';
|
import { MobileReaderProgressBar } from '@/modules/reader/components/overlay/progress-bar/variants/MobileReaderProgressBar.tsx';
|
||||||
import { ReaderChapterList } from '@/modules/reader/components/overlay/navigation/ReaderChapterList.tsx';
|
import { ReaderChapterList } from '@/modules/reader/components/overlay/navigation/ReaderChapterList.tsx';
|
||||||
@@ -89,21 +89,21 @@ const BaseReaderBottomBarMobile = ({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Tooltip title={t('reader.button.chapter_list')}>
|
<CustomTooltip title={t('reader.button.chapter_list')}>
|
||||||
<IconButton {...bindTrigger(chapterListPopupState)} size="large" color="inherit">
|
<IconButton {...bindTrigger(chapterListPopupState)} size="large" color="inherit">
|
||||||
<FormatListBulletedIcon />
|
<FormatListBulletedIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<Tooltip title={t('reader.settings.title.quick_settings')}>
|
<CustomTooltip title={t('reader.settings.title.quick_settings')}>
|
||||||
<IconButton {...bindTrigger(quickSettingsPopupState)} size="large" color="inherit">
|
<IconButton {...bindTrigger(quickSettingsPopupState)} size="large" color="inherit">
|
||||||
<AppSettingsAltIcon />
|
<AppSettingsAltIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<Tooltip title={t('settings.title')}>
|
<CustomTooltip title={t('settings.title')}>
|
||||||
<IconButton onClick={openSettings} size="large" color="inherit">
|
<IconButton onClick={openSettings} size="large" color="inherit">
|
||||||
<SettingsIcon />
|
<SettingsIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Slide>
|
</Slide>
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import { ReactNode } from 'react';
|
import { ReactNode } from 'react';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { CurrentPageSlotProps } from '@/modules/reader/types/ReaderProgressBar.types.ts';
|
import { CurrentPageSlotProps } from '@/modules/reader/types/ReaderProgressBar.types.ts';
|
||||||
import { applyStyles } from '@/modules/core/utils/ApplyStyles.ts';
|
import { applyStyles } from '@/modules/core/utils/ApplyStyles.ts';
|
||||||
import { getProgressBarPositionInfo } from '@/modules/reader/utils/ReaderProgressBar.utils.tsx';
|
import { getProgressBarPositionInfo } from '@/modules/reader/utils/ReaderProgressBar.utils.tsx';
|
||||||
@@ -23,7 +23,7 @@ export const ReaderProgressBarCurrentPageSlot = ({
|
|||||||
children,
|
children,
|
||||||
progressBarPosition,
|
progressBarPosition,
|
||||||
}: CurrentPageSlotProps & { children?: ReactNode }) => (
|
}: CurrentPageSlotProps & { children?: ReactNode }) => (
|
||||||
<Tooltip
|
<CustomTooltip
|
||||||
title={pageName}
|
title={pageName}
|
||||||
slotProps={{
|
slotProps={{
|
||||||
tooltip: { sx: { backgroundColor: 'primary.main', color: 'primary.contrastText' } },
|
tooltip: { sx: { backgroundColor: 'primary.main', color: 'primary.contrastText' } },
|
||||||
@@ -50,5 +50,5 @@ export const ReaderProgressBarCurrentPageSlot = ({
|
|||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Box>
|
</Box>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,15 +7,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import { memo, ReactNode } from 'react';
|
import { memo, ReactNode } from 'react';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { ReaderProgressBarSlotProps } from '@/modules/reader/types/ReaderProgressBar.types.ts';
|
import { ReaderProgressBarSlotProps } from '@/modules/reader/types/ReaderProgressBar.types.ts';
|
||||||
|
|
||||||
import { READER_PROGRESS_BAR_POSITION_TO_PLACEMENT } from '@/modules/reader/constants/ReaderSettings.constants.tsx';
|
import { READER_PROGRESS_BAR_POSITION_TO_PLACEMENT } from '@/modules/reader/constants/ReaderSettings.constants.tsx';
|
||||||
|
|
||||||
export const ReaderProgressBarSlot = memo(
|
export const ReaderProgressBarSlot = memo(
|
||||||
({ pageName, progressBarPosition, slotProps, children }: ReaderProgressBarSlotProps & { children?: ReactNode }) => (
|
({ pageName, progressBarPosition, slotProps, children }: ReaderProgressBarSlotProps & { children?: ReactNode }) => (
|
||||||
<Tooltip
|
<CustomTooltip
|
||||||
{...slotProps?.tooltip}
|
{...slotProps?.tooltip}
|
||||||
key={pageName}
|
key={pageName}
|
||||||
title={pageName}
|
title={pageName}
|
||||||
@@ -24,6 +24,6 @@ export const ReaderProgressBarSlot = memo(
|
|||||||
<Box {...slotProps?.box} sx={{ width: '100%', height: '100%', ...slotProps?.box?.sx }}>
|
<Box {...slotProps?.box} sx={{ width: '100%', height: '100%', ...slotProps?.box?.sx }}>
|
||||||
{children}
|
{children}
|
||||||
</Box>
|
</Box>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
import { Fragment } from 'react';
|
import { Fragment } from 'react';
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { Kbd } from '@/modules/core/components/Kbd.tsx';
|
import { Kbd } from '@/modules/core/components/Kbd.tsx';
|
||||||
|
|
||||||
export const Hotkey = ({ keys, removeKey }: { keys: string[]; removeKey?: (key: string) => void }) => {
|
export const Hotkey = ({ keys, removeKey }: { keys: string[]; removeKey?: (key: string) => void }) => {
|
||||||
@@ -19,7 +19,7 @@ export const Hotkey = ({ keys, removeKey }: { keys: string[]; removeKey?: (key:
|
|||||||
<Stack sx={{ flexDirection: 'row', flexWrap: 'wrap', gap: 1 }}>
|
<Stack sx={{ flexDirection: 'row', flexWrap: 'wrap', gap: 1 }}>
|
||||||
{keys.map((key, index) => (
|
{keys.map((key, index) => (
|
||||||
<Fragment key={key}>
|
<Fragment key={key}>
|
||||||
<Tooltip title={t('global.button.delete')} hidden={!removeKey}>
|
<CustomTooltip title={t('global.button.delete')} hidden={!removeKey}>
|
||||||
<Stack
|
<Stack
|
||||||
sx={{
|
sx={{
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
@@ -36,7 +36,7 @@ export const Hotkey = ({ keys, removeKey }: { keys: string[]; removeKey?: (key:
|
|||||||
</Fragment>
|
</Fragment>
|
||||||
))}
|
))}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
{index === keys.length - 1 ? '' : ','}
|
{index === keys.length - 1 ? '' : ','}
|
||||||
</Fragment>
|
</Fragment>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import Stack from '@mui/material/Stack';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import AddIcon from '@mui/icons-material/Add';
|
import AddIcon from '@mui/icons-material/Add';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import { bindTrigger, usePopupState } from 'material-ui-popup-state/hooks';
|
import { bindTrigger, usePopupState } from 'material-ui-popup-state/hooks';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { ReaderHotkey } from '@/modules/reader/types/Reader.types.ts';
|
import { ReaderHotkey } from '@/modules/reader/types/Reader.types.ts';
|
||||||
import { DEFAULT_READER_SETTINGS } from '@/modules/reader/constants/ReaderSettings.constants.tsx';
|
import { DEFAULT_READER_SETTINGS } from '@/modules/reader/constants/ReaderSettings.constants.tsx';
|
||||||
import { TranslationKey } from '@/Base.types.ts';
|
import { TranslationKey } from '@/Base.types.ts';
|
||||||
@@ -60,11 +60,11 @@ export const ReaderSettingHotkey = ({
|
|||||||
keys={keys}
|
keys={keys}
|
||||||
removeKey={(keyToRemove) => updateSetting(keys.filter((key) => key !== keyToRemove))}
|
removeKey={(keyToRemove) => updateSetting(keys.filter((key) => key !== keyToRemove))}
|
||||||
/>
|
/>
|
||||||
<Tooltip title={t('global.button.add')}>
|
<CustomTooltip title={t('global.button.add')}>
|
||||||
<IconButton {...bindTrigger(popupState)} color="inherit">
|
<IconButton {...bindTrigger(popupState)} color="inherit">
|
||||||
<AddIcon />
|
<AddIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<ResetButton asIconButton onClick={() => updateSetting(DEFAULT_READER_SETTINGS.hotkeys[hotkey])} />
|
<ResetButton asIconButton onClick={() => updateSetting(DEFAULT_READER_SETTINGS.hotkeys[hotkey])} />
|
||||||
</Stack>
|
</Stack>
|
||||||
{popupState.isOpen && (
|
{popupState.isOpen && (
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import DialogTitle from '@mui/material/DialogTitle';
|
|||||||
import DialogActions from '@mui/material/DialogActions';
|
import DialogActions from '@mui/material/DialogActions';
|
||||||
import DialogContent from '@mui/material/DialogContent';
|
import DialogContent from '@mui/material/DialogContent';
|
||||||
import TextField from '@mui/material/TextField';
|
import TextField from '@mui/material/TextField';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { OptionsPanel } from '@/modules/core/components/OptionsPanel.tsx';
|
import { OptionsPanel } from '@/modules/core/components/OptionsPanel.tsx';
|
||||||
import { CheckBoxFilter } from '@/modules/source/components/filters/CheckBoxFilter.tsx';
|
import { CheckBoxFilter } from '@/modules/source/components/filters/CheckBoxFilter.tsx';
|
||||||
import { HeaderFilter } from '@/modules/source/components/filters/HeaderFilter.tsx';
|
import { HeaderFilter } from '@/modules/source/components/filters/HeaderFilter.tsx';
|
||||||
@@ -199,11 +199,11 @@ export function SourceOptions({
|
|||||||
<PopupState variant="dialog" popupId="source-browse-save-search">
|
<PopupState variant="dialog" popupId="source-browse-save-search">
|
||||||
{(popupState) => (
|
{(popupState) => (
|
||||||
<>
|
<>
|
||||||
<Tooltip title={t('source.filter.save_search.label.save')}>
|
<CustomTooltip title={t('source.filter.save_search.label.save')}>
|
||||||
<IconButton sx={{ marginLeft: 'auto' }} {...bindTrigger(popupState)}>
|
<IconButton sx={{ marginLeft: 'auto' }} {...bindTrigger(popupState)}>
|
||||||
<SaveIcon />
|
<SaveIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<Dialog {...bindDialog(popupState)} maxWidth="xs" fullWidth>
|
<Dialog {...bindDialog(popupState)} maxWidth="xs" fullWidth>
|
||||||
<DialogTitle>{t('source.filter.save_search.dialog.label.title')}</DialogTitle>
|
<DialogTitle>{t('source.filter.save_search.dialog.label.title')}</DialogTitle>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
@@ -269,9 +269,9 @@ export function SourceOptions({
|
|||||||
.catch(defaultPromiseErrorHandler('SourceOptions::deleteSavedSearch'));
|
.catch(defaultPromiseErrorHandler('SourceOptions::deleteSavedSearch'));
|
||||||
}}
|
}}
|
||||||
deleteIcon={
|
deleteIcon={
|
||||||
<Tooltip title={t('source.filter.save_search.label.delete')}>
|
<CustomTooltip title={t('source.filter.save_search.label.delete')}>
|
||||||
<DeleteIcon />
|
<DeleteIcon />
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
}
|
}
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import Link from '@mui/material/Link';
|
import Link from '@mui/material/Link';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import { styled } from '@mui/material/styles';
|
import { styled } from '@mui/material/styles';
|
||||||
import FavoriteIcon from '@mui/icons-material/Favorite';
|
import FavoriteIcon from '@mui/icons-material/Favorite';
|
||||||
import NewReleasesIcon from '@mui/icons-material/NewReleases';
|
import NewReleasesIcon from '@mui/icons-material/NewReleases';
|
||||||
import FilterListIcon from '@mui/icons-material/FilterList';
|
import FilterListIcon from '@mui/icons-material/FilterList';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import {
|
import {
|
||||||
requestManager,
|
requestManager,
|
||||||
AbortableApolloUseMutationPaginatedResponse,
|
AbortableApolloUseMutationPaginatedResponse,
|
||||||
@@ -405,7 +405,7 @@ export function SourceMangas() {
|
|||||||
<AppbarSearch />
|
<AppbarSearch />
|
||||||
<SourceGridLayout />
|
<SourceGridLayout />
|
||||||
{source?.isConfigurable && (
|
{source?.isConfigurable && (
|
||||||
<Tooltip title={t('settings.title')}>
|
<CustomTooltip title={t('settings.title')}>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => navigate(AppRoutes.sources.childRoutes.configure.path(sourceId))}
|
onClick={() => navigate(AppRoutes.sources.childRoutes.configure.path(sourceId))}
|
||||||
aria-label="display more actions"
|
aria-label="display more actions"
|
||||||
@@ -415,7 +415,7 @@ export function SourceMangas() {
|
|||||||
>
|
>
|
||||||
<SettingsIcon />
|
<SettingsIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
)}
|
)}
|
||||||
</>,
|
</>,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
import { Fragment, useEffect, useLayoutEffect, useMemo } from 'react';
|
import { Fragment, useEffect, useLayoutEffect, useMemo } from 'react';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import TravelExploreIcon from '@mui/icons-material/TravelExplore';
|
import TravelExploreIcon from '@mui/icons-material/TravelExplore';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { useLocalStorage } from '@/modules/core/hooks/useStorage.tsx';
|
import { useLocalStorage } from '@/modules/core/hooks/useStorage.tsx';
|
||||||
import {
|
import {
|
||||||
@@ -108,7 +108,7 @@ export function Sources() {
|
|||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
setAction(
|
setAction(
|
||||||
<>
|
<>
|
||||||
<Tooltip title={t('search.title.global_search')}>
|
<CustomTooltip title={t('search.title.global_search')}>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() => navigate(AppRoutes.sources.childRoutes.searchAll.path)}
|
onClick={() => navigate(AppRoutes.sources.childRoutes.searchAll.path)}
|
||||||
size="large"
|
size="large"
|
||||||
@@ -116,7 +116,7 @@ export function Sources() {
|
|||||||
>
|
>
|
||||||
<TravelExploreIcon />
|
<TravelExploreIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<LangSelect
|
<LangSelect
|
||||||
shownLangs={shownLangs}
|
shownLangs={shownLangs}
|
||||||
setShownLangs={setShownLangs}
|
setShownLangs={setShownLangs}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import Stack from '@mui/material/Stack';
|
|||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
import AddCircleIcon from '@mui/icons-material/AddCircle';
|
import AddCircleIcon from '@mui/icons-material/AddCircle';
|
||||||
import { bindDialog, bindTrigger, usePopupState } from 'material-ui-popup-state/hooks';
|
import { bindDialog, bindTrigger, usePopupState } from 'material-ui-popup-state/hooks';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { ThemeCreationDialog } from '@/modules/theme/components/CreateThemeDialog.tsx';
|
import { ThemeCreationDialog } from '@/modules/theme/components/CreateThemeDialog.tsx';
|
||||||
import { TypographyMaxLines } from '@/modules/core/components/TypographyMaxLines.tsx';
|
import { TypographyMaxLines } from '@/modules/core/components/TypographyMaxLines.tsx';
|
||||||
|
|
||||||
@@ -34,11 +34,11 @@ export const CreateThemeButton = () => {
|
|||||||
>
|
>
|
||||||
<AddCircleIcon fontSize="large" />
|
<AddCircleIcon fontSize="large" />
|
||||||
</Button>
|
</Button>
|
||||||
<Tooltip title={t('settings.appearance.theme.create.title')} placement="top">
|
<CustomTooltip title={t('settings.appearance.theme.create.title')} placement="top">
|
||||||
<TypographyMaxLines sx={{ maxWidth: '100%' }}>
|
<TypographyMaxLines sx={{ maxWidth: '100%' }}>
|
||||||
{t('settings.appearance.theme.create.title')}
|
{t('settings.appearance.theme.create.title')}
|
||||||
</TypographyMaxLines>
|
</TypographyMaxLines>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</Stack>
|
</Stack>
|
||||||
{popupState.isOpen && <ThemeCreationDialog bindDialogProps={bindDialog(popupState)} mode="create" />}
|
{popupState.isOpen && <ThemeCreationDialog bindDialogProps={bindDialog(popupState)} mode="create" />}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ import Card from '@mui/material/Card';
|
|||||||
import CardActionArea from '@mui/material/CardActionArea';
|
import CardActionArea from '@mui/material/CardActionArea';
|
||||||
import DeleteIcon from '@mui/icons-material/Delete';
|
import DeleteIcon from '@mui/icons-material/Delete';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import EditIcon from '@mui/icons-material/Edit';
|
import EditIcon from '@mui/icons-material/Edit';
|
||||||
import { bindDialog, usePopupState } from 'material-ui-popup-state/hooks';
|
import { bindDialog, usePopupState } from 'material-ui-popup-state/hooks';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { AppThemeContext } from '@/modules/theme/contexts/AppThemeContext.tsx';
|
import { AppThemeContext } from '@/modules/theme/contexts/AppThemeContext.tsx';
|
||||||
import { AppTheme, hasMissingFonts, loadThemeFonts } from '@/modules/theme/services/AppThemes.ts';
|
import { AppTheme, hasMissingFonts, loadThemeFonts } from '@/modules/theme/services/AppThemes.ts';
|
||||||
import { createTheme } from '@/modules/theme/services/ThemeCreator.ts';
|
import { createTheme } from '@/modules/theme/services/ThemeCreator.ts';
|
||||||
@@ -154,9 +154,9 @@ export const ThemePreview = ({ appTheme, onDelete }: { appTheme: AppTheme; onDel
|
|||||||
size="small"
|
size="small"
|
||||||
sx={{ mt: -0.5 }}
|
sx={{ mt: -0.5 }}
|
||||||
>
|
>
|
||||||
<Tooltip title={t('global.button.delete')}>
|
<CustomTooltip title={t('global.button.delete')}>
|
||||||
<DeleteIcon />
|
<DeleteIcon />
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
)}
|
)}
|
||||||
{appTheme.isCustom && (
|
{appTheme.isCustom && (
|
||||||
@@ -169,9 +169,9 @@ export const ThemePreview = ({ appTheme, onDelete }: { appTheme: AppTheme; onDel
|
|||||||
component="div"
|
component="div"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
<Tooltip title={t('global.button.edit')}>
|
<CustomTooltip title={t('global.button.edit')}>
|
||||||
<EditIcon />
|
<EditIcon />
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -229,9 +229,9 @@ export const ThemePreview = ({ appTheme, onDelete }: { appTheme: AppTheme; onDel
|
|||||||
</CardActionArea>
|
</CardActionArea>
|
||||||
</Card>
|
</Card>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
<Tooltip title={getName()} placement="top">
|
<CustomTooltip title={getName()} placement="top">
|
||||||
<TypographyMaxLines sx={{ maxWidth: '100%' }}>{getName()}</TypographyMaxLines>
|
<TypographyMaxLines sx={{ maxWidth: '100%' }}>{getName()}</TypographyMaxLines>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</Stack>
|
</Stack>
|
||||||
<ThemeCreationDialog bindDialogProps={bindDialog(popupState)} mode="edit" appTheme={appTheme} />
|
<ThemeCreationDialog bindDialogProps={bindDialog(popupState)} mode="edit" appTheme={appTheme} />
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -23,11 +23,11 @@ import Link from '@mui/material/Link';
|
|||||||
import ListItemButton from '@mui/material/ListItemButton';
|
import ListItemButton from '@mui/material/ListItemButton';
|
||||||
import MenuItem from '@mui/material/MenuItem';
|
import MenuItem from '@mui/material/MenuItem';
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
||||||
import PopupState, { bindDialog, bindMenu, bindTrigger } from 'material-ui-popup-state';
|
import PopupState, { bindDialog, bindMenu, bindTrigger } from 'material-ui-popup-state';
|
||||||
import { useMemo, useState } from 'react';
|
import { useMemo, useState } from 'react';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
import { requestManager } from '@/lib/requests/RequestManager.ts';
|
||||||
import { Trackers, TTrackerBind, TTrackRecordBind, UNSET_DATE } from '@/modules/tracker/services/Trackers.ts';
|
import { Trackers, TTrackerBind, TTrackRecordBind, UNSET_DATE } from '@/modules/tracker/services/Trackers.ts';
|
||||||
import { ListPreference } from '@/modules/source/components/sourceConfiguration/ListPreference.tsx';
|
import { ListPreference } from '@/modules/source/components/sourceConfiguration/ListPreference.tsx';
|
||||||
@@ -167,11 +167,11 @@ const TrackerActiveHeader = ({
|
|||||||
</TrackerActiveLink>
|
</TrackerActiveLink>
|
||||||
|
|
||||||
<ListItemButton sx={{ flexGrow: 1 }} onClick={openSearch}>
|
<ListItemButton sx={{ flexGrow: 1 }} onClick={openSearch}>
|
||||||
<Tooltip title={trackRecord.title}>
|
<CustomTooltip title={trackRecord.title}>
|
||||||
<TypographyMaxLines flexGrow={1} lines={1}>
|
<TypographyMaxLines flexGrow={1} lines={1}>
|
||||||
{trackRecord.title}
|
{trackRecord.title}
|
||||||
</TypographyMaxLines>
|
</TypographyMaxLines>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
<Stack
|
<Stack
|
||||||
sx={{
|
sx={{
|
||||||
|
|||||||
@@ -16,12 +16,12 @@ import CardMedia from '@mui/material/CardMedia';
|
|||||||
import Collapse from '@mui/material/Collapse';
|
import Collapse from '@mui/material/Collapse';
|
||||||
import Link from '@mui/material/Link';
|
import Link from '@mui/material/Link';
|
||||||
import Stack from '@mui/material/Stack';
|
import Stack from '@mui/material/Stack';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { useLayoutEffect, useRef, useState } from 'react';
|
import { useLayoutEffect, useRef, useState } from 'react';
|
||||||
import parseHtml from 'html-react-parser';
|
import parseHtml from 'html-react-parser';
|
||||||
import CheckCircleIcon from '@mui/icons-material/CheckCircle';
|
import CheckCircleIcon from '@mui/icons-material/CheckCircle';
|
||||||
import sanitizeHtml from 'sanitize-html';
|
import sanitizeHtml from 'sanitize-html';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { SpinnerImage } from '@/modules/core/components/SpinnerImage.tsx';
|
import { SpinnerImage } from '@/modules/core/components/SpinnerImage.tsx';
|
||||||
import { TypographyMaxLines } from '@/modules/core/components/TypographyMaxLines.tsx';
|
import { TypographyMaxLines } from '@/modules/core/components/TypographyMaxLines.tsx';
|
||||||
import { Metadata } from '@/modules/core/components/Metadata.tsx';
|
import { Metadata } from '@/modules/core/components/Metadata.tsx';
|
||||||
@@ -37,11 +37,11 @@ const TrackerMangaCardTitle = ({ title, selected }: { title: string; selected: b
|
|||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Tooltip title={title}>
|
<CustomTooltip title={title}>
|
||||||
<TypographyMaxLines variant="h5" component="h1">
|
<TypographyMaxLines variant="h5" component="h1">
|
||||||
{title}
|
{title}
|
||||||
</TypographyMaxLines>
|
</TypographyMaxLines>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
<CheckCircleIcon sx={{ visibility: selected ? 'visible' : 'hidden' }} color="primary" />
|
<CheckCircleIcon sx={{ visibility: selected ? 'visible' : 'hidden' }} color="primary" />
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
import DownloadIcon from '@mui/icons-material/Download';
|
import DownloadIcon from '@mui/icons-material/Download';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import CardActionArea from '@mui/material/CardActionArea';
|
import CardActionArea from '@mui/material/CardActionArea';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
import Avatar from '@mui/material/Avatar';
|
import Avatar from '@mui/material/Avatar';
|
||||||
import Card from '@mui/material/Card';
|
import Card from '@mui/material/Card';
|
||||||
import CardContent from '@mui/material/CardContent';
|
import CardContent from '@mui/material/CardContent';
|
||||||
@@ -18,6 +17,7 @@ import { Link, useLocation } from 'react-router-dom';
|
|||||||
import Refresh from '@mui/icons-material/Refresh';
|
import Refresh from '@mui/icons-material/Refresh';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
|
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
|
||||||
import { DownloadStateIndicator } from '@/modules/core/components/DownloadStateIndicator.tsx';
|
import { DownloadStateIndicator } from '@/modules/core/components/DownloadStateIndicator.tsx';
|
||||||
import { ChapterUpdateListFieldsFragment, DownloadState } from '@/lib/graphql/generated/graphql.ts';
|
import { ChapterUpdateListFieldsFragment, DownloadState } from '@/lib/graphql/generated/graphql.ts';
|
||||||
import { Mangas } from '@/modules/manga/services/Mangas.ts';
|
import { Mangas } from '@/modules/manga/services/Mangas.ts';
|
||||||
@@ -115,7 +115,7 @@ export const ChapterUpdateCard = memo(({ chapter }: { chapter: ChapterUpdateList
|
|||||||
</Box>
|
</Box>
|
||||||
<DownloadStateIndicator chapterId={chapter.id} />
|
<DownloadStateIndicator chapterId={chapter.id} />
|
||||||
{download?.state === DownloadState.Error && (
|
{download?.state === DownloadState.Error && (
|
||||||
<Tooltip title={t('global.button.retry')}>
|
<CustomTooltip title={t('global.button.retry')}>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -126,10 +126,10 @@ export const ChapterUpdateCard = memo(({ chapter }: { chapter: ChapterUpdateList
|
|||||||
>
|
>
|
||||||
<Refresh />
|
<Refresh />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
)}
|
)}
|
||||||
{download == null && !chapter.isDownloaded && (
|
{download == null && !chapter.isDownloaded && (
|
||||||
<Tooltip title={t('chapter.action.download.add.label.action')}>
|
<CustomTooltip title={t('chapter.action.download.add.label.action')}>
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@@ -140,7 +140,7 @@ export const ChapterUpdateCard = memo(({ chapter }: { chapter: ChapterUpdateList
|
|||||||
>
|
>
|
||||||
<DownloadIcon />
|
<DownloadIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</CustomTooltip>
|
||||||
)}
|
)}
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</CardActionArea>
|
</CardActionArea>
|
||||||
|
|||||||
Reference in New Issue
Block a user