Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Same convention as other packages

Manav Rathi9aa28027dcd1
diff --git a/web/apps/photos/src/components/Sidebar/index.tsx b/web/apps/photos/src/components/Sidebar/index.tsx
index efbac7fb9b..1e24d5c2b1 100644
--- a/web/apps/photos/src/components/Sidebar/index.tsx
+++ b/web/apps/photos/src/components/Sidebar/index.tsx
@@ -5,8 +5,8 @@ import { EnteLogo } from "@/base/components/EnteLogo";
import { ActivityIndicator } from "@/base/components/mui/ActivityIndicator";
import { SpaceBetweenFlex } from "@/base/components/mui/Container";
import { SidebarDrawer } from "@/base/components/mui/SidebarDrawer";
+import { useIsSmallWidth } from "@/base/components/utils/hooks";
import { useModalVisibility } from "@/base/components/utils/modal";
-import { useIsSmallWidth } from "@/base/hooks";
import log from "@/base/log";
import { savedLogs } from "@/base/log-web";
import { customAPIHost } from "@/base/origins";
diff --git a/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx b/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx
index 50652663f4..6f9cbfef1d 100644
--- a/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx
+++ b/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx
@@ -1,6 +1,6 @@
import { SpaceBetweenFlex } from "@/base/components/mui/Container";
import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
-import { useIsTouchscreen } from "@/base/hooks";
+import { useIsTouchscreen } from "@/base/components/utils/hooks";
import { DialogCloseIconButton } from "@/new/photos/components/mui/Dialog";
import { EnteMenuItem } from "@ente/shared/components/Menu/EnteMenuItem";
import ChevronRightIcon from "@mui/icons-material/ChevronRight";
diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx
index 22bc298d0b..f190f2cc81 100644
--- a/web/apps/photos/src/pages/gallery.tsx
+++ b/web/apps/photos/src/pages/gallery.tsx
@@ -4,8 +4,8 @@ import type { MiniDialogAttributes } from "@/base/components/MiniDialog";
import { NavbarBase } from "@/base/components/Navbar";
import { ActivityIndicator } from "@/base/components/mui/ActivityIndicator";
import { errorDialogAttributes } from "@/base/components/utils/dialog";
+import { useIsSmallWidth } from "@/base/components/utils/hooks";
import { useModalVisibility } from "@/base/components/utils/modal";
-import { useIsSmallWidth } from "@/base/hooks";
import log from "@/base/log";
import { type Collection } from "@/media/collection";
import { mergeMetadata, type EnteFile } from "@/media/file";
diff --git a/web/apps/photos/src/pages/shared-albums.tsx b/web/apps/photos/src/pages/shared-albums.tsx
index c81a3aa0dc..a1e8a70ca4 100644
--- a/web/apps/photos/src/pages/shared-albums.tsx
+++ b/web/apps/photos/src/pages/shared-albums.tsx
@@ -3,8 +3,11 @@ import { FormPaper, FormPaperTitle } from "@/base/components/FormPaper";
import { ActivityIndicator } from "@/base/components/mui/ActivityIndicator";
import { SpaceBetweenFlex } from "@/base/components/mui/Container";
import { NavbarBase, SelectionBar } from "@/base/components/Navbar";
+import {
+ useIsSmallWidth,
+ useIsTouchscreen,
+} from "@/base/components/utils/hooks";
import { sharedCryptoWorker } from "@/base/crypto";
-import { useIsSmallWidth, useIsTouchscreen } from "@/base/hooks";
import log from "@/base/log";
import { updateShouldDisableCFUploadProxy } from "@/gallery/upload";
import type { Collection } from "@/media/collection";
diff --git a/web/packages/accounts/components/RecoveryKey.tsx b/web/packages/accounts/components/RecoveryKey.tsx
index ba5e4f4e64..854c787f7a 100644
--- a/web/packages/accounts/components/RecoveryKey.tsx
+++ b/web/packages/accounts/components/RecoveryKey.tsx
@@ -2,8 +2,8 @@ import { type MiniDialogAttributes } from "@/base/components/MiniDialog";
import { SpaceBetweenFlex } from "@/base/components/mui/Container";
import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
import { errorDialogAttributes } from "@/base/components/utils/dialog";
+import { useIsSmallWidth } from "@/base/components/utils/hooks";
import type { ModalVisibilityProps } from "@/base/components/utils/modal";
-import { useIsSmallWidth } from "@/base/hooks";
import log from "@/base/log";
import { downloadString } from "@/base/utils/web";
import { DialogCloseIconButton } from "@/new/photos/components/mui/Dialog";
diff --git a/web/packages/base/hooks.ts b/web/packages/base/components/utils/hooks.ts
similarity index 100%
rename from web/packages/base/hooks.ts
rename to web/packages/base/components/utils/hooks.ts
diff --git a/web/packages/new/photos/components/DevSettings.tsx b/web/packages/new/photos/components/DevSettings.tsx
index 008d319532..03fcf72bcd 100644
--- a/web/packages/new/photos/components/DevSettings.tsx
+++ b/web/packages/new/photos/components/DevSettings.tsx
@@ -1,5 +1,5 @@
import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
-import { useIsSmallWidth } from "@/base/hooks";
+import { useIsSmallWidth } from "@/base/components/utils/hooks";
import { ensureOk } from "@/base/http";
import { getKVS, removeKV, setKV } from "@/base/kv";
import log from "@/base/log";
diff --git a/web/packages/new/photos/components/PeopleList.tsx b/web/packages/new/photos/components/PeopleList.tsx
index d9f2cd31dd..28455f4e66 100644
--- a/web/packages/new/photos/components/PeopleList.tsx
+++ b/web/packages/new/photos/components/PeopleList.tsx
@@ -1,4 +1,4 @@
-import { useIsSmallWidth } from "@/base/hooks";
+import { useIsSmallWidth } from "@/base/components/utils/hooks";
import type { EnteFile } from "@/media/file";
import { faceCrop, type AnnotatedFaceID } from "@/new/photos/services/ml";
import type { Person, PreviewableFace } from "@/new/photos/services/ml/people";
diff --git a/web/packages/new/photos/components/SearchBar.tsx b/web/packages/new/photos/components/SearchBar.tsx
index b11efecbd9..2739742d8d 100644
--- a/web/packages/new/photos/components/SearchBar.tsx
+++ b/web/packages/new/photos/components/SearchBar.tsx
@@ -1,5 +1,5 @@
import { assertionFailed } from "@/base/assert";
-import { useIsSmallWidth } from "@/base/hooks";
+import { useIsSmallWidth } from "@/base/components/utils/hooks";
import { ItemCard, PreviewItemTile } from "@/new/photos/components/Tiles";
import { isMLSupported, mlStatusSnapshot } from "@/new/photos/services/ml";
import { searchOptionsForString } from "@/new/photos/services/search";
diff --git a/web/packages/new/photos/components/WhatsNew.tsx b/web/packages/new/photos/components/WhatsNew.tsx
index e54d268c1f..e0de579901 100644
--- a/web/packages/new/photos/components/WhatsNew.tsx
+++ b/web/packages/new/photos/components/WhatsNew.tsx
@@ -1,6 +1,6 @@
import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
+import { useIsSmallWidth } from "@/base/components/utils/hooks";
import { ensureElectron } from "@/base/electron";
-import { useIsSmallWidth } from "@/base/hooks";
import { ut } from "@/base/i18n";
import ArrowForward from "@mui/icons-material/ArrowForward";
import {
diff --git a/web/packages/new/photos/components/gallery/BarImpl.tsx b/web/packages/new/photos/components/gallery/BarImpl.tsx
index 85dd164042..b069cc5b3e 100644
--- a/web/packages/new/photos/components/gallery/BarImpl.tsx
+++ b/web/packages/new/photos/components/gallery/BarImpl.tsx
@@ -1,5 +1,5 @@
import { Overlay } from "@/base/components/mui/Container";
-import { useIsSmallWidth } from "@/base/hooks";
+import { useIsSmallWidth } from "@/base/components/utils/hooks";
import { CollectionsSortOptions } from "@/new/photos/components/CollectionsSortOptions";
import { FilledIconButton } from "@/new/photos/components/mui";
import {
diff --git a/web/packages/new/photos/components/gallery/PeopleHeader.tsx b/web/packages/new/photos/components/gallery/PeopleHeader.tsx
index 63ae4f2ca9..5ea7fd4749 100644
--- a/web/packages/new/photos/components/gallery/PeopleHeader.tsx
+++ b/web/packages/new/photos/components/gallery/PeopleHeader.tsx
@@ -6,11 +6,11 @@ import {
} from "@/base/components/mui/Container";
import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton";
import { LoadingButton } from "@/base/components/mui/LoadingButton";
+import { useIsSmallWidth } from "@/base/components/utils/hooks";
import {
useModalVisibility,
type ModalVisibilityProps,
} from "@/base/components/utils/modal";
-import { useIsSmallWidth } from "@/base/hooks";
import log from "@/base/log";
import {
addCGroup,