Commit Graph

78 Commits

Author SHA1 Message Date
KatieFrogs
fd32ecb004 Add base directory support
- Base directory can be changed in config.py from the default / to, for example, /taiko-web/
  - See tools/nginx_subdir.conf for an example nginx configuration with a base directory
- Custom error pages can be used, they can be set in config.py
2022-08-21 22:48:24 +02:00
KatieFrogs
e43c4afceb 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
2022-07-15 16:00:43 +02:00
KatieFrogs
e231ad1fcf Fixes
- Add a "Browse..." button to the plugin menu
- Remove the "Unload All" button from the plugin menu if there are no imported plugins to unload
- Add a new search filter: random:yes
- Resolution settings now affects the results screen assets
- Pixelate more assets with lowest resolution setting
- Fix loading error message not appearing sometimes
- Remove img.css from img assets, the background selectors have been moved to assets.js
- Separate the search logic from SongSelect to its own js file
- Load all image assets with crossorigin=anonymous, this could allow making assets low resolution or programatically taking screenshots at a later time
- If EditFunction in a plugin tries to edit something that is not a function, it will give a better error message
- Disallow search engine bots from indexing images and adding a translate link, which cannot load the game
2022-03-16 09:55:25 +03:00
KatieFrogs
0781c9b120 More fixes
- Add list of enabled plugins to the diagnostics
- Fix broken image permormance in the diagnostics
- Fix parsing undefined values in score storage
- Do not error when verticalText or layeredText gets undefined text
2022-03-04 01:41:56 +03:00
Bui
1ef724c4c1 remember last query until refresh 2022-02-26 00:47:09 +00:00
KatieFrogs
7d818877f8 Plugins: Add plugin settings
- Add support for plugin settings, they appear in the same menu as the plugins, indented from the left to emphasize which plugin the setting belongs to
  - Note that plugin settings can still be changed even when the plugins are stopped
- Add tooltips to plugin menu to view the plugin descriptions, description_lang can also be used
- Fix scolling not working on song select when returning from game settings
- Let instance owners set default plugin files in config.py, to make them easier to maintain
- plugins.add() can now add plugins using a url
- Plugins can be hidden from the plugin menu using PluginLoader.hide, an option in plugins.add(), or in config.py
- Make p2.disable() incremental so that multiple plugins can disable multiplayer independently
- Server no longer crashes if certain optional config fields were not copied over from an updated example config
- Fix not being able to unload plugins if one was imported with errors
2022-02-22 16:23:01 +03:00
Bui
78fe7062dc allow ogg to be used for previews 2022-02-18 16:17:12 +00:00
KatieFrogs
1db4eb6710 ImportSongs: Add plugin support
- Files with filenames that end with .taikoweb.js can be imported and run to add custom functionality to the game
- The plugin file is a javascript module script that should have a class in the default export
- Currently supported methods in the class: name (string), load, start, stop, unload (functions)
- The class can be extended from the Patch class to add automatic patching of variables and functions
- Here are some of the plugins I made: https://github.com/KatieFrogs/taiko-web-plugins
2022-02-11 17:28:22 +03:00
LoveEevee
b42b246a99 CustomSongs: Restore custom song list after reload
Uses the File System Access API supported in some browsers to keep the custom song list between sessions, restoring it back even when the page was closed.
2021-05-27 20:23:19 +03:00
LoveEevee
4f66959e9c Use separate js and wasm files for oggmented
Source: https://github.com/LoveEevee/oggmented
2020-11-09 07:08:03 +03:00
LoveEevee
dec0e55eb7 Assets: Convert to ogg
- Uses oggmented library to add ogg support to iOS
- Adds support for ogg songs on the server, configurable per song on the admin page
- Lets iOS users upload custom songs with gdrive when enabled
- Tweaked colour picker on account page to respond faster
- Fixed not being able to restart osu songs
2020-11-09 00:30:56 +03:00
LoveEevee
180ec58adb Changed look of song loading, fix custom game assets and song skins, fix auth error
- Change the way a selected song appears while it is loading the metadata
- Fix custom taikowebskin
- Fix importing custom game assets (local only)
- Get the oauth token again on auth error
2020-10-31 14:47:42 +03:00
LoveEevee
9aa7375287 Fix lyrics 2020-10-29 11:56:58 +03:00
LoveEevee
3fea149353 ImportSongs: Add Google Drive support
- Adds a new page for importing custom songs, where it is possible to pick a local folder (desktop only) or a Google Drive folder (desktop and Android)
  - This feature is disabled on iOS due to the lack of OGG audio support in the browser
- In order to not get rate limited, a TJA file is parsed for metadata only when the song is clicked in the song selection, rather than all at once at import time
- The instance maintainer will need to provide the API credentials in the config.py file to enable this feature
  - This requires a new project to be created at console.cloud.google.com
  - Drive API will have to be enabled
  - API and OAuth keys should be created
    - API key can be restricted to only have Google Drive and Google Picker APIs
    - OAuth Client ID should have Web Application type and JavaScript origins set
    - Editing the OAuth consent screen to have a name and icon is recommended
      - It is semi-required to submit the consent screen for verification as the permission to download all of the Drive files will be asked.
      - Note that the email of the maintainer is publicly visible on the consent screen
  - The project number can be found in the IAM & Admin settings page
2020-10-29 08:07:56 +03:00
Bui
f346e05312
Merge pull request #214 from MarNicGit/DynamicCategories
Dynamic categories
2020-05-09 17:24:23 +01:00
mnvdk
962adb1dc7 song_Skin should be song_skin, info_Fill should be info_fill 2020-04-27 02:33:14 +02:00
mnvdk
8fe06bfb9d renamed infoFill to info_Fill on in the database 2020-04-27 02:22:18 +02:00
mnvdk
800e136f91 Undid storing categories in strings.js, instead using the localization method in songselect.js. category info gets passed down to view.js. 2020-04-27 02:12:09 +02:00
mnvdk
f66ef6417f Moved categories to its own object instead of allstrings and adjusted code in the other files in order to maintain multilangual support 2020-04-26 16:48:18 +02:00
mnvdk
dca4948548 reintroduced infoFill, moved infoFill to mongo 2020-04-17 18:35:39 +02:00
LoveEevee
f83fab41e3 Bug fixes
- Fixed touch multiplayer drum being too small and nameplate drawing on top of it
- Fixed #lyric lines being forced to be lowercase and appearing too early
- Fixed exiting session while someone else is using netplay sending you to difficulty selection of the song that the netplay person has selected
- Fixed ≠MM title on song select not having the first symbol rotated
- Fixed nameplate cache in song select and in game not getting cleared
- Increased ping timeout for multiplayer

Admin page fixes
- Add meta viewport tag so that the admin pages can be opened on mobile
- On song list, songs that are not enabled are now marked
- Disable tabbing through diverge notes checkboxes in courses when adding or editing a song
- Add Hash to song adding
- Display an error if a local chart file has not been found while calculating hash
- If calculating the hash results in an error, do not discard all other changes
2020-04-17 04:53:53 +03:00
mnvdk
d02bfa8426 tiny bit of cleanup 2020-04-16 21:55:55 +02:00
mnvdk
2c4fdab4f9 removed hardcoded categories from stringsjs and moved the language block to mongo 2020-04-16 21:39:23 +02:00
mnvdk
988c4cc734 Removed more hardcoded instances of categories 2020-04-16 00:40:13 +02:00
mnvdk
e1411bcd0d preload all category images in loader.js 2020-04-15 22:33:49 +02:00
mnvdk
85d6e70ff6 Dynamic songskin loading for categories 2020-04-14 23:01:47 +02:00
LoveEevee
cd288d4fa4 Add custom Don
- Registered users can customise the colour of their Don and it will appear for other players
- Bug fixes:
  - Add lyrics checkbox to admin page
  - 2P shows above "creative" or "with lyrics" labels
  - Prevent accidental alt and menu keyboard presses from triggering browser menus
  - Fixed mouse hitboxes on difficulty selection
  - Clean cached sounds and lyrics when another song is loading
  - Fixed debug jumping to the top-left of the screen when hidden
  - Fixed server volume not being applied to songs
2020-04-04 16:48:58 +03:00
LoveEevee
2232c36182 Request a csrftoken before every request 2020-03-17 07:20:03 +03:00
LoveEevee
33b9b206a7 Improve the loading screen error message
- Fix subtitle if the previously selected song had the same title
2020-03-16 12:54:21 +03:00
LoveEevee
7f1bb9d357 Multiplayer improvements and reupload score on error
- In multiplayer you will play at the bottom if you joined second
- Add a dialog to song select that score has not been saved
- Uploads the score when logged in again
- Translate error messages from the server
2020-03-14 07:50:04 +03:00
Bui
62aca02aab bugfixes 2020-03-13 03:19:26 +00:00
LoveEevee
2af924a985 Add everything for accounts 2020-03-13 05:34:54 +03:00
LoveEevee
4d370762f8 Use Font Loading API instead of FontDetect 2020-03-09 16:05:13 +03:00
LoveEevee
9248a52194 Lots of bug fixes
- Toggling autoplay checkbox in debug now disallows saving the score
- Fix crown of the song that was previously selected rendering above the genre
- Outline of empty crowns is slightly darker
- Fix rendering when there is a crown on oni and no crown on ura
- Fix crowns overlapping the netplay 2P icon
- Fix gauge in latency calibration
- Fix debug to work on mobile, can be toggled with ctrl+alt+`;` on hacker's keyboard with permanent notification
- Fix being unable to scroll the settings list without toggling something
- Handle KeyboardInterrupt in server.py
- Fix category jumping not working in session mode
- Fix mouse cursor being hidden at results screen in session mode
- Make "Issues" on the about screen and "An error occurred, please refresh" on loading screens translateable
- CanvasCache uses integer increments for comparison instead of Date.now()
- For imported songs, exclude song titles from genre comparisons if they appear in the name of the folder
- Fix tja files with spaces in the notation
- Fix second player's score on the results screen to have upside down appearance
- Add fixed chinese strings
2020-03-09 15:36:57 +03:00
LoveEevee
1759772831 ScoreStorage: Use hashes instead of song titles 2020-03-07 04:48:30 +03:00
LoveEevee
21259abdda Scoresheet: Save results to localstorage 2020-03-06 19:02:40 +03:00
LoveEevee
879186c313 Add keyboard and gamepad settings 2019-04-05 22:53:51 +03:00
LoveEevee
cb64777012 SongSelect: Add Settings
- Resolution can be adjusted, as well as touch drum animation on mobile
- A translation text file "songtitle.txt" can be imported
  - Titles and translated titles are each on their own line, if a line begins with a language code, it will translate the song title that is above
  - An example file can be found here: https://gist.github.com/LoveEevee/65fe66f0b54c0536f96fd2f4862984d4
- The page will fail to load if version on the page does not match /api/config
- Disabled Tab key while playing, before hitting it would focus the version link
- Fix forcing branches in debug not working
- Fixed not being able to click on songs that do not have oni but have ura
- Fix unexpected category being used as a fallback
- Fix verticalText and layeredText not accepting anything except strings
2019-04-04 23:40:11 +03:00
LoveEevee
61a5d6d496 SoundBuffer: Set song volume
- Requires a new column in the database after preview: `volume` REAL
- The value is a volume multiplier, if the value is set to null or 1 there will be no change
- The volume can be set in debugger
- Imported TJA files are now read from disk every time the song is played, freeing some memory and making it easier to create charts
- Correctly parse TJA files with alphabet notes, added "A" and "B" notes, which appear as DON (Big) and KA (Big) respectively
2019-03-16 00:34:48 +03:00
LoveEevee
e677f2f032 Change some events, fix p2 sending gameend twice
- Fixed gameend being sent twice in p2
- Add `ready`, `loader-error`, and `song-select-random` events
- Fixed `session-start` not firing when invited, added event detail
- Fixed `language-change` being fired at startup
- Fixed `version-link` and `about-link` firing twice
- "#song=" will fire `song-select-difficulty`
- Removed `key-events` and `scoresheet-player2`, merged with `scoresheet` and made it more detailed
2019-02-15 01:10:34 +03:00
LoveEevee
adc45cb652 Custom scripting, #song=, translations
- A song can be linked directly by adding "#song=<id>" to the url, replace `<id>` with the id in the database, after loading it jumps immediately jumps to the difficulty selection
- Added tutorial translations
- Fixed song preview not playing
- Use text fallback for the logo when there are no vectors
- Increased combo cache by 1 pixel
- A custom javascript file can be loaded from config.json by defining "custom_js" value
- Added lots of events to help writing custom js files: `version-link, title-screen, language-change, song-select, song-select-move, song-select-difficulty, song-select-back, about, about-link, tutorial, import-songs, import-songs-default, session, session-start, session-end, debug, load-song, load-song-player2, load-song-unfocused, load-song-cancel, load-song-error, game-start, key-events, p2-game-end, p2-disconnected, p2-abandoned, pause, unpause, pause-restart, pause-song-select, game-lag, scoresheet, scoresheet-player2`
- Event syntax example:
```js
addEventListener("game-start", event => {
	console.log("game-start", event.detail)
})
```
2019-02-14 12:32:45 +03:00
Bui
1fffb5fc13 remove ogg test 2019-02-06 19:55:13 +00:00
Bui
4be9334be3 solidify default git repo 2019-02-06 18:49:25 +00:00
Bui
b3ed655e44 Loader: Inject assets CSS 2019-02-06 18:27:31 +00:00
LoveEevee
da40fd58ff ImportSongs: Custom assets 2019-02-03 15:04:25 +03:00
LoveEevee
32477f2129 Add query string to vectors 2019-01-29 19:23:04 +03:00
LoveEevee
4fdd98789e CanvasDraw: Move vectors to assets 2019-01-29 19:10:56 +03:00
LoveEevee
3398791afe Controller: Separate game and view loops 2019-01-16 15:33:42 +03:00
LoveEevee
5f4048315d Miscellaneous bug fixes 2018-12-13 12:18:52 +03:00
Bui
ac23292fe7 change version var name 2018-12-05 21:55:28 +00:00