Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Mobile
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
179
Issues
179
List
Boards
Labels
Service Desk
Milestones
Merge Requests
12
Merge Requests
12
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Minds
Minds Mobile
Compare Revisions
23f59a1c452e168017095404e16bb1c1db7b7888...0cb040c13d8275e8ce0bb2d656eafd6ae9d7f89e
Source
0cb040c13d8275e8ce0bb2d656eafd6ae9d7f89e
Select Git revision
...
Target
23f59a1c452e168017095404e16bb1c1db7b7888
Select Git revision
Compare
Commits (4)
(feat) enforce FLAG_CREATE_POST into groups screen
· db0c0c4f
Martin Santangelo
authored
7 hours ago
db0c0c4f
(feat) enforce FLAG_SUBSCRIBE into user list component
· 8c6f8a99
Martin Santangelo
authored
7 hours ago
8c6f8a99
(feat) enforce JOIN and JOIN_GATHERING
· 971dc3e7
Martin Santangelo
authored
6 hours ago
971dc3e7
(feat) enforce FLAG_APPOINT_MODERATOR in groups
· 0cb040c1
Martin Santangelo
authored
3 hours ago
0cb040c1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
11 deletions
+23
-11
src/common/services/gathering.service.js
src/common/services/gathering.service.js
+2
-1
src/discovery/DiscoveryUser.js
src/discovery/DiscoveryUser.js
+2
-1
src/groups/GroupViewScreen.js
src/groups/GroupViewScreen.js
+14
-5
src/groups/header/GroupHeader.js
src/groups/header/GroupHeader.js
+5
-4
No files found.
src/common/services/gathering.service.js
View file @
0cb040c1
...
...
@@ -5,6 +5,7 @@ import { Platform } from 'react-native';
import
appStores
from
'
../../../AppStores
'
;
import
{
observable
,
action
}
from
'
mobx
'
;
import
logService
from
'
./log.service
'
;
import
{
FLAG_JOIN_GATHERING
}
from
'
../Permissions
'
;
/**
* Gathering service
...
...
@@ -21,7 +22,7 @@ class GatheringService {
*/
@
action
async
join
(
entity
)
{
if
(
this
.
isActive
)
{
if
(
this
.
isActive
||
entity
.
can
(
FLAG_JOIN_GATHERING
)
)
{
return
;
}
try
{
...
...
This diff is collapsed.
Click to expand it.
src/discovery/DiscoveryUser.js
View file @
0cb040c1
...
...
@@ -28,6 +28,7 @@ import colors from '../styles/Colors'
import
{
ComponentsStyle
}
from
'
../styles/Components
'
;
import
{
CommonStyle
}
from
'
../styles/Common
'
;
import
i18n
from
'
../common/services/i18n.service
'
;
import
{
FLAG_SUBSCRIBE
}
from
'
../common/Permissions
'
;
@
inject
(
'
user
'
)
@
observer
...
...
@@ -62,7 +63,7 @@ export default class DiscoveryUser extends Component {
renderRightButton
()
{
const
item
=
this
.
props
.
entity
.
item
;
if
(
this
.
props
.
user
.
me
.
guid
===
item
.
guid
||
this
.
props
.
hideButtons
)
{
if
(
this
.
props
.
user
.
me
.
guid
===
item
.
guid
||
this
.
props
.
hideButtons
||
!
item
.
can
(
FLAG_SUBSCRIBE
)
)
{
return
;
}
if
(
item
.
subscribed
)
{
...
...
This diff is collapsed.
Click to expand it.
src/groups/GroupViewScreen.js
View file @
0cb040c1
...
...
@@ -38,6 +38,7 @@ import commentsStoreProvider from '../comments/CommentsStoreProvider';
import
i18n
from
'
../common/services/i18n.service
'
;
import
featuresService
from
'
../common/services/features.service
'
;
import
FeedList
from
'
../common/components/FeedList
'
;
import
{
FLAG_CREATE_POST
,
FLAG_APPOINT_MODERATOR
}
from
'
../common/Permissions
'
;
/**
* Groups view screen
...
...
@@ -225,18 +226,23 @@ export default class GroupViewScreen extends Component {
*/
memberMenuPress
=
(
member
)
=>
{
const
group
=
this
.
props
.
groupView
.
group
;
const
memberActions
=
[
i18n
.
t
(
'
cancel
'
)
];
const
imOwner
=
this
.
props
.
groupView
.
group
[
'
is:owner
'
];
const
imModerator
=
this
.
props
.
groupView
.
group
[
'
is:moderator
'
];
const
imOwner
=
group
[
'
is:owner
'
];
const
imModerator
=
group
[
'
is:moderator
'
];
if
(
imOwner
)
{
if
(
member
[
'
is:owner
'
])
{
memberActions
.
push
(
i18n
.
t
(
'
groups.removeOwner
'
)
);
}
else
if
(
!
member
[
'
is:moderator
'
])
{
memberActions
.
push
(
i18n
.
t
(
'
groups.makeOwner
'
)
);
memberActions
.
push
(
i18n
.
t
(
'
groups.makeModerator
'
)
);
if
(
group
.
can
(
FLAG_APPOINT_MODERATOR
))
{
memberActions
.
push
(
i18n
.
t
(
'
groups.makeModerator
'
)
);
}
}
else
{
memberActions
.
push
(
i18n
.
t
(
'
groups.removeModerator
'
)
);
if
(
group
.
can
(
FLAG_APPOINT_MODERATOR
))
{
memberActions
.
push
(
i18n
.
t
(
'
groups.removeModerator
'
)
);
}
}
}
...
...
@@ -315,10 +321,13 @@ export default class GroupViewScreen extends Component {
render
()
{
const
group
=
this
.
props
.
groupView
.
group
;
if
(
!
group
)
{
return
<
CenteredLoading
/>
}
const
showPosterFab
=
this
.
props
.
groupView
.
tab
===
'
feed
'
&&
group
.
can
(
FLAG_CREATE_POST
);
const
memberActionSheet
=
this
.
state
.
memberActions
?
<
ActionSheet
ref
=
{
o
=>
this
.
ActionSheet
=
o
}
...
...
@@ -331,7 +340,7 @@ export default class GroupViewScreen extends Component {
return
(
<
View
style
=
{
CS
.
flexContainer
}
>
{
this
.
props
.
groupView
.
tab
===
'
feed
'
&&
<
CaptureFab
navigation
=
{
this
.
props
.
navigation
}
group
=
{
group
}
/>
}
{
showPosterFab
&&
<
CaptureFab
navigation
=
{
this
.
props
.
navigation
}
group
=
{
group
}
/>
}
{
this
.
getList
()}
{
memberActionSheet
}
<
/View
>
...
...
This diff is collapsed.
Click to expand it.
src/groups/header/GroupHeader.js
View file @
0cb040c1
...
...
@@ -31,6 +31,7 @@ import gathering from '../../common/services/gathering.service';
import
colors
from
'
../../styles/Colors
'
;
import
i18n
from
'
../../common/services/i18n.service
'
;
import
featuresService
from
'
../../common/services/features.service
'
;
import
{
FLAG_JOIN
,
FLAG_JOIN_GATHERING
}
from
'
../../common/Permissions
'
;
/**
* Group Header
...
...
@@ -82,7 +83,7 @@ export default class GroupHeader extends Component {
accessibilityLabel
=
{
i18n
.
t
(
'
group.subscribeMessage
'
)}
disabled
=
{
store
.
saving
}
>
<
Text
style
=
{
CommonStyle
.
colorPrimary
}
ref
=
"
btntext
"
>
{
i18n
.
t
(
'
join
'
)
.
toUpperCase
()
}
<
/Text
>
<
Text
style
=
{
CommonStyle
.
colorPrimary
}
ref
=
"
btntext
"
>
{
i18n
.
t
(
'
join
'
)}
<
/Text
>
<
/TouchableHighlight
>
);
}
else
{
...
...
@@ -94,7 +95,7 @@ export default class GroupHeader extends Component {
accessibilityLabel
=
{
i18n
.
t
(
'
group.leaveMessage
'
)}
disabled
=
{
store
.
saving
}
>
<
Text
style
=
{
CommonStyle
.
colorPrimary
}
ref
=
"
btntext
"
>
{
i18n
.
t
(
'
leave
'
)
.
toUpperCase
()
}
<
/Text
>
<
Text
style
=
{
CommonStyle
.
colorPrimary
}
ref
=
"
btntext
"
>
{
i18n
.
t
(
'
leave
'
)}
<
/Text
>
<
/TouchableHighlight
>
);
}
...
...
@@ -274,8 +275,8 @@ export default class GroupHeader extends Component {
<
Text
style
=
{
styles
.
name
}
>
{
group
.
name
.
toUpperCase
()}
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
buttonscol
}
>
{
this
.
getGatheringButton
()}
{
this
.
getActionButton
()}
{
group
.
can
(
FLAG_JOIN_GATHERING
)
&&
this
.
getGatheringButton
()}
{
group
.
can
(
FLAG_JOIN
)
&&
this
.
getActionButton
()}
<
/View
>
<
/View
>
<
/View
>
...
...
This diff is collapsed.
Click to expand it.