mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-12-22 22:01:48 +01:00
Update deps & cleanup refresh tooltips
This commit is contained in:
parent
4f39677b9e
commit
2458ff7901
3 changed files with 26 additions and 28 deletions
32
poetry.lock
generated
32
poetry.lock
generated
|
@ -232,7 +232,7 @@ postal = ["cryptography"]
|
|||
|
||||
[[package]]
|
||||
name = "django-bootstrap5"
|
||||
version = "22.1"
|
||||
version = "22.2"
|
||||
description = "Bootstrap 5 for Django"
|
||||
category = "main"
|
||||
optional = false
|
||||
|
@ -332,7 +332,7 @@ Django = ">=3.2"
|
|||
|
||||
[[package]]
|
||||
name = "exceptiongroup"
|
||||
version = "1.0.2"
|
||||
version = "1.0.4"
|
||||
description = "Backport of PEP 654 (exception groups)"
|
||||
category = "main"
|
||||
optional = false
|
||||
|
@ -400,7 +400,7 @@ python-versions = ">=3.7"
|
|||
|
||||
[[package]]
|
||||
name = "hypothesis"
|
||||
version = "6.57.1"
|
||||
version = "6.58.0"
|
||||
description = "A library for property-based testing"
|
||||
category = "dev"
|
||||
optional = false
|
||||
|
@ -429,7 +429,7 @@ zoneinfo = ["backports.zoneinfo (>=0.2.1)", "tzdata (>=2022.6)"]
|
|||
|
||||
[[package]]
|
||||
name = "identify"
|
||||
version = "2.5.8"
|
||||
version = "2.5.9"
|
||||
description = "File identification library for Python"
|
||||
category = "dev"
|
||||
optional = false
|
||||
|
@ -981,11 +981,11 @@ python-versions = ">=2"
|
|||
|
||||
[[package]]
|
||||
name = "urllib3"
|
||||
version = "1.26.12"
|
||||
version = "1.26.13"
|
||||
description = "HTTP library with thread-safe connection pooling, file post, and more."
|
||||
category = "main"
|
||||
optional = false
|
||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4"
|
||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"
|
||||
|
||||
[package.dependencies]
|
||||
PySocks = {version = ">=1.5.6,<1.5.7 || >1.5.7,<2.0", optional = true, markers = "extra == \"socks\""}
|
||||
|
@ -1271,8 +1271,8 @@ django-anymail = [
|
|||
{file = "django_anymail-8.6-py3-none-any.whl", hash = "sha256:49d83d7c16316ca86a624097496881d59b7d71b16bf1c5211cffa5b19ef98d0c"},
|
||||
]
|
||||
django-bootstrap5 = [
|
||||
{file = "django-bootstrap5-22.1.tar.gz", hash = "sha256:70b51f020ef95a64780a0b5d5fdb1fade6e7b5e26c53355cc4f3648eca239cab"},
|
||||
{file = "django_bootstrap5-22.1-py3-none-any.whl", hash = "sha256:cf3f257abf750f19e47eddc106066ddb182576185494965d1408eddcb3a7380b"},
|
||||
{file = "django-bootstrap5-22.2.tar.gz", hash = "sha256:e944f5ced342e0e16cde77e1ddacb4b9fd5bce4cc190df2f7da0b8e18a24c9cb"},
|
||||
{file = "django_bootstrap5-22.2-py3-none-any.whl", hash = "sha256:5d677bbfb94207c1a034d63a5f39d95ce287ef509e0b31dfb4d233cc81f93bcc"},
|
||||
]
|
||||
django-browser-reload = [
|
||||
{file = "django-browser-reload-1.6.0.tar.gz", hash = "sha256:9ca69c71796f53868bdc7421f120d147f7a64faa0d5d8c06970ba3f8061af63c"},
|
||||
|
@ -1307,8 +1307,8 @@ django-registration = [
|
|||
{file = "django_registration-3.3-py3-none-any.whl", hash = "sha256:dfa176f594fb465c93495caa55686be723a15829769511383e25172d2efbd0e6"},
|
||||
]
|
||||
exceptiongroup = [
|
||||
{file = "exceptiongroup-1.0.2-py3-none-any.whl", hash = "sha256:c22f11ec6a10d2b453871c5c5fe887436c4d1961324ce9090f2ca6ddc4180c27"},
|
||||
{file = "exceptiongroup-1.0.2.tar.gz", hash = "sha256:a31cd183c3dea02e617aab5153588d5f7258a77b51f0ef41b3815ae8a0d0f695"},
|
||||
{file = "exceptiongroup-1.0.4-py3-none-any.whl", hash = "sha256:542adf9dea4055530d6e1279602fa5cb11dab2395fa650b8674eaec35fc4a828"},
|
||||
{file = "exceptiongroup-1.0.4.tar.gz", hash = "sha256:bd14967b79cd9bdb54d97323216f8fdf533e278df937aa2a90089e7d6e06e5ec"},
|
||||
]
|
||||
filelock = [
|
||||
{file = "filelock-3.8.0-py3-none-any.whl", hash = "sha256:617eb4e5eedc82fc5f47b6d61e4d11cb837c56cb4544e39081099fa17ad109d4"},
|
||||
|
@ -1389,12 +1389,12 @@ h11 = [
|
|||
{file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"},
|
||||
]
|
||||
hypothesis = [
|
||||
{file = "hypothesis-6.57.1-py3-none-any.whl", hash = "sha256:91c22db726ffd68f2658e273af111a6fcae2e53fa430580862e8522686b5c071"},
|
||||
{file = "hypothesis-6.57.1.tar.gz", hash = "sha256:1d8ed5136f368e343f39172b06f68aa7fd1312cf643c332ab18a75d56789fa90"},
|
||||
{file = "hypothesis-6.58.0-py3-none-any.whl", hash = "sha256:c2ffa10c94ff1a4a12f4ff515d78a4a3060a7c5b9968331d7b2707576a29570d"},
|
||||
{file = "hypothesis-6.58.0.tar.gz", hash = "sha256:89d9aa676dac7275755371d42d65fc81366ff0e0289ab525aa2bb3dcf7c98b9f"},
|
||||
]
|
||||
identify = [
|
||||
{file = "identify-2.5.8-py2.py3-none-any.whl", hash = "sha256:48b7925fe122720088aeb7a6c34f17b27e706b72c61070f27fe3789094233440"},
|
||||
{file = "identify-2.5.8.tar.gz", hash = "sha256:7a214a10313b9489a0d61467db2856ae8d0b8306fc923e03a9effa53d8aedc58"},
|
||||
{file = "identify-2.5.9-py2.py3-none-any.whl", hash = "sha256:a390fb696e164dbddb047a0db26e57972ae52fbd037ae68797e5ae2f4492485d"},
|
||||
{file = "identify-2.5.9.tar.gz", hash = "sha256:906036344ca769539610436e40a684e170c3648b552194980bb7b617a8daeb9f"},
|
||||
]
|
||||
idna = [
|
||||
{file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"},
|
||||
|
@ -1682,8 +1682,8 @@ tzdata = [
|
|||
{file = "tzdata-2022.6.tar.gz", hash = "sha256:91f11db4503385928c15598c98573e3af07e7229181bee5375bd30f1695ddcae"},
|
||||
]
|
||||
urllib3 = [
|
||||
{file = "urllib3-1.26.12-py2.py3-none-any.whl", hash = "sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997"},
|
||||
{file = "urllib3-1.26.12.tar.gz", hash = "sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e"},
|
||||
{file = "urllib3-1.26.13-py2.py3-none-any.whl", hash = "sha256:47cc05d99aaa09c9e72ed5809b60e7ba354e64b59c9c173ac3018642d8bb41fc"},
|
||||
{file = "urllib3-1.26.13.tar.gz", hash = "sha256:c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8"},
|
||||
]
|
||||
virtualenv = [
|
||||
{file = "virtualenv-20.16.7-py3-none-any.whl", hash = "sha256:efd66b00386fdb7dbe4822d172303f40cd05e50e01740b19ea42425cbe653e29"},
|
||||
|
|
|
@ -125,7 +125,7 @@ def character_health_change(request, pk: int):
|
|||
character.health_remaining = value
|
||||
character.save(update_fields=["health_remaining"])
|
||||
response = HttpResponse(value)
|
||||
return trigger_client_event(response, "refresh_health_bar", {})
|
||||
return trigger_client_event(response, "refresh_health_bar")
|
||||
|
||||
|
||||
@login_required
|
||||
|
@ -140,7 +140,7 @@ def character_mana_change(request, pk: int):
|
|||
character.mana_remaining = value
|
||||
character.save(update_fields=["mana_remaining"])
|
||||
response = HttpResponse(value)
|
||||
return trigger_client_event(response, "refresh_mana_bar", {})
|
||||
return trigger_client_event(response, "refresh_mana_bar")
|
||||
|
||||
|
||||
@login_required
|
||||
|
@ -166,7 +166,7 @@ def character_defense_misc_change(request, pk: int):
|
|||
character.defense_misc = value
|
||||
character.save(update_fields=["defense_misc"])
|
||||
response = HttpResponse(value)
|
||||
return trigger_client_event(response, "update_defense", {})
|
||||
return trigger_client_event(response, "update_defense")
|
||||
|
||||
|
||||
@login_required
|
||||
|
@ -178,7 +178,7 @@ def character_shield_change(request, pk: int):
|
|||
character.shield = value
|
||||
character.save(update_fields=["shield"])
|
||||
response = HttpResponse(value)
|
||||
return trigger_client_event(response, "update_defense", {})
|
||||
return trigger_client_event(response, "update_defense")
|
||||
|
||||
|
||||
@login_required
|
||||
|
@ -190,7 +190,7 @@ def character_armor_change(request, pk: int):
|
|||
character.armor = value
|
||||
character.save(update_fields=["armor"])
|
||||
response = HttpResponse(value)
|
||||
return trigger_client_event(response, "update_defense", {})
|
||||
return trigger_client_event(response, "update_defense")
|
||||
|
||||
|
||||
@login_required
|
||||
|
@ -202,7 +202,7 @@ def character_initiative_misc_change(request, pk: int):
|
|||
character.initiative_misc = value
|
||||
character.save(update_fields=["initiative_misc"])
|
||||
response = HttpResponse(value)
|
||||
return trigger_client_event(response, "update_initiative", {})
|
||||
return trigger_client_event(response, "update_initiative")
|
||||
|
||||
|
||||
@login_required
|
||||
|
@ -394,7 +394,7 @@ def remove_state(request, pk: int, state_pk: int):
|
|||
response = render(
|
||||
request, "character/snippets/character_details/states.html", context
|
||||
)
|
||||
return trigger_client_event(response, "refresh_tooltips", {})
|
||||
return trigger_client_event(response, "refresh_tooltips", after="swap")
|
||||
|
||||
|
||||
@login_required
|
||||
|
@ -408,7 +408,7 @@ def add_state(request, pk: int, state_pk: int):
|
|||
response = render(
|
||||
request, "character/snippets/character_details/states.html", context
|
||||
)
|
||||
return trigger_client_event(response, "refresh_tooltips", {})
|
||||
return trigger_client_event(response, "refresh_tooltips", after="swap")
|
||||
|
||||
|
||||
@login_required
|
||||
|
|
|
@ -56,10 +56,8 @@
|
|||
let tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl));
|
||||
addEventListener("refresh_tooltips", function (event) {
|
||||
tooltipList.forEach(tooltip => tooltip.dispose());
|
||||
setTimeout(() => {
|
||||
tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]');
|
||||
tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl));
|
||||
}, 50);
|
||||
tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]');
|
||||
tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue