Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
B
Backend Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SpinShare
Backend Server
Commits
111fc1ef
Commit
111fc1ef
authored
Apr 14, 2020
by
Andreas Heimann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finished v1.1
parent
c22b577a
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
139 additions
and
100 deletions
+139
-100
public/assets/css/main.css
public/assets/css/main.css
+1
-26
public/assets/css/main.less
public/assets/css/main.less
+1
-29
public/assets/css/userdetail.css
public/assets/css/userdetail.css
+16
-6
public/assets/css/userdetail.less
public/assets/css/userdetail.less
+4
-1
public/assets/img/defaultAlbumArt.jpg
public/assets/img/defaultAlbumArt.jpg
+0
-0
public/assets/js/tooltip.js
public/assets/js/tooltip.js
+18
-2
src/Controller/APIController.php
src/Controller/APIController.php
+2
-0
src/Controller/ModerationController.php
src/Controller/ModerationController.php
+17
-0
src/Controller/UploadController.php
src/Controller/UploadController.php
+1
-1
src/Controller/UserSettingsController.php
src/Controller/UserSettingsController.php
+9
-3
src/Entity/User.php
src/Entity/User.php
+18
-1
templates/base.html.twig
templates/base.html.twig
+14
-14
templates/index/index.html.twig
templates/index/index.html.twig
+2
-2
templates/moderation/reports/song.html.twig
templates/moderation/reports/song.html.twig
+1
-1
templates/moderation/reports/user.html.twig
templates/moderation/reports/user.html.twig
+5
-1
templates/report/song.html.twig
templates/report/song.html.twig
+1
-1
templates/report/user.html.twig
templates/report/user.html.twig
+1
-1
templates/search/index.html.twig
templates/search/index.html.twig
+5
-2
templates/song/delete.html.twig
templates/song/delete.html.twig
+1
-1
templates/song/detail.html.twig
templates/song/detail.html.twig
+13
-3
templates/user/detail.html.twig
templates/user/detail.html.twig
+9
-5
No files found.
public/assets/css/main.css
View file @
111fc1ef
...
@@ -154,7 +154,7 @@ button:focus,
...
@@ -154,7 +154,7 @@ button:focus,
text-decoration
:
none
;
text-decoration
:
none
;
}
}
.song-item
.song-cover
{
.song-item
.song-cover
{
background
:
rgba
(
255
,
255
,
255
,
0.1
);
background
:
url("../img/defaultAlbumArt.jpg"
)
;
background-size
:
cover
;
background-size
:
cover
;
width
:
100%
;
width
:
100%
;
padding-top
:
100%
;
padding-top
:
100%
;
...
@@ -296,28 +296,3 @@ button:focus,
...
@@ -296,28 +296,3 @@ button:focus,
.user-item.inactive
{
.user-item.inactive
{
box-shadow
:
0px
2px
10px
5px
rgba
(
0
,
0
,
0
,
0.2
);
box-shadow
:
0px
2px
10px
5px
rgba
(
0
,
0
,
0
,
0.2
);
}
}
.tooltip
{
position
:
absolute
;
top
:
0px
;
left
:
0px
;
padding
:
5px
10px
;
background
:
#000000
;
font-size
:
14px
;
border-radius
:
4px
;
pointer-events
:
none
;
display
:
none
;
}
.tooltip
::before
{
content
:
""
;
position
:
absolute
;
top
:
8px
;
left
:
-7px
;
width
:
0
;
height
:
0
;
border-top
:
7px
solid
transparent
;
border-bottom
:
7px
solid
transparent
;
border-right
:
7px
solid
#000
;
}
.tooltip.active
{
display
:
block
;
}
public/assets/css/main.less
View file @
111fc1ef
...
@@ -165,7 +165,7 @@ button, .button {
...
@@ -165,7 +165,7 @@ button, .button {
text-decoration: none;
text-decoration: none;
& .song-cover {
& .song-cover {
background:
rgba(255,255,255,0.1
);
background:
url("../img/defaultAlbumArt.jpg"
);
background-size: cover;
background-size: cover;
width: 100%;
width: 100%;
padding-top: 100%;
padding-top: 100%;
...
@@ -325,31 +325,3 @@ button, .button {
...
@@ -325,31 +325,3 @@ button, .button {
box-shadow: 0px 2px 10px 5px rgba(0, 0, 0, 0.2);
box-shadow: 0px 2px 10px 5px rgba(0, 0, 0, 0.2);
}
}
}
}
\ No newline at end of file
.tooltip {
position: absolute;
top: 0px;
left: 0px;
padding: 5px 10px;
background: #000000;
font-size: 14px;
border-radius: 4px;
pointer-events: none;
display: none;
&::before {
content: "";
position: absolute;
top: 8px;
left: -7px;
width: 0;
height: 0;
border-top: 7px solid transparent;
border-bottom: 7px solid transparent;
border-right: 7px solid #000;
}
&.active {
display: block;
}
}
\ No newline at end of file
public/assets/css/userdetail.css
View file @
111fc1ef
...
@@ -68,33 +68,43 @@
...
@@ -68,33 +68,43 @@
font-size
:
32px
;
font-size
:
32px
;
margin-left
:
20px
;
margin-left
:
20px
;
}
}
.section-user-detail
.user-detail-actions
{
.section-user-detail
.user-detail-actions
,
.section-user-detail
.user-detail-actions-moderation
{
padding
:
50px
;
padding
:
50px
;
padding-top
:
0px
;
padding-top
:
0px
;
display
:
grid
;
display
:
grid
;
grid-template-columns
:
1
fr
1
fr
1
fr
1
fr
;
grid-template-columns
:
1
fr
1
fr
1
fr
1
fr
;
grid-gap
:
25px
;
grid-gap
:
25px
;
}
}
.section-user-detail
.user-detail-actions
.button
{
.section-user-detail
.user-detail-actions.user-detail-actions-moderation
,
.section-user-detail
.user-detail-actions-moderation.user-detail-actions-moderation
{
grid-template-columns
:
1
fr
1
fr
1
fr
1
fr
1
fr
;
}
.section-user-detail
.user-detail-actions
.button
,
.section-user-detail
.user-detail-actions-moderation
.button
{
padding
:
15px
0px
;
padding
:
15px
0px
;
font-size
:
16px
;
font-size
:
16px
;
transition
:
0.2s
ease-in-out
all
,
0.1s
ease-in-out
transform
;
transition
:
0.2s
ease-in-out
all
,
0.1s
ease-in-out
transform
;
}
}
.section-user-detail
.user-detail-actions
.button.button-primary
{
.section-user-detail
.user-detail-actions
.button.button-primary
,
.section-user-detail
.user-detail-actions-moderation
.button.button-primary
{
background
:
#fff
;
background
:
#fff
;
color
:
#222
;
color
:
#222
;
}
}
.section-user-detail
.user-detail-actions
.button.button-primary
:hover
{
.section-user-detail
.user-detail-actions
.button.button-primary
:hover
,
.section-user-detail
.user-detail-actions-moderation
.button.button-primary
:hover
{
background
:
#fff
;
background
:
#fff
;
color
:
#222
;
color
:
#222
;
}
}
.section-user-detail
.user-detail-actions
.button
:hover
{
.section-user-detail
.user-detail-actions
.button
:hover
,
.section-user-detail
.user-detail-actions-moderation
.button
:hover
{
background
:
rgba
(
255
,
255
,
255
,
0.2
);
background
:
rgba
(
255
,
255
,
255
,
0.2
);
color
:
#fff
;
color
:
#fff
;
opacity
:
0.6
;
opacity
:
0.6
;
transform
:
translateY
(
-4px
);
transform
:
translateY
(
-4px
);
}
}
.section-user-detail
.user-detail-actions
.button
:active
{
.section-user-detail
.user-detail-actions
.button
:active
,
.section-user-detail
.user-detail-actions-moderation
.button
:active
{
transform
:
translateY
(
-2px
);
transform
:
translateY
(
-2px
);
}
}
.section-user-detail
.song-row-user
{
.section-user-detail
.song-row-user
{
...
...
public/assets/css/userdetail.less
View file @
111fc1ef
...
@@ -77,13 +77,16 @@
...
@@ -77,13 +77,16 @@
}
}
}
}
}
}
& .user-detail-actions {
& .user-detail-actions
, & .user-detail-actions-moderation
{
padding: 50px;
padding: 50px;
padding-top: 0px;
padding-top: 0px;
display: grid;
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-gap: 25px;
grid-gap: 25px;
&.user-detail-actions-moderation {
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
}
& .button {
& .button {
padding: 15px 0px;
padding: 15px 0px;
font-size: 16px;
font-size: 16px;
...
...
public/assets/img/defaultAlbumArt.jpg
0 → 100644
View file @
111fc1ef
131 KB
public/assets/js/tooltip.js
View file @
111fc1ef
...
@@ -11,11 +11,27 @@ DOMtooltipElements.forEach(function(item) {
...
@@ -11,11 +11,27 @@ DOMtooltipElements.forEach(function(item) {
});
});
function
ShowTooltip
(
_tooltipItem
)
{
function
ShowTooltip
(
_tooltipItem
)
{
let
tooltipPosition
=
_tooltipItem
.
dataset
.
tooltipposition
;
DOMtooltip
.
innerHTML
=
_tooltipItem
.
dataset
.
tooltip
;
DOMtooltip
.
innerHTML
=
_tooltipItem
.
dataset
.
tooltip
;
DOMtooltip
.
classList
.
add
(
"
active
"
);
DOMtooltip
.
classList
.
add
(
"
active
"
);
switch
(
tooltipPosition
)
{
default
:
case
"
top
"
:
DOMtooltip
.
classList
.
add
(
"
tooltip-top
"
);
DOMtooltip
.
style
.
top
=
(
_tooltipItem
.
clientY
-
(
_tooltipItem
.
getBoundingClientRect
().
height
-
15
))
+
"
px
"
;
DOMtooltip
.
style
.
left
=
(
_tooltipItem
.
clientX
+
(
_tooltipItem
.
getBoundingClientRect
().
width
/
2
)
-
(
DOMtooltip
.
getBoundingClientRect
().
width
/
2
))
+
"
px
"
;
break
;
case
"
right
"
:
DOMtooltip
.
classList
.
add
(
"
tooltip-right
"
);
DOMtooltip
.
style
.
top
=
(
_tooltipItem
.
getBoundingClientRect
().
y
+
(
_tooltipItem
.
getBoundingClientRect
().
height
/
2
)
-
(
DOMtooltip
.
getBoundingClientRect
().
height
/
2
))
+
"
px
"
;
DOMtooltip
.
style
.
top
=
(
_tooltipItem
.
getBoundingClientRect
().
y
+
(
_tooltipItem
.
getBoundingClientRect
().
height
/
2
)
-
(
DOMtooltip
.
getBoundingClientRect
().
height
/
2
))
+
"
px
"
;
DOMtooltip
.
style
.
left
=
(
_tooltipItem
.
getBoundingClientRect
().
x
+
_tooltipItem
.
getBoundingClientRect
().
width
-
5
)
+
"
px
"
;
DOMtooltip
.
style
.
left
=
(
_tooltipItem
.
getBoundingClientRect
().
x
+
_tooltipItem
.
getBoundingClientRect
().
width
-
5
)
+
"
px
"
;
break
;
}
}
}
function
HideTooltip
(
_tooltipItem
)
{
function
HideTooltip
(
_tooltipItem
)
{
DOMtooltip
.
classList
.
remove
(
"
active
"
);
DOMtooltip
.
classList
.
remove
(
"
active
"
);
DOMtooltip
.
classList
.
remove
(
"
tooltip-top
"
);
DOMtooltip
.
classList
.
remove
(
"
tooltip-right
"
);
}
}
\ No newline at end of file
src/Controller/APIController.php
View file @
111fc1ef
...
@@ -249,6 +249,7 @@ class APIController extends AbstractController
...
@@ -249,6 +249,7 @@ class APIController extends AbstractController
$data
[
'id'
]
=
$result
->
getId
();
$data
[
'id'
]
=
$result
->
getId
();
$data
[
'username'
]
=
$result
->
getUsername
();
$data
[
'username'
]
=
$result
->
getUsername
();
$data
[
'isVerified'
]
=
$result
->
getIsVerified
();
$data
[
'isVerified'
]
=
$result
->
getIsVerified
();
$data
[
'isPatreon'
]
=
$result
->
getIsPatreon
();
if
(
$result
->
getCoverReference
())
{
if
(
$result
->
getCoverReference
())
{
$data
[
'avatar'
]
=
$baseUrl
.
"/uploads/avatar/"
.
$result
->
getCoverReference
();
$data
[
'avatar'
]
=
$baseUrl
.
"/uploads/avatar/"
.
$result
->
getCoverReference
();
}
else
{
}
else
{
...
@@ -308,6 +309,7 @@ class APIController extends AbstractController
...
@@ -308,6 +309,7 @@ class APIController extends AbstractController
$oneResult
[
'id'
]
=
$result
->
getId
();
$oneResult
[
'id'
]
=
$result
->
getId
();
$oneResult
[
'username'
]
=
$result
->
getUsername
();
$oneResult
[
'username'
]
=
$result
->
getUsername
();
$oneResult
[
'isVerified'
]
=
$result
->
getIsVerified
();
$oneResult
[
'isVerified'
]
=
$result
->
getIsVerified
();
$oneResult
[
'isPatreon'
]
=
$result
->
getIsPatreon
();
if
(
$result
->
getCoverReference
())
{
if
(
$result
->
getCoverReference
())
{
$oneResult
[
'avatar'
]
=
$baseUrl
.
"/uploads/avatar/"
.
$result
->
getCoverReference
();
$oneResult
[
'avatar'
]
=
$baseUrl
.
"/uploads/avatar/"
.
$result
->
getCoverReference
();
}
else
{
}
else
{
...
...
src/Controller/ModerationController.php
View file @
111fc1ef
...
@@ -512,6 +512,23 @@ class ModerationController extends AbstractController
...
@@ -512,6 +512,23 @@ class ModerationController extends AbstractController
return
$this
->
redirectToRoute
(
'user.detail'
,
array
(
'userId'
=>
$userId
));
return
$this
->
redirectToRoute
(
'user.detail'
,
array
(
'userId'
=>
$userId
));
}
}
/**
* @Route("/moderation/user/togglePatreon/{userId}", name="moderation.user.togglePatreon")
*/
public
function
userTogglePatreon
(
Request
$request
,
int
$userId
)
{
$em
=
$this
->
getDoctrine
()
->
getManager
();
$data
=
[];
$userToToggle
=
$em
->
getRepository
(
user
::
class
)
->
findOneBy
(
array
(
'id'
=>
$userId
));
$userToToggle
->
setIsPatreon
(
!
$userToToggle
->
getIsPatreon
());
$em
->
persist
(
$userToToggle
);
$em
->
flush
();
return
$this
->
redirectToRoute
(
'user.detail'
,
array
(
'userId'
=>
$userId
));
}
/**
/**
* @Route("/moderation/user/toggleMod/{userId}", name="moderation.user.toggleMod")
* @Route("/moderation/user/toggleMod/{userId}", name="moderation.user.toggleMod")
*/
*/
...
...
src/Controller/UploadController.php
View file @
111fc1ef
...
@@ -122,7 +122,7 @@ class UploadController extends AbstractController
...
@@ -122,7 +122,7 @@ class UploadController extends AbstractController
try
{
try
{
// find cover
// find cover
$coverFiles
=
glob
(
$extractionPath
.
DIRECTORY_SEPARATOR
.
"AlbumArt"
.
DIRECTORY_SEPARATOR
.
$trackInfo
->
albumArtReference
->
assetName
.
".*"
);
$coverFiles
=
glob
(
$extractionPath
.
DIRECTORY_SEPARATOR
.
"AlbumArt"
.
DIRECTORY_SEPARATOR
.
$trackInfo
->
albumArtReference
->
assetName
.
".*"
);
if
(
$coverFiles
[
0
]
)
{
if
(
count
(
$coverFiles
)
>
0
)
{
$fileType
=
explode
(
"."
,
$coverFiles
[
0
])[
count
(
explode
(
"."
,
$coverFiles
[
0
]))
-
1
];
$fileType
=
explode
(
"."
,
$coverFiles
[
0
])[
count
(
explode
(
"."
,
$coverFiles
[
0
]))
-
1
];
if
(
in_array
(
$fileType
,
array
(
'jpg'
,
'png'
)))
{
if
(
in_array
(
$fileType
,
array
(
'jpg'
,
'png'
)))
{
...
...
src/Controller/UserSettingsController.php
View file @
111fc1ef
...
@@ -30,9 +30,15 @@ class UserSettingsController extends AbstractController
...
@@ -30,9 +30,15 @@ class UserSettingsController extends AbstractController
switch
(
$request
->
request
->
get
(
'save'
))
{
switch
(
$request
->
request
->
get
(
'save'
))
{
case
"general"
:
case
"general"
:
if
(
$formData
->
get
(
'email'
)
!=
""
&&
$formData
->
get
(
'username'
))
{
if
(
$formData
->
get
(
'email'
)
!=
""
&&
$formData
->
get
(
'username'
))
{
$existingUser
=
$em
->
getRepository
(
User
::
class
)
->
findOneBy
(
array
(
'username'
=>
$formData
->
get
(
'username'
),
'email'
=>
$formData
->
get
(
'email'
)));
if
(
$existingUser
)
{
$user
->
setEmail
(
$formData
->
get
(
'email'
));
$user
->
setEmail
(
$formData
->
get
(
'email'
));
$user
->
setUsername
(
$formData
->
get
(
'username'
));
$user
->
setUsername
(
$formData
->
get
(
'username'
));
$this
->
addFlash
(
'success'
,
'Saved successfully!'
);
$this
->
addFlash
(
'success'
,
'Saved successfully!'
);
}
else
{
$this
->
addFlash
(
'error'
,
'Email or username are already in use!'
);
}
}
else
{
}
else
{
$this
->
addFlash
(
'error'
,
'Email and username can\'t be empty!'
);
$this
->
addFlash
(
'error'
,
'Email and username can\'t be empty!'
);
}
}
...
...
src/Entity/User.php
View file @
111fc1ef
...
@@ -25,10 +25,15 @@
...
@@ -25,10 +25,15 @@
private
$coverReference
;
private
$coverReference
;
/**
/**
* @ORM\Column(type="boolean")
* @ORM\Column(type="boolean"
, nullable=true
)
*/
*/
private
$isVerified
;
private
$isVerified
;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private
$isPatreon
;
public
function
__construct
()
public
function
__construct
()
{
{
parent
::
__construct
();
parent
::
__construct
();
...
@@ -58,4 +63,16 @@
...
@@ -58,4 +63,16 @@
return
$this
;
return
$this
;
}
}
public
function
getIsPatreon
()
:
?
bool
{
return
$this
->
isPatreon
;
}
public
function
setIsPatreon
(
bool
$isPatreon
)
:
self
{
$this
->
isPatreon
=
$isPatreon
;
return
$this
;
}
}
}
\ No newline at end of file
templates/base.html.twig
View file @
111fc1ef
...
@@ -9,6 +9,9 @@
...
@@ -9,6 +9,9 @@
<!-- Meta Tags -->
<!-- Meta Tags -->
<link
rel=
"icon"
type=
"image/png"
href=
"
{{
asset
(
'assets/img/favicon.png'
)
}}
"
/>
<link
rel=
"icon"
type=
"image/png"
href=
"
{{
asset
(
'assets/img/favicon.png'
)
}}
"
/>
<meta
http-equiv=
"Content-Security-Policy"
content=
"script-src 'self' 'unsafe-inline';"
/>
<meta
http-equiv=
"Content-Security-Policy"
content=
"script-src 'self' 'unsafe-inline';"
/>
<meta
property=
"og:site_name"
content=
"SpinSha.re"
/>
<meta
name=
"description"
content=
"Songsharing service for the rhythm game Spin Rhythm XD"
/>
{%
block
meta
%}{%
endblock
%}
<!-- Styles -->
<!-- Styles -->
<link
rel=
"stylesheet"
href=
"https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap"
/>
<link
rel=
"stylesheet"
href=
"https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap"
/>
...
@@ -20,24 +23,24 @@
...
@@ -20,24 +23,24 @@
<main>
<main>
<aside>
<aside>
<nav>
<nav>
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'index.index'
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'index.index'
)
}}
"
data-tooltip
=
"Home"
><i
class=
"mdi mdi-home-outline"
></i></a>
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'index.index'
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'index.index'
)
}}
"
title
=
"Home"
><i
class=
"mdi mdi-home-outline"
></i></a>
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'search.index'
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'search.index'
)
}}
"
data-tooltip
=
"Search"
><i
class=
"mdi mdi-magnify"
></i></a>
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'search.index'
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'search.index'
)
}}
"
title
=
"Search"
><i
class=
"mdi mdi-magnify"
></i></a>
<a
class=
"item
"
href=
"https://www.patreon.com/spinshare"
target=
"_blank"
data-tooltip=
"Patreon"
><i
class=
"mdi mdi-patreon
"
></i></a>
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'index.client'
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'index.client'
)
}}
"
title=
"Download Client"
><i
class=
"mdi mdi-microsoft-windows
"
></i></a>
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'index.client'
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'index.client'
)
}}
"
data-tooltip=
"Download Client"
><i
class=
"mdi mdi-microsoft-windows
"
></i></a>
<a
class=
"item
"
href=
"https://www.patreon.com/spinshare"
target=
"_blank"
title=
"Patreon"
data-tooltipPosition=
"right"
><i
class=
"mdi mdi-patreon
"
></i></a>
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'index.legal'
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'index.legal'
)
}}
"
data-tooltip
=
"Legal"
><i
class=
"mdi mdi-gavel"
></i></a>
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'index.legal'
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'index.legal'
)
}}
"
title
=
"Legal"
><i
class=
"mdi mdi-gavel"
></i></a>
</nav>
</nav>
<nav>
<nav>
{%
if
is_granted
(
"ROLE_USER"
)
%}
{%
if
is_granted
(
"ROLE_USER"
)
%}
{%
if
is_granted
(
"ROLE_MODERATOR"
)
or
is_granted
(
"ROLE_ADMIN"
)
%}
{%
if
is_granted
(
"ROLE_MODERATOR"
)
or
is_granted
(
"ROLE_ADMIN"
)
%}
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'moderation.index'
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'moderation.index'
)
}}
"
data-tooltip
=
"Moderator Dashboard"
><i
class=
"mdi mdi-shield-outline"
></i></a>
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'moderation.index'
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'moderation.index'
)
}}
"
title
=
"Moderator Dashboard"
><i
class=
"mdi mdi-shield-outline"
></i></a>
{%
endif
%}
{%
endif
%}
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'upload.index'
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'upload.index'
)
}}
"
data-tooltip
=
"Upload"
><i
class=
"mdi mdi-upload-outline"
></i></a>
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'upload.index'
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'upload.index'
)
}}
"
title
=
"Upload"
><i
class=
"mdi mdi-upload-outline"
></i></a>
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'user.settings'
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'user.settings'
)
}}
"
data-tooltip
=
"Settings"
><i
class=
"mdi mdi-cog-outline"
></i></a>
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'user.settings'
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'user.settings'
)
}}
"
title
=
"Settings"
><i
class=
"mdi mdi-cog-outline"
></i></a>
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'user.detail'
and
app.request.attributes.get
(
'_route_params'
)[
'userId'
]
|
default
(
''
)
==
app.user.id
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'user.detail'
,
{
userId
:
app.user.id
}
)
}}
"
data-tooltip
=
"My Profile"
><i
class=
"mdi mdi-account-circle-outline"
></i></a>
<a
class=
"item
{%
if
app.request.attributes.get
(
'_route'
)
==
'user.detail'
and
app.request.attributes.get
(
'_route_params'
)[
'userId'
]
|
default
(
''
)
==
app.user.id
%}
active
{%
endif
%}
"
href=
"
{{
path
(
'user.detail'
,
{
userId
:
app.user.id
}
)
}}
"
title
=
"My Profile"
><i
class=
"mdi mdi-account-circle-outline"
></i></a>
<a
class=
"item"
href=
"
{{
path
(
'fos_user_security_logout'
)
}}
"
data-tooltip
=
"Logout"
><i
class=
"mdi mdi-close-circle-outline"
></i></a>
<a
class=
"item"
href=
"
{{
path
(
'fos_user_security_logout'
)
}}
"
title
=
"Logout"
><i
class=
"mdi mdi-close-circle-outline"
></i></a>
{%
else
%}
{%
else
%}
<a
class=
"item"
href=
"
{{
path
(
'fos_user_security_login'
)
}}
"
data-tooltip
=
"Login/Register"
><i
class=
"mdi mdi-login-variant"
></i></a>
<a
class=
"item"
href=
"
{{
path
(
'fos_user_security_login'
)
}}
"
title
=
"Login/Register"
><i
class=
"mdi mdi-login-variant"
></i></a>
{%
endif
%}
{%
endif
%}
</nav>
</nav>
</aside>
</aside>
...
@@ -45,10 +48,7 @@
...
@@ -45,10 +48,7 @@
{%
block
content
%}{%
endblock
%}
{%
block
content
%}{%
endblock
%}
</main>
</main>
<div
class=
"tooltip"
></div>
<!-- Scripts -->
<!-- Scripts -->
<script
src=
"
{{
asset
(
'assets/js/tooltip.js'
)
}}
"
></script>
{%
block
scripts
%}{%
endblock
%}
{%
block
scripts
%}{%
endblock
%}
</body>
</body>
</html>
</html>
\ No newline at end of file
templates/index/index.html.twig
View file @
111fc1ef
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<div
class=
"song-list"
>
<div
class=
"song-list"
>
{%
for
song
in
newSongs
%}
{%
for
song
in
newSongs
%}
<a
class=
"song-item"
href=
"
{{
path
(
'song.detail'
,
{
songId
:
song.id
}
)
}}
"
>
<a
class=
"song-item"
href=
"
{{
path
(
'song.detail'
,
{
songId
:
song.id
}
)
}}
"
>
<div
class=
"song-cover"
style=
"background-image: url(
{{
asset
(
'uploads/cover/'
~
song.fileReference
~
'.png?t='
~
date
()
.
timestamp
)
}}
);"
>
<div
class=
"song-cover"
style=
"background-image: url(
{{
asset
(
"uploads/cover/"
~
song.fileReference
~
".png?v="
~
date
()
.
timestamp
)
}}
), url(
{{
asset
(
"assets/img/defaultAlbumArt.jpg"
)
}}
);"
>
<div
class=
"song-charter-info"
>
<div
class=
"song-charter-info"
>
<div
class=
"song-charter"
><i
class=
"mdi mdi-account-circle"
></i><span>
{{
song.charter
|
default
(
'Unknown'
)
}}
</span></div>
<div
class=
"song-charter"
><i
class=
"mdi mdi-account-circle"
></i><span>
{{
song.charter
|
default
(
'Unknown'
)
}}
</span></div>
</div>
</div>
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<div
class=
"song-list"
>
<div
class=
"song-list"
>
{%
for
song
in
popularSongs
%}
{%
for
song
in
popularSongs
%}
<a
class=
"song-item"
href=
"
{{
path
(
'song.detail'
,
{
songId
:
song.id
}
)
}}
"
>
<a
class=
"song-item"
href=
"
{{
path
(
'song.detail'
,
{
songId
:
song.id
}
)
}}
"
>
<div
class=
"song-cover"
style=
"background-image: url(
{{
asset
(
'uploads/cover/'
~
song.fileReference
~
'.png?t='
~
date
()
.
timestamp
)
}}
);"
>
<div
class=
"song-cover"
style=
"background-image: url(
{{
asset
(
"uploads/cover/"
~
song.fileReference
~
".png?v="
~
date
()
.
timestamp
)
}}
), url(
{{
asset
(
"assets/img/defaultAlbumArt.jpg"
)
}}
);"
>
<div
class=
"song-charter-info"
>
<div
class=
"song-charter-info"
>
<div
class=
"song-charter"
><i
class=
"mdi mdi-account-circle"
></i><span>
{{
song.charter
|
default
(
'Unknown'
)
}}
</span></div>
<div
class=
"song-charter"
><i
class=
"mdi mdi-account-circle"
></i><span>
{{
song.charter
|
default
(
'Unknown'
)
}}
</span></div>
</div>
</div>
...
...
templates/moderation/reports/song.html.twig
View file @
111fc1ef
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<div
class=
"title"
>
Song
</div>
<div
class=
"title"
>
Song
</div>
<div
class=
"report-data"
>
<div
class=
"report-data"
>
{%
if
reportSong
is
not
null
%}
{%
if
reportSong
is
not
null
%}
<img
src=
"
{{
asset
(
'uploads/cover/'
~
reportSong.fileReference
~
'.png?t='
~
date
()
.
timestamp
)
}}
"
class=
"song-cover"
alt=
"Song Cover"
/>
<img
src=
"
{{
asset
(
"uploads/cover/"
~
reportSong.fileReference
~
".png?v="
~
date
()
.
timestamp
)
}}
"
class=
"song-cover"
alt=
"Song Cover"
/>
<div
class=
"report-item"
>
<div
class=
"report-item"
>
<div
class=
"column"
>
Title
</div>
<div
class=
"column"
>
Title
</div>
...
...
templates/moderation/reports/user.html.twig
View file @
111fc1ef
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<div
class=
"box"
>
<div
class=
"box"
>
<div
class=
"title"
>
User
</div>
<div
class=
"title"
>
User
</div>
<div
class=
"report-data"
>
<div
class=
"report-data"
>
<img
src=
"
{{
reportUser.coverReference
?
asset
(
'uploads/avatar/'
~
reportUser.coverReference
~
'?t='
~
date
()
.
timestamp
)
:
asset
(
'assets/img/defaultAvatar.jpg'
)
}}
"
class=
"avatar-icon"
alt=
"Avatar"
/>
<img
src=
"
{{
asset
(
'uploads/avatar/'
~
reportUser.coverReference
~
'?t='
~
date
()
.
timestamp
)
}}
"
class=
"avatar-icon"
alt=
"Avatar"
/>
<div
class=
"report-item"
>
<div
class=
"report-item"
>
<div
class=
"column"
>
Username
</div>
<div
class=
"column"
>
Username
</div>
...
@@ -22,6 +22,10 @@
...
@@ -22,6 +22,10 @@
<div
class=
"column"
>
Is Verified?
</div>
<div
class=
"column"
>
Is Verified?
</div>
<div
class=
"value"
>
{{
reportUser.isVerified
?
"Yes"
:
"No"
}}
</div>
<div
class=
"value"
>
{{
reportUser.isVerified
?
"Yes"
:
"No"
}}
</div>
</div>
</div>
<div
class=
"report-item"
>
<div
class=
"column"
>
Is Patreon?
</div>
<div
class=
"value"
>
{{
reportUser.isPatreon
?
"Yes"
:
"No"
}}
</div>
</div>
<div
class=
"report-item"
>
<div
class=
"report-item"
>
<div
class=
"column"
>
Last Login
</div>
<div
class=
"column"
>
Last Login
</div>
<div
class=
"value"
>
{{
reportUser.lastLogin
|
date
(
'd/m/Y - H:i'
)
}}
</div>
<div
class=
"value"
>
{{
reportUser.lastLogin
|
date
(
'd/m/Y - H:i'
)
}}
</div>
...
...
templates/report/song.html.twig
View file @
111fc1ef
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<div
class=
"title"
>
Report a song
</div>
<div
class=
"title"
>
Report a song
</div>
<div
class=
"song-report"
>
<div
class=
"song-report"
>
<div
class=
"song-item inactive"
>
<div
class=
"song-item inactive"
>
<div
class=
"song-cover"
style=
"background-image: url(
{{
asset
(
'uploads/cover/'
~
songToReport.fileReference
~
'.png?t='
~
date
()
.
timestamp
)
}}
);"
>
<div
class=
"song-cover"
style=
"background-image: url(
{{
asset
(
"uploads/cover/"
~
songToReport.fileReference
~
".png?v="
~
date
()
.
timestamp
)
}}
), url(
{{
asset
(
"assets/img/defaultAlbumArt.jpg"
)
}}
);"
>
<div
class=
"song-charter-info"
>
<div
class=
"song-charter-info"
>
<div
class=
"song-charter"
><i
class=
"mdi mdi-account-circle"
></i><span>
{{
songToReport.charter
}}
</span></div>
<div
class=
"song-charter"
><i
class=
"mdi mdi-account-circle"
></i><span>
{{
songToReport.charter
}}
</span></div>
</div>
</div>
...
...
templates/report/user.html.twig
View file @
111fc1ef
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<div
class=
"title"
>
Report a user
</div>
<div
class=
"title"
>
Report a user
</div>
<div
class=
"user-report"
>
<div
class=
"user-report"
>
<div
class=
"user-item inactive"
>
<div
class=
"user-item inactive"
>
<div
class=
"user-avatar"
style=
"background-image: url(
{{
(
userToReport.coverReference
!=
""
)
?
asset
(
'uploads/avatar/'
~
userToReport.coverReference
~
'?t='
~
date
()
.
timestamp
)
:
asset
(
'assets/img/defaultAvatar.jpg'
)
}}
)
"
></div>
<div
class=
"user-avatar"
style=
"background-image: url(
{{
asset
(
'uploads/avatar/'
~
userToReport.coverReference
~
'?t='
~
date
()
.
timestamp
)
}}
), url(
{{
asset
(
"assets/img/defaultAvatar.jpg"
)
}}
);
"
></div>
<div
class=
"user-metadata"
>
<div
class=
"user-metadata"
>
<div
class=
"user-name"
>
{{
userToReport.username
}}
</div>
<div
class=
"user-name"
>
{{
userToReport.username
}}
</div>
</div>
</div>
...
...
templates/search/index.html.twig
View file @
111fc1ef
...
@@ -25,12 +25,15 @@
...
@@ -25,12 +25,15 @@
<div
class=
"user-list"
>
<div
class=
"user-list"
>
{%
for
user
in
results.users
%}
{%
for
user
in
results.users
%}
<a
href=
"
{{
path
(
'user.detail'
,
{
userId
:
user.id
}
)
}}
"
class=
"user-item"
>
<a
href=
"
{{
path
(
'user.detail'
,
{
userId
:
user.id
}
)
}}
"
class=
"user-item"
>
<div
class=
"user-avatar"
style=
"background-image: url(
{{
(
user.coverReference
!=
""
)
?
asset
(
'uploads/avatar/'
~
user.coverReference
~
'?t='
~
date
()
.
timestamp
)
:
asset
(
'assets/img/defaultAvatar.jpg'
)
}}
);"
></div>
<div
class=
"user-avatar"
style=
"background-image: url(
{{
asset
(
'uploads/avatar/'
~
user.coverReference
~
'?t='
~
date
()
.
timestamp
)
}}
), url(
{{
asset
(
"assets/img/defaultAvatar.jpg"
)
}}
);"
></div>
<div
class=
"user-metadata"
>
<div
class=
"user-metadata"
>
<div
class=
"user-name"
>
{{
user.userName
}}
</div>
<div
class=
"user-name"
>
{{
user.userName
}}
</div>
{%
if
user.isVerified
%}
{%
if
user.isVerified
%}
<div
class=
"user-badge"
><i
class=
"mdi mdi-check-decagram"
></i></div>
<div
class=
"user-badge"
><i
class=
"mdi mdi-check-decagram"
></i></div>
{%
endif
%}
{%
endif
%}
{%
if
user.isPatreon
%}
<div
class=
"user-badge"
><i
class=
"mdi mdi-patreon"
></i></div>
{%
endif
%}
</div>
</div>
</a>
</a>
{%
endfor
%}
{%
endfor
%}
...
@@ -45,7 +48,7 @@
...
@@ -45,7 +48,7 @@
<div
class=
"song-list"
>
<div
class=
"song-list"
>
{%
for
song
in
results.songs
%}
{%
for
song
in
results.songs
%}
<a
class=
"song-item"
href=
"
{{
path
(
'song.detail'
,
{
songId
:
song.id
}
)
}}
"
>
<a
class=
"song-item"
href=
"
{{
path
(
'song.detail'
,
{
songId
:
song.id
}
)
}}
"
>
<div
class=
"song-cover"
style=
"background-image: url(
{{
asset
(
'uploads/cover/'
~
song.fileReference
~
'.png?t='
~
date
()
.
timestamp
)
}}
);"
>
<div
class=
"song-cover"
style=
"background-image: url(
{{
asset
(
"uploads/cover/"
~
song.fileReference
~
".png?v="
~
date
()
.
timestamp
)
}}
), url(
{{
asset
(
"assets/img/defaultAlbumArt.jpg"
)
}}
);"
>
<div
class=
"song-charter-info"
>
<div
class=
"song-charter-info"
>
<div
class=
"song-charter"
><i
class=
"mdi mdi-account-circle"
></i><span>
{{
song.charter
|
default
(
'Unknown'
)
}}
</span></div>
<div
class=
"song-charter"
><i
class=
"mdi mdi-account-circle"
></i><span>
{{
song.charter
|
default
(
'Unknown'
)
}}
</span></div>
</div>
</div>
...
...
templates/song/delete.html.twig
View file @
111fc1ef
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<p>
Do you really want to remove your chart?
<strong>
This action cannot be undone!
</strong></p>
<p>
Do you really want to remove your chart?
<strong>
This action cannot be undone!
</strong></p>
</div>
</div>
<div
class=
"song-item inactive"
>
<div
class=
"song-item inactive"
>
<div
class=
"song-cover"
style=
"background-image: url(
{{
asset
(
'uploads/cover/'
~
song.fileReference
~
'.png?t='
~
date
()
.
timestamp
)
}}
);"
>
<div
class=
"song-cover"
style=
"background-image: url(
{{
asset
(
"uploads/cover/"
~
song.fileReference
~
".png?v="
~
date
()
.
timestamp
)
}}
), url(
{{
asset
(
"assets/img/defaultAlbumArt.jpg"
)
}}
);"
>
</div>
</div>
<div
class=
"song-metadata"
>
<div
class=
"song-metadata"
>
<div
class=
"song-title"
>
{{
song.title
|
default
(
'Untitles'
)
}}
</div>
<div
class=
"song-title"
>
{{
song.title
|
default
(
'Untitles'
)
}}
</div>
...
...
templates/song/detail.html.twig
View file @
111fc1ef
...
@@ -2,12 +2,19 @@
...
@@ -2,12 +2,19 @@
{%
block
title
%}{{
song.title
}}{%
endblock
%}
{%
block
title
%}{{
song.title
}}{%
endblock
%}
{%
block
meta
%}
<meta
property=
"og:title"
content=
"
{{
song.title
}}
on SpinSha.re"
/>
<meta
property=
"og:type"
content=
"music.song"
/>
<meta
property=
"og:url"
content=
"
{{
path
(
'song.detail'
,
{
songId
:
song.id
}
)
}}
"
/>
<meta
property=
"og:image"
content=
"
{{
asset
(
"uploads/cover/"
~
song.fileReference
~
".png?v="
~
date
()
.
timestamp
)
}}
"
/>
{%
endblock
%}
{%
block
content
%}
{%
block
content
%}
<section
class=
"section-song-detail"
>
<section
class=
"section-song-detail"
>
<div
class=
"song-detail-background"
style=
"background-image: url(
{{
asset
(
'uploads/cover/'
~
song.fileReference
~
'.png?t='
~
date
()
.
timestamp
)
}}
);"
>
<div
class=
"song-detail-background"
style=
"background-image: url(
{{
asset
(
"uploads/cover/"
~
song.fileReference
~
".png?v="
~
date
()
.
timestamp
)
}}
), url(
{{
asset
(
"assets/img/defaultAlbumArt.jpg"
)
}}
);"
>
<div
class=
"song-detail-dim"
>
<div
class=
"song-detail-dim"
>
<div
class=
"song-detail active"
>
<div
class=
"song-detail active"
>
<div
class=
"song-cover"
style=
"background-image: url(
{{
asset
(
'uploads/cover/'
~
song.fileReference
~
'.png?t='
~
date
()
.
timestamp
)
}}
);"
>
<div
class=
"song-cover"
style=
"background-image: url(
{{
asset
(
"uploads/cover/"
~
song.fileReference
~
".png?v="
~
date
()
.
timestamp
)
}}
), url(
{{
asset
(
"assets/img/defaultAlbumArt.jpg"
)
}}
);"
>
</div>
</div>
<div
class=
"song-meta-data"
>
<div
class=
"song-meta-data"
>
<div
class=
"song-title"
>
{{
song.title
}}
</div>
<div
class=
"song-title"
>
{{
song.title
}}
</div>
...
@@ -30,12 +37,15 @@
...
@@ -30,12 +37,15 @@
</div>
</div>
<div
class=
"song-uploader"
>
<div
class=
"song-uploader"
>
<a
href=
"
{{
path
(
'user.detail'
,
{
userId
:
uploader.id
}
)
}}
"
class=
"user-item"
>
<a
href=
"
{{
path
(
'user.detail'
,
{
userId
:
uploader.id
}
)
}}
"
class=
"user-item"
>
<div
class=
"user-avatar"
style=
"background-image: url(
{{
(
uploader.coverReference
!=
""
)
?
asset
(
'uploads/avatar/'
~
uploader.coverReference
~
'?t='
~
date
()
.
timestamp
)
:
asset
(
'assets/img/defaultAvatar.jpg'
)
}}
);"
></div>
<div
class=
"user-avatar"
style=
"background-image: url(
{{
asset
(
'uploads/avatar/'
~
uploader.coverReference
~
'?t='
~
date
()
.
timestamp
)
}}
), url(
{{
asset
(
"assets/img/defaultAvatar.jpg"
)
}}
);"
></div>
<div
class=
"user-metadata"
>
<div
class=
"user-metadata"
>
<div
class=
"user-username"
>
{{
uploader.username
}}
</div>
<div
class=
"user-username"
>
{{
uploader.username
}}
</div>
{%
if
uploader.isVerified
%}
{%
if
uploader.isVerified
%}
<div
class=
"user-badge"
><i
class=
"mdi mdi-check-decagram"
></i></div>
<div
class=
"user-badge"
><i
class=
"mdi mdi-check-decagram"
></i></div>
{%
endif
%}
{%
endif
%}
{%
if
uploader.isPatreon
%}
<div
class=
"user-badge"
><i
class=
"mdi mdi-patreon"
></i></div>
{%
endif
%}
</div>
</div>
</a>
</a>
</div>
</div>
...
...
templates/user/detail.html.twig
View file @
111fc1ef
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
{%
block
content
%}
{%
block
content
%}
<section
class=
"section-user-detail"
>
<section
class=
"section-user-detail"
>
<div
class=
"user-detail-background"
style=
"background-image: url(
{{
(
user.coverReference
!=
""
)
?
asset
(
'uploads/avatar/'
~
user.coverReference
~
'?t='
~
date
()
.
timestamp
)
:
asset
(
'assets/img/defaultAvatar.jpg'
)
}}
);"
>
<div
class=
"user-detail-background"
style=
"background-image: url(
{{
asset
(
'uploads/avatar/'
~
user.coverReference
~
'?t='
~
date
()
.
timestamp
)
}}
), url(
{{
asset
(
"assets/img/defaultAvatar.jpg"
)
}}
);"
>
<div
class=
"user-detail-dim"
>
<div
class=
"user-detail-dim"
>
<div
class=
"user-detail"
>
<div
class=
"user-detail"
>
<div
class=
"user-avatar"
style=
"background-image: url(
{{
(
user.coverReference
!=
""
)
?
asset
(
'uploads/avatar/'
~
user.coverReference
~
'?t='
~
date
()
.
timestamp
)
:
asset
(
'assets/img/defaultAvatar.jpg'
)
}}
);"
>
<div
class=
"user-avatar"
style=
"background-image: url(
{{
asset
(
'uploads/avatar/'
~
user.coverReference
~
'?t='
~
date
()
.
timestamp
)
}}
), url(
{{
asset
(
"assets/img/defaultAvatar.jpg"
)
}}
);"
>
{%
if
app.user.id
==
user.id
%}
{%
if
app.user.id
==
user.id
%}
<form
method=
"post"
action=
""
enctype=
"multipart/form-data"
class=
"user-avatar-change"
>
<form
method=
"post"
action=
""
enctype=
"multipart/form-data"
class=
"user-avatar-change"
>
<input
typoe=
"hidden"
name=
"save"
value=
"changeAvatar"
/>
<input
typoe=
"hidden"
name=
"save"
value=
"changeAvatar"
/>
...
@@ -19,7 +19,10 @@
...
@@ -19,7 +19,10 @@
<div
class=
"user-meta-data"
>
<div
class=
"user-meta-data"
>
<div
class=
"user-name"
>
{{
user.username
}}
</div>
<div
class=
"user-name"
>
{{
user.username
}}
</div>
{%
if
user.isVerified
%}
{%
if
user.isVerified
%}
<div
class=
"user-badge"
><i
class=
"mdi mdi-check-decagram"
></i></div>
<div
class=
"user-badge"
title=
"Verified"
><i
class=
"mdi mdi-check-decagram"
></i></div>
{%
endif
%}
{%
if
user.isPatreon
%}
<div
class=
"user-badge"
title=
"Patreon Supporter"
><i
class=
"mdi mdi-patreon"
></i></div>
{%
endif
%}
{%
endif
%}
</div>
</div>
</div>
</div>
...
@@ -30,7 +33,7 @@
...
@@ -30,7 +33,7 @@
<a
href=
"
{{
path
(
'report.user'
,
{
userId
:
user.id
}
)
}}
"
class=
"button"
>
Report
</a>
<a
href=
"
{{
path
(
'report.user'
,
{
userId
:
user.id
}
)
}}
"
class=
"button"
>
Report
</a>
</div>
</div>
{%
if
is_granted
(
'ROLE_MODERATOR'
)
and
user.id
!=
app.user.id
%}
{%
if
is_granted
(
'ROLE_MODERATOR'
)
and
user.id
!=
app.user.id
%}
<div
class=
"user-detail-actions"
>
<div
class=
"user-detail-actions
-moderation
"
>
{%
if
user.enabled
%}
{%
if
user.enabled
%}
<a
href=
"
{{
path
(
'moderation.user.ban'
,
{
userId
:
user.id
}
)
}}
"
class=
"button"
>
Ban User
</a>
<a
href=
"
{{
path
(
'moderation.user.ban'
,
{
userId
:
user.id
}
)
}}
"
class=
"button"
>
Ban User
</a>
{%
else
%}
{%
else
%}
...
@@ -40,6 +43,7 @@
...
@@ -40,6 +43,7 @@
<a
href=
"
{{
path
(
'moderation.user.toggleVerified'
,
{
userId
:
user.id
}
)
}}
"
class=
"button"
>
{{
user.isVerified
?
"Unverify"
:
"Verify"
}}
</a>
<a
href=
"
{{
path
(
'moderation.user.toggleVerified'
,
{
userId
:
user.id
}
)
}}
"
class=
"button"
>
{{
user.isVerified
?
"Unverify"
:
"Verify"
}}
</a>
{%
if
is_granted
(
'ROLE_ADMIN'
)
%}
{%
if
is_granted
(
'ROLE_ADMIN'
)
%}
<a
href=
"
{{
path
(
'moderation.user.toggleMod'
,
{
userId
:
user.id
}
)
}}
"
class=
"button"
>
{{
(
"ROLE_MODERATOR"
in
user.roles
)
?
"Demote to User"
:
"Promote to Mod"
}}
</a>
<a
href=
"
{{
path
(
'moderation.user.toggleMod'
,
{
userId
:
user.id
}
)
}}
"
class=
"button"
>
{{
(
"ROLE_MODERATOR"
in
user.roles
)
?
"Demote to User"
:
"Promote to Mod"
}}
</a>
<a
href=
"
{{
path
(
'moderation.user.togglePatreon'
,
{
userId
:
user.id
}
)
}}
"
class=
"button"
>
{{
user.isPatreon
?
"Remove Patreon"
:
"Make Patreon"
}}
</a>
{%
endif
%}
{%
endif
%}
</div>
</div>
{%
endif
%}
{%
endif
%}
...
@@ -51,7 +55,7 @@
...
@@ -51,7 +55,7 @@
<div
class=
"song-list"
>
<div
class=
"song-list"
>
{%
for
song
in
uploads
%}
{%
for
song
in
uploads
%}
<a
class=
"song-item"
href=
"
{{
path
(
'song.detail'
,
{
songId
:
song.id
}
)
}}
"
>
<a
class=
"song-item"
href=
"
{{
path
(
'song.detail'
,
{
songId
:
song.id
}
)
}}
"
>
<div
class=
"song-cover"
style=
"background-image: url(
{{
asset
(
'uploads/cover/'
~
song.fileReference
~
'.png?t='
~
date
()
.
timestamp
)
}}
);"
>
<div
class=
"song-cover"
style=
"background-image: url(
{{
asset
(
"uploads/cover/"
~
song.fileReference
~
".png?v="
~
date
()
.
timestamp
)
}}
), url(
{{
asset
(
"assets/img/defaultAlbumArt.jpg"
)
}}
);"
>
<div
class=
"song-charter-info"
>
<div
class=
"song-charter-info"
>
<div
class=
"song-charter"
><i
class=
"mdi mdi-account-circle"
></i><span>
{{
song.charter
|
default
(
'Unknown'
)
}}
</span></div>
<div
class=
"song-charter"
><i
class=
"mdi mdi-account-circle"
></i><span>
{{
song.charter
|
default
(
'Unknown'
)
}}
</span></div>
</div>
</div>
...
...
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