GithubHelp home page GithubHelp logo

sh4rkman / squadcalc Goto Github PK

View Code? Open in Web Editor NEW
34.0 34.0 6.0 1.01 GB

A Complete Mortar Calculator for Squad

Home Page: https://squadcalc.app

License: MIT License

HTML 5.19% JavaScript 40.48% SCSS 54.33%
mortar-calculators squad

squadcalc's People

Contributors

dependabot[bot] avatar ferrariic avatar sh4rkman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

squadcalc's Issues

Error toast to rework

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

production build failing in Docker container

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?

Input skipping to target from weapon

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.

Hellcanon implementation

New mortar-like gun to add to msmc ?

Ingame table :

xBn04y14rh

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

Saved calcs are not properly centered

Describe the bug
Saved calcs are not properly centered

To Reproduce
Steps to reproduce the behavior:

  1. Save a calc on small device

Screenshots
If applicable, add screenshots to help explain your problem.

Screenshot_20230319_200817_Chrome.jpg

Heightmap size optimization

Chrome warning to avoid :

[Violation] 'load' handler took 158ms

Map thats looks too heavy :

  • Goosebay
  • Gorodok
  • Kohat
  • Lashkar
  • Skorpo
  • Tallil
  • Yeho

image

css value wo unit

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; }

Code Quality

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.

Weird String

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

  1. Create a valid firing solution with the MLRS and Mortar Technical.
  2. Save that firing solution.
  3. Nonsense characters get added to the end of the saved entry.

Screenshots

weird string

Desktop:

  • Firefox
  • Version 110.0

Addition of map interface

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.

FF keeps input values through refreshing

Describe the bug
FF keeps input values through refreshing

To Reproduce
Steps to reproduce the behavior:

  1. Firefox
  2. Enter keypads
  3. F5 / ctrl + R
  4. Values still here, no calculations

Copy/Save tooltips showing back after each new calculation

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.