Add CS2-SimpleAdmin documentation site

Introduces a new documentation site for CS2-SimpleAdmin using Docusaurus, including developer API references, tutorials, user guides, and module documentation. Removes the CleanModule example and updates FunCommands and ExampleModule. Also updates main plugin and API files to support new documentation and module structure.
This commit is contained in:
Dawid Bepierszcz
2025-10-20 01:27:01 +02:00
parent 21a5de6b3d
commit b0d8696756
74 changed files with 32732 additions and 279 deletions

View File

@@ -0,0 +1,48 @@
using CounterStrikeSharp.API.Core;
namespace CS2_SimpleAdminApi;
/// <summary>
/// Provides contextual information about a menu to its factory function.
/// This eliminates the need to duplicate category IDs and menu titles when creating menus.
/// </summary>
public class MenuContext
{
/// <summary>
/// The category ID this menu belongs to (e.g., "fun", "players").
/// Used for automatic "Back" button navigation.
/// </summary>
public string CategoryId { get; init; } = string.Empty;
/// <summary>
/// The unique identifier for this menu within its category.
/// </summary>
public string MenuId { get; init; } = string.Empty;
/// <summary>
/// The display title of the menu (from registration).
/// </summary>
public string MenuTitle { get; init; } = string.Empty;
/// <summary>
/// The permission required to access this menu (if any).
/// </summary>
public string? Permission { get; init; }
/// <summary>
/// The command name for permission override checking (if any).
/// </summary>
public string? CommandName { get; init; }
/// <summary>
/// Creates a new MenuContext with the specified values.
/// </summary>
public MenuContext(string categoryId, string menuId, string menuTitle, string? permission = null, string? commandName = null)
{
CategoryId = categoryId;
MenuId = menuId;
MenuTitle = menuTitle;
Permission = permission;
CommandName = commandName;
}
}