diff --git a/RIGS/migrations/0040_profile_dark_theme.py b/RIGS/migrations/0040_profile_dark_theme.py new file mode 100644 index 00000000..0de43954 --- /dev/null +++ b/RIGS/migrations/0040_profile_dark_theme.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.5 on 2021-02-06 10:43 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('RIGS', '0039_auto_20210123_1910'), + ] + + operations = [ + migrations.AddField( + model_name='profile', + name='dark_theme', + field=models.BooleanField(default=False), + ), + ] diff --git a/RIGS/models.py b/RIGS/models.py index 599053e7..03a35c46 100644 --- a/RIGS/models.py +++ b/RIGS/models.py @@ -26,6 +26,7 @@ class Profile(AbstractUser): is_approved = models.BooleanField(default=False) last_emailed = models.DateTimeField(blank=True, null=True) # Currently only populated by the admin approval email. TODO: Populate it each time we send any email, might need that... + dark_theme = models.BooleanField(default=False) @classmethod def make_api_key(cls): diff --git a/RIGS/templates/event_form.html b/RIGS/templates/event_form.html index d1b9dc1e..d53955e3 100644 --- a/RIGS/templates/event_form.html +++ b/RIGS/templates/event_form.html @@ -79,7 +79,7 @@ {% block content %} {% include 'item_modal.html' %} -
+ {% csrf_token %}
diff --git a/assets/models.py b/assets/models.py index 4e18887c..fe7035c1 100644 --- a/assets/models.py +++ b/assets/models.py @@ -146,10 +146,7 @@ class Asset(models.Model, RevisionMixin): return reverse('asset_detail', kwargs={'pk': self.asset_id}) def __str__(self): - out = "{} | {}".format(self.asset_id, self.description) - if self.is_cable and self.cable_type is not None: - out += '{} - {}m - {}'.format(self.cable_type.plug, self.length, self.cable_type.socket) - return out + return "{} | {}".format(self.asset_id, self.description) def clean(self): errdict = {} diff --git a/package-lock.json b/package-lock.json index 198761e9..06de466b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,6 @@ "bootstrap-select": "^1.13.17", "clipboard": "^2.0.6", "cssnano": "^4.1.10", - "dark-mode-switch": "^1.0.0", "flatpickr": "^4.6.6", "fullcalendar": "^5.3.2", "gulp": "^4.0.2", @@ -1663,11 +1662,6 @@ "type": "^1.0.1" } }, - "node_modules/dark-mode-switch": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dark-mode-switch/-/dark-mode-switch-1.0.0.tgz", - "integrity": "sha512-wRoqYGmph7mwRbPcSNRR6DpRQe5wOK0lG6O3Hz7nIWWDyLAHSqje7PUI6c/acOYACiSPHc7sqysn57GSuklb6w==" - }, "node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -10583,11 +10577,6 @@ "type": "^1.0.1" } }, - "dark-mode-switch": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dark-mode-switch/-/dark-mode-switch-1.0.0.tgz", - "integrity": "sha512-wRoqYGmph7mwRbPcSNRR6DpRQe5wOK0lG6O3Hz7nIWWDyLAHSqje7PUI6c/acOYACiSPHc7sqysn57GSuklb6w==" - }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", diff --git a/package.json b/package.json index ebe0e823..182e0b8e 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,6 @@ "bootstrap-select": "^1.13.17", "clipboard": "^2.0.6", "cssnano": "^4.1.10", - "dark-mode-switch": "^1.0.0", "flatpickr": "^4.6.6", "fullcalendar": "^5.3.2", "gulp": "^4.0.2", diff --git a/pipeline/source_assets/scss/dark_screen.scss b/pipeline/source_assets/scss/dark_screen.scss index a32b519d..8f8556a3 100644 --- a/pipeline/source_assets/scss/dark_screen.scss +++ b/pipeline/source_assets/scss/dark_screen.scss @@ -111,4 +111,12 @@ .custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 $input-focus-width rgba($primary, 0.7) !important; } + .source { + color: white !important; + } + .embed_container { + border-color: #3853a4 !important; + background: #222; + color: $gray-100; + } } diff --git a/pipeline/source_assets/scss/screen.scss b/pipeline/source_assets/scss/screen.scss index 3b249728..f68453bb 100644 --- a/pipeline/source_assets/scss/screen.scss +++ b/pipeline/source_assets/scss/screen.scss @@ -1,4 +1,3 @@ -@import "dark_screen"; @import "custom-variables"; //Required @import "node_modules/bootstrap/scss/bootstrap-reboot"; diff --git a/templates/base.html b/templates/base.html index db69b273..c9db7c43 100644 --- a/templates/base.html +++ b/templates/base.html @@ -10,11 +10,14 @@ + + + {% block css %} {% endblock %} @@ -77,7 +80,11 @@
- + - {% block js %} {% endblock %} diff --git a/users/templates/partials/navbar_user.html b/users/templates/partials/navbar_user.html index b929b702..53d8b25b 100644 --- a/users/templates/partials/navbar_user.html +++ b/users/templates/partials/navbar_user.html @@ -3,22 +3,17 @@ -