Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Desktop Client
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
Desktop Client
Commits
f8b45b2b
Commit
f8b45b2b
authored
Jun 13, 2020
by
SpinShare
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added collapsable texts and play overlay
parent
d68d100c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
10 deletions
+46
-10
src/views/SongDetail.vue
src/views/SongDetail.vue
+46
-10
No files found.
src/views/SongDetail.vue
View file @
f8b45b2b
...
@@ -13,11 +13,16 @@
...
@@ -13,11 +13,16 @@
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
:
class
=
"
'song-actions ' + (previewIsPlaying ? 'player-active' : '')
"
>
<
div
:
class
=
"
'song-actions ' + (previewIsPlaying ? 'player-active' : '')
"
>
<
div
v
-
on
:
click
=
"
AddToQueue()
"
class
=
"
action
"
>
<
div
v
-
on
:
click
=
"
AddToQueue()
"
class
=
"
action
"
v
-
if
=
"
!isInstalled
"
>
<
div
class
=
"
icon
"
>
<
div
class
=
"
icon
"
>
<
i
class
=
"
mdi mdi-download
"
><
/i
>
<
i
class
=
"
mdi mdi-download
"
><
/i
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
v
-
on
:
click
=
"
ShowPlayOverlay()
"
class
=
"
action
"
v
-
if
=
"
isInstalled
"
>
<
div
class
=
"
icon
"
>
<
i
class
=
"
mdi mdi-gamepad-variant
"
><
/i
>
<
/div
>
<
/div
>
<
div
class
=
"
action-player
"
>
<
div
class
=
"
action-player
"
>
<
div
class
=
"
icon
"
v
-
on
:
click
=
"
TogglePreview()
"
>
<
div
class
=
"
icon
"
v
-
on
:
click
=
"
TogglePreview()
"
>
<
i
class
=
"
mdi mdi-play
"
v
-
if
=
"
!previewIsPlaying
"
><
/i
>
<
i
class
=
"
mdi mdi-play
"
v
-
if
=
"
!previewIsPlaying
"
><
/i
>
...
@@ -47,7 +52,7 @@
...
@@ -47,7 +52,7 @@
<
img
src
=
"
@/assets/img/difficultyEasy.svg
"
:
class
=
"
hasEasyDifficulty ? 'active' : ''
"
alt
=
"
Easy Difficulty
"
/>
<
img
src
=
"
@/assets/img/difficultyEasy.svg
"
:
class
=
"
hasEasyDifficulty ? 'active' : ''
"
alt
=
"
Easy Difficulty
"
/>
<
img
src
=
"
@/assets/img/difficultyNormal.svg
"
:
class
=
"
hasNormalDifficulty ? 'active' : ''
"
alt
=
"
Normal Difficulty
"
/>
<
img
src
=
"
@/assets/img/difficultyNormal.svg
"
:
class
=
"
hasNormalDifficulty ? 'active' : ''
"
alt
=
"
Normal Difficulty
"
/>
<
img
src
=
"
@/assets/img/difficultyHard.svg
"
:
class
=
"
hasHardDifficulty ? 'active' : ''
"
alt
=
"
Hard Difficulty
"
/>
<
img
src
=
"
@/assets/img/difficultyHard.svg
"
:
class
=
"
hasHardDifficulty ? 'active' : ''
"
alt
=
"
Hard Difficulty
"
/>
<
img
src
=
"
@/assets/img/difficultyExtreme.svg
"
:
class
=
"
hasEx
tremeDifficulty ? 'active' : ''
"
alt
=
"
Extreme
Difficulty
"
/>
<
img
src
=
"
@/assets/img/difficultyExtreme.svg
"
:
class
=
"
hasEx
pertDifficulty ? 'active' : ''
"
alt
=
"
Expert
Difficulty
"
/>
<
img
src
=
"
@/assets/img/difficultyXD.svg
"
:
class
=
"
hasXDDifficulty ? 'active' : ''
"
alt
=
"
xD Difficulty
"
/>
<
img
src
=
"
@/assets/img/difficultyXD.svg
"
:
class
=
"
hasXDDifficulty ? 'active' : ''
"
alt
=
"
xD Difficulty
"
/>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -81,7 +86,7 @@
...
@@ -81,7 +86,7 @@
<
UserItem
v
-
bind
=
"
uploader
"
/>
<
UserItem
v
-
bind
=
"
uploader
"
/>
<
/div
>
<
/div
>
<
div
class
=
"
song-description
"
v
-
if
=
"
description || tags.length > 0
"
>
<
div
class
=
"
song-description
"
v
-
if
=
"
description || tags.length > 0
"
>
<
div
class
=
"
text
"
v
-
if
=
"
description
"
>
{{
description
}}
<
/div
>
<
CollapsableText
v
-
bind
:
text
=
"
description
"
v
-
if
=
"
description
"
/
>
<
div
class
=
"
tags
"
>
<
div
class
=
"
tags
"
>
<
router
-
link
class
=
"
tag
"
v
-
for
=
"
tag in tags
"
v
-
bind
:
key
=
"
tag
"
:
to
=
"
{ name: 'Search', params: { searchQuery: tag
}
}
"
>
{{
tag
}}
<
/router-link
>
<
router
-
link
class
=
"
tag
"
v
-
for
=
"
tag in tags
"
v
-
bind
:
key
=
"
tag
"
:
to
=
"
{ name: 'Search', params: { searchQuery: tag
}
}
"
>
{{
tag
}}
<
/router-link
>
<
/div
>
<
/div
>
...
@@ -89,30 +94,46 @@
...
@@ -89,30 +94,46 @@
<
/div
>
<
/div
>
<
div
class
=
"
song-social
"
v
-
if
=
"
apiFinished
"
>
<
div
class
=
"
song-social
"
v
-
if
=
"
apiFinished
"
>
<
div
class
=
"
tab-header
"
>
<
div
class
=
"
tab-header
"
>
<
router
-
link
:
to
=
"
{ name: 'SongDetailReviews', params: { id: id
}
}
"
class
=
"
tab-header-item tab-header-item-reviews
"
><
span
>
{{
$t
(
'
songdetail.tabs.reviews
'
)
}}
<
/span></
router
-
link
>
<
router
-
link
:
to
=
"
{ name: 'SongDetailReviews', params: { id: id
}
}
"
class
=
"
tab-header-item tab-header-item-reviews
"
exact
><
span
>
{{
$t
(
'
songdetail.tabs.reviews
'
)
}}
<
/span></
router
-
link
>
<
router
-
link
:
to
=
"
{ name: 'SongDetailSpinPlays', params: { id: id
}
}
"
class
=
"
tab-header-item tab-header-item-spinplays
"
><
span
>
{{
$t
(
'
songdetail.tabs.spinplays
'
)
}}
<
/span></
router
-
link
>
<
router
-
link
:
to
=
"
{ name: 'SongDetailSpinPlays', params: { id: id
}
}
"
class
=
"
tab-header-item tab-header-item-spinplays
"
exact
><
span
>
{{
$t
(
'
songdetail.tabs.spinplays
'
)
}}
<
/span></
router
-
link
>
<
/div
>
<
/div
>
<
router
-
view
><
/router-view
>
<
router
-
view
><
/router-view
>
<
/div
>
<
/div
>
<
Loading
v
-
if
=
"
!apiFinished
"
/>
<
Loading
v
-
if
=
"
!apiFinished
"
/>
<
PlayOverlay
v
-
if
=
"
showPlayOverlay
"
v
-
bind
:
fileReference
=
"
fileReference
"
v
-
bind
:
hasEasyDifficulty
=
"
hasEasyDifficulty
"
v
-
bind
:
hasNormalDifficulty
=
"
hasNormalDifficulty
"
v
-
bind
:
hasHardDifficulty
=
"
hasHardDifficulty
"
v
-
bind
:
hasExpertDifficulty
=
"
hasExpertDifficulty
"
v
-
bind
:
hasXDDifficulty
=
"
hasXDDifficulty
"
/>
<
/section
>
<
/section
>
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
remote
}
from
'
electron
'
;
import
{
remote
}
from
'
electron
'
;
import
path
from
'
path
'
;
import
fs
from
'
fs
'
;
const
{
clipboard
,
shell
}
=
remote
;
const
{
clipboard
,
shell
}
=
remote
;
import
SSAPI
from
'
@/modules/module.api.js
'
;
import
SSAPI
from
'
@/modules/module.api.js
'
;
import
UserSettings
from
'
@/modules/module.usersettings.js
'
;
import
UserItem
from
'
@/components/User/UserItem.vue
'
;
import
UserItem
from
'
@/components/User/UserItem.vue
'
;
import
CollapsableText
from
'
@/components/CollapsableText.vue
'
;
import
Loading
from
'
@/components/Loading.vue
'
;
import
Loading
from
'
@/components/Loading.vue
'
;
import
PlayOverlay
from
'
@/components/Overlays/PlayOverlay.vue
'
;
export
default
{
export
default
{
name
:
'
SongDetail
'
,
name
:
'
SongDetail
'
,
components
:
{
components
:
{
UserItem
,
UserItem
,
Loading
CollapsableText
,
Loading
,
PlayOverlay
}
,
}
,
data
:
function
()
{
data
:
function
()
{
return
{
return
{
...
@@ -126,11 +147,13 @@
...
@@ -126,11 +147,13 @@
hasEasyDifficulty
:
false
,
hasEasyDifficulty
:
false
,
hasNormalDifficulty
:
false
,
hasNormalDifficulty
:
false
,
hasHardDifficulty
:
false
,
hasHardDifficulty
:
false
,
hasEx
treme
Difficulty
:
false
,
hasEx
pert
Difficulty
:
false
,
hasXDDifficulty
:
false
,
hasXDDifficulty
:
false
,
tags
:
[],
tags
:
[],
uploader
:
null
,
uploader
:
null
,
uploadDate
:
null
,
uploadDate
:
null
,
fileReference
:
""
,
isInstalled
:
false
,
previewPath
:
""
,
previewPath
:
""
,
downloadPath
:
""
,
downloadPath
:
""
,
downloads
:
0
,
downloads
:
0
,
...
@@ -138,11 +161,13 @@
...
@@ -138,11 +161,13 @@
description
:
""
,
description
:
""
,
previewIsPlaying
:
false
,
previewIsPlaying
:
false
,
currentPreviewAudio
:
null
,
currentPreviewAudio
:
null
,
previewVolume
:
50
previewVolume
:
50
,
showPlayOverlay
:
false
}
}
}
,
}
,
mounted
:
function
()
{
mounted
:
function
()
{
let
ssapi
=
new
SSAPI
(
process
.
env
.
NODE_ENV
===
'
development
'
);
let
ssapi
=
new
SSAPI
(
process
.
env
.
NODE_ENV
===
'
development
'
);
let
userSettings
=
new
UserSettings
();
ssapi
.
getSongDetail
(
this
.
$route
.
params
.
id
).
then
((
data
)
=>
{
ssapi
.
getSongDetail
(
this
.
$route
.
params
.
id
).
then
((
data
)
=>
{
this
.
$data
.
id
=
data
.
data
.
id
;
this
.
$data
.
id
=
data
.
data
.
id
;
...
@@ -154,7 +179,7 @@
...
@@ -154,7 +179,7 @@
this
.
$data
.
hasEasyDifficulty
=
data
.
data
.
hasEasyDifficulty
;
this
.
$data
.
hasEasyDifficulty
=
data
.
data
.
hasEasyDifficulty
;
this
.
$data
.
hasNormalDifficulty
=
data
.
data
.
hasNormalDifficulty
;
this
.
$data
.
hasNormalDifficulty
=
data
.
data
.
hasNormalDifficulty
;
this
.
$data
.
hasHardDifficulty
=
data
.
data
.
hasHardDifficulty
;
this
.
$data
.
hasHardDifficulty
=
data
.
data
.
hasHardDifficulty
;
this
.
$data
.
hasEx
treme
Difficulty
=
data
.
data
.
hasExtremeDifficulty
;
this
.
$data
.
hasEx
pert
Difficulty
=
data
.
data
.
hasExtremeDifficulty
;
this
.
$data
.
hasXDDifficulty
=
data
.
data
.
hasXDDifficulty
;
this
.
$data
.
hasXDDifficulty
=
data
.
data
.
hasXDDifficulty
;
if
(
data
.
data
.
tags
!=
""
)
{
if
(
data
.
data
.
tags
!=
""
)
{
this
.
$data
.
tags
=
data
.
data
.
tags
;
this
.
$data
.
tags
=
data
.
data
.
tags
;
...
@@ -165,14 +190,25 @@
...
@@ -165,14 +190,25 @@
this
.
$data
.
views
=
data
.
data
.
views
;
this
.
$data
.
views
=
data
.
data
.
views
;
this
.
$data
.
description
=
data
.
data
.
description
;
this
.
$data
.
description
=
data
.
data
.
description
;
this
.
$data
.
uploadDate
=
data
.
data
.
uploadDate
;
this
.
$data
.
uploadDate
=
data
.
data
.
uploadDate
;
this
.
$data
.
fileReference
=
data
.
data
.
fileReference
;
// Check if Song is already installed by searching for the srtb file
this
.
$data
.
isInstalled
=
fs
.
existsSync
(
path
.
join
(
userSettings
.
get
(
'
gameDirectory
'
),
this
.
$data
.
fileReference
+
"
.srtb
"
));
ssapi
.
getUserDetail
(
data
.
data
.
uploader
).
then
((
data
)
=>
{
ssapi
.
getUserDetail
(
data
.
data
.
uploader
).
then
((
data
)
=>
{
this
.
$data
.
uploader
=
data
.
data
;
this
.
$data
.
uploader
=
data
.
data
;
this
.
$data
.
apiFinished
=
true
;
this
.
$data
.
apiFinished
=
true
;
}
);
}
);
}
);
}
);
this
.
$on
(
'
closePlayOverlay
'
,
()
=>
{
this
.
$data
.
showPlayOverlay
=
false
;
}
);
}
,
}
,
methods
:
{
methods
:
{
ShowPlayOverlay
:
function
()
{
this
.
$data
.
showPlayOverlay
=
true
;
}
,
AddToQueue
:
function
()
{
AddToQueue
:
function
()
{
this
.
$root
.
$emit
(
'
download
'
,
{
id
:
this
.
$data
.
id
,
cover
:
this
.
$data
.
cover
,
title
:
this
.
$data
.
title
,
artist
:
this
.
$data
.
artist
,
downloadPath
:
this
.
$data
.
downloadPath
}
);
this
.
$root
.
$emit
(
'
download
'
,
{
id
:
this
.
$data
.
id
,
cover
:
this
.
$data
.
cover
,
title
:
this
.
$data
.
title
,
artist
:
this
.
$data
.
artist
,
downloadPath
:
this
.
$data
.
downloadPath
}
);
}
,
}
,
...
@@ -449,7 +485,7 @@
...
@@ -449,7 +485,7 @@
color
:
rgba
(
255
,
255
,
255
,
0.75
);
color
:
rgba
(
255
,
255
,
255
,
0.75
);
}
}
&
.
router
-
link
-
exact
-
active
{
&
.
router
-
link
-
active
{
opacity
:
1
;
opacity
:
1
;
color
:
rgba
(
255
,
255
,
255
,
1
);
color
:
rgba
(
255
,
255
,
255
,
1
);
background
:
#
383
C3F
;
background
:
#
383
C3F
;
...
...
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