💚 End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Update upload dialog
vishnukvmdf8a34edc0b70
diff --git a/web/apps/locker/src/components/CreateItemDialog.tsx b/web/apps/locker/src/components/CreateItemDialog.tsxindex f49c1f959e..dae5c55e42 100644--- a/web/apps/locker/src/components/CreateItemDialog.tsx+++ b/web/apps/locker/src/components/CreateItemDialog.tsx@@ -1,4 +1,4 @@-import AddOutlinedIcon from "@mui/icons-material/AddOutlined";+import ChevronRightRoundedIcon from "@mui/icons-material/ChevronRightRounded";import CloudUploadOutlinedIcon from "@mui/icons-material/CloudUploadOutlined";import VisibilityIcon from "@mui/icons-material/Visibility";import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";@@ -253,15 +253,20 @@ export const CreateItemDialog: React.FC<CreateItemDialogProps> = ({maxWidth="sm"slotProps={{paper: {- sx: { maxHeight: "min(720px, 90vh)", borderRadius: "16px" },+ sx: {+ maxHeight: "min(720px, 90vh)",+ borderRadius: "16px",+ width: "min(100%, 520px)",+ },},}}><DialogTitlesx={{- borderBottom: 1,- borderColor: "divider",fontWeight: "bold",+ px: { xs: 4, sm: 5 },+ pt: { xs: 4, sm: 4.5 },+ pb: { xs: 2, sm: 2.5 },}}>{isEditMode@@ -273,22 +278,18 @@ export const CreateItemDialog: React.FC<CreateItemDialogProps> = ({: t("saveToLocker")}</DialogTitle>- <DialogContent sx={{ px: { xs: 2, sm: 3 }, py: 2.5 }}>+ <DialogContent+ sx={{+ px: { xs: 4, sm: 5 },+ py: { xs: 2.5, sm: 3 },+ }}+ >{!isEditMode && !selectedOption && (<Stack sx={{ gap: 2, pt: 1 }}><Typography variant="body" sx={{ color: "text.muted" }}>{t("informationDescription")}</Typography>- <Box- sx={{- display: "grid",- gridTemplateColumns: {- xs: "repeat(2, minmax(0, 1fr))",- sm: "repeat(4, minmax(0, 1fr))",- },- gap: 1.5,- }}- >+ <Stack sx={{ gap: 1 }}>{CREATABLE_TYPES.map((option) => (<TypeCardkey={option.type}@@ -301,7 +302,7 @@ export const CreateItemDialog: React.FC<CreateItemDialogProps> = ({}/>))}- </Box>+ </Stack></Stack>)}@@ -439,6 +440,7 @@ export const CreateItemDialog: React.FC<CreateItemDialogProps> = ({color="secondary"onClick={handleClose}disabled={uploading}+ sx={{ borderRadius: "16px", py: 1.25 }}>{t("cancel")}</FocusVisibleButton>@@ -447,6 +449,7 @@ export const CreateItemDialog: React.FC<CreateItemDialogProps> = ({color="accent"loading={uploading}disabled={!canUpload}+ sx={{ borderRadius: "16px", py: 1.25 }}onClick={() => void handleUpload()}>{t("upload")}@@ -520,14 +523,15 @@ const TypeCard: React.FC<{onClick={onClick}sx={(theme) => ({display: "flex",- flexDirection: "column",alignItems: "center",- gap: 1.25,- p: 2,- borderRadius: "16px",- backgroundColor: theme.vars.palette.fill.faint,+ justifyContent: "space-between",+ width: "100%",+ gap: 2,+ px: 1,+ py: 1.25,+ borderRadius: "12px",transition: "background-color 0.15s",- textAlign: "center",+ textAlign: "left","&:hover": { backgroundColor: theme.vars.palette.fill.faintHover },})}>@@ -535,24 +539,38 @@ const TypeCard: React.FC<{sx={{display: "flex",alignItems: "center",- justifyContent: "center",- width: 56,- height: 56,- borderRadius: "50%",- backgroundColor: bgColor,+ gap: 2,+ minWidth: 0,+ flex: 1,}}>- {icon}+ <Box+ sx={{+ display: "flex",+ alignItems: "center",+ justifyContent: "center",+ width: 48,+ height: 48,+ borderRadius: "50%",+ backgroundColor: bgColor,+ flexShrink: 0,+ }}+ >+ {icon}+ </Box>+ <Box sx={{ minWidth: 0, flex: 1 }}>+ <Typography variant="body" sx={{ fontWeight: "medium" }}>+ {label}+ </Typography>+ <Typography+ variant="small"+ sx={{ color: "text.muted", textWrap: "balance" }}+ >+ {description}+ </Typography>+ </Box></Box>- <Typography variant="body" sx={{ fontWeight: "medium" }}>- {label}- </Typography>- <Typography- variant="small"- sx={{ color: "text.muted", textWrap: "balance" }}- >- {description}- </Typography>+ <ChevronRightRoundedIcon sx={{ color: "text.faint", flexShrink: 0 }} /></ButtonBase>);@@ -803,7 +821,7 @@ const CollectionSelector: React.FC<{alignItems: "center",justifyContent: "space-between",gap: 1,- mb: 1,+ mb: 1.5,}}><Typography@@ -818,41 +836,40 @@ const CollectionSelector: React.FC<{>{t("collections")}</Typography>- {onCreateCollection && (- <ButtonBase- onClick={() => {- setCreateOpen((open) => !open);- setCreateError(null);- }}- sx={(theme) => ({- display: "inline-flex",- alignItems: "center",- gap: 0.5,- px: 1,- py: 0.5,- borderRadius: "999px",- backgroundColor: theme.vars.palette.fill.faint,- color: theme.vars.palette.text.muted,- })}- >- <AddOutlinedIcon sx={{ fontSize: 16 }} />- <Typography variant="small">- {t("createCollection")}- </Typography>- </ButtonBase>- )}</Stack>- {collections.length > 0 ? (- <Stack direction="row" sx={{ gap: 1, flexWrap: "wrap" }}>+ {collections.length > 0 || onCreateCollection ? (+ <Stack direction="row" sx={{ gap: 1.5, flexWrap: "wrap" }}>+ {onCreateCollection && (+ <ButtonBase+ onClick={() => {+ setCreateOpen((open) => !open);+ setCreateError(null);+ }}+ sx={(theme) => ({+ borderRadius: "999px",+ px: 1.5,+ py: 0.875,+ border: `1px dotted ${theme.vars.palette.stroke.muted}`,+ color: theme.vars.palette.text.muted,+ backgroundColor: createOpen+ ? theme.vars.palette.fill.faint+ : "transparent",+ })}+ >+ <Typography variant="small">+ + {t("collection")}+ </Typography>+ </ButtonBase>+ )}{collections.map((collection) => (<ButtonBasekey={collection.id}onClick={() => onSelect(collection.id)}sx={(theme) => ({borderRadius: "999px",- px: 1.25,- py: 0.75,+ px: 1.5,+ py: 0.875,backgroundColor:selectedID === collection.id? theme.vars.palette.primary.maindiff --git a/web/apps/locker/src/locales/en-US/translation.json b/web/apps/locker/src/locales/en-US/translation.jsonindex 807e2d77e4..40e79cf561 100644--- a/web/apps/locker/src/locales/en-US/translation.json+++ b/web/apps/locker/src/locales/en-US/translation.json@@ -18,6 +18,7 @@"searchEmptyDescription": "Try searching for something else.","tryAdjustingYourSearchQuery": "Try adjusting your search query","recents": "Recents",+ "collection": "Collection","collections": "Collections","trash": "Trash","createCollection": "Create collection",diff --git a/web/apps/locker/src/locales/fr-FR/translation.json b/web/apps/locker/src/locales/fr-FR/translation.jsonindex 51a1a5bb88..b6c88430fe 100644--- a/web/apps/locker/src/locales/fr-FR/translation.json+++ b/web/apps/locker/src/locales/fr-FR/translation.json@@ -15,6 +15,7 @@"searchEmptyTitle": "Aucun resultat trouve","searchEmptyDescription": "Essaie de rechercher autre chose.","tryAdjustingYourSearchQuery": "Essaie d'ajuster ta requete de recherche",+ "collection": "Collection","trash": "Corbeille","createCollection": "Creer une collection","createNewCollection": "Creer une nouvelle collection",diff --git a/web/apps/locker/src/locales/ja-JP/translation.json b/web/apps/locker/src/locales/ja-JP/translation.jsonindex 2b1c55224c..d0a2aab6ea 100644--- a/web/apps/locker/src/locales/ja-JP/translation.json+++ b/web/apps/locker/src/locales/ja-JP/translation.json@@ -18,6 +18,7 @@"searchEmptyDescription": "別のキーワードで検索してみてください。","tryAdjustingYourSearchQuery": "検索クエリを調整してみてください","recents": "最近",+ "collection": "コレクション","collections": "コレクション","trash": "ゴミ箱","createCollection": "コレクションを作成",