Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support private share in cloud file browser
- Loading branch information
Showing
16 changed files
with
2,017 additions
and
186 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,4 @@ | ||
|
||
PrivateShareDialog QFrame#mFrame { | ||
border: 0; | ||
} |
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,58 @@ | ||
#ifndef SEAFILE_CLIENT_CONTACT_SHARE_INFO_H | ||
#define SEAFILE_CLIENT_CONTACT_SHARE_INFO_H | ||
|
||
#include <QMetaType> | ||
#include <QString> | ||
|
||
struct SeafileGroup { | ||
int id; | ||
QString name; | ||
QString owner; | ||
}; | ||
|
||
struct SeafileContact { | ||
QString email; | ||
QString nickname; | ||
}; | ||
|
||
enum SharePermission { | ||
READ_WRITE, | ||
READ_ONLY, | ||
}; | ||
|
||
|
||
enum ShareType { | ||
SHARE_TO_USER, | ||
SHARE_TO_GROUP, | ||
}; | ||
|
||
|
||
inline SharePermission permissionfromString(const QString& s) | ||
{ | ||
return s == "r" ? READ_ONLY : READ_WRITE; | ||
} | ||
|
||
inline ShareType shareTypeFromString(const QString& s) | ||
{ | ||
return s == "group" ? SHARE_TO_GROUP : SHARE_TO_USER; | ||
} | ||
|
||
struct UserShareInfo { | ||
SharePermission permission; | ||
SeafileContact user; | ||
}; | ||
|
||
struct GroupShareInfo { | ||
SharePermission permission; | ||
SeafileGroup group; | ||
}; | ||
|
||
/** | ||
* Register with QMetaType so we can wrap it with QVariant::fromValue | ||
*/ | ||
Q_DECLARE_METATYPE(SeafileGroup) | ||
Q_DECLARE_METATYPE(SeafileContact) | ||
Q_DECLARE_METATYPE(UserShareInfo) | ||
Q_DECLARE_METATYPE(GroupShareInfo) | ||
|
||
#endif |
Oops, something went wrong.