Lyrics, search, and other fixes

- #LYRIC
  - Parse #LYRIC commands and apply them to all difficulties that do not have them
  - #LYRIC command now supports branches
  - Fix last #LYRIC at the end of the chart getting ignored
- Fix the glitchy dragging and dropping of files on the custom song importing page
- Fix Ctrl and Shift keys getting stuck on song select when switching tabs with Ctrl(+Shift)+Tab
- Search
  - Fix the search box "random:yes" query to randomize the entire results and not just the first 50
  - Add "all:yes" query to the search box to remove the result limit and display all of the results
  - Fix searching for an invalid query (like "cleared:yes" or ":") unexpectedly returning all the songs
  - Fix pressing Q then jumping to a song through search not unmuting the sound
  - Pressing the search key on mobile will hide the keyboard
  - Fix search tips changing rapidly when the window is resized
- Use comments instead of `######` in the issue template so that the warning does not appear in the issue
- Fix TJA MAKER: url between angle brackets not working
- Add a check for Class field declarations in the browser support warning
- Fix gpicker getting stuck if a network error occurs
- Fix not being able to replace some assets using a "taiko-web assets" folder
- Fix selectable song title not being aligned with the game if the game window is too wide
- Allow plugin developers to use the "select" type for the settings options
  - It uses "options" array and "options_lang" object
- Fix plugins not getting removed from the plugin list on syntax error
- Fix error messages not working if a default plugin is broken
- Fix the start of default plugins not stopping the page from loading on error
- Fix not being able to scroll the plugins screen on mobile
This commit is contained in:
KatieFrogs
2022-07-15 16:00:43 +02:00
parent 7722813879
commit e43c4afceb
16 changed files with 354 additions and 180 deletions

View File

@@ -37,17 +37,14 @@
}
}
})
this.assetSelectors = {
"bg-pattern-1": ".pattern-bg",
"bg_genre_0": "#song-select",
"title-screen": "#title-screen",
"dancing-don": "#loading-don",
"touch_drum": "#touch-drum-img",
"touch_fullscreen": "#touch-full-btn",
"touch_pause": "#touch-pause-btn",
"bg_stage_1": ".song-stage-1",
"bg_stage_2": ".song-stage-2",
"bg_stage_3": ".song-stage-3"
this.assetSelectors = {}
for(var selector in assets.cssBackground){
var filename = assets.cssBackground[selector]
var index = filename.lastIndexOf(".")
if(index !== -1){
filename = filename.slice(0, index)
}
this.assetSelectors[filename] = selector
}
this.comboVoices = ["v_combo_50"].concat(Array.from(Array(50), (d, i) => "v_combo_" + ((i + 1) * 100)))
}
@@ -64,7 +61,7 @@
var file = files[i]
var name = file.name.toLowerCase()
var path = file.path.toLowerCase()
if(name.endsWith(".tja")){
if(name.endsWith(".tja") || name.endsWith(".tjf")){
this.tjaFiles.push({
file: file,
index: i
@@ -292,9 +289,9 @@
if(gt === maker.length - 1){
var lt = maker.lastIndexOf("<")
if(lt !== -1 && lt !== gt - 2){
url = maker.slice(lt + 2, gt)
url = maker.slice(lt + 1, gt).trim()
if(url.startsWith("http://") || url.startsWith("https://")){
maker = maker.slice(0, lt).trim()
maker = maker.slice(0, lt)
}else{
url = null
}
@@ -452,12 +449,20 @@
vectors = JSON.parse(response)
}))
}
if(name.endsWith(".png")){
if(name.endsWith(".png") || name.endsWith(".gif")){
let image = document.createElement("img")
promises.push(pageEvents.load(image).then(() => {
if(id in this.assetSelectors){
var selector = this.assetSelectors[id]
this.stylesheet.push(selector + '{background-image:url("' + image.src + '")}')
var gradient = ""
if(selector === "#song-search"){
gradient = loader.songSearchGradient
}
this.stylesheet.push(loader.cssRuleset({
[selector]: {
"background-image": gradient + "url(\"" + image.src + "\")"
}
}))
}
}))
image.id = name