# Admin Window

# Admin Window

Since version 3.1.0 one admin window in the KyuubiSoft "Goldfiligran" look replaces the old admin panel. Every change is a **draft** until you press **Save**. Info Hub still runs without KyuubiSoft Core.

:::note
The admin window is new in 3.1.0 and has not been tested in game yet.
:::

## Opening the window

| Way in | Notes |
|--------|-------|
| `/ksinfoadmin panel` | Player only |
| The Info Hub tile in the KyuubiSoft hub `/ksadmin` | Needs KyuubiSoft Core; the hub itself needs `ks.admin` |
| The NPC `showcase_infohub` | Needs KyuubiSoft Core |

Every way in, and every save, undo and reload, needs **`ks.info.admin`** (or the old `infohub.admin`). On a showcase server visitors can browse read-only from every entry. See [Permissions](./permissions).

---

## Layout

- **Navigation** in three groups with counters:
  - **Content:** News, Rules, FAQ, Pages, Tiles, Team, Server & links
  - **Commands:** Commands
  - **Settings:** Book & sections, Join, General
- **Global search** over all content and settings, with **Go to**.
- **Footer** with the draft: the list of changes (each one can be reverted), **Check**, **Discard** and **Save**. Closing with unsaved changes asks first; Esc keeps the draft for 30 minutes (a disconnect drops it).

---

## Saving

- **Errors block saving** and open the check view. Warnings do not block.
- Saving runs in the background: rights and checks first. If someone else (another admin, the web editor or a hand edit) changed the same files in the meantime, the changes are **merged per object**; real conflicts ask "Save anyway?".
- A **backup set** is made (the last 20 are kept), files are written atomically (unknown keys stay), and a failed write or reload rolls back. Then the content reloads and applies at once.
- **Undo last save** loads a backup as a new draft.
- Reloads (`/ksinfoadmin reload`, Core's reload, the web editor) wait for a running save.

---

## Content boards

All boards share one list / form layout with search, filters, duplicate, reorder, rename with "Used in" (references move along), delete with restore, and **Open in book** (shows the saved version).

| Board | What you edit |
|-------|---------------|
| **News** | Type, date, expiry (validated), pinned, a target in the book with link label, permission, priority; an "expired" filter. News ids never change, so the read state of players is kept |
| **Rules** | Categories and rules with severity. An acknowledgement card shows "n changed · n new · n removed". **Correction only – no re-acknowledgement** (off by default) is for typo fixes; new, removed or renamed rules always need re-acknowledgement |
| **FAQ** | Categories and questions with tags and "See also" links |
| **Pages** | All page types with a live preview of the text, commands and aliases with a "restart needed" hint |
| **Tiles** | One list in book order with the place each tile gets, the reason for hidden tiles and a warning at the limit of 10 rows of 4 tiles per side. Console tiles need `ks.core.admin.dialog.console` |
| **Team** | Ranks with colour preview, members with an online player picker |
| **Server & links** | Name, tagline, address, version, description, statistics (incl. total players and custom values), links |

## Commands board

Categories with a command and plugin picker, display, execution (blocklist, allowlist, parameters), hidden commands and custom commands.

## Settings boards

| Board | Contains |
|-------|----------|
| **Book & sections** | All 6 sections (incl. news), hub title, main command, banner, search, "Your books" |
| **Join** | Welcome message lines per language with a chat preview, the Info Book item (with item picker), first join |
| **General** | A button to `/kssettings` for the server language, permission nodes, file status with "Replace with draft", backups, **Reload from disk** |

Fields that the book never reads are hidden and stay unchanged in the files.

---

## Texts per language

Every text field has **language chips** (translated / missing / outdated):

- A missing language shows the text players see today in grey and is never saved.
- An outdated translation (the base text changed) is flagged instead of deleted.

## Check view

About 50 rules, each with **Go to**. Examples: empty or duplicate ids, unknown targets, members without name or with an unknown rank, command name clashes, wrong date format, the tile limit, console tiles, broken files, "restart needed", outdated translations.

---

## Tips

1. **Open in book** shows what players see after you saved.
2. If you edited files by hand, use **Reload from disk** (General) or `/ksinfoadmin reload`.
3. A new or renamed command name still needs a server restart; the window tells you.