Skip to content

Commit

Permalink
Merge pull request #12 from nosaraei/main
Browse files Browse the repository at this point in the history
change appearance
  • Loading branch information
ehsantdy authored Feb 12, 2023
2 parents d7a0d82 + 82bfb2a commit 041af86
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 39 deletions.
7 changes: 7 additions & 0 deletions backend/channel/BucketsChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,13 @@ storage_class = STANDARD`;
});

}

async unMountBucket(){

if(GlobalData.RClone){
GlobalData.RClone.kill();
}
}
}

const instance = new BucketsChannel();
Expand Down
2 changes: 1 addition & 1 deletion backend/view/loading.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Loading Arvan S3 Application</title>
<title>Loading Arvan Cloud S3 Application</title>
<style>
body{
background-color: #00baba;
Expand Down
14 changes: 10 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,28 @@ function CreateWindow() {
// Create the browser window.

mainWindow = new BrowserWindow({
width: 1024,
width: 1210,
height: 768,
minWidth: 1024,
minHeight: 768,
maxWidth: 1210,
//maxHeight: 768,
icon: path.join(__dirname, 'icon.png'),
autoHideMenuBar: true,
show: false,
show: true,
maximizable: false,
frame: true,
movable: true,
transparent: false,
webPreferences: {
nodeIntegration: false,
contextIsolation: false,
preload: path.join(__dirname, 'preload.js')
}
});

mainWindow.maximize();
mainWindow.show();
//mainWindow.maximize();
//mainWindow.show();

mainWindow.on('close', async e => {
e.preventDefault();
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arvan-s3",
"version": "1.1.1",
"name": "arvan-cloud-s3",
"version": "1.1.2",
"private": true,
"main": "main.js",
"homepage": "./",
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Arvan S3</title>
<title>Arvan Cloud S3</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ function App(){
padding: '1.5rem',
boxShadow: '0 4px 20px rgba(0,0,0, 0.03)',
borderRadius: '1rem',
marginTop: '1.5rem',
minHeight: 'calc(91vh - 1.5rem)'
marginTop: '1rem',
minHeight: 'calc(91vh - 1rem)'
}}>
<Routes>
<Route path={"/profiles"} element={<ProfilesList/>}/>
Expand Down
2 changes: 1 addition & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ body {
font-weight: 400;
line-height: 1.5;
color: rgb(52, 68, 86);
padding-bottom: 1.5rem;
padding-bottom: 1rem;
}

code {
Expand Down
28 changes: 28 additions & 0 deletions src/sections/BucketsList/BucketsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,28 @@ const BucketsList = () => {

};

const handleUnMountBucket = async (params) => {

try{

await window.channel("Buckets@unMountBucket");

layout.notify(params.row.Name + " unmounted successfully", {
severity: "success"
});

}
catch (e) {

console.log(e);

layout.notify("Error in bucket unmount", {
severity: "error"
});
}

};

function getCreationDateAttribute(params) {

return moment(params.value).locale('en').format('DD MMMM YYYY - HH:mm');
Expand Down Expand Up @@ -350,6 +372,12 @@ const BucketsList = () => {
</ListItemIcon>
<ListItemText>Mount as drive</ListItemText>
</MenuItem>
<MenuItem onClick={handleUnMountBucket.bind(this, params)}>
<ListItemIcon>
<SaveIcon fontSize="small" />
</ListItemIcon>
<ListItemText>Unmount bucket</ListItemText>
</MenuItem>
<MenuItem onClick={handleCopyBucket.bind(this, params)}>
<ListItemIcon>
<FolderCopyIcon fontSize="small" />
Expand Down
58 changes: 31 additions & 27 deletions src/sections/ObjectsList/ObjectsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,34 +457,10 @@ const ObjectsList = () => {
<IconButton onClick={handleBackToBuckets}><BackIcon fontSize="small" /></IconButton>
<span style={{fontSize: '16px', fontWeight: '700'}}>Bucket {mountedBucket}</span>
</div>
<ActionMenu buttonTitle="Batch operation" disabled={!selectionModel.length}>
<MenuItem onClick={handleBulkDownloadObjects}>
<ListItemIcon>
<CloudDownloadOutlinedIcon fontSize="small" />
</ListItemIcon>
<ListItemText>Download objects</ListItemText>
</MenuItem>
<MenuItem onClick={handleBulkSetPublic}>
<ListItemIcon>
<PublicIcon fontSize="small" />
</ListItemIcon>
<ListItemText>Access public read</ListItemText>
</MenuItem>
<MenuItem onClick={handleBulkSetPrivate}>
<ListItemIcon>
<PublicOffIcon fontSize="small" />
</ListItemIcon>
<ListItemText>Remove public read access</ListItemText>
</MenuItem>
<MenuItem onClick={handleBulkDeleteObjects}>
<ListItemIcon>
<DeleteIcon fontSize="small" />
</ListItemIcon>
<ListItemText>Delete objects</ListItemText>
</MenuItem>
</ActionMenu>

<div style={{
marginTop: '-40px',
marginLeft: '-120px'
}}>
<TextField
size="small"
Expand All @@ -496,8 +472,36 @@ const ObjectsList = () => {
onChange={(e) => setSearchKey(e.target.value)}
/>
</div>
<Stack direction="row" justifyContent="space-between" sx={{gap: '1rem'}}>
<ActionMenu buttonTitle="Batch operation" disabled={!selectionModel.length}>
<MenuItem onClick={handleBulkDownloadObjects}>
<ListItemIcon>
<CloudDownloadOutlinedIcon fontSize="small" />
</ListItemIcon>
<ListItemText>Download objects</ListItemText>
</MenuItem>
<MenuItem onClick={handleBulkSetPublic}>
<ListItemIcon>
<PublicIcon fontSize="small" />
</ListItemIcon>
<ListItemText>Access public read</ListItemText>
</MenuItem>
<MenuItem onClick={handleBulkSetPrivate}>
<ListItemIcon>
<PublicOffIcon fontSize="small" />
</ListItemIcon>
<ListItemText>Remove public read access</ListItemText>
</MenuItem>
<MenuItem onClick={handleBulkDeleteObjects}>
<ListItemIcon>
<DeleteIcon fontSize="small" />
</ListItemIcon>
<ListItemText>Delete objects</ListItemText>
</MenuItem>
</ActionMenu>
<Button onClick={() => setUploadBoxDialog({open: true})} variant="contained" startIcon={<CloudUploadIcon />}>Upload</Button>
</Stack>

<Button onClick={() => setUploadBoxDialog({open: true})} variant="contained" startIcon={<CloudUploadIcon />}>Upload</Button>
</Stack>

<ObjectUploadBoxDialog
Expand Down
2 changes: 1 addition & 1 deletion src/sections/ProfilesList/ProfilesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ const ProfilesList = () => {

const ToolBar = (
<div>
<h3 style={{marginTop: '0'}}>Arvan S3</h3>
<h3 style={{marginTop: '0'}}>Arvan Cloud S3</h3>
<Stack direction="row" justifyContent="space-between" sx={{marginBottom: '1rem'}}>
<div>
<span style={{fontSize: '16px', fontWeight: '700'}}>Profiles</span>
Expand Down

0 comments on commit 041af86

Please sign in to comment.