Remove overrides
This commit is contained in:
@@ -101,7 +101,15 @@ const AllAlbumsDialog = styled(Dialog)(({ theme }) => ({
|
||||
},
|
||||
}));
|
||||
|
||||
const Title = ({
|
||||
type TitleProps = { collectionCount: number } & Pick<
|
||||
AllAlbums,
|
||||
| "onClose"
|
||||
| "collectionsSortBy"
|
||||
| "onChangeCollectionsSortBy"
|
||||
| "isInHiddenSection"
|
||||
>;
|
||||
|
||||
const Title: React.FC<TitleProps> = ({
|
||||
onClose,
|
||||
collectionCount,
|
||||
collectionsSortBy,
|
||||
|
||||
@@ -145,9 +145,9 @@ export const GalleryBarAndListHeader: React.FC<
|
||||
onRemotePull,
|
||||
onAddSaveGroup,
|
||||
}}
|
||||
collectionSummary={toShowCollectionSummaries.get(
|
||||
activeCollectionID!,
|
||||
)!}
|
||||
collectionSummary={
|
||||
toShowCollectionSummaries.get(activeCollectionID!)!
|
||||
}
|
||||
onCollectionShare={showCollectionShare}
|
||||
onCollectionCast={showCollectionCast}
|
||||
/>
|
||||
@@ -211,9 +211,9 @@ export const GalleryBarAndListHeader: React.FC<
|
||||
/>
|
||||
<CollectionShare
|
||||
{...collectionShareVisibilityProps}
|
||||
collectionSummary={toShowCollectionSummaries.get(
|
||||
activeCollectionID!,
|
||||
)!}
|
||||
collectionSummary={
|
||||
toShowCollectionSummaries.get(activeCollectionID!)!
|
||||
}
|
||||
collection={activeCollection}
|
||||
{...{
|
||||
user,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// TODO: Audit this file
|
||||
/* eslint-disable @typescript-eslint/restrict-plus-operands */
|
||||
import AlbumOutlinedIcon from "@mui/icons-material/AlbumOutlined";
|
||||
import FavoriteRoundedIcon from "@mui/icons-material/FavoriteRounded";
|
||||
import PlayCircleOutlineOutlinedIcon from "@mui/icons-material/PlayCircleOutlineOutlined";
|
||||
@@ -358,12 +357,15 @@ export const FileList: React.FC<FileListProps> = ({
|
||||
});
|
||||
};
|
||||
|
||||
const getVacuumItem = (timeStampList, footerHeight: number) => {
|
||||
const getVacuumItem = (
|
||||
timeStampList: TimeStampListItem[],
|
||||
footerHeight: number,
|
||||
) => {
|
||||
const fileListHeight = (() => {
|
||||
let sum = 0;
|
||||
const getCurrentItemSize = getItemSize(timeStampList);
|
||||
for (let i = 0; i < timeStampList.length; i++) {
|
||||
sum += getCurrentItemSize(i);
|
||||
sum += getCurrentItemSize(i)!;
|
||||
if (height - sum <= footerHeight) {
|
||||
break;
|
||||
}
|
||||
@@ -456,16 +458,17 @@ export const FileList: React.FC<FileListProps> = ({
|
||||
return newList;
|
||||
};
|
||||
|
||||
const getItemSize = (timeStampList) => (index) => {
|
||||
switch (timeStampList[index].tag) {
|
||||
case "date":
|
||||
return dateContainerHeight;
|
||||
case "file":
|
||||
return listItemHeight;
|
||||
default:
|
||||
return timeStampList[index].height;
|
||||
}
|
||||
};
|
||||
const getItemSize =
|
||||
(timeStampList: TimeStampListItem[]) => (index: number) => {
|
||||
switch (timeStampList[index]!.tag) {
|
||||
case "date":
|
||||
return dateContainerHeight;
|
||||
case "file":
|
||||
return listItemHeight;
|
||||
default:
|
||||
return timeStampList[index]!.height!;
|
||||
}
|
||||
};
|
||||
|
||||
const generateKey = (index: number) => {
|
||||
switch (timeStampList[index]!.tag) {
|
||||
|
||||
@@ -381,6 +381,7 @@ const InProgressSection: React.FC = () => {
|
||||
|
||||
const fileList = inProgressUploads ?? [];
|
||||
|
||||
// @ts-expect-error Need to add types
|
||||
const renderListItem = ({ localFileID, progress }) => {
|
||||
return (
|
||||
<InProgressItemContainer key={localFileID}>
|
||||
@@ -396,10 +397,12 @@ const InProgressSection: React.FC = () => {
|
||||
);
|
||||
};
|
||||
|
||||
// @ts-expect-error Need to add types
|
||||
const getItemTitle = ({ localFileID, progress }) => {
|
||||
return `${uploadFileNames.get(localFileID)} - ${progress}%`;
|
||||
};
|
||||
|
||||
// @ts-expect-error Need to add types
|
||||
const generateItemKey = ({ localFileID, progress }) => {
|
||||
return `${localFileID}-${progress}`;
|
||||
};
|
||||
@@ -501,6 +504,7 @@ const ResultSection: React.FC<ResultSectionProps> = ({
|
||||
return <></>;
|
||||
}
|
||||
|
||||
// @ts-expect-error Need to add types
|
||||
const renderListItem = (fileID) => {
|
||||
return (
|
||||
<ResultItemContainer key={fileID}>
|
||||
@@ -509,10 +513,12 @@ const ResultSection: React.FC<ResultSectionProps> = ({
|
||||
);
|
||||
};
|
||||
|
||||
// @ts-expect-error Need to add types
|
||||
const getItemTitle = (fileID) => {
|
||||
return uploadFileNames.get(fileID)!;
|
||||
};
|
||||
|
||||
// @ts-expect-error Need to add types
|
||||
const generateItemKey = (fileID) => {
|
||||
return fileID;
|
||||
};
|
||||
|
||||
@@ -72,7 +72,8 @@ const App: React.FC<AppProps> = ({ Component, pageProps }) => {
|
||||
void isLocalStorageAndIndexedDBMismatch().then((mismatch) => {
|
||||
if (mismatch) {
|
||||
log.error("Logging out (IndexedDB and local storage mismatch)");
|
||||
return logout();
|
||||
logout();
|
||||
return;
|
||||
} else {
|
||||
return runMigrations();
|
||||
}
|
||||
|
||||
@@ -235,6 +235,7 @@ class UIService {
|
||||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error Need to add types
|
||||
function convertInProgressUploadsToList(inProgressUploads) {
|
||||
return [...inProgressUploads.entries()].map(
|
||||
([localFileID, progress]) =>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// TODO: Audit this file
|
||||
import type { SelectionContext } from "ente-new/photos/components/gallery";
|
||||
import type { GalleryBarMode } from "ente-new/photos/components/gallery/reducer";
|
||||
import type { SelectedState, SetSelectedState } from "utils/file";
|
||||
@@ -10,6 +11,7 @@ export const handleSelectCreator =
|
||||
userID: number | undefined,
|
||||
activeCollectionID: number,
|
||||
activePersonID: string | undefined,
|
||||
// @ts-expect-error Need to add types
|
||||
setRangeStart?,
|
||||
) =>
|
||||
({ id, ownerID }: { id: number; ownerID: number }, index?: number) =>
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
"extends": "ente-build-config/tsconfig-next.json",
|
||||
"compilerOptions": {
|
||||
/* Set the base directory from which to resolve bare module names. */
|
||||
"baseUrl": "./src",
|
||||
|
||||
/* Override tsconfig-next.json (TODO: Remove all of us) */
|
||||
"noImplicitAny": false,
|
||||
"strictNullChecks": false
|
||||
"baseUrl": "./src"
|
||||
},
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
{
|
||||
"extends": "ente-build-config/tsconfig-next.json",
|
||||
"compilerOptions": {
|
||||
/* MUI doesn't work with exactOptionalPropertyTypes yet. */
|
||||
"exactOptionalPropertyTypes": false
|
||||
},
|
||||
"include": [
|
||||
".",
|
||||
"../base/global-electron.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user