"FileList._updateDetailsView" expects either a file name (as a string)
or a file model (as an "OCA.File.FileInfoModel"), but when called
through "updateInList" an "OC.Files.FileInfo" object was given instead.
As the given attribute was not a model "_updateDetailsView" treated it
as a file name and tried to get the model for that file, which failed
and caused the details view to be emptied.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When the favourite icon in the details view is clicked the "Favorite"
action is triggered. However, if the action name given to
"triggerAction" is not found then the "Download" action is triggered
instead. As the "Favorite" action is not available in some file lists
(like "Recents") the "Download" action was executed instead in those
cases, which was a strange behaviour. Now the favourite icon is
hidden if its action is not available.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
When a file from the file list is dragged a drag shadow (a copy of the
file row that follows the cursor position) is created. The drag shadow
element is created as a direct child of the body element, so it needs a
higher "z-index" than the one used for the file list to be visible.
In narrow screens the "#app-content" uses a "z-index" of 1000 in order
to be visible over the "#navigation-bar" when they overlap, so the
"z-index" of the drag shadow must be at least 1000 to be visible over
the file list.
Instead of updating the hardcoded "z-index" it was removed and replaced
by CSS rules for ".dragshadow" elements to ease theming.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
If the estimated upload time is bigger than 4 hours it shows the text
"Uploading..." because the time then doesn't give any good hint to the
user anyways.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
1. The upload remaining time is always 'a few second' whatever a big or a
small file uploading.
This commit fixes it. The `new Date().getMilliseconds()` only return a
three digits number. When time arrived the next second, the millisecond
start from ZERO again. So `new Date().getTime()` is the righe choice.
And remaining time variables shoule be initialized when the file starts
uploading, otherwise the remaining time of a new upload will always be
'Infinity years' until you refresh the page.
2. The unit of `data.bitrate` is bit, but the argument unit of
`humanFileSize` function is byte, so it should be divided by 8.
Signed-off-by: Yaojin Qian <i@ume.ink>
The post-render event makes possible to modify the
MainFileInfoDetailsView element once it has been rendered, which is
needed by OCA.SystemTags.FilesPlugin to add the "Tags" label to the file
details, while the pre-render event makes possible to detach added
elements if needed before the MainFileInfoDetailsView is rendered again,
as that removes the events from the child DOM elements even if they
belong to other views.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
In some cases, an app may need to act on a detail view registered by
another app or the core, for example, to add extra elements to the
element of the detail view.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Fixes: #4644
Without this patch the filelist would always reload. However since not
all the correct data was set yet it would often:
1. fireoff a propfind to ../webdav/
2. fireoff a propfind to ../webdav/<PATH>
When just opening the file list those are the same so the result is just
fine. However if opening a direct link it means that there is a race
condition on which finishes first.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Whenever a file list is already initialized and was hidden when
switching to another file list in the navigation bar, if the user comes
back to this list it gets redisplayed. At this point the list needs to
be refreshed to be able to reflect any potential file changes done from
the other lists.
The Files app active view is set to "files" in silent mode to avoid an
unneeded load of the "/" directory. However, this also prevents the
details view from being automatically closed, so it has to be explicitly
closed by the Goto plugin; the approach used is the same that would have
been used by OCA.Files.App._onNavigationChanged if not silenced.
Fixes#1448
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The local link is a clever thing and the clients should support this imho but it might not be clear to all users. For one, the term 'local link' is a bit odd. Local with respect to what? It links directly to the file or folder, so direct link seems to make more sense to me. And we should explain the difference with a public link. So this PR:
* renames local link to direct link
* adds a short explanation, noting it only works for users who have access to this file/folder.
As other links are called public link you could also consider calling this 'private link', I suppose. But the links we sent by mail to ppl could also be called 'private link' (they are for one user, who git it by email) so I think it might be confusing. What do @nextcloud/designers think?
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
added quit option in notif in app.js
added quit option in notif in file-upload.js
added quit option in notif in fileinfomodel.js
added quit option in notif in filelist.js
added quit option in notif in filelist.js
added quit option in notif in tagsplugin.js
added quit option in notif in statusmanager.js
added quit option in notif in external.js
added quit option in notif in versionstabview.js
added quit option in notif in notification.js
changes according to the latest review.
timeout removed since there is a button to close it
translation capability added
typo fixed
test files updated
small errors fixed
Signed-off-by: Morris Jobke <hey@morrisjobke.de>