diff --git a/backend/sophon/core/migrations/0005_auto_20211016_0136.py b/backend/sophon/core/migrations/0005_auto_20211016_0136.py new file mode 100644 index 0000000..f15e634 --- /dev/null +++ b/backend/sophon/core/migrations/0005_auto_20211016_0136.py @@ -0,0 +1,24 @@ +# Generated by Django 3.2.7 on 2021-10-16 01:36 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ('core', '0004_sophoninstancedetails'), + ] + + operations = [ + migrations.AlterModelOptions( + name='sophoninstancedetails', + options={'verbose_name': 'Sophon instance details', 'verbose_name_plural': 'Sophon instance details'}, + ), + migrations.AlterField( + model_name='sophoninstancedetails', + name='theme', + field=models.CharField( + choices=[('sophon', 'The Sophonity'), ('paper', 'Sheet of Paper'), ('royalblue', 'Royal Blue'), ('hacker', 'Hacker Terminal'), + ('amber', 'Gestione Amber')], default='sophon', help_text='The bluelib theme of the Sophon instance.', max_length=32, + verbose_name='Theme'), + ), + ] diff --git a/backend/sophon/core/models.py b/backend/sophon/core/models.py index 0930a58..422618c 100644 --- a/backend/sophon/core/models.py +++ b/backend/sophon/core/models.py @@ -203,6 +203,7 @@ class SophonInstanceDetails(SophonModel): ("paper", "Sheet of Paper"), ("royalblue", "Royal Blue"), ("hacker", "Hacker Terminal"), + ("amber", "Gestione Amber"), ), default="sophon", max_length=32, diff --git a/frontend/src/contexts/theme.tsx b/frontend/src/contexts/theme.tsx index e814fc5..2bb8db5 100644 --- a/frontend/src/contexts/theme.tsx +++ b/frontend/src/contexts/theme.tsx @@ -1,3 +1,4 @@ +import {BluelibTheme} from "@steffo/bluelib-react/dist/types" import * as React from "react" import {ContextData} from "../types/ContextTypes" import {WithChildren} from "../types/ExtraTypes" @@ -5,7 +6,7 @@ import {WithChildren} from "../types/ExtraTypes" // States type ThemeSelected = { - bluelib: "sophon" | "royalblue" | "hacker" | "paper", + bluelib: BluelibTheme, title: string, } @@ -14,7 +15,7 @@ type ThemeSelected = { type ThemeSet = { type: "set", - bluelib: "sophon" | "royalblue" | "hacker" | "paper", + bluelib: BluelibTheme, title: string, }