UI Adjustments in share file modal (#1231)
UI Adjustments in share file modal (elements alignment & snackbars position fixes) Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
This commit is contained in:
@@ -43,6 +43,7 @@ const styles = (theme: Theme) =>
|
||||
createStyles({
|
||||
copyButtonContainer: {
|
||||
paddingLeft: 16,
|
||||
paddingTop: 18,
|
||||
},
|
||||
modalContent: {
|
||||
paddingBottom: 53,
|
||||
@@ -140,7 +141,7 @@ const ShareFile = ({
|
||||
const slDate = new Date(`${selectedDate}`);
|
||||
const currDate = new Date();
|
||||
|
||||
const diffDate = slDate.getTime() - currDate.getTime();
|
||||
const diffDate = Math.ceil((slDate.getTime() - currDate.getTime()) / 1000);
|
||||
|
||||
if (diffDate > 0) {
|
||||
api
|
||||
@@ -149,7 +150,7 @@ const ShareFile = ({
|
||||
`/api/v1/buckets/${bucketName}/objects/share?prefix=${encodeFileName(
|
||||
dataObject.name
|
||||
)}&version_id=${versionID}${
|
||||
selectedDate !== "" ? `&expires=${diffDate}ms` : ""
|
||||
selectedDate !== "" ? `&expires=${diffDate}s` : ""
|
||||
}`
|
||||
)
|
||||
.then((res: string) => {
|
||||
|
||||
@@ -667,11 +667,14 @@ export const snackBarCommon = {
|
||||
color: "#fff",
|
||||
},
|
||||
snackBarExternal: {
|
||||
top: "-17px",
|
||||
position: "absolute" as const,
|
||||
minWidth: "348px",
|
||||
top: -1,
|
||||
height: 33,
|
||||
position: "fixed" as const,
|
||||
minWidth: 348,
|
||||
whiteSpace: "nowrap" as const,
|
||||
height: "33px",
|
||||
left: 0,
|
||||
width: "100%",
|
||||
justifyContent: "center" as const,
|
||||
},
|
||||
snackDiv: {
|
||||
top: "17px",
|
||||
@@ -684,7 +687,9 @@ export const snackBarCommon = {
|
||||
minWidth: "348px",
|
||||
whiteSpace: "nowrap" as const,
|
||||
height: "33px",
|
||||
maxWidth: "calc(100% - 140px)",
|
||||
width: "100%",
|
||||
justifyContent: "center",
|
||||
left: 0,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user