Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Frontend
Project
Project
Details
Activity
Releases
Dependency List
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
855
Issues
855
List
Boards
Labels
Service Desk
Milestones
Merge Requests
41
Merge Requests
41
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
bf1c086c
Commit
bf1c086c
authored
2 hours ago
by
Marcelo Rivera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(revert): re-add nsfw selector
parent
261296b0
feat/self-declare-nsfw
1 merge request
!414
[Sprint/GiddyGiraffe] (feat): ability for channels to self-declare nsfw
Pipeline
#74412180
passed with stages
in 32 minutes and 7 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
46 deletions
+38
-46
channel.component.scss
src/app/modules/channels/channel.component.scss
+2
-20
sidebar.html
src/app/modules/channels/sidebar/sidebar.html
+27
-7
user-dropdown.ts
src/app/modules/legacy/components/buttons/user-dropdown.ts
+9
-19
No files found.
src/app/modules/channels/channel.component.scss
View file @
bf1c086c
...
...
@@ -249,10 +249,6 @@ m-channel{
.m-channel--name
{
word-break
:
break-word
;
text-align
:
center
;
display
:
grid
;
grid-template-rows
:
1fr
;
grid-template-columns
:
1fr
40px
;
>
*
{
display
:inline-block
;
vertical-align
:middle
;
...
...
@@ -264,9 +260,7 @@ m-channel{
text-rending
:
optimizeLegibilty
;
-webkit-font-smoothing
:
antialiased
;
font-size
:
28px
;
margin
:
0
auto
;
grid-row
:
1
/
span
1
;
grid-column
:
1
/
span
2
;
margin
:
0
;
}
.minds-button-edit
>
button
{
font-size
:
16px
;
...
...
@@ -277,19 +271,7 @@ m-channel{
button
{
border
:
0
;
font-size
:
16px
;
}
.m-channelName--toolbar
{
display
:
inline-flex
;
flex-direction
:
row
;
grid-column
:
2
/
span
1
;
grid-row
:
1
/
span
1
;
align-self
:
center
;
width
:
30px
;
&
>
*
{
margin-right
:
-
$minds-margin
/
2
;
}
margin-right
:
-26px
;
}
}
.m-channel--username
{
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/channels/sidebar/sidebar.html
View file @
bf1c086c
...
...
@@ -3,13 +3,11 @@
<minds-avatar
[
object
]="
user
"
[
editMode
]="
editing
"
(
added
)="
upload_avatar
($
event
)"
></minds-avatar>
<div
class=
"m-channel--name"
>
<h2>
{{user.name}}
</h2>
<div
class=
"m-channelName--toolbar"
>
<span
class=
"minds-button-edit"
(
click
)="
toggleEditing
()"
*
ngIf=
"session.getLoggedInUser().guid == user.guid"
>
<button
class=
"material-icons"
[
hidden
]="
editing
"
>
edit
</button>
<button
class=
"material-icons"
[
hidden
]="!
editing
"
>
done
</button>
</span>
<minds-button-user-dropdown
[(
user
)]="
user
"
></minds-button-user-dropdown>
</div>
<span
class=
"minds-button-edit"
(
click
)="
toggleEditing
()"
*
ngIf=
"session.getLoggedInUser().guid == user.guid"
>
<button
class=
"material-icons"
[
hidden
]="
editing
"
>
edit
</button>
<button
class=
"material-icons"
[
hidden
]="!
editing
"
>
done
</button>
</span>
<minds-button-user-dropdown
[(
user
)]="
user
"
*
ngIf=
"session.getLoggedInUser().guid != user.guid"
></minds-button-user-dropdown>
</div>
<div
class=
"m-channel--username"
>
<h2><span>
@
</span>
{{user.username}}
</h2>
...
...
@@ -73,6 +71,28 @@
</div>
</div>
<div
class=
"m-channel-bio-editor m-channel-nsfw-editor"
*
ngIf=
"editing && isOwner()"
>
<div
class=
"m-channel-bio-input"
>
<i
class=
"material-icons mdl-color-text--blue-grey-300"
>
explicit
</i>
<m-nsfw-selector
[
selected
]="
user
.
nsfw
"
[
service
]="'
editing
'"
[
locked
]="
user
.
nsfw_lock
"
(
selected
)="
onNSWFSelections
($
event
)"
>
</m-nsfw-selector>
</div>
<div
class=
"mdl-card mdl-color--red-500 mdl-color-text--blue-grey-50 mdl-shadow--2dp"
style=
"min-height:0;"
*
ngIf=
"errorMessage"
>
<div
class=
"mdl-card__supporting-text mdl-color-text--blue-grey-50"
>
{{errorMessage}}
</div>
</div>
</div>
<m-channel--social-profiles
[
user
]="
user
"
[
editing
]="
editing
&&
isOwner
()"
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/legacy/components/buttons/user-dropdown.ts
View file @
bf1c086c
...
...
@@ -16,12 +16,10 @@ import { BlockListService } from "../../../../common/services/block-list.service
<button class="material-icons" (click)="toggleMenu($event)">more_vert</button>
<ul class="minds-dropdown-menu" [hidden]="!showMenu" >
<ng-container *ngIf="session.getLoggedInUser().guid != user.guid">
<li class="mdl-menu__item" [hidden]="user.blocked" (click)="block()" i18n="@@MINDS__BUTTONS__USER_DROPDOWN__BLOCK">Block @{{user.username}}</li>
<li class="mdl-menu__item" [hidden]="!user.blocked" (click)="unBlock()" i18n="@@MINDS__BUTTONS__USER_DROPDOWN__UNBLOCK">Un-Block @{{user.username}}</li>
<li class="mdl-menu__item" [hidden]="user.subscribed" (click)="subscribe()" i18n="@@MINDS__BUTTONS__USER_DROPDOWN__SUBSCRIBE">Subscribe</li>
<li class="mdl-menu__item" [hidden]="!user.subscribed" (click)="unSubscribe()" i18n="@@MINDS__BUTTONS__USER_DROPDOWN__UNSUBSCRIBE">Unsubscribe</li>
</ng-container>
<li class="mdl-menu__item" [hidden]="user.blocked" (click)="block()" i18n="@@MINDS__BUTTONS__USER_DROPDOWN__BLOCK">Block @{{user.username}}</li>
<li class="mdl-menu__item" [hidden]="!user.blocked" (click)="unBlock()" i18n="@@MINDS__BUTTONS__USER_DROPDOWN__UNBLOCK">Un-Block @{{user.username}}</li>
<li class="mdl-menu__item" [hidden]="user.subscribed" (click)="subscribe()" i18n="@@MINDS__BUTTONS__USER_DROPDOWN__SUBSCRIBE">Subscribe</li>
<li class="mdl-menu__item" [hidden]="!user.subscribed" (click)="unSubscribe()" i18n="@@MINDS__BUTTONS__USER_DROPDOWN__UNSUBSCRIBE">Unsubscribe</li>
<li class="mdl-menu__item" *ngIf="session.isAdmin()" [hidden]="user.banned !== 'yes'" (click)="unBan()" i18n="@@MINDS__BUTTONS__USER_DROPDOWN__UNBAN_GLOBALLY">Un-ban globally</li>
<li class="mdl-menu__item"
*ngIf="session.isAdmin()"
...
...
@@ -45,7 +43,6 @@ import { BlockListService } from "../../../../common/services/block-list.service
E-mail Address
</li>
<li class="mdl-menu__item"
*ngIf="session.getLoggedInUser().guid != user.guid"
(click)="report(); showMenu = false"
i18n="@@M__ACTION__REPORT"
>
...
...
@@ -68,13 +65,12 @@ import { BlockListService } from "../../../../common/services/block-list.service
Remove Explicit
</li>
<li class="mdl-menu__item m-user-dropdown__item--nsfw"
*ngIf="session.isAdmin()
|| session.getLoggedInUser().guid == user.guid
"
*ngIf="session.isAdmin()"
>
<m-nsfw-selector
service="editing"
[selected]="session.isAdmin() ? user.nsfw_lock : user.nsfw"
[locked]="session.isAdmin() ? [] : user.nsfw_lock"
(selected)="setNSFW($event)"
[selected]="user.nsfw_lock"
(selected)="setNSFWLock($event)"
>
</m-nsfw-selector>
</li>
...
...
@@ -312,16 +308,10 @@ export class UserDropdownButton {
}
}
async
setNSFW
(
reasons
:
Array
<
{
label
,
value
,
selected
}
>
)
{
async
setNSFW
Lock
(
reasons
:
Array
<
{
label
,
value
,
selected
}
>
)
{
const
nsfw
=
reasons
.
map
(
reason
=>
reason
.
value
);
this
.
client
.
post
(
`api/v2/admin/nsfw/
${
this
.
user
.
guid
}
`
,
{
nsfw
});
this
.
user
.
nsfw
=
nsfw
;
if
(
this
.
session
.
isAdmin
())
{
this
.
client
.
post
(
`api/v2/admin/nsfw/
${
this
.
user
.
guid
}
`
,
{
nsfw
});
}
else
{
await
this
.
client
.
post
(
'
api/v1/channel/info
'
,
{
nsfw
:
this
.
user
.
nsfw
})
}
}
async
setRating
(
rating
:
number
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment