Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Sharkey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blueb
Sharkey
Commits
a32a8e04
Commit
a32a8e04
authored
6 months ago
by
blueb
Browse files
Options
Downloads
Patches
Plain Diff
improvement: make MkAbuseReport more friendly for smaller screen sizes
parent
a357e9bc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/frontend/src/components/MkAbuseReport.vue
+59
-34
59 additions, 34 deletions
packages/frontend/src/components/MkAbuseReport.vue
with
59 additions
and
34 deletions
packages/frontend/src/components/MkAbuseReport.vue
+
59
−
34
View file @
a32a8e04
...
...
@@ -4,40 +4,52 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
<
template
>
<div
class=
"bcekxzvu _margin _panel"
>
<div
class=
"target"
>
<MkA
v-user-preview=
"report.targetUserId"
class=
"info"
:to=
"`/admin/user/$
{report.targetUserId}`" :behavior="'window'">
<MkAvatar
class=
"avatar"
:user=
"report.targetUser"
indicator
/>
<div
class=
"names"
>
<MkUserName
class=
"name"
:user=
"report.targetUser"
/>
<MkAcct
class=
"acct"
:user=
"report.targetUser"
style=
"display: block;"
/>
<div
class=
"bcekxzvu _margin _panel"
:class=
"
{ resolved: resolved }">
<div
class=
"target"
>
<MkA
v-user-preview=
"report.targetUserId"
class=
"info"
:to=
"`/admin/user/$
{report.targetUserId}`" :behavior="'window'">
<MkAvatar
class=
"avatar"
:user=
"report.targetUser"
indicator
/>
<div
class=
"names"
>
<MkUserName
class=
"name"
:user=
"report.targetUser"
/>
<MkAcct
class=
"acct"
:user=
"report.targetUser"
style=
"display: block;"
/>
</div>
</MkA>
<br>
<div
class=
"keyvalCtn"
>
<MkKeyValue>
<template
#key
>
{{
i18n
.
ts
.
registeredDate
}}
</
template
>
<
template
#value
>
{{
dateString
(
report
.
targetUser
.
createdAt
)
}}
(
<MkTime
:time=
"report.targetUser.createdAt"
/>
)
</
template
>
</MkKeyValue>
<MkKeyValue>
<
template
#key
>
{{
i18n
.
ts
.
reporter
}}
</
template
>
<
template
#value
><MkA
:to=
"`/admin/user/$
{report.reporter.id}`" class="_link" :behavior="'window'">@
{{
report
.
reporter
.
username
}}
</MkA></
template
>
</MkKeyValue>
<MkKeyValue>
<
template
#key
>
{{
i18n
.
ts
.
createdAt
}}
</
template
>
<
template
#value
><MkTime
:time=
"report.createdAt"
mode=
"absolute"
/>
(
<MkTime
:time=
"report.createdAt"
mode=
"relative"
/>
)
</
template
>
</MkKeyValue>
</div>
</MkA>
<MkKeyValue>
<template
#key
>
{{
i18n
.
ts
.
registeredDate
}}
</
template
>
<
template
#value
>
{{
dateString
(
report
.
targetUser
.
createdAt
)
}}
(
<MkTime
:time=
"report.targetUser.createdAt"
/>
)
</
template
>
</MkKeyValue>
</div>
<div
class=
"detail"
>
<div>
<Mfm
:text=
"report.comment"
:isBlock=
"true"
:linkNavigationBehavior=
"'window'"
/>
</div>
<hr/>
<div>
{{ i18n.ts.reporter }}:
<MkA
:to=
"`/admin/user/${report.reporter.id}`"
class=
"_link"
:behavior=
"'window'"
>
@{{ report.reporter.username }}
</MkA></div>
<div
v-if=
"report.assignee"
>
{{ i18n.ts.moderator }}:
<MkAcct
:user=
"report.assignee"
/>
<hr>
</div>
<div><MkTime
:time=
"report.createdAt"
/></div>
<div
class=
"action"
>
<MkSwitch
v-model=
"forward"
:disabled=
"report.targetUser.host == null || report.resolved"
>
{{ i18n.ts.forwardReport }}
<
template
#caption
>
{{
i18n
.
ts
.
forwardReportIsAnonymous
}}
</
template
>
</MkSwitch>
<MkButton
v-if=
"!report.resolved"
primary
@
click=
"resolve"
>
{{ i18n.ts.abuseMarkAsResolved }}
</MkButton>
<div
class=
"detail"
>
<div>
<Mfm
:text=
"report.comment"
:isBlock=
"true"
:linkNavigationBehavior=
"'window'"
/>
</div>
<hr/>
<div
v-if=
"report.assignee"
>
{{ i18n.ts.moderator }}:
<MkA
:to=
"`/admin/user/${report.assignee.id}`"
class=
"_link"
:behavior=
"'window'"
>
@{{ report.assignee.username }}
</MkA>
<br>
</div>
<div
class=
"action"
>
<MkSwitch
v-model=
"forward"
c:disabled=
"report.targetUser.host == null || report.resolved"
>
{{ i18n.ts.forwardReport }}
<
template
#caption
>
{{
i18n
.
ts
.
forwardReportIsAnonymous
}}
</
template
>
</MkSwitch>
<br
v-if=
"!report.resolved"
>
<MkButton
v-if=
"!report.resolved"
primary
@
click=
"resolve"
>
{{ i18n.ts.abuseMarkAsResolved }}
</MkButton>
</div>
</div>
</div>
</div>
</template>
<
script
lang=
"ts"
setup
>
...
...
@@ -58,6 +70,7 @@ const emit = defineEmits<{
}
>
();
const
forward
=
ref
(
props
.
report
.
forwarded
);
const
resolved
=
ref
(
props
.
report
.
resolved
);
function
resolve
()
{
os
.
apiWithDialog
(
'
admin/resolve-abuse-user-report
'
,
{
...
...
@@ -72,13 +85,17 @@ function resolve() {
<
style
lang=
"scss"
scoped
>
.bcekxzvu
{
display
:
flex
;
flex-direction
:
column
;
transition
:
.1s
;
&
.resolved
:not
(
:hover
,
:focus
)
{
opacity
:
50%
;
}
>
.target
{
width
:
35%
;
box-sizing
:
border-box
;
text-align
:
left
;
padding
:
24px
;
border-right
:
solid
1px
var
(
--
divider
);
padding
:
24px
24px
0px
24px
;
>
.info
{
display
:
flex
;
...
...
@@ -100,16 +117,24 @@ function resolve() {
padding
:
0
8px
;
flex
:
1
;
white-space
:
pre
;
overflow
:
hidden
;
>
.name
{
font-weight
:
bold
;
}
}
}
>
.keyvalCtn
{
display
:
inline-flex
;
gap
:
15px
;
}
}
>
.detail
{
flex
:
1
;
padding
:
24px
;
padding
:
0px
24px
24px
24px
;
}
}
</
style
>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment