mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:02:55 +08:00
Make deletion confirmation content less confusing
This commit is contained in:
parent
a694f46253
commit
32444e0e30
@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
{
|
{
|
||||||
deleteBeatmapsButton.Enabled.Value = false;
|
deleteBeatmapsButton.Enabled.Value = false;
|
||||||
Task.Run(() => beatmaps.Delete()).ContinueWith(_ => Schedule(() => deleteBeatmapsButton.Enabled.Value = true));
|
Task.Run(() => beatmaps.Delete()).ContinueWith(_ => Schedule(() => deleteBeatmapsButton.Enabled.Value = true));
|
||||||
}));
|
}, DeleteConfirmationContentStrings.Beatmaps));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -40,11 +40,11 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
Text = MaintenanceSettingsStrings.DeleteAllBeatmapVideos,
|
Text = MaintenanceSettingsStrings.DeleteAllBeatmapVideos,
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
dialogOverlay?.Push(new MassVideoDeleteConfirmationDialog(() =>
|
dialogOverlay?.Push(new MassDeleteConfirmationDialog(() =>
|
||||||
{
|
{
|
||||||
deleteBeatmapVideosButton.Enabled.Value = false;
|
deleteBeatmapVideosButton.Enabled.Value = false;
|
||||||
Task.Run(beatmaps.DeleteAllVideos).ContinueWith(_ => Schedule(() => deleteBeatmapVideosButton.Enabled.Value = true));
|
Task.Run(beatmaps.DeleteAllVideos).ContinueWith(_ => Schedule(() => deleteBeatmapVideosButton.Enabled.Value = true));
|
||||||
}));
|
}, DeleteConfirmationContentStrings.BeatmapVideos));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
AddRange(new Drawable[]
|
AddRange(new Drawable[]
|
||||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
Text = MaintenanceSettingsStrings.DeleteAllCollections,
|
Text = MaintenanceSettingsStrings.DeleteAllCollections,
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
dialogOverlay?.Push(new MassDeleteConfirmationDialog(deleteAllCollections));
|
dialogOverlay?.Push(new MassDeleteConfirmationDialog(deleteAllCollections, DeleteConfirmationContentStrings.Collections));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -2,15 +2,16 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Overlays.Dialog;
|
using osu.Game.Overlays.Dialog;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
||||||
{
|
{
|
||||||
public partial class MassDeleteConfirmationDialog : DangerousActionDialog
|
public partial class MassDeleteConfirmationDialog : DangerousActionDialog
|
||||||
{
|
{
|
||||||
public MassDeleteConfirmationDialog(Action deleteAction)
|
public MassDeleteConfirmationDialog(Action deleteAction, LocalisableString deleteContent)
|
||||||
{
|
{
|
||||||
BodyText = "Everything?";
|
BodyText = deleteContent;
|
||||||
DangerousAction = deleteAction;
|
DangerousAction = deleteAction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|
||||||
{
|
|
||||||
public partial class MassVideoDeleteConfirmationDialog : MassDeleteConfirmationDialog
|
|
||||||
{
|
|
||||||
public MassVideoDeleteConfirmationDialog(Action deleteAction)
|
|
||||||
: base(deleteAction)
|
|
||||||
{
|
|
||||||
BodyText = "All beatmap videos? This cannot be undone!";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -42,7 +42,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
{
|
{
|
||||||
deleteAllButton.Enabled.Value = false;
|
deleteAllButton.Enabled.Value = false;
|
||||||
Task.Run(deleteAllModPresets).ContinueWith(t => Schedule(onAllModPresetsDeleted, t));
|
Task.Run(deleteAllModPresets).ContinueWith(t => Schedule(onAllModPresetsDeleted, t));
|
||||||
}));
|
}, DeleteConfirmationContentStrings.ModPresets));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
undeleteButton = new SettingsButton
|
undeleteButton = new SettingsButton
|
||||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
{
|
{
|
||||||
deleteScoresButton.Enabled.Value = false;
|
deleteScoresButton.Enabled.Value = false;
|
||||||
Task.Run(() => scores.Delete()).ContinueWith(_ => Schedule(() => deleteScoresButton.Enabled.Value = true));
|
Task.Run(() => scores.Delete()).ContinueWith(_ => Schedule(() => deleteScoresButton.Enabled.Value = true));
|
||||||
}));
|
}, DeleteConfirmationContentStrings.Scores));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
{
|
{
|
||||||
deleteSkinsButton.Enabled.Value = false;
|
deleteSkinsButton.Enabled.Value = false;
|
||||||
Task.Run(() => skins.Delete()).ContinueWith(_ => Schedule(() => deleteSkinsButton.Enabled.Value = true));
|
Task.Run(() => skins.Delete()).ContinueWith(_ => Schedule(() => deleteSkinsButton.Enabled.Value = true));
|
||||||
}));
|
}, DeleteConfirmationContentStrings.Skins));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user