Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
Taiko Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
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
nanahira
Taiko Web
Commits
988c4cc7
Commit
988c4cc7
authored
Apr 16, 2020
by
mnvdk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed more hardcoded instances of categories
parent
e1411bcd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
101 deletions
+19
-101
public/src/js/loader.js
public/src/js/loader.js
+8
-0
public/src/js/songselect.js
public/src/js/songselect.js
+8
-58
public/src/js/view.js
public/src/js/view.js
+3
-43
No files found.
public/src/js/loader.js
View file @
988c4cc7
...
@@ -107,6 +107,14 @@ class Loader{
...
@@ -107,6 +107,14 @@ class Loader{
this
.
addPromise
(
this
.
ajax
(
"
/api/categories
"
).
then
(
categories
=>
{
this
.
addPromise
(
this
.
ajax
(
"
/api/categories
"
).
then
(
categories
=>
{
assets
.
categories
=
JSON
.
parse
(
categories
)
assets
.
categories
=
JSON
.
parse
(
categories
)
assets
.
categories
.
push
({
title
:
"
default
"
,
songSkin
:
{
background
:
"
#ececec
"
,
border
:
[
"
#fbfbfb
"
,
"
#8b8b8b
"
],
outline
:
"
#656565
"
}
})
}),
"
/api/categories
"
)
}),
"
/api/categories
"
)
this
.
addPromise
(
this
.
ajax
(
"
/api/songs
"
).
then
(
songs
=>
{
this
.
addPromise
(
this
.
ajax
(
"
/api/songs
"
).
then
(
songs
=>
{
...
...
public/src/js/songselect.js
View file @
988c4cc7
...
@@ -26,97 +26,47 @@ class SongSelect{
...
@@ -26,97 +26,47 @@ class SongSelect{
outline
:
"
#ad7723
"
outline
:
"
#ad7723
"
},
},
"
random
"
:
{
"
random
"
:
{
sort
:
7
,
sort
:
0
,
background
:
"
#fa91ff
"
,
background
:
"
#fa91ff
"
,
border
:
[
"
#ffdfff
"
,
"
#b068b2
"
],
border
:
[
"
#ffdfff
"
,
"
#b068b2
"
],
outline
:
"
#b221bb
"
outline
:
"
#b221bb
"
},
},
"
tutorial
"
:
{
"
tutorial
"
:
{
sort
:
7
,
sort
:
0
,
background
:
"
#29e8aa
"
,
background
:
"
#29e8aa
"
,
border
:
[
"
#86ffbd
"
,
"
#009a8c
"
],
border
:
[
"
#86ffbd
"
,
"
#009a8c
"
],
outline
:
"
#08a28c
"
outline
:
"
#08a28c
"
},
},
"
about
"
:
{
"
about
"
:
{
sort
:
7
,
sort
:
0
,
background
:
"
#a2d0e7
"
,
background
:
"
#a2d0e7
"
,
border
:
[
"
#c6dfff
"
,
"
#4485d9
"
],
border
:
[
"
#c6dfff
"
,
"
#4485d9
"
],
outline
:
"
#2390d9
"
outline
:
"
#2390d9
"
},
},
"
settings
"
:
{
"
settings
"
:
{
sort
:
7
,
sort
:
0
,
background
:
"
#ce93fa
"
,
background
:
"
#ce93fa
"
,
border
:
[
"
#dec4fd
"
,
"
#a543ef
"
],
border
:
[
"
#dec4fd
"
,
"
#a543ef
"
],
outline
:
"
#a741ef
"
outline
:
"
#a741ef
"
},
},
"
browse
"
:
{
"
browse
"
:
{
sort
:
7
,
sort
:
0
,
background
:
"
#fab5d3
"
,
background
:
"
#fab5d3
"
,
border
:
[
"
#ffe7ef
"
,
"
#d36aa2
"
],
border
:
[
"
#ffe7ef
"
,
"
#d36aa2
"
],
outline
:
"
#d36aa2
"
outline
:
"
#d36aa2
"
},
"
J-POP
"
:
{
sort
:
0
,
background
:
"
#219fbb
"
,
border
:
[
"
#7ec3d3
"
,
"
#0b6773
"
],
outline
:
"
#005058
"
},
"
アニメ
"
:
{
sort
:
1
,
background
:
"
#ff9700
"
,
border
:
[
"
#ffdb8c
"
,
"
#e75500
"
],
outline
:
"
#9c4100
"
},
"
ボーカロイド™曲
"
:
{
sort
:
2
,
background
:
"
#def2ef
"
,
border
:
[
"
#f7fbff
"
,
"
#79919f
"
],
outline
:
"
#5a6584
"
},
"
バラエティ
"
:
{
sort
:
3
,
background
:
"
#8fd321
"
,
border
:
[
"
#f7fbff
"
,
"
#587d0b
"
],
outline
:
"
#374c00
"
},
"
クラシック
"
:
{
sort
:
4
,
background
:
"
#d1a016
"
,
border
:
[
"
#e7cf6b
"
,
"
#9a6b00
"
],
outline
:
"
#734d00
"
},
"
ゲームミュージック
"
:
{
sort
:
5
,
background
:
"
#9c72c0
"
,
border
:
[
"
#bda2ce
"
,
"
#63407e
"
],
outline
:
"
#4b1c74
"
},
"
ナムコオリジナル
"
:
{
sort
:
6
,
background
:
"
#ff5716
"
,
border
:
[
"
#ffa66b
"
,
"
#b53000
"
],
outline
:
"
#9c2000
"
}
}
}
}
let
sortCount
=
7
;
for
(
let
category
of
assets
.
categories
){
for
(
let
category
of
assets
.
categories
){
if
(
!
this
.
songSkin
[
category
.
title
]
&&
category
.
songSkin
){
if
(
!
this
.
songSkin
[
category
.
title
]
&&
category
.
songSkin
){
if
(
!
category
.
songSkin
.
sort
){
if
(
!
category
.
songSkin
.
sort
==
null
){
category
.
songSkin
.
sort
=
sortCount
category
.
songSkin
.
sort
=
Object
.
keys
(
this
.
songSkin
).
length
+
1
sortCount
+=
1
}
}
this
.
songSkin
[
category
.
title
]
=
category
.
songSkin
this
.
songSkin
[
category
.
title
]
=
category
.
songSkin
}
}
}
}
this
.
songSkin
.
default
=
{
this
.
songSkin
[
'
default
'
].
sort
=
Object
.
keys
(
this
.
songSkin
).
length
+
1
sort
:
Object
.
keys
(
this
.
songSkin
).
length
+
1
,
background
:
"
#ececec
"
,
border
:
[
"
#fbfbfb
"
,
"
#8b8b8b
"
],
outline
:
"
#656565
"
}
this
.
font
=
strings
.
font
this
.
font
=
strings
.
font
...
...
public/src/js/view.js
View file @
988c4cc7
...
@@ -23,40 +23,6 @@
...
@@ -23,40 +23,6 @@
this
.
darkDonBg
=
false
this
.
darkDonBg
=
false
this
.
pauseOptions
=
strings
.
pauseOptions
this
.
pauseOptions
=
strings
.
pauseOptions
this
.
categories
=
{
"
J-POP
"
:
{
sort
:
0
,
infoFill
:
"
#004d68
"
},
"
アニメ
"
:
{
sort
:
1
,
infoFill
:
"
#9c4002
"
},
"
ボーカロイド™曲
"
:
{
sort
:
2
,
infoFill
:
"
#546184
"
},
"
バラエティ
"
:
{
sort
:
3
,
infoFill
:
"
#3c6800
"
},
"
クラシック
"
:
{
sort
:
4
,
infoFill
:
"
#865800
"
},
"
ゲームミュージック
"
:
{
sort
:
5
,
infoFill
:
"
#4f2886
"
},
"
ナムコオリジナル
"
:
{
sort
:
6
,
infoFill
:
"
#961e00
"
},
"
default
"
:
{
sort
:
7
,
infoFill
:
"
#656565
"
}
}
this
.
difficulty
=
{
this
.
difficulty
=
{
"
easy
"
:
0
,
"
easy
"
:
0
,
"
normal
"
:
1
,
"
normal
"
:
1
,
...
@@ -329,10 +295,10 @@
...
@@ -329,10 +295,10 @@
var
_h
=
22
var
_h
=
22
var
_x
=
628
-
_w
var
_x
=
628
-
_w
var
_y
=
88
-
_h
var
_y
=
88
-
_h
if
(
selectedSong
.
category
in
this
.
categories
){
if
(
assets
.
categories
.
find
(
cat
=>
cat
.
title
==
selectedSong
.
category
)
){
ctx
.
fillStyle
=
this
.
categories
[
selectedSong
.
category
].
infoFill
ctx
.
fillStyle
=
assets
.
categories
.
find
(
cat
=>
cat
.
title
==
selectedSong
.
category
).
songSkin
.
outline
}
else
{
}
else
{
ctx
.
fillStyle
=
this
.
categories
.
default
.
infoFill
ctx
.
fillStyle
=
assets
.
categories
.
find
(
cat
=>
cat
.
title
==
'
default
'
).
songSkin
.
outline
}
}
this
.
draw
.
roundedRect
({
this
.
draw
.
roundedRect
({
ctx
:
ctx
,
ctx
:
ctx
,
...
@@ -1425,12 +1391,6 @@
...
@@ -1425,12 +1391,6 @@
var
songLayers
=
[
document
.
getElementById
(
"
layer1
"
),
document
.
getElementById
(
"
layer2
"
)]
var
songLayers
=
[
document
.
getElementById
(
"
layer1
"
),
document
.
getElementById
(
"
layer2
"
)]
var
prefix
=
""
var
prefix
=
""
if
(
selectedSong
.
category
in
this
.
categories
){
var
catId
=
this
.
categories
[
selectedSong
.
category
].
sort
}
else
{
var
catId
=
this
.
categories
.
default
.
sort
}
if
(
!
selectedSong
.
songSkin
.
song
){
if
(
!
selectedSong
.
songSkin
.
song
){
var
id
=
selectedSong
.
songBg
var
id
=
selectedSong
.
songBg
this
.
songBg
.
classList
.
add
(
"
songbg-
"
+
id
)
this
.
songBg
.
classList
.
add
(
"
songbg-
"
+
id
)
...
...
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