Skip to content

Commit 18132fb

Browse files
authored
Merge pull request #6 from SunriseCommunity/feat/add-ux-improvements
2 parents 49ae1e2 + c97ad1b commit 18132fb

8 files changed

Lines changed: 107 additions & 62 deletions

File tree

astro.config.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
import { defineConfig } from 'astro/config';
33
import starlight from '@astrojs/starlight';
44
import mermaid from 'astro-mermaid';
5-
import starlightThemeRapide from 'starlight-theme-rapide'
5+
import starlightThemeRapide from 'starlight-theme-rapide';
6+
import starlightImageZoom from 'starlight-image-zoom';
7+
import starlightScrollToTop from 'starlight-scroll-to-top';
8+
69

710
// https://astro.build/config
811
export default defineConfig({
@@ -50,7 +53,8 @@ export default defineConfig({
5053
autogenerate: { directory: 'deprecated' },
5154
},
5255
],
53-
plugins: [starlightThemeRapide()],
56+
description: 'Documentation for the Sunrise osu! server project, including setup guides and configuration options.',
57+
plugins: [starlightThemeRapide(), starlightImageZoom(), starlightScrollToTop()],
5458
customCss: [
5559
'./src/styles/custom.css'
5660
],

bun.lock

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
"astro-mermaid": "^1.3.1",
1717
"mermaid": "^11.12.2",
1818
"sharp": "^0.34.2",
19+
"starlight-image-zoom": "^0.13.2",
20+
"starlight-scroll-to-top": "^0.4.0",
1921
"starlight-theme-rapide": "^0.5.2"
2022
}
2123
}

src/content/docs/deprecated/enchanced-configuration.mdx

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ sidebar:
88
variant: caution
99
---
1010

11+
import { Steps } from '@astrojs/starlight/components';
12+
import { Aside } from '@astrojs/starlight/components';
13+
1114
This section will cover enhanced configuration of the server, which were previously not possible with the admin panel.
1215

1316
## Update your own privileges (Using direct database change)
@@ -16,6 +19,7 @@ Before we can access the admin panel, we need to update our own privileges. This
1619

1720
For the sake of simplicity, we will use the [DBeaver](https://dbeaver.io/) database management tool, but you can use any other tool that supports MySQL databases.
1821

22+
<Steps>
1923
1. Open DBeaver.
2024
2. Connect to your database following the instructions below
2125
:::note
@@ -29,22 +33,23 @@ For the sake of simplicity, we will use the [DBeaver](https://dbeaver.io/) datab
2933

3034
3. Open the `Database/sunrise/user` table.
3135
4. Find your user in the list, and double-click on it's `Privilege` value.
32-
5. Update it using the following table:
36+
5. Update it to the new value depending on the privileges you want to have. For example, to have admin privileges, set it to `8`.
37+
<Aside title="Privilege Levels and how to calculate them">
38+
To calculate the privilege level, you should sum the values of the privileges you want to grant.
3339

34-
:::note Privilege Levels and how to calculate them
35-
To calculate the privilege level, you should sum the values of the privileges you want to grant.
40+
Current privileges are:
3641

37-
Current privileges are:
42+
- `0` - User
43+
- `1` - Supporter
44+
- `2` - Bat (Beatmap Approval Team)
45+
- `8` - Administrator
46+
- `16` - Developer
47+
- `512` - Super User (Can use server maintenance commands)
3848

39-
- `0` - User
40-
- `1` - Supporter
41-
- `2` - Bat (Beatmap Approval Team)
42-
- `8` - Administrator
43-
- `16` - Developer
44-
- `512` - Super User (Can use server maintenance commands)
49+
For example, if you want to grant Bat and Administrator privileges, you would sum `2` (Bat) and `8` (Administrator), resulting in `10`.
4550

46-
For example, if you want to grant Bat and Administrator privileges, you would sum `2` (Bat) and `8` (Administrator), resulting in `10`.
47-
:::
51+
</Aside>
4852

4953
6. Click on the `Apply cell changes` button (or press `Ctrl + S`).
50-
7. Changes will be applied during a minute or so, and you will be able to access the admin panel.
54+
7. Changes will be applied during a minute or so, and you will be able to access the admin panel.
55+
</Steps>

src/content/docs/getting-started/configuration.mdx

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebar:
44
order: 3
55
---
66

7+
import { Steps } from '@astrojs/starlight/components';
8+
79
This section will cover basic configuration of the server.
810

911
## General Configuration
@@ -28,13 +30,15 @@ Open the `Sunset/app/i18n.config.json` file and update the following values:
2830

2931
##### Change server's logo
3032

33+
<Steps>
3134
1. Use any favicon generator, use [any search engine](https://www.google.com/search?q=create+favicon+for+website) to find one.
32-
- For simplicity, we will use [realfavicongenerator.net]( https://realfavicongenerator.net/) in this guide.
35+
- For simplicity, we will use [realfavicongenerator.net]( https://realfavicongenerator.net/) in this guide.
3336
2. Upload your logo image (PNG, JPG, SVG, etc.) and click the "Generate" button.
3437
3. Click `Next` at the bottom of the page.
3538
4. Select `Next.js` and download app and public files.
36-
![Favicon Generator](../../../assets/img/favicon-gen.png)
39+
![Favicon Generator](../../../assets/img/favicon-gen.png)
3740
5. Replace files in the `Sunset/app` and `Sunset/public` directories with the downloaded files following the website instructions.
41+
</Steps>
3842

3943
##### Change server's assets
4044

@@ -44,12 +48,14 @@ For example, to change the front page mascot image, you can replace `Sunset/publ
4448

4549
##### Change the website's colors
4650

51+
<Steps>
4752
1. Use any Tailwind v3 ShadCN UI theme generator, use [any search engine](https://www.google.com/search?q=tailwind+css+v3+shadcn+cn+ui+theme+generator) to find one.
48-
- For simplicity, we will use [tweakcn.com](https://tweakcn.com/) in this guide.
53+
- For simplicity, we will use [tweakcn.com](https://tweakcn.com/) in this guide.
4954
2. Select or manually customize the theme you want.
5055
3. Click on the `Code` tab and select `Tailwind v3` and `hsl` options.
5156
4. Press the `Copy` button to copy the code.
5257
5. Open the `Sunset/app/style.css` file and replace the content with the copied code.
58+
</Steps>
5359

5460
#### Sunrise (osu! server) changes
5561

@@ -335,11 +341,18 @@ BANCHO_CLIENT_SECRET=your_client_secret
335341

336342
You can get the credentials by registering your application on the [osu! API](https://osu.ppy.sh/home/account/edit).
337343

338-
![1](../../../assets/img/bancho-1.png)
344+
<Steps>
345+
1. Go to the [osu! API](https://osu.ppy.sh/home/account/edit) page and find the `OAuth` section.
346+
![1](../../../assets/img/bancho-1.png)
347+
348+
2. Click on the `New OAuth Application` button or press `Edit` if you already have an application created.
349+
![2](../../../assets/img/bancho-2.png)
350+
- If you are creating a new application, fill the `Application Name` and `Application Callback URLs` fields with any value, as they are not used by the server.
339351

340-
![2](../../../assets/img/bancho-2.png)
352+
3. Copy the `Client ID` and `Client Secret` values.
353+
![3](../../../assets/img/bancho-3.png)
354+
</Steps>
341355

342-
![3](../../../assets/img/bancho-3.png)
343356

344357
After that, don't forget to restart the stack.
345358

src/content/docs/getting-started/faq.mdx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebar:
44
order: 4
55
---
66

7+
import { Steps } from '@astrojs/starlight/components';
8+
79
This section will cover some of the most common questions about Sunrise, its features, and some troubleshooting tips.
810

911
## How do I set up the server?
@@ -148,19 +150,21 @@ This will update all components to the latest version.
148150

149151
To update the server, you can follow these steps for all components you wish to update:
150152

153+
<Steps>
151154
1. Stop the server if it's running.
152155
2. Pull the latest changes from the GitHub repository.
153156

154-
```bash
155-
git fetch
156-
git pull
157-
```
157+
```bash
158+
git fetch
159+
git pull
160+
```
158161

159162
3. Rebuild the component using the docker compose command:
160163

161-
```bash
162-
docker compose -f docker-compose.yml up -d --build --force-recreate
163-
```
164+
```bash
165+
docker compose -f docker-compose.yml up -d --build --force-recreate
166+
```
167+
</Steps>
164168

165169
This should update all components to the latest version.
166170

src/content/docs/upgrading/migration-to-solar-system-from-manual-install.mdx

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebar:
44
order: 2
55
---
66

7+
import { Steps } from '@astrojs/starlight/components';
8+
79
![Migration to Solar System from Manual Install](../../../assets/img/prefer_solar_system.png)
810

911
## Introduction
@@ -25,28 +27,31 @@ Make sure to create a backup of the Sunrise using `!backupdatabase` command in-g
2527
We are not responsible for any data loss or corruption that may occur during the migration. Please make sure to create backups of all databases before proceeding with the migration.
2628
:::
2729

30+
<Steps>
31+
2832
1. **Stop the Server**: Ensure that Sunrise/Observatory/Sunshine containers are not running before making any changes. (Leave databases containers running.)
2933

3034
2. **Clone the Solar System repository**: Clone the [Solar System](https://github.com/SunriseCommunity/Solar-System) repository with submodules.
3135

32-
```console
33-
git clone --recursive https://github.com/SunriseCommunity/Solar-System.git
34-
cd Solar-System
35-
```
36+
```console
37+
git clone --recursive https://github.com/SunriseCommunity/Solar-System.git
38+
cd Solar-System
39+
```
3640

3741
3. **Copy the configuration files**: Copy the configuration files from your manual installation to the Solar System repository.
3842

39-
```console
40-
cp .env.example .env
41-
cp Sunrise.Config.Production.json.example Sunrise.Config.Production.json
42-
```
43+
```console
44+
cp .env.example .env
45+
cp Sunrise.Config.Production.json.example Sunrise.Config.Production.json
46+
```
4347

4448
4. **Fill the configuration files**: Fill the configuration files with your previous configuration values.
4549

46-
For example, if you were using `appsettings.Production.json` file, you can copy the values from it to the `Sunrise.Config.Production.json` file.
47-
48-
For the `.env` file, each value has a prefix of the component it belongs to. For example, `SUNRISE_` prefix is for Sunrise, `OBSERVATORY_` prefix is for Observatory, `SUNSHINE_` prefix is for Sunshine.
50+
For example, if you were using `appsettings.Production.json` file, you can copy the values from it to the `Sunrise.Config.Production.json` file.
51+
52+
For the `.env` file, each value has a prefix of the component it belongs to. For example, `SUNRISE_` prefix is for Sunrise, `OBSERVATORY_` prefix is for Observatory, `SUNSHINE_` prefix is for Sunshine.
4953

54+
</Steps>
5055

5156
### Migrating data from sunrise database
5257

src/content/docs/upgrading/upgrade-to-dot-env-variables.mdx

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ sidebar:
44
order: 2
55
---
66

7+
import { Steps } from '@astrojs/starlight/components';
8+
79
## Introduction
810

911
Starting from January 6 2026, Sunrise has transitioned to using `.env` files for configuration management.
@@ -24,50 +26,54 @@ This is not a requirement, but it is highly recommended to back up your existing
2426
To do so, run `!backupdatabase` Bancho command in-game to back up your database. After it's done, continue with this guide.
2527
:::
2628

29+
<Steps>
30+
2731
1. **Stop the Server**: Ensure that your Sunrise server is not running before making any changes.
2832

29-
If you are running the server using Docker Compose:
33+
If you are running the server using Docker Compose:
3034

31-
```bash
32-
docker compose -f docker-compose.yml down
33-
```
35+
```bash
36+
docker compose -f docker-compose.yml down
37+
```
3438

35-
Or manually stop the server if you are running it directly.
39+
Or manually stop the server if you are running it directly.
3640

3741
2. **Create a `.env` File**: In the root directory of your Sunrise server, there should be a file named `.env.example`. Create a copy of this file and rename it to `.env`.
3842

39-
On Linux or macOS, you can use the following command:
43+
On Linux or macOS, you can use the following command:
4044

41-
```bash
42-
cp .env.example .env
43-
```
45+
```bash
46+
cp .env.example .env
47+
```
4448

45-
On Windows, you can use:
49+
On Windows, you can use:
4650

47-
```powershell
48-
copy .env.example .env
49-
```
51+
```powershell
52+
copy .env.example .env
53+
```
5054

5155
3. **Migrate Configuration Values**: Open your existing `appsettings.*.json` files and copy the relevant configuration values to the corresponding variables in the `.env` file.
5256

53-
Here is an example mapping of the values from `appsettings.json` to `.env` variables:
57+
Here is an example mapping of the values from `appsettings.json` to `.env` variables:
5458

55-
![](../../../assets/img/values-mapping-for-env.png)
56-
:::warning
57-
Please notice that `Hangfire.ConnectionString` is _deprecated_ and doesn't need to be migrated to `.env` file any more. Use the same connection string as `Database.ConnectionString` instead.
58-
:::
59+
![](../../../assets/img/values-mapping-for-env.png)
60+
:::warning
61+
Please notice that `Hangfire.ConnectionString` is _deprecated_ and doesn't need to be migrated to `.env` file any more. Use the same connection string as `Database.ConnectionString` instead.
62+
:::
5963

6064
4. **Save Changes**: After migrating all the necessary values, save the `.env` file.
6165

6266
5. **Restart the Server**: Start your Sunrise server again to apply the changes.
6367

64-
If you are using Docker Compose:
68+
If you are using Docker Compose:
6569

66-
```bash
67-
docker compose -f docker-compose.yml up -d --build --remove-orphans
68-
```
70+
```bash
71+
docker compose -f docker-compose.yml up -d --build --remove-orphans
72+
```
73+
74+
Or start the server manually if you are running it directly.
6975

70-
Or start the server manually if you are running it directly.
76+
</Steps>
7177

7278
## Common problems
7379

0 commit comments

Comments
 (0)