cloudcmd icon indicating copy to clipboard operation
cloudcmd copied to clipboard

Time of file/folder-modification

Open frepke opened this issue 4 years ago • 8 comments

  • Version (cloudcmd -v): 15.5.1
  • Node Version node -v: -
  • OS (uname -a on Linux): Docker version 20.10.2 on Linux PVE 5.4.78-2
  • Browser name/version: Safari/Firefox (all latest)
  • Used Command Line Parameters: -
  • Changed Config: -

I would like to see an option NAME-SIZE-DATE were DATE includes the "modify time".

For some reason I've to reload the webpage sometimes, otherwise I'm working in a file which isn't saved to the disk. When a modification time is visible, I know if a reload before editing is necessary.

frepke avatar Feb 01 '21 07:02 frepke

This is a very good idea for a pull request :). readify is a great place to start from.

coderaiser avatar Feb 01 '21 09:02 coderaiser

What to do with readify? Do I have to install it in the dockercontainer?

frepke avatar Feb 01 '21 10:02 frepke

Right now readify returns data in this way:

({
    path: '/',
    files: [{
        name: 'readify.js',
        size: '4.22kb',
        date: '20.02.2016',
        owner: 'coderaiser',
        mode: 'rw- rw- r--',
        type: 'file',
    }],
});

It should be modified to have a time field:

({
    path: '/',
    files: [{
        name: 'readify.js',
        size: '4.22kb',
        date: '20.02.2016',
        time: '21:35',
        owner: 'coderaiser',
        mode: 'rw- rw- r--',
        type: 'file',
    }],
});

Then file template should be modified and name-size-date-time styles should be added to columns directory.

coderaiser avatar Feb 01 '21 10:02 coderaiser

Unfortunately I don't know where to start, maybe someone else can jump in.

frepke avatar Feb 02 '21 12:02 frepke

We can start from determining do you want date and time both was visible or only one of them? Showing one of them would be much simpler :).

Also what format of time do you want to see? Is 21:35 is ok to you? or you see it as 21:35:59?

coderaiser avatar Feb 02 '21 12:02 coderaiser

I would prefer both date and time , 21:35 without seconds is okay

frepke avatar Feb 02 '21 12:02 frepke

In this case addTime function can be added to @cloudcmd/formatify.

And later @cloudcmd/sortify should be updated to add support of sorting by time.

coderaiser avatar Feb 02 '21 13:02 coderaiser

Sorry, no clue how to implement this.

maybe someone else can pick this up

frepke avatar Feb 04 '21 09:02 frepke