Skip to content

Commit

Permalink
Enabled modals for testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daveiano committed Nov 20, 2023
1 parent 028c826 commit 03821c4
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 24 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -751,3 +751,4 @@ See https://github.com/Daveiano/weewx-wdc/compare/v3.3.0...580071ca175a03fe4924b
- Bugfix: Fixed "ValueError: could not convert string to float" in forecast, introduced in GH-191
- Bugfixed Added missing `nl.conf` in `install.py` GH-221
- Bugfix: Fixed Gauge tiles daily reset (via MQTT)
- Open Webcam Links/Stat Tile links in a Modal GH-220
35 changes: 25 additions & 10 deletions skins/weewx-wdc/index.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,20 @@
.addEventListener("click", () => {
document.getElementById("modal-radar-default").open = true;
});
document
.querySelector("#panel-radar a")
.addEventListener("click", (event) => {
event.preventDefault();
});

if (document .querySelector("#panel-radar a")) {
document
.querySelector("#panel-radar a")
.addEventListener("click", (event) => {
event.preventDefault();
});
}
</script>
<style>
#panel-radar {
cursor: pointer;
}
</style>
#end if

#for $external in externals_list
Expand All @@ -170,12 +178,19 @@
document.getElementById("modal-$external").open = true;
});

document
.querySelector("#panel-$external a")
.addEventListener("click", (event) => {
event.preventDefault();
});
if (document .querySelector("#panel-$external a")) {
document
.querySelector("#panel-$external a")
.addEventListener("click", (event) => {
event.preventDefault();
});
}
</script>
<style>
#panel-$external {
cursor: pointer;
}
</style>
#end for
#end if

Expand Down
9 changes: 8 additions & 1 deletion test/test_install_report/src/skin-custom.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ SKIN_VERSION = 2.2.1
# Show a link to the GitHub respository of this skin. Set to False to hide.
github_link = True

radar_html = '<a href="https://www.dwd.de/DE/leistungen/radarbild_film/radarbild_film.html"><img src="https://www.dwd.de/DWD/wetter/radar/radfilm_sac_akt.gif" alt="Radar" loading="lazy"></a>'
radar_html = '<a href="https://www.dwd.de/DE/leistungen/radarbild_film/radarbild_film.html"><img src="https://public-images-social.s3.eu-west-1.amazonaws.com/webcam-placeholder.png" alt="Radar" loading="lazy"></a>'

open_radar_and_externals_modal = True

[[mqtt]]
mqtt_websockets_enabled = 0
Expand Down Expand Up @@ -154,6 +156,11 @@ SKIN_VERSION = 2.2.1
min = 0
max = 360

[[stat_tile_links]]
[[[ET]]]
link = "https://en.wikipedia.org/wiki/Evapotranspiration"
open = modal

[[Icons]]
rain = "includes/icons/barometer.svg"
cloudbase = /home/dba/dev/weewx-wdc/test/e2e-tests/artifacts-custom-weewx-html/public_html/dwd/icons/8.png
Expand Down
36 changes: 23 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -668,18 +668,13 @@ __metadata:
linkType: hard

"@playwright/test@npm:latest":
version: 1.35.1
resolution: "@playwright/test@npm:1.35.1"
version: 1.40.0
resolution: "@playwright/test@npm:1.40.0"
dependencies:
"@types/node": "*"
fsevents: 2.3.2
playwright-core: 1.35.1
dependenciesMeta:
fsevents:
optional: true
playwright: 1.40.0
bin:
playwright: cli.js
checksum: 3509d2f2c7397f9b0d4f49088cab8625f17d186f7e9b3389ddebf7c52ee8aae6407eab48f66b300b7bf6a33f6e3533fd5951e72bfdb001b68838af98596d5a53
checksum: 128f05978f9f5a557f0b7924ec134d43cb70c78d74bc3bf7b18576f00e72399100ddf1f4a139e05ea8275407d8e27be0203ac34f514319a2cbeb01eaf0be5be4
languageName: node
linkType: hard

Expand Down Expand Up @@ -4662,12 +4657,27 @@ __metadata:
languageName: node
linkType: hard

"playwright-core@npm:1.35.1":
version: 1.35.1
resolution: "playwright-core@npm:1.35.1"
"playwright-core@npm:1.40.0":
version: 1.40.0
resolution: "playwright-core@npm:1.40.0"
bin:
playwright-core: cli.js
checksum: 179abc0051f00474e528935b507fa8cedc986b2803b020d7679878ba28cdd7036ad5a779792aad2ad281f8dc625eb1d2fb77663cb8de0d20c7ffbda7c18febdd
checksum: 57de5c91a4c404b120ed2af8541b21cdedcbc4f27477341157666d356bbee3b3fab8e61d020f0f450708fa2e8f6dc244b9224cb1985d5426e609cebed15af095
languageName: node
linkType: hard

"playwright@npm:1.40.0":
version: 1.40.0
resolution: "playwright@npm:1.40.0"
dependencies:
fsevents: 2.3.2
playwright-core: 1.40.0
dependenciesMeta:
fsevents:
optional: true
bin:
playwright: cli.js
checksum: 7ba49e5376a6cfd1d32048dbdb2fd38e09182aa2e4619fdb23d3e6530fa6987f2f3fd34ad1d9d906fb4ec2da69ee7536eeb881982d60750fde809183caa607fc
languageName: node
linkType: hard

Expand Down

0 comments on commit 03821c4

Please sign in to comment.