mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat(PluginInstaller): implement AcceptsFeedback, FeedbackMessage
This commit is contained in:
parent
f30ebe5166
commit
785df95071
2 changed files with 22 additions and 2 deletions
|
|
@ -387,6 +387,11 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
{
|
||||
ImGui.Text(Locs.FeedbackModal_Text(this.feedbackPlugin.Name));
|
||||
|
||||
if (this.feedbackPlugin?.FeedbackMessage != null)
|
||||
{
|
||||
ImGui.TextWrapped(this.feedbackPlugin.FeedbackMessage);
|
||||
}
|
||||
|
||||
if (this.pluginListUpdatable.Any(
|
||||
up => up.InstalledPlugin.Manifest.InternalName == this.feedbackPlugin?.InternalName))
|
||||
{
|
||||
|
|
@ -1226,7 +1231,7 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
|
||||
this.DrawVisitRepoUrlButton(manifest.RepoUrl);
|
||||
|
||||
if (!manifest.SourceRepo.IsThirdParty)
|
||||
if (!manifest.SourceRepo.IsThirdParty && manifest.AcceptsFeedback)
|
||||
{
|
||||
this.DrawSendFeedbackButton(manifest);
|
||||
}
|
||||
|
|
@ -1401,7 +1406,7 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
ImGui.TextColored(ImGuiColors.DalamudGrey3, downloadText);
|
||||
|
||||
var isThirdParty = manifest.IsThirdParty;
|
||||
var canFeedback = !isThirdParty && !plugin.IsDev && plugin.Manifest.DalamudApiLevel == PluginManager.DalamudApiLevel;
|
||||
var canFeedback = !isThirdParty && !plugin.IsDev && plugin.Manifest.DalamudApiLevel == PluginManager.DalamudApiLevel && plugin.Manifest.AcceptsFeedback;
|
||||
|
||||
// Installed from
|
||||
if (plugin.IsDev)
|
||||
|
|
|
|||
|
|
@ -161,4 +161,19 @@ internal record PluginManifest
|
|||
/// Gets an URL for the plugin's icon.
|
||||
/// </summary>
|
||||
public string? IconUrl { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value that indicates whether or not this plugin accepts feedback.
|
||||
/// </summary>
|
||||
public bool AcceptsFeedback { get; init; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a message that is shown to users when sending feedback.
|
||||
/// </summary>
|
||||
public string? FeedbackMessage { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating the webhook URL feedback is sent to.
|
||||
/// </summary>
|
||||
public string? FeedbackWebhook { get; init; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue