Compare commits
5 Commits
77293f03e9
...
2640a49734
Author | SHA1 | Date |
---|---|---|
Lukáš Kucharczyk | 2640a49734 | |
Lukáš Kucharczyk | 65c175afb2 | |
Lukáš Kucharczyk | 0814071a26 | |
Lukáš Kucharczyk | 5f845f866e | |
Lukáš Kucharczyk | c3d4697470 |
|
@ -1,7 +1,9 @@
|
||||||
## Unreleased
|
## 1.0.3 / 2023-02-20 17:16+01:00
|
||||||
|
|
||||||
|
* Add wikidata ID and year for editions
|
||||||
|
* Add icons for game, edition, purchase filters
|
||||||
* Allow filtering by game, edition, purchase from the session list
|
* Allow filtering by game, edition, purchase from the session list
|
||||||
* Add icons for the above
|
* Allow editing filtered entities from session list
|
||||||
|
|
||||||
## 1.0.2 / 2023-02-18 21:48+01:00
|
## 1.0.2 / 2023-02-18 21:48+01:00
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ RUN npm install && \
|
||||||
|
|
||||||
FROM python:3.10.9-slim-bullseye
|
FROM python:3.10.9-slim-bullseye
|
||||||
|
|
||||||
ENV VERSION_NUMBER 1.0.2
|
ENV VERSION_NUMBER 1.0.3
|
||||||
ENV PROD 1
|
ENV PROD 1
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ textarea {
|
||||||
|
|
||||||
#session-table {
|
#session-table {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 3fr repeat(3, 1fr) 0.5fr 1fr;
|
grid-template-columns: 3fr 2fr repeat(2, 1fr) 0.5fr 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
.purchase-name > span:nth-child(2) {
|
.purchase-name > span:nth-child(2) {
|
||||||
|
|
|
@ -20,8 +20,13 @@ class SessionForm(forms.ModelForm):
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class EditionChoiceField(forms.ModelChoiceField):
|
||||||
|
def label_from_instance(self, obj) -> str:
|
||||||
|
return f"{obj.name} ({obj.platform}, {obj.year_released})"
|
||||||
|
|
||||||
|
|
||||||
class PurchaseForm(forms.ModelForm):
|
class PurchaseForm(forms.ModelForm):
|
||||||
edition = forms.ModelChoiceField(queryset=Edition.objects.order_by("name"))
|
edition = EditionChoiceField(queryset=Edition.objects.order_by("name"))
|
||||||
platform = forms.ModelChoiceField(queryset=Platform.objects.order_by("name"))
|
platform = forms.ModelChoiceField(queryset=Platform.objects.order_by("name"))
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -38,9 +43,11 @@ class PurchaseForm(forms.ModelForm):
|
||||||
|
|
||||||
|
|
||||||
class EditionForm(forms.ModelForm):
|
class EditionForm(forms.ModelForm):
|
||||||
|
platform = forms.ModelChoiceField(queryset=Platform.objects.order_by("name"))
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Edition
|
model = Edition
|
||||||
fields = ["game", "name", "platform"]
|
fields = ["game", "name", "platform", "year_released", "wikidata"]
|
||||||
|
|
||||||
|
|
||||||
class GameForm(forms.ModelForm):
|
class GameForm(forms.ModelForm):
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Generated by Django 4.1.5 on 2023-02-20 14:55
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("games", "0014_device_session_device"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="edition",
|
||||||
|
name="wikidata",
|
||||||
|
field=models.CharField(blank=True, default=None, max_length=50, null=True),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="edition",
|
||||||
|
name="year_released",
|
||||||
|
field=models.IntegerField(default=2023),
|
||||||
|
),
|
||||||
|
]
|
|
@ -20,6 +20,8 @@ class Edition(models.Model):
|
||||||
game = models.ForeignKey("Game", on_delete=models.CASCADE)
|
game = models.ForeignKey("Game", on_delete=models.CASCADE)
|
||||||
name = models.CharField(max_length=255)
|
name = models.CharField(max_length=255)
|
||||||
platform = models.ForeignKey("Platform", on_delete=models.CASCADE)
|
platform = models.ForeignKey("Platform", on_delete=models.CASCADE)
|
||||||
|
year_released = models.IntegerField(default=datetime.today().year)
|
||||||
|
wikidata = models.CharField(max_length=50, null=True, blank=True, default=None)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
@ -56,7 +58,10 @@ class Purchase(models.Model):
|
||||||
)
|
)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"{self.edition} ({self.platform}, {self.get_ownership_type_display()})"
|
platform_info = self.platform
|
||||||
|
if self.platform != self.edition.platform:
|
||||||
|
platform_info = f"{self.edition.platform} version on {self.platform}"
|
||||||
|
return f"{self.edition} ({platform_info}, {self.edition.year_released}, {self.get_ownership_type_display()})"
|
||||||
|
|
||||||
|
|
||||||
class Platform(models.Model):
|
class Platform(models.Model):
|
||||||
|
|
|
@ -683,34 +683,58 @@ select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.\!container {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: 640px) {
|
@media (min-width: 640px) {
|
||||||
.container {
|
.container {
|
||||||
max-width: 640px;
|
max-width: 640px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.\!container {
|
||||||
|
max-width: 640px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
.container {
|
.container {
|
||||||
max-width: 768px;
|
max-width: 768px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.\!container {
|
||||||
|
max-width: 768px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 1024px) {
|
@media (min-width: 1024px) {
|
||||||
.container {
|
.container {
|
||||||
max-width: 1024px;
|
max-width: 1024px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.\!container {
|
||||||
|
max-width: 1024px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 1280px) {
|
@media (min-width: 1280px) {
|
||||||
.container {
|
.container {
|
||||||
max-width: 1280px;
|
max-width: 1280px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.\!container {
|
||||||
|
max-width: 1280px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 1536px) {
|
@media (min-width: 1536px) {
|
||||||
.container {
|
.container {
|
||||||
max-width: 1536px;
|
max-width: 1536px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.\!container {
|
||||||
|
max-width: 1536px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.prose {
|
.prose {
|
||||||
|
@ -718,6 +742,11 @@ select {
|
||||||
max-width: 65ch;
|
max-width: 65ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prose :where(p):not(:where([class~="not-prose"] *)) {
|
||||||
|
margin-top: 1.25em;
|
||||||
|
margin-bottom: 1.25em;
|
||||||
|
}
|
||||||
|
|
||||||
.prose :where([class~="lead"]):not(:where([class~="not-prose"] *)) {
|
.prose :where([class~="lead"]):not(:where([class~="not-prose"] *)) {
|
||||||
color: var(--tw-prose-lead);
|
color: var(--tw-prose-lead);
|
||||||
font-size: 1.25em;
|
font-size: 1.25em;
|
||||||
|
@ -1070,11 +1099,6 @@ select {
|
||||||
line-height: 1.75;
|
line-height: 1.75;
|
||||||
}
|
}
|
||||||
|
|
||||||
.prose :where(p):not(:where([class~="not-prose"] *)) {
|
|
||||||
margin-top: 1.25em;
|
|
||||||
margin-bottom: 1.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.prose :where(video):not(:where([class~="not-prose"] *)) {
|
.prose :where(video):not(:where([class~="not-prose"] *)) {
|
||||||
margin-top: 2em;
|
margin-top: 2em;
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
|
@ -1577,6 +1601,10 @@ select {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.\!fixed {
|
||||||
|
position: fixed !important;
|
||||||
|
}
|
||||||
|
|
||||||
.absolute {
|
.absolute {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
@ -1585,10 +1613,18 @@ select {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.\!relative {
|
||||||
|
position: relative !important;
|
||||||
|
}
|
||||||
|
|
||||||
.sticky {
|
.sticky {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.\!sticky {
|
||||||
|
position: sticky !important;
|
||||||
|
}
|
||||||
|
|
||||||
.-inset-1 {
|
.-inset-1 {
|
||||||
top: -0.25rem;
|
top: -0.25rem;
|
||||||
right: -0.25rem;
|
right: -0.25rem;
|
||||||
|
@ -1640,6 +1676,14 @@ select {
|
||||||
clear: none;
|
clear: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.m-1 {
|
||||||
|
margin: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.m-10 {
|
||||||
|
margin: 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.mx-auto {
|
.mx-auto {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
@ -1716,6 +1760,10 @@ select {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.\!block {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
|
||||||
.inline-block {
|
.inline-block {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
@ -1780,6 +1828,10 @@ select {
|
||||||
display: grid;
|
display: grid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.\!grid {
|
||||||
|
display: grid !important;
|
||||||
|
}
|
||||||
|
|
||||||
.inline-grid {
|
.inline-grid {
|
||||||
display: inline-grid;
|
display: inline-grid;
|
||||||
}
|
}
|
||||||
|
@ -1796,6 +1848,10 @@ select {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.\!hidden {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
.h-6 {
|
.h-6 {
|
||||||
height: 1.5rem;
|
height: 1.5rem;
|
||||||
}
|
}
|
||||||
|
@ -1808,6 +1864,10 @@ select {
|
||||||
height: 1rem;
|
height: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.h-1 {
|
||||||
|
height: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
.h-24 {
|
.h-24 {
|
||||||
height: 6rem;
|
height: 6rem;
|
||||||
}
|
}
|
||||||
|
@ -1836,6 +1896,10 @@ select {
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w-1 {
|
||||||
|
width: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
.max-w-screen-lg {
|
.max-w-screen-lg {
|
||||||
max-width: 1024px;
|
max-width: 1024px;
|
||||||
}
|
}
|
||||||
|
@ -2695,6 +2759,10 @@ select {
|
||||||
border-bottom-left-radius: 0.25rem;
|
border-bottom-left-radius: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.border {
|
||||||
|
border-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
.border-0 {
|
.border-0 {
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
}
|
}
|
||||||
|
@ -2703,10 +2771,6 @@ select {
|
||||||
border-width: 2px;
|
border-width: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.border {
|
|
||||||
border-width: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.border-x {
|
.border-x {
|
||||||
border-left-width: 1px;
|
border-left-width: 1px;
|
||||||
border-right-width: 1px;
|
border-right-width: 1px;
|
||||||
|
@ -2942,6 +3006,10 @@ select {
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.p-1 {
|
||||||
|
padding: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
.py-2 {
|
.py-2 {
|
||||||
padding-top: 0.5rem;
|
padding-top: 0.5rem;
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.5rem;
|
||||||
|
@ -3485,6 +3553,11 @@ select {
|
||||||
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.\!invert {
|
||||||
|
--tw-invert: invert(100%) !important;
|
||||||
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow) !important;
|
||||||
|
}
|
||||||
|
|
||||||
.sepia {
|
.sepia {
|
||||||
--tw-sepia: sepia(100%);
|
--tw-sepia: sepia(100%);
|
||||||
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
||||||
|
@ -3544,6 +3617,14 @@ select {
|
||||||
transition-duration: 150ms;
|
transition-duration: 150ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.\!transition {
|
||||||
|
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter !important;
|
||||||
|
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter !important;
|
||||||
|
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter !important;
|
||||||
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
|
||||||
|
transition-duration: 150ms !important;
|
||||||
|
}
|
||||||
|
|
||||||
.duration-200 {
|
.duration-200 {
|
||||||
transition-duration: 200ms;
|
transition-duration: 200ms;
|
||||||
}
|
}
|
||||||
|
@ -3565,6 +3646,18 @@ select {
|
||||||
content: var(--tw-content);
|
content: var(--tw-content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.\[a-zA-Z-\:\#\] {
|
||||||
|
a-z-a--z-: #;
|
||||||
|
}
|
||||||
|
|
||||||
|
.\[vite\:html\] {
|
||||||
|
vite: html;
|
||||||
|
}
|
||||||
|
|
||||||
|
.\[vite\:css\] {
|
||||||
|
vite: css;
|
||||||
|
}
|
||||||
|
|
||||||
.dark form label {
|
.dark form label {
|
||||||
--tw-text-opacity: 1;
|
--tw-text-opacity: 1;
|
||||||
color: rgb(148 163 184 / var(--tw-text-opacity));
|
color: rgb(148 163 184 / var(--tw-text-opacity));
|
||||||
|
@ -3584,7 +3677,7 @@ textarea {
|
||||||
|
|
||||||
#session-table {
|
#session-table {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 3fr repeat(3, 1fr) 0.5fr 1fr;
|
grid-template-columns: 3fr 2fr repeat(2, 1fr) 0.5fr 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
.purchase-name > span:nth-child(2) {
|
.purchase-name > span:nth-child(2) {
|
||||||
|
@ -3619,72 +3712,6 @@ th label {
|
||||||
margin-right: 1rem;
|
margin-right: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.basic-button {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.basic-button > :not([hidden]) ~ :not([hidden]) {
|
|
||||||
--tw-space-x-reverse: 0;
|
|
||||||
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
|
||||||
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
||||||
}
|
|
||||||
|
|
||||||
.basic-button button {
|
|
||||||
display: inline-block;
|
|
||||||
border-radius: 0.25rem;
|
|
||||||
--tw-bg-opacity: 1;
|
|
||||||
background-color: rgb(37 99 235 / var(--tw-bg-opacity));
|
|
||||||
padding-left: 1.5rem;
|
|
||||||
padding-right: 1.5rem;
|
|
||||||
padding-top: 0.625rem;
|
|
||||||
padding-bottom: 0.625rem;
|
|
||||||
font-size: 0.75rem;
|
|
||||||
line-height: 1rem;
|
|
||||||
font-weight: 500;
|
|
||||||
text-transform: uppercase;
|
|
||||||
line-height: 1.25;
|
|
||||||
--tw-text-opacity: 1;
|
|
||||||
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
||||||
--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
||||||
--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
|
|
||||||
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
||||||
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
|
|
||||||
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
|
|
||||||
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
|
|
||||||
transition-duration: 150ms;
|
|
||||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.basic-button button:hover {
|
|
||||||
--tw-bg-opacity: 1;
|
|
||||||
background-color: rgb(29 78 216 / var(--tw-bg-opacity));
|
|
||||||
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
||||||
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
|
||||||
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
||||||
}
|
|
||||||
|
|
||||||
.basic-button button:focus {
|
|
||||||
--tw-bg-opacity: 1;
|
|
||||||
background-color: rgb(29 78 216 / var(--tw-bg-opacity));
|
|
||||||
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
||||||
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
|
||||||
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
||||||
outline: 2px solid transparent;
|
|
||||||
outline-offset: 2px;
|
|
||||||
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
||||||
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
||||||
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
||||||
}
|
|
||||||
|
|
||||||
.basic-button button:active {
|
|
||||||
--tw-bg-opacity: 1;
|
|
||||||
background-color: rgb(30 64 175 / var(--tw-bg-opacity));
|
|
||||||
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
||||||
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
|
||||||
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hover\:prose-lg:hover {
|
.hover\:prose-lg:hover {
|
||||||
font-size: 1.125rem;
|
font-size: 1.125rem;
|
||||||
line-height: 1.7777778;
|
line-height: 1.7777778;
|
||||||
|
@ -4175,6 +4202,11 @@ th label {
|
||||||
max-width: 65ch;
|
max-width: 65ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dark .dark\:prose :where(p):not(:where([class~="not-prose"] *)) {
|
||||||
|
margin-top: 1.25em;
|
||||||
|
margin-bottom: 1.25em;
|
||||||
|
}
|
||||||
|
|
||||||
.dark .dark\:prose :where([class~="lead"]):not(:where([class~="not-prose"] *)) {
|
.dark .dark\:prose :where([class~="lead"]):not(:where([class~="not-prose"] *)) {
|
||||||
color: var(--tw-prose-lead);
|
color: var(--tw-prose-lead);
|
||||||
font-size: 1.25em;
|
font-size: 1.25em;
|
||||||
|
@ -4527,11 +4559,6 @@ th label {
|
||||||
line-height: 1.75;
|
line-height: 1.75;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark .dark\:prose :where(p):not(:where([class~="not-prose"] *)) {
|
|
||||||
margin-top: 1.25em;
|
|
||||||
margin-bottom: 1.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dark .dark\:prose :where(video):not(:where([class~="not-prose"] *)) {
|
.dark .dark\:prose :where(video):not(:where([class~="not-prose"] *)) {
|
||||||
margin-top: 2em;
|
margin-top: 2em;
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
|
@ -4708,6 +4735,11 @@ th label {
|
||||||
max-width: 65ch;
|
max-width: 65ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sm\:prose :where(p):not(:where([class~="not-prose"] *)) {
|
||||||
|
margin-top: 1.25em;
|
||||||
|
margin-bottom: 1.25em;
|
||||||
|
}
|
||||||
|
|
||||||
.sm\:prose :where([class~="lead"]):not(:where([class~="not-prose"] *)) {
|
.sm\:prose :where([class~="lead"]):not(:where([class~="not-prose"] *)) {
|
||||||
color: var(--tw-prose-lead);
|
color: var(--tw-prose-lead);
|
||||||
font-size: 1.25em;
|
font-size: 1.25em;
|
||||||
|
@ -5060,11 +5092,6 @@ th label {
|
||||||
line-height: 1.75;
|
line-height: 1.75;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sm\:prose :where(p):not(:where([class~="not-prose"] *)) {
|
|
||||||
margin-top: 1.25em;
|
|
||||||
margin-bottom: 1.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sm\:prose :where(video):not(:where([class~="not-prose"] *)) {
|
.sm\:prose :where(video):not(:where([class~="not-prose"] *)) {
|
||||||
margin-top: 2em;
|
margin-top: 2em;
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
|
@ -5406,4 +5433,4 @@ th label {
|
||||||
.dark .dark\:lg\:hover\:\[paint-order\:markers\]:hover {
|
.dark .dark\:lg\:hover\:\[paint-order\:markers\]:hover {
|
||||||
paint-order: markers;
|
paint-order: markers;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,22 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 inline">
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 inline">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
<path stroke-linecap="round" stroke-linejoin="round" d="M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||||
</svg>
|
</svg>
|
||||||
</a>Filtering by "{% firstof purchase platform game edition ownership_type %}"
|
</a>
|
||||||
|
{% if purchase %}
|
||||||
|
Filtering by purchase "{{ purchase }}"
|
||||||
|
(<a href="{% url 'edit_purchase' purchase.id %}" class="hover:underline dark:text-white">Edit</a>)
|
||||||
|
{% elif platform %}
|
||||||
|
Filtering by purchase "{{ platform }}"
|
||||||
|
(<a href="{% url 'edit_platform' platform.id %}" class="hover:underline dark:text-white">Edit</a>)
|
||||||
|
{% elif game %}
|
||||||
|
Filtering by purchase "{{ game }}"
|
||||||
|
(<a href="{% url 'edit_game' game.id %}" class="hover:underline dark:text-white">Edit</a>)
|
||||||
|
{% elif edition %}
|
||||||
|
Filtering by purchase "{{ edition }}"
|
||||||
|
(<a href="{% url 'edit_edition' edition.id %}" class="hover:underline dark:text-white">Edit</a>)
|
||||||
|
{% elif ownership_type %}
|
||||||
|
Filtering by ownership type "{{ ownership_type }}"
|
||||||
|
{% endif%}
|
||||||
</span>
|
</span>
|
||||||
{% if purchase %}<a class="dark:text-white hover:underline block" href="{% url 'list_sessions_by_edition' purchase.edition.id %}">See all platforms</a>{% endif %}
|
{% if purchase %}<a class="dark:text-white hover:underline block" href="{% url 'list_sessions_by_edition' purchase.edition.id %}">See all platforms</a>{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -56,7 +71,15 @@
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="dark:text-white overflow-hidden text-ellipsis whitespace-nowrap"><a class="hover:underline" href="{% url 'list_sessions_by_platform' data.purchase.platform.id %}">{{ data.purchase.platform }}</a></div>
|
<div class="dark:text-white overflow-hidden text-ellipsis whitespace-nowrap">
|
||||||
|
<a class="hover:underline" href="{% url 'list_sessions_by_platform' data.purchase.platform.id %}">
|
||||||
|
{% if data.purchase.platform != data.purchase.edition.platform %}
|
||||||
|
{{data.purchase.edition.platform}} on {{ data.purchase.platform }}
|
||||||
|
{% else %}
|
||||||
|
{{ data.purchase.platform }}
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<div class="dark:text-slate-400 text-center">{{ data.timestamp_start | date:"d/m/Y H:i" }}</div>
|
<div class="dark:text-slate-400 text-center">{{ data.timestamp_start | date:"d/m/Y H:i" }}</div>
|
||||||
<div class="dark:text-slate-400 text-center">
|
<div class="dark:text-slate-400 text-center">
|
||||||
{% if data.unfinished %}
|
{% if data.unfinished %}
|
||||||
|
|
|
@ -31,6 +31,8 @@ urlpatterns = [
|
||||||
path("add-purchase/", views.add_purchase, name="add_purchase"),
|
path("add-purchase/", views.add_purchase, name="add_purchase"),
|
||||||
path("add-edition/", views.add_edition, name="add_edition"),
|
path("add-edition/", views.add_edition, name="add_edition"),
|
||||||
path("edit-edition/<int:edition_id>", views.edit_edition, name="edit_edition"),
|
path("edit-edition/<int:edition_id>", views.edit_edition, name="edit_edition"),
|
||||||
|
path("edit-game/<int:game_id>", views.edit_game, name="edit_game"),
|
||||||
|
path("edit-platform/<int:platform_id>", views.edit_platform, name="edit_platform"),
|
||||||
path("add-device/", views.add_device, name="add_device"),
|
path("add-device/", views.add_device, name="add_device"),
|
||||||
path("edit-session/<int:session_id>", views.edit_session, name="edit_session"),
|
path("edit-session/<int:session_id>", views.edit_session, name="edit_session"),
|
||||||
path("edit-purchase/<int:purchase_id>", views.edit_purchase, name="edit_purchase"),
|
path("edit-purchase/<int:purchase_id>", views.edit_purchase, name="edit_purchase"),
|
||||||
|
|
|
@ -79,6 +79,30 @@ def edit_purchase(request, purchase_id=None):
|
||||||
return render(request, "add.html", context)
|
return render(request, "add.html", context)
|
||||||
|
|
||||||
|
|
||||||
|
def edit_game(request, game_id=None):
|
||||||
|
context = {}
|
||||||
|
purchase = Game.objects.get(id=game_id)
|
||||||
|
form = GameForm(request.POST or None, instance=purchase)
|
||||||
|
if form.is_valid():
|
||||||
|
form.save()
|
||||||
|
return redirect("list_sessions")
|
||||||
|
context["title"] = "Edit Game"
|
||||||
|
context["form"] = form
|
||||||
|
return render(request, "add.html", context)
|
||||||
|
|
||||||
|
|
||||||
|
def edit_platform(request, platform_id=None):
|
||||||
|
context = {}
|
||||||
|
purchase = Platform.objects.get(id=platform_id)
|
||||||
|
form = PlatformForm(request.POST or None, instance=purchase)
|
||||||
|
if form.is_valid():
|
||||||
|
form.save()
|
||||||
|
return redirect("list_sessions")
|
||||||
|
context["title"] = "Edit Platform"
|
||||||
|
context["form"] = form
|
||||||
|
return render(request, "add.html", context)
|
||||||
|
|
||||||
|
|
||||||
def edit_edition(request, edition_id=None):
|
def edit_edition(request, edition_id=None):
|
||||||
context = {}
|
context = {}
|
||||||
edition = Edition.objects.get(id=edition_id)
|
edition = Edition.objects.get(id=edition_id)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "timetracker"
|
name = "timetracker"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
description = "A simple time tracker."
|
description = "A simple time tracker."
|
||||||
authors = ["Lukáš Kucharczyk <lukas@kucharczyk.xyz>"]
|
authors = ["Lukáš Kucharczyk <lukas@kucharczyk.xyz>"]
|
||||||
license = "GPL"
|
license = "GPL"
|
||||||
|
|
Loading…
Reference in New Issue