Compare commits
2 Commits
3aa06b6d7f
...
26955b841d
| Author | SHA1 | Date | |
|---|---|---|---|
| 26955b841d | |||
| 9073106f61 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,3 +9,4 @@ hint-report/
|
||||
.csslintrc
|
||||
coverage/
|
||||
tmp/
|
||||
*.geany
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
# sr2ini
|
||||
# sr2ini – a simple initiative tracker for Shadowrun 2e
|
||||
|
||||
Simple Initiative tracker for Shadowrun 2e.
|
||||
sr2ini is a lightweight, single-page initiative tracker for the TTRPG Shadowrun in its 2nd edition. The app helps DMs and players to manage fights by tracking each combatant's initiative, order of action, damage (stun and physical), and wound modifiers. It was written specifically for mobile use and can be installed as a web app.
|
||||
55
TODO.md
55
TODO.md
@ -118,22 +118,16 @@
|
||||
- x color scheme beim Favicon anpassen
|
||||
- https://realfavicongenerator.net/
|
||||
- see also here: https://github.com/audreyfeldroy/favicon-cheat-sheet
|
||||
|
||||
- x Mauszeiger soll Finger werden, wenn er über combatant-name/ini/dice-and-rea hovert
|
||||
- x actions-menu erscheint nicht direkt unter dem Button
|
||||
- beide dropdowns sind gerade garbled
|
||||
|
||||
|
||||
### open
|
||||
|
||||
- unter die GPL stellen
|
||||
- https://www.gnu.org/licenses/gpl-howto.html
|
||||
|
||||
- sr2ini_ynh auf neue Version bringen
|
||||
- manifest: Version, tarball URL und sha256 ersetzen
|
||||
- README.md: Version ersetzen
|
||||
- ggf. doc/screenshots/sr2ini-screenshot.jpg ersetzen (960x640)
|
||||
- favicon checken: https://realfavicongenerator.net/favicon_checker
|
||||
- x im FP3T Tor Browser kann ich rauszoomen, bis ich die ganzen damage monitors und action menus sehe -> verhindern!
|
||||
- action-menu und damage-monitor sliden jetzt nicht mehr rein, sondern bleiben an Ort und Stelle
|
||||
- das sollte die Sache verhindern
|
||||
- x warum fkt. das Ganze nicht als Webapp?
|
||||
- Firefox (android) sieht die Seite nicht als installable an
|
||||
- Webmanifest ist aber da und scheint auch in Ordnung zu sein (sagt Firefox on Linux)
|
||||
- x favicon checken: https://realfavicongenerator.net/favicon_checker
|
||||
- jetzt fkt. immer noch nicht die URLs im Icon manifest
|
||||
- x Links zu den versch. favicons fkt. nicht: sie lauten /… statt /sr2ini/…
|
||||
- x Lösung: parcel build braucht als --public-url "./" (statt "/"), dann werden die Links korrekt erzeugt
|
||||
@ -149,25 +143,31 @@
|
||||
- letztes Problem (hoffentlich): die Links zu den android-chrome-XYZxXYZ Icons im site.webmanifest stimmen nicht
|
||||
- hab site.manifest nach src/ verschoben und die Links angepasst -> jetzt scheint's zu gehen
|
||||
|
||||
|
||||
### open
|
||||
|
||||
- x focus-related stuff
|
||||
- x enter key doesn't work right away after clicking add button
|
||||
- x wenn ein damage monitor offen ist und ich auf add combatant clicke, springt der Fokus nicht zuverlässig ins erste input feld
|
||||
- x after pressing damage level button, focus moves to first table row act button
|
||||
- it's probably b/c I resort the table
|
||||
- focus trapping im modal fkt. nur rückwärts (shift-tab), aber nicht vorwärts
|
||||
- wenn ich in einem modal mit Tab durchgehe und zu den Buttons ganz unten komme, bewegt sich der untere Rand des Modals ab und auf
|
||||
- comments with general info in source files?
|
||||
- unter die GPL stellen
|
||||
- https://www.gnu.org/licenses/gpl-howto.html
|
||||
|
||||
- sr2ini_ynh auf neue Version bringen
|
||||
- manifest: Version, tarball URL und sha256 ersetzen
|
||||
- README.md: Version ersetzen
|
||||
- ggf. doc/screenshots/sr2ini-screenshot.jpg ersetzen (960x640)
|
||||
|
||||
- Deployment:
|
||||
- CI/CD: es gibt Jenkins für Yunohost
|
||||
- hier ist ein Tutorial, um Jenkins und Gitea miteinander bekannt zu machen: https://mike42.me/blog/2019-05-how-to-integrate-gitea-and-jenkins
|
||||
- Jenkins Doc: https://www.jenkins.io/doc/book/using/best-practices/
|
||||
- ist aber wohl mit Kanonen auf Spatzen
|
||||
- use minified libraries (aug-ui, bs, jq)
|
||||
- focus-related stuff
|
||||
- enter key doesn't work right away after clicking add button
|
||||
- after pressing damage button, focus moves to first table row act button
|
||||
- it's probably b/c I resort the table
|
||||
- wenn ein damage monitor offen ist und ich auf add combatant clicke, springt der Fokus nicht zuverlässig ins erste input feld
|
||||
- focus trapping im modal fkt. nur rückwärts (shift-tab), aber nicht vorwärts
|
||||
- zumindest im Chrome; FF ungetestet
|
||||
- im FP3T Tor Browser kann ich rauszoomen, bis ich die ganzen damage monitors und action menus sehe -> verhindern!
|
||||
- action-menu und damage-monitor sliden jetzt nicht mehr rein, sondern bleiben an Ort und Stelle
|
||||
- das sollte die Sache verhindern
|
||||
- warum fkt. das Ganze nicht als Webapp?
|
||||
- Firefox (android) sieht die Seite nicht als installable an
|
||||
- Webmanifest ist aber da und scheint auch in Ordnung zu sein (sagt Firefox on Linux)
|
||||
- comments with general info in source files?
|
||||
|
||||
|
||||
## Feature Requests
|
||||
@ -231,4 +231,3 @@
|
||||
- x dafür sorgen, dass die Seite erst dann aufgebaut wird, wenn die CSS-Files geladen sind, damit man nicht den ungestylten Krams sieht -> passt schon
|
||||
- x CSS aufräumen
|
||||
- Variablen für Farben, Filter etc.
|
||||
|
||||
|
||||
@ -1,26 +1,9 @@
|
||||
/* *****************
|
||||
// Register Service Worker
|
||||
if (navigator && navigator.serviceWorker) {
|
||||
navigator.serviceWorker.register(
|
||||
new URL("service-worker.js", import.meta.url),
|
||||
{type: "module"}
|
||||
).then( (registration) => {
|
||||
console.log('ServiceWorker registration successful with scope: ', registration.scope);
|
||||
}, (err) => {
|
||||
console.log('ServiceWorker registration failed: ', err);
|
||||
});
|
||||
} else {
|
||||
console.error("Service workers are not supported.");
|
||||
}
|
||||
***************** */
|
||||
|
||||
|
||||
/*
|
||||
* import libraries
|
||||
*/
|
||||
|
||||
const bs = require("../../node_modules/bootstrap/js/dist/modal.js");
|
||||
const $ = require("../../node_modules/jquery/dist/jquery.js");
|
||||
const bs = require("../../node_modules/bootstrap/js/dist/modal.js");
|
||||
|
||||
|
||||
/*
|
||||
@ -245,6 +228,7 @@ function handleDamageLevelClick(event) {
|
||||
$btn.parent().parent().prevAll().find("button.damage-" + damageType).removeClass("active");
|
||||
$btn.parent().parent().nextAll().find("button.damage-" + damageType + ":not(.active)").addClass("active");
|
||||
sortTable();
|
||||
$btn.focus();
|
||||
}
|
||||
|
||||
// click handler for edit buttons
|
||||
@ -544,9 +528,10 @@ $(document).ready(function () {
|
||||
}
|
||||
});
|
||||
// always focus name input field when combatant modal appears
|
||||
$('#combatant-modal').on('shown.bs.modal', () => $('#combatant-modal-name').focus());
|
||||
// (need to use vanilla JS b/c jQuery can't seem to attach event handler correctly)
|
||||
document.getElementById('combatant-modal').addEventListener('shown.bs.modal', () => $('#combatant-modal-name').focus());
|
||||
// always empty input fields when combatant modal disappears
|
||||
$("#combatant-modal").on('hidden.bs.modal', () => $("input[id*='combatant-modal']").val(""));
|
||||
document.getElementById('combatant-modal').addEventListener('hidden.bs.modal', () => $("input[id*='combatant-modal']").val(""));
|
||||
// Hide damage monitors and actions menus after click somewhere else
|
||||
$("html").on("click", (e) => {
|
||||
if ($(e.target).parents(".damage-monitor").length == 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user