* Added the button and manager * Minor cleanup * Reigstered to the wrong thing! * Unload UI * Address the review * First commit :) * Some cleanup * Added some comments and now the placehoder text goes away once you start typing * Some cleanup and better test command * Basic rate limiter class (Not finished) * Cleanup * Removed forgotten comment xD * Whitespace removal * Minor cleanup, cvar hours -> minutes * More minor tweaks * Don't cache timer and add examples to fields * Added CCvar for time between bug reports * Minor crash when restarting rounds fixed * It compiled on my computer! * Fix comment indents * Remove unecessary async, removed magic strings, simplfied sawmill to not use post inject * Make struct private * Simplfiy TryGetLongHeader * Changed list to enumerable * URI cleanup * Got rid of the queue, used a much better way! * Made the comments a little better and fix some issues with them * Added header consts * Maximum reports per round is now an error message * Time between reports is now in seconds * Change ordering * Change hotkey to O * only update window when its open * Split up validation * address review * Address a few issues * inheritance fix * API now doesn't keep track of requests, just uses the rate limited response from github * Rough idea of how channels would work * refactor: reorganized code, placed rate limiter into http-client-handler AND manager (usually only manager-one should work) * cleanup * Add user agent so api doesn't get mad * Better error logs * Cleanup * It now throws! * refactor: renaming, moved some methods, xml-doc cleanups * refactor: BugReportWindow formatted to convention, enforced 1 updates only 1 per sec * Add very basic licence info * Fixed the issues! * Set ccvar default to false * make the button better * fix test fail silly me * Adress the review! * refactor: cleanup of entry point code, binding server-side code with client-facing manager * Resolve the other issues and cleanup and stuff smile :) * not entity * fixes * Cleanup * Cleanup * forgor region * fixes * Split up function and more stuff * Better unsubs yaygit add -A * I pray... * Revert "I pray..." This reverts commit 9629fb4f1289c9009a03e4e4facd9ae975e6303e. * I think I have to add it in the pr * Revert "I think I have to add it in the pr" This reverts commit e185b42f570fe5f0f51e0e44761d7938e22e67f7. * Tweaks * Minor tweak to permissions --------- Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
65 lines
2.7 KiB
C#
65 lines
2.7 KiB
C#
using Robust.Shared.Configuration;
|
|
|
|
namespace Content.Shared.CCVar;
|
|
|
|
public sealed partial class CCVars
|
|
{
|
|
/// <summary>
|
|
/// Allow users to submit bug reports. Will enable a button on the hotbar. See <see cref="GithubEnabled" /> for
|
|
/// setting up the GitHub API!
|
|
/// </summary>
|
|
public static readonly CVarDef<bool> EnablePlayerBugReports =
|
|
CVarDef.Create("bug_reports.enable_player_bug_reports", false, CVar.SERVER | CVar.REPLICATED);
|
|
|
|
/// <summary>
|
|
/// Minimum playtime that players need to have played to submit bug reports.
|
|
/// </summary>
|
|
public static readonly CVarDef<int> MinimumPlaytimeInMinutesToEnableBugReports =
|
|
CVarDef.Create("bug_reports.minimum_playtime_in_minutes_to_enable_bug_reports", 120, CVar.SERVER | CVar.REPLICATED);
|
|
|
|
/// <summary>
|
|
/// Maximum number of bug reports a user can submit per round.
|
|
/// </summary>
|
|
public static readonly CVarDef<int> MaximumBugReportsPerRound =
|
|
CVarDef.Create("bug_reports.maximum_bug_reports_per_round", 5, CVar.SERVER | CVar.REPLICATED);
|
|
|
|
/// <summary>
|
|
/// Minimum time between bug reports.
|
|
/// </summary>
|
|
public static readonly CVarDef<int> MinimumSecondsBetweenBugReports =
|
|
CVarDef.Create("bug_reports.minimum_seconds_between_bug_reports", 120, CVar.SERVER | CVar.REPLICATED);
|
|
|
|
/// <summary>
|
|
/// Maximum length of a bug report title.
|
|
/// </summary>
|
|
public static readonly CVarDef<int> MaximumBugReportTitleLength =
|
|
CVarDef.Create("bug_reports.maximum_bug_report_title_length", 35, CVar.SERVER | CVar.REPLICATED);
|
|
|
|
/// <summary>
|
|
/// Minimum length of a bug report title.
|
|
/// </summary>
|
|
public static readonly CVarDef<int> MinimumBugReportTitleLength =
|
|
CVarDef.Create("bug_reports.minimum_bug_report_title_length", 10, CVar.SERVER | CVar.REPLICATED);
|
|
|
|
/// <summary>
|
|
/// Maximum length of a bug report description.
|
|
/// </summary>
|
|
public static readonly CVarDef<int> MaximumBugReportDescriptionLength =
|
|
CVarDef.Create("bug_reports.maximum_bug_report_description_length", 750, CVar.SERVER | CVar.REPLICATED);
|
|
|
|
/// <summary>
|
|
/// Minimum length of a bug report description.
|
|
/// </summary>
|
|
public static readonly CVarDef<int> MinimumBugReportDescriptionLength =
|
|
CVarDef.Create("bug_reports.minimum_bug_report_description_length", 10, CVar.SERVER | CVar.REPLICATED);
|
|
|
|
/// <summary>
|
|
/// List of tags that are added to the report. Separate each value with ",".
|
|
/// </summary>
|
|
/// <example>
|
|
/// IG report, Bug
|
|
/// </example>
|
|
public static readonly CVarDef<string> BugReportTags =
|
|
CVarDef.Create("bug_reports.tags", "IG bug report", CVar.SERVER | CVar.REPLICATED);
|
|
}
|