1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:07:38 +08:00
Commit Graph

3151 Commits

Author SHA1 Message Date
Dean Herbert
7229ae83ea
Adjust sizing and distribution of timestamp and username 2024-07-30 18:03:56 +09:00
Dean Herbert
6670f79258
Reduce overall size of chat text 2024-07-30 18:03:56 +09:00
Bartłomiej Dach
48e38bd467
Merge pull request #29186 from peppy/fix-status-config
Fix online status not persisting correctly
2024-07-29 16:11:05 +02:00
Bartłomiej Dach
8b96b0b9e4
Add logging when starting and stopping watch operations in online metadata client
For future use with debugging issues like
https://github.com/ppy/osu/issues/29138, hopefully.
2024-07-29 13:19:01 +02:00
Dean Herbert
11265538c4
Reset online status on logout 2024-07-29 20:06:30 +09:00
Dean Herbert
c142adf926
Fix online status not persisting correctly
Regressed at some point.

I don't see much reason not to link the bindable directly with config.
It seems to work as you'd expect. Tested with logout (resets to
"Online") and connection failure (persists).

Closes https://github.com/ppy/osu/issues/29173.
2024-07-29 20:06:27 +09:00
Dean Herbert
19affa7062
Rename new property to match true usage (per item)
Also document a bit more.
2024-07-26 20:45:13 +09:00
Dean Herbert
1ad0b31217
Add required pieces to MultiplayerPlaylistItemStats for total score tracking 2024-07-26 19:04:04 +09:00
Bartłomiej Dach
3bb30d7ff9
Fix several missing properties on MultiplayerScore
You wouldn't think this would be an actual thing that can happen to us,
but it is. The most important one by far is `MaximumStatistics`; that
is the root cause behind why stuff like spinner ticks or slider tails
wasn't showing.

On a better day we should probably do cleanup to unify these models
better, but today is not that day.
2024-07-25 13:15:45 +02:00
Bartłomiej Dach
dd8be62d07
Merge pull request #28849 from frenzibyte/custom-profile-colour
Add custom hue support to user profile overlay
2024-07-22 09:41:32 +02:00
Salman Ahmed
102da0f98c Remove incorrect [CanBeNull] attribute 2024-07-17 23:58:38 +03:00
Bartłomiej Dach
2a601ce961
Also send version hash header under more accepted convention of name 2024-07-17 16:21:46 +02:00
Bartłomiej Dach
3006bae0d8
Send client-generated session GUID for identification purposes
This is the first half of a change that *may* fix
https://github.com/ppy/osu/issues/26338 (it definitely fixes *one case*
where the issue happens, but I'm not sure if it will cover all of them).

As described in the issue thread, using the `jti` claim from the JWT
used for authorisation seemed like a decent idea. However, upon closer
inspection the scheme falls over badly in a specific scenario where:

1. A client instance connects to spectator server using JWT A.

2. At some point, JWT A expires, and is silently rotated by the game in
   exchange for JWT B.

   The spectator server knows nothing of this, and continues to only
   track JWT A, including the old `jti` claim in said JWT.

3. At some later point, the client's connection to one of the spectator
   server hubs drops out. A reconnection is automatically attempted,
   *but* it is attempted using JWT B.

   The spectator server was not aware of JWT B until now, and said JWT
   has a different `jti` claim than the old one, so to the spectator
   server, it looks like a completely different client connecting, which
   boots the user out of their account.

This PR adds a per-session GUID which is sent in a HTTP header on every
connection attempt to spectator server. This GUID will be used instead
of the `jti` claim in JWTs as a persistent identifier of a single user's
single lazer session, which bypasses the failure scenario described
above.

I don't think any stronger primitive than this is required. As far as I
can tell this is as strong a protection as the JWT was (which is to say,
not *very* strong), and doing this removes a lot of weird complexity
that would be otherwise incurred by attempting to have client ferry all
of its newly issued JWTs to the server so that it can be aware of them.
2024-07-17 15:56:41 +02:00
Salman Ahmed
3eaac11b44 Add profile hue attribute to API model 2024-07-13 11:26:45 +03:00
Dean Herbert
f0ad7a97cb
Merge branch 'master' into daily-challenge/better-results 2024-07-04 23:56:09 +09:00
Dean Herbert
aa72c09c3a
Merge pull request #28659 from bdach/daily-challenge/integration
Use room watching functionality to receive realtime daily challenge updates
2024-07-04 23:55:46 +09:00
Bartłomiej Dach
b29e535ca5
Add results screen for displaying arbitrary daily challenge scores
At this point its primary usage is the daily challenge event feed, but
the leaderboard will be using this too shortly.

Because the playlists results screen that exists in `master` is
hard-coupled to showing the *local user's* best result on a given
playlist by way of hard-coupling itself to the relevant API request,
allowing show of *arbitrary* score by ID requires a whole bunch of
subclassery as things stand. Oh well.

Class naming is... best effort, due to the above.
2024-07-04 13:45:24 +02:00
Dean Herbert
5f56ed6872
Merge branch 'master' into navigate-to-timestamp 2024-07-03 20:42:32 +09:00
Bartłomiej Dach
df97215298
Use room watching functionality to receive realtime daily challenge updates 2024-06-28 13:35:16 +02:00
Bartłomiej Dach
d6e7781be1
Add client/server models for allowing clients to receive realtime playlist updates 2024-06-27 11:32:18 +02:00
Bartłomiej Dach
0d2a47167c
Fix crash on calculating playlist duration when rate-changing mods are present
Regressed in https://github.com/ppy/osu/pull/28399.

To reproduce, enter a playlist that has an item with a rate-changing mod
(rather than create it yourself).

This is happening because `APIRuleset` has `CreateInstance()`
unimplemented:

    b4cefe0cc2/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs (L159)

and only triggers when the playlist items in question originate from
web.

This is why it is bad to have interface implementations throw outside of
maybe mock implementations for tests. `CreateInstance()` is a scourge
elsewhere in general, we need way less of it in the codebase (because
while convenient, it's also problematic to implement in online contexts,
and also expensive because reflection).
2024-06-25 11:28:10 +02:00
Bartłomiej Dach
44b9a06639
Allow more lenient parsing of incoming timestamps 2024-06-18 13:13:50 +02:00
Bartłomiej Dach
6fb0cabf36
Add start date to Room 2024-06-12 11:43:18 +02:00
Bartłomiej Dach
f135a9a923
Make SelectedItem externally mutable
Not being able to externally mutate this was making reuse in new daily
challenge screen unnecessarily arduous.
2024-06-10 12:44:38 +02:00
Salman Ahmed
6f729be573 Merge branch 'master' into LeaderBoardScore_clean 2024-06-07 22:42:49 +03:00
Dean Herbert
9c6e707f00
Adjust transitions 2024-06-07 17:04:16 +08:00
Dean Herbert
366ef64a2c
Apply NRT to UpdateableRank 2024-06-07 16:54:12 +08:00
Dean Herbert
7cbe93efc3
Refactor latest changes to avoid unnecessary call when mods not present 2024-06-07 10:37:27 +08:00
Xesquim
6e3bea938e Instancing a Ruleset only when it's necessary to 2024-06-06 13:26:52 -03:00
Dean Herbert
dd3f4bcdab
Fix code quality and null handling 2024-06-07 00:01:50 +08:00
Xesquim
860afb8123 Creating method in ModUtils to calculate the rate for the song 2024-06-06 10:06:07 -03:00
Xesquim
7dd18a84f6 Fixing the GetTotalDuration in PlaylistExtesions 2024-06-05 12:25:33 -03:00
Dean Herbert
5dfeaa3c4a
Move dialog strings to more common class name 2024-05-31 11:46:32 +09:00
Dean Herbert
e52f524ea2
Use common header text 2024-05-31 11:44:53 +09:00
Dean Herbert
474ff5b99d
Use question mark for more grammatical correctness
Co-authored-by: Joseph Madamba <madamba.joehu@outlook.com>
2024-05-31 10:46:30 +09:00
Dean Herbert
87a331fdde
Improve text on external link warning dialog 2024-05-31 02:44:45 +09:00
Dean Herbert
f3bc944ac8
Remove using statement 2024-05-30 17:45:32 +09:00
Dean Herbert
36d7775032
Fix typo in IAPIProvider xmldoc 2024-05-30 17:38:05 +09:00
Dean Herbert
2f2bc8e52e
Avoid ChatAckRequest failures flooding console in OsuGameTestScenes 2024-05-30 17:37:55 +09:00
Bartłomiej Dach
ab01fa6d45
Add xmldoc to APIAccess.APIVersion 2024-05-29 14:10:07 +02:00
Bartłomiej Dach
cc13655617
Derive API response version from game version
(Or local date, in the case of non-deployed builds).

Came up when I was looking at https://github.com/ppy/osu-web/pull/11240
and found that we were still hardcoding this.

Thankfully, this *should not* cause issues, since there don't seem to be
any (documented or undocumented) API response version checks for
versions newer than 20220705 in osu-web master.

For clarity and possible debugging needs, the API response version is
also logged.
2024-05-29 14:10:01 +02:00
Dean Herbert
740a3377fa
Merge branch 'master' into LeaderBoardScore_clean 2024-05-27 17:18:41 +09:00
Salman Ahmed
2c18c10ac8 Move to SelectV2 namespace 2024-05-25 17:20:10 +03:00
Salman Ahmed
d395c85418 Adjust right content width based on scoring mode 2024-05-25 17:16:41 +03:00
Salman Ahmed
5955378004 Replace "X mods" text with a pill indicator 2024-05-25 16:11:24 +03:00
Salman Ahmed
35af518fdb Remove expanded/contracted states and limit to 5 mods
Also adjusts right content width to contain those 5 mods. Not sure how to handle the extra space in the score though...to be dealt with later.
2024-05-25 12:52:48 +03:00
Bartłomiej Dach
61a415fed2
Add client/server models & operations for "daily challenge" feature 2024-05-17 10:58:08 +02:00
Joseph Madamba
9b84d8ac2f Apply missed changes from old leaderboard score
See:
- d11e56b8bb
- 7d74d84e6c
- 07f9f5c6d8
2024-05-12 22:39:22 -07:00
Joseph Madamba
736e15ab26 Improve fluidity states 2024-05-12 22:21:50 -07:00
Joseph Madamba
e8967ff3c5 Lower username font size a bit 2024-05-10 22:14:41 -07:00