sh4rkman / squadcalc Goto Github PK
View Code? Open in Web Editor NEWA Complete Mortar Calculator for Squad
Home Page: https://squadcalc.app
License: MIT License
A Complete Mortar Calculator for Squad
Home Page: https://squadcalc.app
License: MIT License
Enter A123 -> 3C345
The errors toasts are inconsistent and disapear after a few sec.
TODO: A new consistent error managing system that display errors as long as the inputs are wrong
I am attempting to run this application in a Docker container.
My Dockerfile:
FROM node:18-slim
RUN apt-get update && apt-get install -y git python3 build-essential && rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/sh4rkman/SquadCalc.git
WORKDIR "/SquadCalc"
RUN npm ci
CMD [ "npm", "run", "build:prod"]
My docker-compose
services:
mortarcalc:
build: .
image: mortarcalc
container_name: mortarcalc
ports:
- 8082:80
restart: always
environment:
TZ: America/Chicago
The container builds successfully, but it fails during runtime. The only console output are warnings about assets exceeding a recommended size:
> [email protected] build:prod
> webpack --config ./config/webpack.prod.js
assets by info 4.56 MiB [immutable] 36 assets
assets by path src/img/favicons/*.png 72.6 KiB
asset src/img/favicons/icon_195x195.4a02e49b237947c080f27958744daa48.png 11.9 KiB [emitted]
asset src/img/favicons/icon_196x196.6855bd15533d0a580b8a84a21b887c85.png 11.8 KiB [emitted]
asset src/img/favicons/icon_180x180.eb8c935cc8f820be0a413bd3cc1b8feb.png 10.3 KiB [emitted]
+ 8 assets
assets by path *.ico 14.5 KiB
asset icon_16x16.abf2c1b6e62976aef514bc1167d4030c.ico 7.23 KiB [emitted]
asset icon_32x32.abf2c1b6e62976aef514bc1167d4030c.ico 7.23 KiB [emitted]
asset index.html 5.04 KiB [emitted]
asset manifest.d59b03a42d2eece98606da9263479788.json 2.31 KiB [emitted]
asset src/img/favicons/icon_1024x1024.697d7c45238be7189a926e7dc9d1e722.svg 1.66 KiB [emitted]
asset robots.txt 23 bytes [emitted]
Entrypoint main [big] 2.18 MiB (2.37 MiB) = src/css/326.fa1803deb7d43fb5521e.min.css 362 KiB ./src/js/326.4e45bf5430361622c911.min.js 1.68 MiB src/css/main.52d1926916a542b6f305.min.css 43.1 KiB ./src/js/main.c09c5c10ce5c6cdc19a6.min.js 109 KiB 31 auxiliary assets
orphan modules 466 KiB (javascript) 7.32 KiB (runtime) [orphan] 117 modules
runtime modules 3.06 KiB 6 modules
cacheable modules 640 KiB (javascript) 2.37 MiB (asset) 134 KiB (css/mini-extract)
modules by path ./src/ 40.8 KiB (javascript) 2.37 MiB (asset) 11 KiB (css/mini-extract)
asset modules 1.27 KiB (javascript) 2.37 MiB (asset) 31 modules
modules by path ./src/css/ 11 KiB
css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/sass-loader/dist/cjs.js!./src/css/styles.scss 77 bytes [built] [code generated]
+ 3 modules
./src/app.js + 39 modules 39.5 KiB [built] [code generated]
modules by path ./node_modules/ 600 KiB (javascript) 123 KiB (css/mini-extract)
javascript modules 600 KiB 5 modules
css modules 123 KiB
modules by path ./node_modules/purecss/build/*.css 29.3 KiB 2 modules
+ 3 modules
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
src/css/326.fa1803deb7d43fb5521e.min.css (362 KiB)
./src/js/326.4e45bf5430361622c911.min.js (1.68 MiB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
main (2.18 MiB)
src/css/326.fa1803deb7d43fb5521e.min.css
./src/js/326.4e45bf5430361622c911.min.js
src/css/main.52d1926916a542b6f305.min.css
./src/js/main.c09c5c10ce5c6cdc19a6.min.js
WARNING in webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/
webpack 5.82.1 compiled with 3 warnings in 14304 ms
Any suggestions? Is it even possible to build & run this on Linux?
After inputting first part of weapon it skips to end of target input string.
So after i.e writing "A01" it will set cursor to end of target input string.
Browser: Safari Desktop
Seems to work fine though in Firefox.
It's in the title. It can be more useful to use the higher angle to hit some targets behind buildings or similar.
https://www.codefactor.io/repository/github/sh4rkman/msmc/issues/master
Logo is not centered because of the version div
New mortar-like gun to add to msmc ?
Ingame table :
According to endeber script, looks like there is different velocities once again (air friction?) :
HELL: DIST T-MIL | F-MIL | DEV | VEL
HELL: --------------|-----------|---------|----------
HELL: 0925m 0785mil | 000NaNmil | d=+00NaN | v=95.231
HELL: 0900m 0872mil | 000NaNmil | d=+00NaN | v=94.387
HELL: 0875m 0959mil | 000NaNmil | d=+00NaN | v=94.924
HELL: 0800m 1047mil | 1000.5mil | d=+46.49 | v=94.138
HELL: 0700m 1134mil | 1120.8mil | d=+13.17 | v=93.035
HELL: 0600m 1221mil | 1210.3mil | d=+10.67 | v=93.171
HELL: 0500m 1274mil | 1286.6mil | d=-12.64 | v=90.576
HELL: 0400m 1343mil | 1355.6mil | d=-12.56 | v=90.044
HELL: 0300m 1396mil | 1419.9mil | d=-23.89 | v=86.832
HELL: 0200m 1448mil | 1481.3mil | d=-33.35 | v=81.644
HELL: 0150m 1483mil | 1511.4mil | d=-28.37 | v=80.346
Enhancement : allow copying to clipboard and tooltip only if coords are correct
New tooltip should be :
Value Error : font-size only 0 can be a unit. You must put a unit after your number : 1.2
from :
/* -- L*800px -- */ @media (min-height: 50em) { input { font-size: 1.2; }
to
/* -- L*800px -- */ @media (min-height: 50em) { input { font-size: 1.2em; }
ToFix:
21: Expected var 'ctx' to be ordered before var 'map'.
43: Expected const 'fkp' to be ordered before var 'pos'.
47: Move variable declaration to top of function or script.
48: Expected 'var' and instead saw 'let'.
49: Expected 'var' and instead saw 'let'.
52: Expected 'var' and instead saw 'let'.
57: Move variable declaration to top of function or script.
64 Missing semicolon.
65 [JSLint was unable to finish] Expected ';' and instead saw '}'.
356 Missing semicolon.
402 Missing semicolon.
577 Missing semicolon.
580 Missing semicolon.
422: Unexpected trailing space.
453:Unexpected trailing space.
454: Unexpected trailing space.
496: Unexpected trailing space.
the last div should be class="pure-u-3-24"
and not class="pure-u-2-24"
To Reproduce
Desktop:
TODO: detect if the keypads are out of map
Display a message
A12-5 is calculated as A1-2-5
ReferenceError: event is not defined - main.js:241:28
filterInput
https://mortar.sharkman.info/js/main.js:241:28
onkeypress
https://mortar.sharkman.info/:1:1
Describe the bug
Weird string added when saving firing solution with MLRS and Mortar Technical. No issue when using any of the other weapons.
To Reproduce
Screenshots
Desktop:
Toast, tooltip
Considering squadmortar.xyz and squad-calc.com are not being kept up to date it would be great to add an option to use a map interface to place the weapon and targets.
Describe the bug
MLRS not accurate on Yeho.
Desktop:
Like in the game ? Check it
To Reproduce
Steps to reproduce the behavior:
Solution
Catch de window resize event and resize every saved input
https://developer.mozilla.org/en-US/docs/Web/API/Window/resize_event
Range now is between 1000-2050m.
todo: make responsive the social icon
make the keypad holder red
Describe the bug
FF keeps input values through refreshing
To Reproduce
Steps to reproduce the behavior:
When coordinates are already there, changing map should refresh calculation with the new heightmap
Current log :
B234->C52 = 165.5° - 1165
B234->C524 = 167.5° - 1169
B234->C5246 = 166.8° - 1168
Goal :
B234->C524 = 167.5° - 1169
B234->C5246 = 166.8° - 1168
map research is disabled for now because of mobile users.
Need to figure out how to allow it on big screens only
https://stackoverflow.com/questions/17480040/select2-hiding-the-search-box
https://stackoverflow.com/questions/60024417/select2-change-configuration-dynamically
Ideally, these one-time tooltips are here to help users to spot the linked actions
Once they clicked it, there is no need to display it again :
Stock a value somewhere once the linked action is clicked and don't show the tooltips ever again until page is refreshed
Cookie/session is another alternative, but looks overkill
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.