Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Frontend
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
398
Merge Requests
65
CI / CD
Security & Compliance
Packages
Analytics
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
92d0dc39
Commit
92d0dc39
authored
1 hour ago
by
Marcelo Rivera
Browse files
Options
Download
(fix): it should take the value from the session!
parent
7b12c0c0
feat/hide-share-buttons
1 merge request
!776
Allow users to permanently hide "share" buttons in settings
Pipeline
#117604470
running with stages
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
12 deletions
+11
-12
src/app/modules/blogs/view/view.html
View file @
92d0dc39
...
...
@@ -157,7 +157,7 @@
<m-social-icons
[url]=
"blog.perma_url"
[title]=
"blog.title"
*ngIf=
"!
blog.ownerObj
.hide_share_buttons"
*ngIf=
"!
session.getLoggedInUser()
.hide_share_buttons"
>
</m-social-icons>
...
...
This diff is collapsed.
src/app/modules/blogs/view/view.spec.ts
View file @
92d0dc39
...
...
@@ -45,9 +45,7 @@ describe('Blog view component', () => {
guid
:
'
1
'
,
title
:
'
test blog
'
,
description
:
'
description
'
,
ownerObj
:
{
hide_share_buttons
:
false
,
},
ownerObj
:
{},
allow_comments
:
true
,
perma_url
:
'
/perma
'
,
thumbnail
:
'
/thumbnail
'
,
...
...
@@ -84,6 +82,9 @@ describe('Blog view component', () => {
fixture
=
TestBed
.
createComponent
(
BlogView
);
comp
=
fixture
.
componentInstance
;
comp
.
blog
=
blog
;
sessionMock
.
user
.
hide_share_buttons
=
false
;
fixture
.
detectChanges
();
});
...
...
@@ -96,9 +97,7 @@ describe('Blog view component', () => {
expect
(
socialIcons
).
not
.
toBeNull
();
const
blog
=
Object
.
assign
({},
comp
.
blog
);
blog
.
ownerObj
.
hide_share_buttons
=
true
;
comp
.
blog
=
blog
;
sessionMock
.
user
.
hide_share_buttons
=
true
;
fixture
.
detectChanges
();
...
...
This diff is collapsed.
src/app/modules/media/view/view.component.html
View file @
92d0dc39
...
...
@@ -330,7 +330,7 @@
*ngIf=
"
entity &&
!attachment.shouldBeBlurred(entity) &&
!
entity.ownerObj?
.hide_share_buttons
!
session.getLoggedInUser()
.hide_share_buttons
"
>
</m-social-icons>
...
...
This diff is collapsed.
src/app/modules/newsfeed/single/single.component.html
View file @
92d0dc39
...
...
@@ -47,6 +47,6 @@
[url]=
"siteUrl + 'newsfeed/' + activity?.guid"
[title]=
"activity?.title || ''"
[embed]=
"activity"
*ngIf=
"!
activity?.ownerObj
.hide_share_buttons"
*ngIf=
"!
session.getLoggedInUser()
.hide_share_buttons"
>
</m-social-icons>
This diff is collapsed.
src/app/modules/newsfeed/single/single.component.spec.ts
View file @
92d0dc39
...
...
@@ -111,6 +111,7 @@ describe('NewsfeedSingleComponent', () => {
};
sessionMock
.
user
.
admin
=
false
;
sessionMock
.
user
.
hide_share_buttons
=
false
;
featuresServiceMock
.
mock
(
'
sync-feeds
'
,
false
);
fixture
.
detectChanges
();
...
...
@@ -199,9 +200,7 @@ describe('NewsfeedSingleComponent', () => {
expect
(
socialIcons
).
not
.
toBeNull
();
const
activity
=
Object
.
assign
({},
comp
.
activity
);
activity
.
ownerObj
.
hide_share_buttons
=
true
;
comp
.
activity
=
activity
;
sessionMock
.
user
.
hide_share_buttons
=
true
;
fixture
.
detectChanges
();
...
...
This diff is collapsed.
src/tests/session-mock.spec.ts
View file @
92d0dc39
...
...
@@ -12,6 +12,7 @@ export let sessionMock = new (function() {
disabled_boost
:
false
,
username
:
'
test
'
,
show_boosts
:
true
,
hide_share_buttons
:
false
,
};
this
.
loggedIn
=
true
;
this
.
isAdmin
=
()
=>
{
...
...
This diff is collapsed.
Please
register
or
sign in
to comment