refactor: temporarily disable the proofreading feature for a hotfix release ahead of a major refactor (#2742)
This commit is contained in:
@@ -72,7 +72,7 @@ function renderWithProviders(ui: React.ReactNode) {
|
||||
return render(<EnvProvider>{ui}</EnvProvider>);
|
||||
}
|
||||
|
||||
describe('ReplacementRulesWindow', () => {
|
||||
describe.skip('ReplacementRulesWindow', () => {
|
||||
beforeEach(() => {
|
||||
// Reset stores
|
||||
(useSettingsStore.setState as unknown as (state: unknown) => void)({
|
||||
|
||||
@@ -15,6 +15,7 @@ interface AnnotationPopupProps {
|
||||
Icon: React.ElementType;
|
||||
onClick: () => void;
|
||||
disabled?: boolean;
|
||||
visible?: boolean;
|
||||
}>;
|
||||
position: Position;
|
||||
trianglePosition: Position;
|
||||
@@ -65,16 +66,19 @@ const AnnotationPopup: React.FC<AnnotationPopupProps> = ({
|
||||
)}
|
||||
style={{ scrollbarWidth: 'none', msOverflowStyle: 'none' }}
|
||||
>
|
||||
{buttons.map((button, index) => (
|
||||
<PopupButton
|
||||
key={index}
|
||||
showTooltip={!highlightOptionsVisible}
|
||||
tooltipText={button.tooltipText}
|
||||
Icon={button.Icon}
|
||||
onClick={button.onClick}
|
||||
disabled={button.disabled}
|
||||
/>
|
||||
))}
|
||||
{buttons.map((button, index) => {
|
||||
if (button.visible === false) return null;
|
||||
return (
|
||||
<PopupButton
|
||||
key={index}
|
||||
showTooltip={!highlightOptionsVisible}
|
||||
tooltipText={button.tooltipText}
|
||||
Icon={button.Icon}
|
||||
onClick={button.onClick}
|
||||
disabled={button.disabled}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</Popup>
|
||||
{highlightOptionsVisible && (
|
||||
|
||||
@@ -965,6 +965,7 @@ const Annotator: React.FC<{ bookKey: string }> = ({ bookKey }) => {
|
||||
Icon: MdBuildCircle,
|
||||
onClick: handleShowReplacementOptions,
|
||||
disabled: bookData.book?.format !== 'EPUB',
|
||||
visible: false,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -202,15 +202,14 @@ const TranslatorPopup: React.FC<TranslatorPopupProps> = ({
|
||||
)}
|
||||
</div>
|
||||
<div className='absolute bottom-0 flex h-8 w-full items-center justify-between bg-gray-600 px-4'>
|
||||
{provider && !loading && (
|
||||
<div className='line-clamp-1 text-xs opacity-60'>
|
||||
{error
|
||||
? ''
|
||||
: _('Translated by {{provider}}.', {
|
||||
provider: providers.find((p) => p.name === provider)?.label,
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
<div className='line-clamp-1 text-xs opacity-60'>
|
||||
{provider &&
|
||||
!loading &&
|
||||
!error &&
|
||||
_('Translated by {{provider}}.', {
|
||||
provider: providers.find((p) => p.name === provider)?.label,
|
||||
})}
|
||||
</div>
|
||||
<Select
|
||||
className='bg-gray-600 text-white/75'
|
||||
value={provider}
|
||||
|
||||
@@ -145,7 +145,7 @@ const BookMenu: React.FC<BookMenuProps> = ({ menuClassName, setIsDropdownOpen })
|
||||
))}
|
||||
<hr className='border-base-200 my-1' />
|
||||
<MenuItem label={_('KOReader Sync')} onClick={showKoSyncSettingsWindow} />
|
||||
<MenuItem label={_('Replacement Rules')} onClick={showReplacementRulesWindow} />
|
||||
{false && <MenuItem label={_('Replacement Rules')} onClick={showReplacementRulesWindow} />}
|
||||
{settings.kosync.enabled && (
|
||||
<>
|
||||
<MenuItem label={_('Push Progress')} onClick={handlePushKOSync} />
|
||||
|
||||
Reference in New Issue
Block a user