1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-06 18:44:06 +08:00

Improve supporter-only duration notice and fix max duration of non-supporter

See https://github.com/ppy/osu-web/blob/3c542292569b336c4dff38e2b52a823149ec1a81/.env.example#L230. Might have more duration options in the future.
This commit is contained in:
Joseph Madamba
2023-07-26 01:37:55 -07:00
Unverified
parent 30e0e00c52
commit 9d87ff2986
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -10,9 +10,9 @@ namespace osu.Game.Localisation
private const string prefix = @"osu.Game.Resources.Localisation.OnlinePlay";
/// <summary>
/// "This duration is only available for osu!supporters."
/// "Playlist durations longer than 2 weeks require an active osu!supporter tag."
/// </summary>
public static LocalisableString SupporterOnlyDurationNotice => new TranslatableString(getKey(@"supporter_only_duration_notice"), @"This duration is only available for osu!supporters.");
public static LocalisableString SupporterOnlyDurationNotice => new TranslatableString(getKey(@"supporter_only_duration_notice"), @"Playlist durations longer than 2 weeks require an active osu!supporter tag.");
private static string getKey(string key) => $@"{prefix}:{key}";
}
@@ -371,7 +371,7 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
private bool hasValidSettings => RoomID.Value == null && NameField.Text.Length > 0 && Playlist.Count > 0
&& hasValidDuration;
private bool hasValidDuration => DurationField.Current.Value < TimeSpan.FromDays(31) || localUser.Value.IsSupporter;
private bool hasValidDuration => DurationField.Current.Value <= TimeSpan.FromDays(14) || localUser.Value.IsSupporter;
private void apply()
{