π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
update(locker):pending-dialogs-updated
Aswin Asok12da5f9b219e
diff --git a/web/apps/locker/src/components/LockerConfirmDialog.tsx b/web/apps/locker/src/components/LockerConfirmDialog.tsxindex 6903e3cfbb..e0d8a4dd66 100644--- a/web/apps/locker/src/components/LockerConfirmDialog.tsx+++ b/web/apps/locker/src/components/LockerConfirmDialog.tsx@@ -22,7 +22,7 @@ import {} from "@mui/material";import { LoadingButton } from "ente-base/components/mui/LoadingButton";import { t } from "i18next";-import type React from "react";+import React, { useId } from "react";interface LockerConfirmDialogProps {open: boolean;@@ -55,6 +55,8 @@ export function LockerConfirmDialog({onClose,onConfirm,}: LockerConfirmDialogProps) {+ const titleID = useId();+ const bodyID = useId();const handleClose = () => {if (!loading) {onClose();@@ -64,6 +66,8 @@ export function LockerConfirmDialog({return (<Dialogopen={open}+ aria-labelledby={titleID}+ aria-describedby={bodyID}onClose={handleClose}fullWidthmaxWidth="xs"@@ -113,11 +117,13 @@ export function LockerConfirmDialog({}}/><Typography+ id={titleID}sx={{ ...lockerTextH2Sx, textAlign: "center", mt: 2.5 }}>{title}</Typography><Typography+ id={bodyID}sx={(theme) => ({...lockerTextBodySx,textAlign: "center",diff --git a/web/apps/locker/src/components/LockerFileLinkDialog.tsx b/web/apps/locker/src/components/LockerFileLinkDialog.tsxindex 0cea0317c6..2616374e3d 100644--- a/web/apps/locker/src/components/LockerFileLinkDialog.tsx+++ b/web/apps/locker/src/components/LockerFileLinkDialog.tsx@@ -23,7 +23,7 @@ import {} from "@mui/material";import { LoadingButton } from "ente-base/components/mui/LoadingButton";import { t } from "i18next";-import React from "react";+import React, { useId } from "react";interface LockerFileLinkDialogProps {open: boolean;@@ -49,191 +49,204 @@ export const LockerFileLinkDialog: React.FC<LockerFileLinkDialogProps> = ({onCopy,onShare,onDelete,-}) => (- <Dialog- open={open}- onClose={loading || deleting ? undefined : onClose}- fullWidth={!loading}- maxWidth={loading ? false : "xs"}- slotProps={{- paper: {- sx: loading- ? (theme) => ({- display: "flex",- flexDirection: "row",- alignItems: "center",- gap: 2,- padding: "20px 24px",- borderRadius: "20px",- ...lockerColorSx(theme, {- backgroundColor: "backgroundBase",- }),- boxShadow: lockerShadowFloating,- width: "auto",- })- : lockerSheetPaperSx,- },- container: {- sx: loading ? { alignItems: "center" } : lockerSheetContainerSx,- },- }}- >- {loading ? (- <>- <CircularProgress- size={24}- thickness={4}- sx={(theme) => lockerColorSx(theme, { color: "primary" })}- />- <Typography sx={lockerTextBodySx}>- {t("creatingShareLink")}- </Typography>- </>- ) : (- <Stack>- <Stack- direction="row"- sx={{ alignItems: "center", gap: 1.5, minHeight: 38 }}- >- <Typography- noWrap- sx={{ ...lockerTextH2Sx, flex: 1, minWidth: 0 }}- >- {itemTitle}+}) => {+ const titleID = useId();+ return (+ <Dialog+ open={open}+ aria-labelledby={titleID}+ onClose={loading || deleting ? undefined : onClose}+ fullWidth={!loading}+ maxWidth={loading ? false : "xs"}+ slotProps={{+ paper: {+ sx: loading+ ? (theme) => ({+ display: "flex",+ flexDirection: "row",+ alignItems: "center",+ gap: 2,+ padding: "20px 24px",+ borderRadius: "20px",+ ...lockerColorSx(theme, {+ backgroundColor: "backgroundBase",+ }),+ boxShadow: lockerShadowFloating,+ width: "auto",+ })+ : lockerSheetPaperSx,+ },+ container: {+ sx: loading+ ? { alignItems: "center" }+ : lockerSheetContainerSx,+ },+ }}+ >+ {loading ? (+ <>+ <CircularProgress+ size={24}+ thickness={4}+ sx={(theme) =>+ lockerColorSx(theme, { color: "primary" })+ }+ />+ <Typography id={titleID} sx={lockerTextBodySx}>+ {t("creatingShareLink")}</Typography>- <IconButton- aria-label={t("cancel")}- onClick={onClose}- disabled={deleting}- sx={(theme) => ({- width: 36,- height: 36,- borderRadius: "50%",- p: 0,- flexShrink: 0,- ...lockerColorSx(theme, {- backgroundColor: "fillLight",- color: "iconColor",- }),- "&:hover": {+ </>+ ) : (+ <Stack>+ <Stack+ direction="row"+ sx={{ alignItems: "center", gap: 1.5, minHeight: 38 }}+ >+ <Typography+ id={titleID}+ noWrap+ sx={{ ...lockerTextH2Sx, flex: 1, minWidth: 0 }}+ >+ {itemTitle}+ </Typography>+ <IconButton+ aria-label={t("cancel")}+ onClick={onClose}+ disabled={deleting}+ sx={(theme) => ({+ width: 36,+ height: 36,+ borderRadius: "50%",+ p: 0,+ flexShrink: 0,...lockerColorSx(theme, {- backgroundColor: "fillDark",+ backgroundColor: "fillLight",+ color: "iconColor",}),- },- })}- >- <HugeiconsIcon- icon={Cancel01Icon}- size={18}- strokeWidth={1.5}- />- </IconButton>- </Stack>- <Typography- sx={(theme) => ({- ...lockerTextBodySx,- mt: 2,- ...lockerColorSx(theme, { color: "textLight" }),- })}- >- {t("shareThisLink")}- </Typography>- <Box- sx={(theme) => ({- position: "relative",- mt: 3,- borderRadius: "12px",- padding: "16px 48px 16px 12px",- ...lockerColorSx(theme, {- backgroundColor: "fillLight",- }),- })}- >+ "&:hover": {+ ...lockerColorSx(theme, {+ backgroundColor: "fillDark",+ }),+ },+ })}+ >+ <HugeiconsIcon+ icon={Cancel01Icon}+ size={18}+ strokeWidth={1.5}+ />+ </IconButton>+ </Stack><Typography- component="div"- sx={{- wordBreak: "break-all",- fontSize: 13,- lineHeight: 1.5,- fontFamily:- 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',- }}- >- {url}- </Typography>- <IconButton- aria-label={t("copyLink")}- onClick={onCopy}- disabled={!url || deleting}sx={(theme) => ({- position: "absolute",- right: 6,- top: 6,- width: 36,- height: 36,- borderRadius: "50%",- ...lockerColorSx(theme, { color: "iconColor" }),- "&:hover": {- ...lockerColorSx(theme, {- backgroundColor: "fillDark",- }),- },+ ...lockerTextBodySx,+ mt: 2,+ ...lockerColorSx(theme, { color: "textLight" }),})}>- <ContentCopyIcon sx={{ fontSize: 18 }} />- </IconButton>- </Box>- <Stack sx={{ gap: 1.5, mt: 2 }}>- <Button- fullWidth- onClick={showShareAction ? onShare : onCopy}- disabled={!url || deleting}+ {t("shareThisLink")}+ </Typography>+ <Boxsx={(theme) => ({- ...lockerTextBodyBoldSx,- minHeight: 52,- borderRadius: "20px",- textTransform: "none",+ position: "relative",+ mt: 3,+ borderRadius: "12px",+ padding: "16px 48px 16px 12px",...lockerColorSx(theme, {- backgroundColor: "primary",- color: "specialWhite",+ backgroundColor: "fillLight",}),- "&:hover": {- ...lockerColorSx(theme, {- backgroundColor: "primaryDark",- }),- },})}>- {showShareAction ? t("shareLink") : t("copyLink")}- </Button>- <LoadingButton- fullWidth- variant="text"- color="critical"- loading={deleting}- onClick={onDelete}- sx={(theme) => ({- ...lockerTextBodyBoldSx,- minHeight: 52,- borderRadius: "20px",- textTransform: "none",- backgroundColor: "transparent",- ...lockerColorSx(theme, { color: "warning" }),- "&.Mui-disabled": {- backgroundColor: "transparent",- ...lockerColorSx(theme, { color: "warning" }),- },- "&:hover": {+ <Typography+ component="div"+ sx={{+ wordBreak: "break-all",+ fontSize: 13,+ lineHeight: 1.5,+ fontFamily:+ 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',+ }}+ >+ {url}+ </Typography>+ <IconButton+ aria-label={t("copyLink")}+ onClick={onCopy}+ disabled={!url || deleting}+ sx={(theme) => ({+ position: "absolute",+ right: 6,+ top: 6,+ width: 36,+ height: 36,+ borderRadius: "50%",+ ...lockerColorSx(theme, { color: "iconColor" }),+ "&:hover": {+ ...lockerColorSx(theme, {+ backgroundColor: "fillDark",+ }),+ },+ })}+ >+ <ContentCopyIcon sx={{ fontSize: 18 }} />+ </IconButton>+ </Box>+ <Stack sx={{ gap: 1.5, mt: 2 }}>+ <Button+ fullWidth+ onClick={showShareAction ? onShare : onCopy}+ disabled={!url || deleting}+ sx={(theme) => ({+ ...lockerTextBodyBoldSx,+ minHeight: 52,+ borderRadius: "20px",+ textTransform: "none",...lockerColorSx(theme, {- backgroundColor: "warningLight",+ backgroundColor: "primary",+ color: "specialWhite",}),- },- })}- >- {deleting ? t("deletingShareLink") : t("deleteLink")}- </LoadingButton>+ "&:hover": {+ ...lockerColorSx(theme, {+ backgroundColor: "primaryDark",+ }),+ },+ })}+ >+ {showShareAction ? t("shareLink") : t("copyLink")}+ </Button>+ <LoadingButton+ fullWidth+ variant="text"+ color="critical"+ loading={deleting}+ onClick={onDelete}+ sx={(theme) => ({+ ...lockerTextBodyBoldSx,+ minHeight: 52,+ borderRadius: "20px",+ textTransform: "none",+ backgroundColor: "transparent",+ ...lockerColorSx(theme, { color: "warning" }),+ "&.Mui-disabled": {+ backgroundColor: "transparent",+ ...lockerColorSx(theme, {+ color: "warning",+ }),+ },+ "&:hover": {+ ...lockerColorSx(theme, {+ backgroundColor: "warningLight",+ }),+ },+ })}+ >+ {deleting+ ? t("deletingShareLink")+ : t("deleteLink")}+ </LoadingButton>+ </Stack></Stack>- </Stack>- )}- </Dialog>-);+ )}+ </Dialog>+ );+};diff --git a/web/apps/locker/src/components/itemList/ItemListDialogs.tsx b/web/apps/locker/src/components/itemList/ItemListDialogs.tsxindex d456372661..486418790e 100644--- a/web/apps/locker/src/components/itemList/ItemListDialogs.tsx+++ b/web/apps/locker/src/components/itemList/ItemListDialogs.tsx@@ -28,7 +28,7 @@ import {} from "@mui/material";import { LoadingButton } from "ente-base/components/mui/LoadingButton";import { t } from "i18next";-import React from "react";+import React, { useId } from "react";import {lockerSheetContainerSx,lockerSheetPaperSx,@@ -126,448 +126,461 @@ export const ItemListDialogs: React.FC<ItemListDialogsProps> = ({setRestoreCollectionID,collectionFilterAnchorEl,fileLinkDialogOpen,-}) => (- <>- <LockerFileLinkDialog- open={fileLinkDialogOpen}- itemTitle={activeFileLinkItemTitle}- url={activeFileLinkURL ?? undefined}- loading={isCreatingFileLink}- deleting={isDeletingFileLink}- showShareAction={canNativeShare}- onClose={closeFileLinkDialog}- onCopy={onCopyFileLink}- onShare={onShareFileLink}- onDelete={onRequestDeleteFileLink}- />+}) => {+ const restoreTitleID = useId();+ return (+ <>+ <LockerFileLinkDialog+ open={fileLinkDialogOpen}+ itemTitle={activeFileLinkItemTitle}+ url={activeFileLinkURL ?? undefined}+ loading={isCreatingFileLink}+ deleting={isDeletingFileLink}+ showShareAction={canNativeShare}+ onClose={closeFileLinkDialog}+ onCopy={onCopyFileLink}+ onShare={onShareFileLink}+ onDelete={onRequestDeleteFileLink}+ />- <LockerConfirmDialog- open={isDeleteFileLinkConfirmOpen}- illustration="/images/file_delete_icon.png"- title={t("deleteShareLinkDialogTitle")}- body={t("deleteShareLinkConfirmation")}- confirmLabel={t("delete")}- loading={isDeletingFileLink}- onClose={() => {- if (!isDeletingFileLink) {- setDeleteFileLinkConfirmOpen(false);- }- }}- onConfirm={deleteFileLink}- />+ <LockerConfirmDialog+ open={isDeleteFileLinkConfirmOpen}+ illustration="/images/file_delete_icon.png"+ title={t("deleteShareLinkDialogTitle")}+ body={t("deleteShareLinkConfirmation")}+ confirmLabel={t("delete")}+ loading={isDeletingFileLink}+ onClose={() => {+ if (!isDeletingFileLink) {+ setDeleteFileLinkConfirmOpen(false);+ }+ }}+ onConfirm={deleteFileLink}+ />- <Dialog- slotProps={{- paper: { sx: lockerSheetPaperSx },- container: { sx: lockerSheetContainerSx },- }}- open={restoreDialogOpen}- onClose={() => {- if (!restoringItem) {- onCloseRestoreDialog();- }- }}- fullWidth- maxWidth="xs"- >- <Stack>- <Stack- direction="row"- sx={{ alignItems: "center", gap: 1.5, minHeight: 38 }}- >+ <Dialog+ slotProps={{+ paper: { sx: lockerSheetPaperSx },+ container: { sx: lockerSheetContainerSx },+ }}+ open={restoreDialogOpen}+ aria-labelledby={restoreTitleID}+ onClose={() => {+ if (!restoringItem) {+ onCloseRestoreDialog();+ }+ }}+ fullWidth+ maxWidth="xs"+ >+ <Stack>+ <Stack+ direction="row"+ sx={{ alignItems: "center", gap: 1.5, minHeight: 38 }}+ >+ <Typography+ id={restoreTitleID}+ noWrap+ sx={{ ...lockerTextH2Sx, flex: 1, minWidth: 0 }}+ >+ {t("restoreToCollection")}+ </Typography>+ <IconButton+ aria-label={t("cancel")}+ disabled={restoringItem}+ onClick={() => {+ if (!restoringItem) {+ onCloseRestoreDialog();+ }+ }}+ sx={(theme) => ({+ width: 36,+ height: 36,+ borderRadius: "50%",+ p: 0,+ flexShrink: 0,+ ...lockerColorSx(theme, {+ backgroundColor: "fillLight",+ color: "iconColor",+ }),+ "&:hover": {+ ...lockerColorSx(theme, {+ backgroundColor: "fillDark",+ }),+ },+ })}+ >+ <HugeiconsIcon+ icon={Cancel01Icon}+ size={18}+ strokeWidth={1.5}+ />+ </IconButton>+ </Stack><Typography- noWrap- sx={{ ...lockerTextH2Sx, flex: 1, minWidth: 0 }}+ sx={(theme) => ({+ ...lockerTextMiniSx,+ mt: 2.5,+ mb: 1,+ ...lockerColorSx(theme, { color: "textLight" }),+ })}>- {t("restoreToCollection")}+ {t("collections")}</Typography>- <IconButton- aria-label={t("cancel")}- disabled={restoringItem}- onClick={() => {- if (!restoringItem) {- onCloseRestoreDialog();- }- }}+ <Box sx={{ display: "flex", flexWrap: "wrap", gap: 1 }}>+ {restoreCollections.length > 0 ? (+ restoreCollections.map((collection) => (+ <Chip+ key={collection.id}+ label={collection.name}+ icon={+ restoreCollectionID ===+ collection.id ? (+ <CheckRoundedIcon+ sx={{ fontSize: 14 }}+ />+ ) : undefined+ }+ disabled={restoringItem}+ onClick={() =>+ setRestoreCollectionID(collection.id)+ }+ sx={(theme) => ({+ height: 36,+ borderRadius: "9999px",+ px: "14px",+ border: "1px solid",+ ...lockerColorSx(theme, {+ backgroundColor:+ restoreCollectionID ===+ collection.id+ ? "primaryLight"+ : "fillLight",+ color:+ restoreCollectionID ===+ collection.id+ ? "primary"+ : "textBase",+ ...(restoreCollectionID ===+ collection.id+ ? {+ borderColor:+ "primaryStroke" as const,+ }+ : {}),+ }),+ ...(restoreCollectionID ===+ collection.id+ ? {}+ : { borderColor: "transparent" }),+ "& .MuiChip-label": {+ ...lockerTextBodySx,+ px: 0,+ },+ "& .MuiChip-icon": {+ ml: 0,+ mr: 0.75,+ ...lockerColorSx(theme, {+ color: "primary",+ }),+ },+ })}+ />+ ))+ ) : (+ <Typography+ sx={(theme) => ({+ ...lockerTextBodySx,+ ...lockerColorSx(theme, {+ color: "textLight",+ }),+ })}+ >+ {t("noCollectionsAvailableForSelection")}+ </Typography>+ )}+ </Box>+ {restoreError && (+ <Typography+ sx={(theme) => ({+ ...lockerTextMiniSx,+ mt: 1.5,+ ...lockerColorSx(theme, { color: "warning" }),+ })}+ >+ {restoreError}+ </Typography>+ )}+ <LoadingButton+ fullWidth+ variant="contained"+ loading={restoringItem}+ disabled={restoreCollectionID === null}+ onClick={onConfirmRestore}sx={(theme) => ({- width: 36,- height: 36,- borderRadius: "50%",- p: 0,- flexShrink: 0,+ ...lockerTextBodyBoldSx,+ mt: 3,+ minHeight: 52,+ borderRadius: "20px",+ textTransform: "none",...lockerColorSx(theme, {- backgroundColor: "fillLight",- color: "iconColor",+ backgroundColor: "primary",+ color: "specialWhite",}),"&:hover": {...lockerColorSx(theme, {- backgroundColor: "fillDark",+ backgroundColor: "primaryDark",+ }),+ },+ "&.Mui-disabled": {+ ...lockerColorSx(theme, {+ backgroundColor: "fillDarkest",+ color: "textLighter",}),},})}>- <HugeiconsIcon- icon={Cancel01Icon}- size={18}- strokeWidth={1.5}- />- </IconButton>+ {t("restore")}+ </LoadingButton></Stack>- <Typography- sx={(theme) => ({- ...lockerTextMiniSx,- mt: 2.5,- mb: 1,- ...lockerColorSx(theme, { color: "textLight" }),- })}- >- {t("collections")}- </Typography>- <Box sx={{ display: "flex", flexWrap: "wrap", gap: 1 }}>- {restoreCollections.length > 0 ? (- restoreCollections.map((collection) => (- <Chip- key={collection.id}- label={collection.name}- icon={- restoreCollectionID === collection.id ? (- <CheckRoundedIcon- sx={{ fontSize: 14 }}- />- ) : undefined- }- disabled={restoringItem}- onClick={() =>- setRestoreCollectionID(collection.id)- }- sx={(theme) => ({- height: 36,- borderRadius: "9999px",- px: "14px",- border: "1px solid",- ...lockerColorSx(theme, {- backgroundColor:- restoreCollectionID ===- collection.id- ? "primaryLight"- : "fillLight",- color:- restoreCollectionID ===- collection.id- ? "primary"- : "textBase",- ...(restoreCollectionID ===- collection.id- ? {- borderColor:- "primaryStroke" as const,- }- : {}),- }),- ...(restoreCollectionID === collection.id- ? {}- : { borderColor: "transparent" }),- "& .MuiChip-label": {- ...lockerTextBodySx,- px: 0,- },- "& .MuiChip-icon": {- ml: 0,- mr: 0.75,- ...lockerColorSx(theme, {- color: "primary",- }),- },- })}+ </Dialog>++ <Dialog+ slotProps={{+ paper: { sx: lockerSheetPaperSx },+ container: { sx: lockerSheetContainerSx },+ }}+ open={renameCollectionOpen}+ onClose={() => {+ if (!renamingCollection) {+ onCloseRenameDialog();+ }+ }}+ fullWidth+ maxWidth="xs"+ >+ <Stack>+ <Stack+ direction="row"+ sx={{ alignItems: "center", gap: 1.5, minHeight: 38 }}+ >+ <Typography+ sx={{ ...lockerTextH2Sx, flex: 1, minWidth: 0 }}+ >+ {t("renameCollection")}+ </Typography>+ <IconButton+ aria-label={t("close")}+ onClick={onCloseRenameDialog}+ disabled={renamingCollection}+ sx={lockerHeaderIconButtonSx}+ >+ <HugeiconsIcon+ icon={Cancel01Icon}+ size={18}+ strokeWidth={1.5}/>- ))- ) : (+ </IconButton>+ </Stack>+ <Box sx={{ mt: 2.5 }}>+ <FormField+ value={renameValue}+ onChange={(event) =>+ setRenameValue(event.target.value)+ }+ label={t("enterCollectionName")}+ required+ autoFocus+ disabled={renamingCollection}+ onKeyDown={(event) => {+ if (event.key === "Enter") {+ void onConfirmRename();+ }+ }}+ />+ </Box>+ {renameError && (<Typographysx={(theme) => ({- ...lockerTextBodySx,- ...lockerColorSx(theme, { color: "textLight" }),+ ...lockerTextMiniSx,+ mt: 1.5,+ ...lockerColorSx(theme, { color: "warning" }),})}>- {t("noCollectionsAvailableForSelection")}+ {renameError}</Typography>)}- </Box>- {restoreError && (- <Typography+ <LoadingButton+ fullWidth+ color="primary"+ loading={renamingCollection}+ disabled={!renameValue.trim()}+ onClick={onConfirmRename}sx={(theme) => ({- ...lockerTextMiniSx,- mt: 1.5,- ...lockerColorSx(theme, { color: "warning" }),- })}- >- {restoreError}- </Typography>- )}- <LoadingButton- fullWidth- variant="contained"- loading={restoringItem}- disabled={restoreCollectionID === null}- onClick={onConfirmRestore}- sx={(theme) => ({- ...lockerTextBodyBoldSx,- mt: 3,- minHeight: 52,- borderRadius: "20px",- textTransform: "none",- ...lockerColorSx(theme, {- backgroundColor: "primary",- color: "specialWhite",- }),- "&:hover": {+ ...lockerTextBodyBoldSx,+ mt: 3,+ borderRadius: "20px",+ textTransform: "none",...lockerColorSx(theme, {- backgroundColor: "primaryDark",+ backgroundColor: "primary",+ color: "specialWhite",}),- },- "&.Mui-disabled": {- ...lockerColorSx(theme, {- backgroundColor: "fillDarkest",- color: "textLighter",+ "&:hover": {+ ...lockerColorSx(theme, {+ backgroundColor: "primaryDark",+ }),+ },+ ...lockerPrimaryButtonSx(theme, {+ loading: renamingCollection,}),- },- })}- >- {t("restore")}- </LoadingButton>- </Stack>- </Dialog>-- <Dialog- slotProps={{- paper: { sx: lockerSheetPaperSx },- container: { sx: lockerSheetContainerSx },- }}- open={renameCollectionOpen}- onClose={() => {- if (!renamingCollection) {- onCloseRenameDialog();- }- }}- fullWidth- maxWidth="xs"- >- <Stack>- <Stack- direction="row"- sx={{ alignItems: "center", gap: 1.5, minHeight: 38 }}- >- <Typography- sx={{ ...lockerTextH2Sx, flex: 1, minWidth: 0 }}- >- {t("renameCollection")}- </Typography>- <IconButton- aria-label={t("close")}- onClick={onCloseRenameDialog}- disabled={renamingCollection}- sx={lockerHeaderIconButtonSx}+ })}>- <HugeiconsIcon- icon={Cancel01Icon}- size={18}- strokeWidth={1.5}- />- </IconButton>+ {t("save")}+ </LoadingButton></Stack>- <Box sx={{ mt: 2.5 }}>- <FormField- value={renameValue}- onChange={(event) => setRenameValue(event.target.value)}- label={t("enterCollectionName")}- required- autoFocus- disabled={renamingCollection}- onKeyDown={(event) => {- if (event.key === "Enter") {- void onConfirmRename();+ </Dialog>++ <Dialog+ slotProps={{+ paper: { sx: lockerSheetPaperSx },+ container: { sx: lockerSheetContainerSx },+ }}+ open={createCollectionOpen}+ onClose={() => {+ if (!creatingCollection) {+ onCloseCreateCollectionDialog();+ }+ }}+ fullWidth+ maxWidth="xs"+ >+ <Stack>+ <Stack+ direction="row"+ sx={{ alignItems: "center", gap: 1.5, minHeight: 38 }}+ >+ <Typography+ sx={{ ...lockerTextH2Sx, flex: 1, minWidth: 0 }}+ >+ {t("createCollection")}+ </Typography>+ <IconButton+ aria-label={t("close")}+ onClick={onCloseCreateCollectionDialog}+ disabled={creatingCollection}+ sx={lockerHeaderIconButtonSx}+ >+ <HugeiconsIcon+ icon={Cancel01Icon}+ size={18}+ strokeWidth={1.5}+ />+ </IconButton>+ </Stack>+ <Box sx={{ mt: 2.5 }}>+ <FormField+ value={createCollectionName}+ onChange={(event) =>+ setCreateCollectionName(event.target.value)}- }}- />- </Box>- {renameError && (- <Typography+ label={t("enterCollectionName")}+ required+ autoFocus+ disabled={creatingCollection}+ onKeyDown={(event) => {+ if (event.key === "Enter") {+ onConfirmCreateCollection();+ }+ }}+ />+ </Box>+ {createCollectionError && (+ <Typography+ sx={(theme) => ({+ ...lockerTextMiniSx,+ mt: 1.5,+ ...lockerColorSx(theme, { color: "warning" }),+ })}+ >+ {createCollectionError}+ </Typography>+ )}+ <LoadingButton+ fullWidth+ color="primary"+ loading={creatingCollection}+ disabled={!createCollectionName.trim()}+ onClick={onConfirmCreateCollection}sx={(theme) => ({- ...lockerTextMiniSx,- mt: 1.5,- ...lockerColorSx(theme, { color: "warning" }),- })}- >- {renameError}- </Typography>- )}- <LoadingButton- fullWidth- color="primary"- loading={renamingCollection}- disabled={!renameValue.trim()}- onClick={onConfirmRename}- sx={(theme) => ({- ...lockerTextBodyBoldSx,- mt: 3,- borderRadius: "20px",- textTransform: "none",- ...lockerColorSx(theme, {- backgroundColor: "primary",- color: "specialWhite",- }),- "&:hover": {+ ...lockerTextBodyBoldSx,+ mt: 3,+ borderRadius: "20px",+ textTransform: "none",...lockerColorSx(theme, {- backgroundColor: "primaryDark",+ backgroundColor: "primary",+ color: "specialWhite",}),- },- ...lockerPrimaryButtonSx(theme, {- loading: renamingCollection,- }),- })}- >- {t("save")}- </LoadingButton>- </Stack>- </Dialog>-- <Dialog- slotProps={{- paper: { sx: lockerSheetPaperSx },- container: { sx: lockerSheetContainerSx },- }}- open={createCollectionOpen}- onClose={() => {- if (!creatingCollection) {- onCloseCreateCollectionDialog();- }- }}- fullWidth- maxWidth="xs"- >- <Stack>- <Stack- direction="row"- sx={{ alignItems: "center", gap: 1.5, minHeight: 38 }}- >- <Typography- sx={{ ...lockerTextH2Sx, flex: 1, minWidth: 0 }}- >- {t("createCollection")}- </Typography>- <IconButton- aria-label={t("close")}- onClick={onCloseCreateCollectionDialog}- disabled={creatingCollection}- sx={lockerHeaderIconButtonSx}+ "&:hover": {+ ...lockerColorSx(theme, {+ backgroundColor: "primaryDark",+ }),+ },+ ...lockerPrimaryButtonSx(theme, {+ loading: creatingCollection,+ }),+ })}>- <HugeiconsIcon- icon={Cancel01Icon}- size={18}- strokeWidth={1.5}- />- </IconButton>+ {t("createCollectionButton")}+ </LoadingButton></Stack>- <Box sx={{ mt: 2.5 }}>- <FormField- value={createCollectionName}- onChange={(event) =>- setCreateCollectionName(event.target.value)- }- label={t("enterCollectionName")}- required- autoFocus- disabled={creatingCollection}- onKeyDown={(event) => {- if (event.key === "Enter") {- onConfirmCreateCollection();+ </Dialog>++ <Menu+ anchorEl={collectionFilterAnchorEl}+ open={!!collectionFilterAnchorEl}+ onClose={closeCollectionFilterMenu}+ slotProps={{+ paper: { sx: [lockerMenuPaperSx, { mt: 1 }] },+ list: { disablePadding: true },+ }}+ >+ {dropdownHomeCollections.map((collection) => {+ const isSelected = homeSelectedCollectionIDs.includes(+ collection.id,+ );+ return (+ <LockerMenuOption+ key={collection.id}+ onClick={() =>+ onToggleHomeCollection(collection.id)}+ selected={isSelected}+ secondary={new Intl.NumberFormat().format(+ collection.items.length,+ )}+ >+ {collection.name}+ </LockerMenuOption>+ );+ })}+ {homeSelectedCollectionIDs.length > 0 && (+ <LockerMenuFooter+ onClick={() => {+ clearHomeCollectionSelection();+ closeCollectionFilterMenu();}}- />- </Box>- {createCollectionError && (- <Typography- sx={(theme) => ({- ...lockerTextMiniSx,- mt: 1.5,- ...lockerColorSx(theme, { color: "warning" }),- })}>- {createCollectionError}- </Typography>+ {t("clearSelection")}+ </LockerMenuFooter>)}- <LoadingButton- fullWidth- color="primary"- loading={creatingCollection}- disabled={!createCollectionName.trim()}- onClick={onConfirmCreateCollection}- sx={(theme) => ({- ...lockerTextBodyBoldSx,- mt: 3,- borderRadius: "20px",- textTransform: "none",- ...lockerColorSx(theme, {- backgroundColor: "primary",- color: "specialWhite",- }),- "&:hover": {- ...lockerColorSx(theme, {- backgroundColor: "primaryDark",- }),- },- ...lockerPrimaryButtonSx(theme, {- loading: creatingCollection,- }),- })}- >- {t("createCollectionButton")}- </LoadingButton>- </Stack>- </Dialog>-- <Menu- anchorEl={collectionFilterAnchorEl}- open={!!collectionFilterAnchorEl}- onClose={closeCollectionFilterMenu}- slotProps={{- paper: { sx: [lockerMenuPaperSx, { mt: 1 }] },- list: { disablePadding: true },- }}- >- {dropdownHomeCollections.map((collection) => {- const isSelected = homeSelectedCollectionIDs.includes(- collection.id,- );- return (- <LockerMenuOption- key={collection.id}- onClick={() => onToggleHomeCollection(collection.id)}- selected={isSelected}- secondary={new Intl.NumberFormat().format(- collection.items.length,- )}- >- {collection.name}- </LockerMenuOption>- );- })}- {homeSelectedCollectionIDs.length > 0 && (- <LockerMenuFooter- onClick={() => {- clearHomeCollectionSelection();- closeCollectionFilterMenu();- }}- >- {t("clearSelection")}- </LockerMenuFooter>- )}- </Menu>+ </Menu>- <Snackbar- open={feedbackMessage !== null}- message={feedbackMessage}- autoHideDuration={2500}- onClose={onCloseFeedback}- />- </>-);+ <Snackbar+ open={feedbackMessage !== null}+ message={feedbackMessage}+ autoHideDuration={2500}+ onClose={onCloseFeedback}+ />+ </>+ );+};diff --git a/web/apps/locker/src/components/locker-dialog-styles.ts b/web/apps/locker/src/components/locker-dialog-styles.tsindex 765ce8634d..5654d98524 100644--- a/web/apps/locker/src/components/locker-dialog-styles.ts+++ b/web/apps/locker/src/components/locker-dialog-styles.ts@@ -5,7 +5,8 @@ export const lockerMenuPaperSx = (theme: Theme) => ({"& .MuiMenuItem-root:last-of-type": { borderBottomColor: "transparent" },width: 196,borderRadius: "20px",- overflow: "hidden",+ overflowX: "hidden" as const,+ overflowY: "auto" as const,boxShadow: lockerShadowFloating,border: "1px solid",...lockerColorSx(theme, {