-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2877 from owncloud/dummy-share-indicators
Share indicator for direct and indirect shares in file list
- Loading branch information
Showing
15 changed files
with
855 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Return all absolute parent paths. | ||
* | ||
* For example if passing in "a/b/c" it will return | ||
* ["a/b", "a", ""] | ||
* If an empty string or "/" is passed in, an empty array is returned. | ||
* | ||
* @param {String} path path to process | ||
* @param {Boolean} includeCurrent whether to include the current path (with leading slash) | ||
* @return {Array.<String>} parent paths | ||
*/ | ||
export function getParentPaths (path, includeCurrent = false) { | ||
if (path === '' || path === '/') { | ||
return [] | ||
} | ||
|
||
if (path.charAt(0) !== '/') { | ||
path = '/' + path | ||
} | ||
|
||
const paths = [] | ||
const sections = path.split('/') | ||
|
||
if (includeCurrent) { | ||
paths.push(path) | ||
} | ||
|
||
sections.pop() | ||
while (sections.length > 0) { | ||
paths.push(sections.join('/')) | ||
sections.pop() | ||
} | ||
|
||
return paths | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Share types | ||
*/ | ||
export const shareTypes = { | ||
user: 0, | ||
group: 1, | ||
userGroup: 2, | ||
link: 3, | ||
guest: 4, | ||
remote: 6 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.