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
84e04813
Commit
84e04813
authored
Apr 23, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:bui/taiko-web
parents
6f88e2f9
09c1ba2b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
97 additions
and
59 deletions
+97
-59
app.py
app.py
+27
-12
public/src/js/canvasdraw.js
public/src/js/canvasdraw.js
+1
-1
public/src/js/loader.js
public/src/js/loader.js
+0
-4
public/src/js/parsetja.js
public/src/js/parsetja.js
+33
-20
public/src/js/songselect.js
public/src/js/songselect.js
+1
-0
public/src/js/view.js
public/src/js/view.js
+4
-3
server.py
server.py
+5
-3
templates/admin.html
templates/admin.html
+2
-1
templates/admin_song_detail.html
templates/admin_song_detail.html
+5
-5
templates/admin_song_new.html
templates/admin_song_new.html
+12
-7
templates/admin_songs.html
templates/admin_songs.html
+7
-3
No files found.
app.py
View file @
84e04813
...
@@ -67,7 +67,10 @@ def generate_hash(id, form):
...
@@ -67,7 +67,10 @@ def generate_hash(id, form):
else
:
else
:
if
url
.
startswith
(
"/"
):
if
url
.
startswith
(
"/"
):
url
=
url
[
1
:]
url
=
url
[
1
:]
with
open
(
os
.
path
.
join
(
"public"
,
url
),
"rb"
)
as
file
:
path
=
os
.
path
.
normpath
(
os
.
path
.
join
(
"public"
,
url
))
if
not
os
.
path
.
isfile
(
path
):
raise
HashException
(
"File not found:
%
s"
%
(
os
.
path
.
abspath
(
path
)))
with
open
(
path
,
"rb"
)
as
file
:
md5
.
update
(
file
.
read
())
md5
.
update
(
file
.
read
())
return
base64
.
b64encode
(
md5
.
digest
())[:
-
2
]
.
decode
(
'utf-8'
)
return
base64
.
b64encode
(
md5
.
digest
())[:
-
2
]
.
decode
(
'utf-8'
)
...
@@ -245,18 +248,28 @@ def route_admin_songs_new_post():
...
@@ -245,18 +248,28 @@ def route_admin_songs_new_post():
output
[
'volume'
]
=
float
(
request
.
form
.
get
(
'volume'
))
or
None
output
[
'volume'
]
=
float
(
request
.
form
.
get
(
'volume'
))
or
None
output
[
'maker_id'
]
=
int
(
request
.
form
.
get
(
'maker_id'
))
or
None
output
[
'maker_id'
]
=
int
(
request
.
form
.
get
(
'maker_id'
))
or
None
output
[
'lyrics'
]
=
True
if
request
.
form
.
get
(
'lyrics'
)
else
False
output
[
'lyrics'
]
=
True
if
request
.
form
.
get
(
'lyrics'
)
else
False
output
[
'hash'
]
=
None
output
[
'hash'
]
=
request
.
form
.
get
(
'hash'
)
seq
=
db
.
seq
.
find_one
({
'name'
:
'songs'
})
seq
=
db
.
seq
.
find_one
({
'name'
:
'songs'
})
seq_new
=
seq
[
'value'
]
+
1
if
seq
else
1
seq_new
=
seq
[
'value'
]
+
1
if
seq
else
1
hash_error
=
False
if
request
.
form
.
get
(
'gen_hash'
):
try
:
output
[
'hash'
]
=
generate_hash
(
seq_new
,
request
.
form
)
except
HashException
as
e
:
hash_error
=
True
flash
(
'An error occurred:
%
s'
%
str
(
e
),
'error'
)
output
[
'id'
]
=
seq_new
output
[
'id'
]
=
seq_new
output
[
'order'
]
=
seq_new
output
[
'order'
]
=
seq_new
db
.
songs
.
insert_one
(
output
)
db
.
songs
.
insert_one
(
output
)
flash
(
'Song created.'
)
if
not
hash_error
:
flash
(
'Song created.'
)
db
.
seq
.
update_one
({
'name'
:
'songs'
},
{
'$set'
:
{
'value'
:
seq_new
}},
upsert
=
True
)
db
.
seq
.
update_one
({
'name'
:
'songs'
},
{
'$set'
:
{
'value'
:
seq_new
}},
upsert
=
True
)
return
redirect
(
'/admin/songs/
%
s'
%
str
(
seq_new
))
return
redirect
(
'/admin/songs/
%
s'
%
str
(
seq_new
))
...
@@ -296,17 +309,19 @@ def route_admin_songs_id_post(id):
...
@@ -296,17 +309,19 @@ def route_admin_songs_id_post(id):
output
[
'maker_id'
]
=
int
(
request
.
form
.
get
(
'maker_id'
))
or
None
output
[
'maker_id'
]
=
int
(
request
.
form
.
get
(
'maker_id'
))
or
None
output
[
'lyrics'
]
=
True
if
request
.
form
.
get
(
'lyrics'
)
else
False
output
[
'lyrics'
]
=
True
if
request
.
form
.
get
(
'lyrics'
)
else
False
output
[
'hash'
]
=
request
.
form
.
get
(
'hash'
)
output
[
'hash'
]
=
request
.
form
.
get
(
'hash'
)
hash_error
=
False
if
request
.
form
.
get
(
'gen_hash'
):
if
request
.
form
.
get
(
'gen_hash'
):
try
:
try
:
output
[
'hash'
]
=
generate_hash
(
id
,
request
.
form
)
output
[
'hash'
]
=
generate_hash
(
id
,
request
.
form
)
except
HashException
as
e
:
except
HashException
as
e
:
hash_error
=
True
flash
(
'An error occurred:
%
s'
%
str
(
e
),
'error'
)
flash
(
'An error occurred:
%
s'
%
str
(
e
),
'error'
)
return
redirect
(
'/admin/songs/
%
s'
%
id
)
db
.
songs
.
update_one
({
'id'
:
id
},
{
'$set'
:
output
})
db
.
songs
.
update_one
({
'id'
:
id
},
{
'$set'
:
output
})
flash
(
'Changes saved.'
)
if
not
hash_error
:
flash
(
'Changes saved.'
)
return
redirect
(
'/admin/songs/
%
s'
%
id
)
return
redirect
(
'/admin/songs/
%
s'
%
id
)
...
...
public/src/js/canvasdraw.js
View file @
84e04813
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
ideographicComma
:
/
[
、。
]
/
,
ideographicComma
:
/
[
、。
]
/
,
apostrophe
:
/
[
''’
]
/
,
apostrophe
:
/
[
''’
]
/
,
degree
:
/
[
゚°
]
/
,
degree
:
/
[
゚°
]
/
,
brackets
:
/
[\(
(
\)
)
\[\]
「」『』【】::;;
]
/
,
brackets
:
/
[\(
(
\)
)
\[\]
「」『』【】::;;
≠
]
/
,
tilde
:
/
[\-
-~~〜_
]
/
,
tilde
:
/
[\-
-~~〜_
]
/
,
tall
:
/
[
bbddffgghhj-lj-ltt♪
]
/
,
tall
:
/
[
bbddffgghhj-lj-ltt♪
]
/
,
i
:
/
[
ii
]
/
,
i
:
/
[
ii
]
/
,
...
...
public/src/js/loader.js
View file @
84e04813
...
@@ -409,10 +409,6 @@ class Loader{
...
@@ -409,10 +409,6 @@ class Loader{
})
})
}
}
clean
(
error
){
clean
(
error
){
var
fontDetectDiv
=
document
.
getElementById
(
"
fontdetectHelper
"
)
if
(
fontDetectDiv
){
fontDetectDiv
.
parentNode
.
removeChild
(
fontDetectDiv
)
}
delete
this
.
loaderDiv
delete
this
.
loaderDiv
delete
this
.
loaderPercentage
delete
this
.
loaderPercentage
delete
this
.
loaderProgress
delete
this
.
loaderProgress
...
...
public/src/js/parsetja.js
View file @
84e04813
...
@@ -158,6 +158,7 @@
...
@@ -158,6 +158,7 @@
var
sectionBegin
=
true
var
sectionBegin
=
true
var
lastBpm
=
bpm
var
lastBpm
=
bpm
var
lastGogo
=
gogo
var
lastGogo
=
gogo
var
lyricsLine
=
null
var
currentMeasure
=
[]
var
currentMeasure
=
[]
var
firstNote
=
true
var
firstNote
=
true
...
@@ -292,6 +293,18 @@
...
@@ -292,6 +293,18 @@
}
}
note_chain
=
[];
note_chain
=
[];
}
}
if
(
"
lyricsLine
"
in
note
){
if
(
!
this
.
lyrics
){
this
.
lyrics
=
[]
}
if
(
this
.
lyrics
.
length
!==
0
){
this
.
lyrics
[
this
.
lyrics
.
length
-
1
].
end
=
note
.
start
}
this
.
lyrics
.
push
({
start
:
note
.
start
,
text
:
note
.
lyricsLine
})
}
}
}
if
(
note_chain
.
length
>
1
&&
currentMeasure
.
length
>=
8
)
{
if
(
note_chain
.
length
>
1
&&
currentMeasure
.
length
>=
8
)
{
checkChain
(
note_chain
,
currentMeasure
.
length
,
false
);
checkChain
(
note_chain
,
currentMeasure
.
length
,
false
);
...
@@ -308,6 +321,10 @@
...
@@ -308,6 +321,10 @@
lastBpm
=
bpm
lastBpm
=
bpm
lastGogo
=
gogo
lastGogo
=
gogo
}
}
if
(
lyricsLine
!==
null
){
circleObj
.
lyricsLine
=
lyricsLine
lyricsLine
=
null
}
currentMeasure
.
push
(
circleObj
)
currentMeasure
.
push
(
circleObj
)
}
}
}
}
...
@@ -320,12 +337,21 @@
...
@@ -320,12 +337,21 @@
gogo
:
gogo
gogo
:
gogo
})
})
}
else
if
(
!
circleObj
){
}
else
if
(
!
circleObj
){
currentMeasure
.
push
(
{
var
circleObj2
=
{
bpm
:
bpm
,
bpm
:
bpm
,
scroll
:
scroll
scroll
:
scroll
})
}
if
(
lyricsLine
!==
null
){
circleObj2
.
lyricsLine
=
lyricsLine
lyricsLine
=
null
}
currentMeasure
.
push
(
circleObj2
)
}
}
if
(
circleObj
){
if
(
circleObj
){
if
(
lyricsLine
!==
null
){
circleObj
.
lyricsLine
=
lyricsLine
lyricsLine
=
null
}
currentMeasure
.
push
(
circleObj
)
currentMeasure
.
push
(
circleObj
)
}
}
}
}
...
@@ -334,8 +360,9 @@
...
@@ -334,8 +360,9 @@
var
line
=
this
.
data
[
lineNum
]
var
line
=
this
.
data
[
lineNum
]
if
(
line
.
slice
(
0
,
1
)
===
"
#
"
){
if
(
line
.
slice
(
0
,
1
)
===
"
#
"
){
var
line
=
line
.
slice
(
1
)
.
toLowerCase
()
var
line
=
line
.
slice
(
1
)
var
[
name
,
value
]
=
this
.
split
(
line
,
"
"
)
var
[
name
,
value
]
=
this
.
split
(
line
,
"
"
)
name
=
name
.
toLowerCase
()
switch
(
name
){
switch
(
name
){
case
"
gogostart
"
:
case
"
gogostart
"
:
...
@@ -442,16 +469,7 @@
...
@@ -442,16 +469,7 @@
branchObj
[
branchName
]
=
currentBranch
branchObj
[
branchName
]
=
currentBranch
break
break
case
"
lyric
"
:
case
"
lyric
"
:
if
(
!
this
.
lyrics
){
lyricsLine
=
value
.
replace
(
regexLinebreak
,
"
\n
"
).
trim
()
this
.
lyrics
=
[]
}
if
(
this
.
lyrics
.
length
!==
0
){
this
.
lyrics
[
this
.
lyrics
.
length
-
1
].
end
=
ms
}
this
.
lyrics
.
push
({
start
:
ms
,
text
:
value
.
trim
().
replace
(
regexLinebreak
,
"
\n
"
)
})
break
break
}
}
...
@@ -539,13 +557,8 @@
...
@@ -539,13 +557,8 @@
}
}
break
break
case
"
,
"
:
case
"
,
"
:
if
(
currentMeasure
.
length
===
0
&&
(
bpm
!==
lastBpm
||
gogo
!==
lastGogo
)){
if
(
currentMeasure
.
length
===
0
&&
(
bpm
!==
lastBpm
||
gogo
!==
lastGogo
||
lyricsLine
!==
null
)){
insertNote
({
insertBlankNote
()
type
:
"
event
"
,
bpm
:
bpm
,
scroll
:
scroll
,
gogo
:
gogo
})
}
}
pushMeasure
()
pushMeasure
()
currentMeasure
=
[]
currentMeasure
=
[]
...
...
public/src/js/songselect.js
View file @
84e04813
...
@@ -2660,6 +2660,7 @@ class SongSelect{
...
@@ -2660,6 +2660,7 @@ class SongSelect{
this
.
difficultyCache
.
clean
()
this
.
difficultyCache
.
clean
()
this
.
sessionCache
.
clean
()
this
.
sessionCache
.
clean
()
this
.
currentSongCache
.
clean
()
this
.
currentSongCache
.
clean
()
this
.
nameplateCache
.
clean
()
assets
.
sounds
[
"
bgm_songsel
"
].
stop
()
assets
.
sounds
[
"
bgm_songsel
"
].
stop
()
if
(
!
this
.
bgmEnabled
){
if
(
!
this
.
bgmEnabled
){
snd
.
musicGain
.
fadeIn
()
snd
.
musicGain
.
fadeIn
()
...
...
public/src/js/view.js
View file @
84e04813
...
@@ -595,8 +595,8 @@
...
@@ -595,8 +595,8 @@
this
.
nameplateCache
.
get
({
this
.
nameplateCache
.
get
({
ctx
:
ctx
,
ctx
:
ctx
,
x
:
320
,
x
:
touchMultiplayer
?
47
:
320
,
y
:
t
his
.
player
===
2
?
460
:
20
,
y
:
t
ouchMultiplayer
?
(
this
.
player
===
2
?
361
:
119
)
:
(
this
.
player
===
2
?
460
:
20
)
,
w
:
273
,
w
:
273
,
h
:
66
,
h
:
66
,
id
:
"
1p
"
,
id
:
"
1p
"
,
...
@@ -751,7 +751,7 @@
...
@@ -751,7 +751,7 @@
y
:
animPos
.
y2
y
:
animPos
.
y2
}]
}]
var
touchTop
=
frameTop
+
(
touchMultiplayer
?
135
:
0
)
var
touchTop
=
frameTop
+
(
touchMultiplayer
?
135
:
0
)
+
(
this
.
player
===
2
?
-
165
:
0
)
this
.
touchDrum
=
(()
=>
{
this
.
touchDrum
=
(()
=>
{
var
sw
=
842
var
sw
=
842
var
sh
=
340
var
sh
=
340
...
@@ -2273,6 +2273,7 @@
...
@@ -2273,6 +2273,7 @@
this
.
comboCache
.
clean
()
this
.
comboCache
.
clean
()
this
.
pauseCache
.
clean
()
this
.
pauseCache
.
clean
()
this
.
branchCache
.
clean
()
this
.
branchCache
.
clean
()
this
.
nameplateCache
.
clean
()
versionDiv
.
classList
.
remove
(
"
version-hide
"
)
versionDiv
.
classList
.
remove
(
"
version-hide
"
)
loader
.
screen
.
parentNode
.
appendChild
(
versionDiv
)
loader
.
screen
.
parentNode
.
appendChild
(
versionDiv
)
...
...
server.py
View file @
84e04813
...
@@ -52,12 +52,12 @@ async def connection(ws, path):
...
@@ -52,12 +52,12 @@ async def connection(ws, path):
await
ws
.
send
(
status_event
())
await
ws
.
send
(
status_event
())
while
True
:
while
True
:
try
:
try
:
message
=
await
asyncio
.
wait_for
(
ws
.
recv
(),
timeout
=
5
)
message
=
await
asyncio
.
wait_for
(
ws
.
recv
(),
timeout
=
10
)
except
asyncio
.
TimeoutError
:
except
asyncio
.
TimeoutError
:
# Keep user connected
# Keep user connected
pong_waiter
=
await
ws
.
ping
()
pong_waiter
=
await
ws
.
ping
()
try
:
try
:
await
asyncio
.
wait_for
(
pong_waiter
,
timeout
=
5
)
await
asyncio
.
wait_for
(
pong_waiter
,
timeout
=
10
)
except
asyncio
.
TimeoutError
:
except
asyncio
.
TimeoutError
:
# Disconnect
# Disconnect
break
break
...
@@ -338,8 +338,10 @@ async def connection(ws, path):
...
@@ -338,8 +338,10 @@ async def connection(ws, path):
sent_msg2
=
status_event
()
sent_msg2
=
status_event
()
await
asyncio
.
wait
([
await
asyncio
.
wait
([
ws
.
send
(
sent_msg1
),
ws
.
send
(
sent_msg1
),
user
[
"other_user"
][
"ws"
]
.
send
(
sent_msg1
)
])
await
asyncio
.
wait
([
ws
.
send
(
sent_msg2
),
ws
.
send
(
sent_msg2
),
user
[
"other_user"
][
"ws"
]
.
send
(
sent_msg1
),
user
[
"other_user"
][
"ws"
]
.
send
(
sent_msg2
)
user
[
"other_user"
][
"ws"
]
.
send
(
sent_msg2
)
])
])
del
user
[
"other_user"
][
"other_user"
]
del
user
[
"other_user"
][
"other_user"
]
...
...
templates/admin.html
View file @
84e04813
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<title>
Taiko Web Admin
</title>
<title>
Taiko Web Admin
</title>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
>
<link
href=
"https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap"
rel=
"stylesheet"
>
<link
href=
"https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap"
rel=
"stylesheet"
>
<link
href=
"/src/css/admin.css"
rel=
"stylesheet"
>
<link
href=
"/src/css/admin.css"
rel=
"stylesheet"
>
</head>
</head>
...
...
templates/admin_song_detail.html
View file @
84e04813
...
@@ -52,19 +52,19 @@
...
@@ -52,19 +52,19 @@
<p>
Courses
</p>
<p>
Courses
</p>
<label
for=
"course_easy"
>
Easy
</label>
<label
for=
"course_easy"
>
Easy
</label>
<input
type=
"number"
id=
"course_easy"
value=
"{{song.courses.easy.stars}}"
name=
"course_easy"
min=
"0"
max=
"10"
>
<input
type=
"number"
id=
"course_easy"
value=
"{{song.courses.easy.stars}}"
name=
"course_easy"
min=
"0"
max=
"10"
>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_easy"
id=
"branch_easy"
{%
if
song
.
courses
.
easy
.
branch
%}
checked
{%
endif
%}
><label
for=
"branch_easy"
>
Diverge Notes
</label></span>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_easy"
id=
"branch_easy"
{%
if
song
.
courses
.
easy
.
branch
%}
checked
{%
endif
%}
tabindex=
"-1"
><label
for=
"branch_easy"
>
Diverge Notes
</label></span>
<label
for=
"course_normal"
>
Normal
</label>
<label
for=
"course_normal"
>
Normal
</label>
<input
type=
"number"
id=
"course_normal"
value=
"{{song.courses.normal.stars}}"
name=
"course_normal"
min=
"0"
max=
"10"
>
<input
type=
"number"
id=
"course_normal"
value=
"{{song.courses.normal.stars}}"
name=
"course_normal"
min=
"0"
max=
"10"
>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_normal"
id=
"branch_normal"
{%
if
song
.
courses
.
normal
.
branch
%}
checked
{%
endif
%}
><label
for=
"branch_normal"
>
Diverge Notes
</label></span>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_normal"
id=
"branch_normal"
{%
if
song
.
courses
.
normal
.
branch
%}
checked
{%
endif
%}
tabindex=
"-1"
><label
for=
"branch_normal"
>
Diverge Notes
</label></span>
<label
for=
"course_hard"
>
Hard
</label>
<label
for=
"course_hard"
>
Hard
</label>
<input
type=
"number"
id=
"course_hard"
value=
"{{song.courses.hard.stars}}"
name=
"course_hard"
min=
"0"
max=
"10"
>
<input
type=
"number"
id=
"course_hard"
value=
"{{song.courses.hard.stars}}"
name=
"course_hard"
min=
"0"
max=
"10"
>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_hard"
id=
"branch_hard"
{%
if
song
.
courses
.
hard
.
branch
%}
checked
{%
endif
%}
><label
for=
"branch_hard"
>
Diverge Notes
</label></span>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_hard"
id=
"branch_hard"
{%
if
song
.
courses
.
hard
.
branch
%}
checked
{%
endif
%}
tabindex=
"-1"
><label
for=
"branch_hard"
>
Diverge Notes
</label></span>
<label
for=
"course_oni"
>
Oni
</label>
<label
for=
"course_oni"
>
Oni
</label>
<input
type=
"number"
id=
"course_oni"
value=
"{{song.courses.oni.stars}}"
name=
"course_oni"
min=
"0"
max=
"10"
>
<input
type=
"number"
id=
"course_oni"
value=
"{{song.courses.oni.stars}}"
name=
"course_oni"
min=
"0"
max=
"10"
>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_oni"
id=
"branch_oni"
{%
if
song
.
courses
.
oni
.
branch
%}
checked
{%
endif
%}
><label
for=
"branch_oni"
>
Diverge Notes
</label></span>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_oni"
id=
"branch_oni"
{%
if
song
.
courses
.
oni
.
branch
%}
checked
{%
endif
%}
tabindex=
"-1"
><label
for=
"branch_oni"
>
Diverge Notes
</label></span>
<label
for=
"course_ura"
>
Ura
</label>
<label
for=
"course_ura"
>
Ura
</label>
<input
type=
"number"
id=
"course_ura"
value=
"{{song.courses.ura.stars}}"
name=
"course_ura"
min=
"0"
max=
"10"
>
<input
type=
"number"
id=
"course_ura"
value=
"{{song.courses.ura.stars}}"
name=
"course_ura"
min=
"0"
max=
"10"
>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_ura"
id=
"branch_ura"
{%
if
song
.
courses
.
ura
.
branch
%}
checked
{%
endif
%}
><label
for=
"branch_ura"
>
Diverge Notes
</label></span>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_ura"
id=
"branch_ura"
{%
if
song
.
courses
.
ura
.
branch
%}
checked
{%
endif
%}
tabindex=
"-1"
><label
for=
"branch_ura"
>
Diverge Notes
</label></span>
</div>
</div>
<div
class=
"form-field"
>
<div
class=
"form-field"
>
...
...
templates/admin_song_new.html
View file @
84e04813
...
@@ -48,19 +48,19 @@
...
@@ -48,19 +48,19 @@
<p>
Courses
</p>
<p>
Courses
</p>
<label
for=
"course_easy"
>
Easy
</label>
<label
for=
"course_easy"
>
Easy
</label>
<input
type=
"number"
id=
"course_easy"
value=
""
name=
"course_easy"
min=
"0"
max=
"10"
>
<input
type=
"number"
id=
"course_easy"
value=
""
name=
"course_easy"
min=
"0"
max=
"10"
>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_easy"
id=
"branch_easy"
><label
for=
"branch_easy"
>
Diverge Notes
</label></span>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_easy"
id=
"branch_easy"
tabindex=
"-1"
><label
for=
"branch_easy"
>
Diverge Notes
</label></span>
<label
for=
"course_normal"
>
Normal
</label>
<label
for=
"course_normal"
>
Normal
</label>
<input
type=
"number"
id=
"course_normal"
value=
""
name=
"course_normal"
min=
"0"
max=
"10"
>
<input
type=
"number"
id=
"course_normal"
value=
""
name=
"course_normal"
min=
"0"
max=
"10"
>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_normal"
id=
"branch_normal"
><label
for=
"branch_normal"
>
Diverge Notes
</label></span>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_normal"
id=
"branch_normal"
tabindex=
"-1"
><label
for=
"branch_normal"
>
Diverge Notes
</label></span>
<label
for=
"course_hard"
>
Hard
</label>
<label
for=
"course_hard"
>
Hard
</label>
<input
type=
"number"
id=
"course_hard"
value=
""
name=
"course_hard"
min=
"0"
max=
"10"
>
<input
type=
"number"
id=
"course_hard"
value=
""
name=
"course_hard"
min=
"0"
max=
"10"
>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_hard"
id=
"branch_hard"
><label
for=
"branch_hard"
>
Diverge Notes
</label></span>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_hard"
id=
"branch_hard"
tabindex=
"-1"
><label
for=
"branch_hard"
>
Diverge Notes
</label></span>
<label
for=
"course_oni"
>
Oni
</label>
<label
for=
"course_oni"
>
Oni
</label>
<input
type=
"number"
id=
"course_oni"
value=
""
name=
"course_oni"
min=
"0"
max=
"10"
>
<input
type=
"number"
id=
"course_oni"
value=
""
name=
"course_oni"
min=
"0"
max=
"10"
>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_oni"
id=
"branch_oni"
><label
for=
"branch_oni"
>
Diverge Notes
</label></span>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_oni"
id=
"branch_oni"
tabindex=
"-1"
><label
for=
"branch_oni"
>
Diverge Notes
</label></span>
<label
for=
"course_ura"
>
Ura
</label>
<label
for=
"course_ura"
>
Ura
</label>
<input
type=
"number"
id=
"course_ura"
value=
""
name=
"course_ura"
min=
"0"
max=
"10"
>
<input
type=
"number"
id=
"course_ura"
value=
""
name=
"course_ura"
min=
"0"
max=
"10"
>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_ura"
id=
"branch_ura"
><label
for=
"branch_ura"
>
Diverge Notes
</label></span>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"branch_ura"
id=
"branch_ura"
tabindex=
"-1"
><label
for=
"branch_ura"
>
Diverge Notes
</label></span>
</div>
</div>
<div
class=
"form-field"
>
<div
class=
"form-field"
>
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
<div
class=
"form-field"
>
<div
class=
"form-field"
>
<p><label
for=
"offset"
>
Offset
</label></p>
<p><label
for=
"offset"
>
Offset
</label></p>
<input
type=
"text"
id=
"offset"
value=
""
name=
"offset"
required
>
<input
type=
"text"
id=
"offset"
value=
"
0
"
name=
"offset"
required
>
</div>
</div>
<div
class=
"form-field"
>
<div
class=
"form-field"
>
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
<div
class=
"form-field"
>
<div
class=
"form-field"
>
<p><label
for=
"volume"
>
Volume
</label></p>
<p><label
for=
"volume"
>
Volume
</label></p>
<input
type=
"text"
id=
"volume"
value=
""
name=
"volume"
required
>
<input
type=
"text"
id=
"volume"
value=
"
1.0
"
name=
"volume"
required
>
</div>
</div>
<div
class=
"form-field"
>
<div
class=
"form-field"
>
...
@@ -121,6 +121,11 @@
...
@@ -121,6 +121,11 @@
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"lyrics"
id=
"lyrics"
><label
for=
"lyrics"
>
Enabled
</label></span>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"lyrics"
id=
"lyrics"
><label
for=
"lyrics"
>
Enabled
</label></span>
</div>
</div>
<div
class=
"form-field"
>
<p><label
for=
"hash"
>
Hash
</label></p>
<input
type=
"text"
id=
"hash"
value=
""
name=
"hash"
>
<span
class=
"checkbox"
><input
type=
"checkbox"
name=
"gen_hash"
id=
"gen_hash"
><label
for=
"gen_hash"
>
Generate
</label></span>
</div>
<button
type=
"submit"
class=
"save-song"
>
Save
</button>
<button
type=
"submit"
class=
"save-song"
>
Save
</button>
</form>
</form>
</div>
</div>
...
...
templates/admin_songs.html
View file @
84e04813
...
@@ -10,10 +10,14 @@
...
@@ -10,10 +10,14 @@
{% for song in songs %}
{% for song in songs %}
<a
href=
"/admin/songs/{{ song.id }}"
class=
"song-link"
>
<a
href=
"/admin/songs/{{ song.id }}"
class=
"song-link"
>
<div
class=
"song"
>
<div
class=
"song"
>
{% if song.title_lang.en %}
{% if song.title_lang.en and song.title_lang.en != song.title %}
<p><span
class=
"song-id"
>
{{ song.id }}.
</span>
{{ song.title_lang.en }}
<small>
({{ song.title }})
</small></p>
<p><span
class=
"song-id"
>
{{ song.id }}.
</span>
{% if not song.enabled %}(Not enabled){% endif %}
{{ song.title_lang.en }}
<small>
({{ song.title }})
</small></p>
{% else %}
{% else %}
<p><span
class=
"song-id"
>
{{ song.id }}.
</span>
{{ song.title }}
</p>
<p><span
class=
"song-id"
>
{{ song.id }}.
</span>
{% if not song.enabled %}(Not enabled){% endif %}
{{ song.title }}
</p>
{% endif %}
{% endif %}
</div>
</div>
</a>
</a>
...
...
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