Commit Graph

267 Commits

Author SHA1 Message Date
JakobLichterfeld
2a922e321c feat: update to Phoenix HTML 4.1, bump dependencies (#4277)
* feat: update to Phenix HTML 4.1

* fix: updating to the new Gettext.Backend approach

* chore: update pot files ro locale version 45.0.0

* fix: downgrade cloack back to 1.1.2

* revert: merge of mix.lock

* fix: new syntax for field name generation for phx-feedback-for

* Revert "fix: new syntax for field name generation for phx-feedback-for"

This reverts commit 4d95e4f1c9367d2d5c606ced2190ab23edcb971b.

* fix: downgrade floki back to 0.35.2

* Revert "fix: downgrade floki back to 0.35.2"

This reverts commit a4f0b6bf4b32099d89003c3d20f72333d510e109.

* fix: ensure floki nil is handled

* style: linter findings

* Revert "fix: ensure floki nil is handled"

* fix: new syntax for field name generation for phx-feedback-for

* debug: floki paramter error

* Revert "debug: floki paramter error"

This reverts commit 61920267edf5186b593920bde7d87e8b30af55aa.

* fix: Remove unnecessary code in settings_test.exs which breaks floki 0.36+
2024-10-27 08:17:49 +01:00
JakobLichterfeld
1ee48c9547 feat: update breadcrumb links to use Phoenix path helpers (#4052)
* feat: update breadcrumb links to use Phoenix path helpers

fixes: #3905

* doc: update changelog
2024-07-07 11:19:34 +02:00
JakobLichterfeld
1e1ebffd3b style: fix single quoted string in car_live (#4049)
* style: fix single quoted string in car_live

* doc: update changelog
2024-07-06 16:22:08 +02:00
Martin Kolací
8192f12860 Add icon to summary when Sentry Mode is triggered and recording (#4043)
* Add icon to summary when Sentry Mode is triggered and recording

Signed-off-by: kolaCZek <mail@kolaczek.cz>

* Update pot files

* Update Chinese translation for "Sentry Mode recording"

---------

Signed-off-by: kolaCZek <mail@kolaczek.cz>
Co-authored-by: Jakob Lichterfeld <jakob-lichterfeld@gmx.de>
2024-07-06 15:44:31 +02:00
Jakob Lichterfeld
00fdadcd06 feat: add LFP Battery setting for car settings (#4007) -> master 2024-07-05 19:11:12 +02:00
mark3-dev
c90cde871d feat: Add ability to enable and disable data collection for cars (#3993)
* Add ability to enable and disable cars

* Add default value for enabled in car_settings.

* Fix unit tests.

* Fix formatting.

* Update text to be more descriptive

* Update lables.
2024-07-05 09:01:16 +02:00
jlestel
4313409323 feat: Dynamic endpoints and token to use official Tesla API (self-hosted or from third party provider) (#3903)
* feat: endpoints by env

* fix: typo

* fix: useless env

* fix: format

* fix: distinct auth domain and url

* format

* fix: force issuer url if needed

* feat: new streaming based on vin

* fix refresh

* revert

* up

* feat: no need for access token / refresh token if the TOKEN env var is present

* feat: update login if token env var exists

* feat: add ENV var to allow insecure wss

* fix: remove TESLA_CN

* fix(naming): TESLA_API_URL to TESLA_API_DOMAIN

* feat: add an env var to allo invalid certs on WSS

* doc: add API domains env vars description

* fix: typo

* feat: add env var to change log level

* fix: APP_LOG_LEVEL

* feat: add TOKEN documention and wording

* fix: refacto insecure param

* feat: naming and doc

* fix: missing env var usage

* fix: rebound variable issuer_url

* fix: compilation warning on the issuer_url variable

* fix: format code

* fix: issuer_url assignments

---------

Co-authored-by: Julien <julien@citio.digital>
2024-05-27 11:03:23 +02:00
Jakob Lichterfeld
10995a3ce5 Revert "Dynamic endpoints and token to use official Tesla API (self-hosted or from third party provider) (#3866)"
This reverts commit 263f207dc9.
2024-05-20 14:07:26 +02:00
jlestel
263f207dc9 Dynamic endpoints and token to use official Tesla API (self-hosted or from third party provider) (#3866)
* feat: endpoints by env

* fix: typo

* fix: useless env

* fix: format

* fix: distinct auth domain and url

* format

* fix: force issuer url if needed

* feat: new streaming based on vin

* fix refresh

* revert

* up

* feat: no need for access token / refresh token if the TOKEN env var is present

* feat: update login if token env var exists

* feat: add ENV var to allow insecure wss

* fix: remove TESLA_CN

* fix(naming): TESLA_API_URL to TESLA_API_DOMAIN

* feat: add an env var to allo invalid certs on WSS

* doc: add API domains env vars description

* fix: typo

* feat: add env var to change log level

* fix: APP_LOG_LEVEL

* feat: add TOKEN documention and wording

* fix: refacto insecure param

* feat: naming and doc

* fix: missing env var usage

---------

Co-authored-by: Julien <julien@citio.digital>
2024-05-20 13:11:13 +02:00
dyxyl
7a5625f09f fix: errors from Timex.Timezone.local() during switchover to DST. (#3848)
* Fix errors from Timex.Timezone.local() during switchover to DST.

* Update the gettext files to match.
2024-04-17 14:49:41 +02:00
b1c1l1
97cfb79493 feat: Add URL_PATH environment variable for reverse proxy deployments (#3771)
* Add URL_PATH environment variable for reverse proxy deployments

For example, this can be used to run TeslaMate behind a reverse proxy, using a
URL path such as "/teslamate".

* gettext: update pot and po files

Generated using:
  mix gettext.extract --merge

* web: run mix format

* gettext: update pot and po files

Re-generating gettext files after running mix format.

Generated using:
  mix gettext.extract --merge
2024-03-25 09:21:34 +01:00
Brian May
2b5cdbdffd Add nix flake (#3485)
This will add support for nix flakes. Which really helps with my
development on nixos. This has two basic parts:

1. DEVELOPMENT

After this you can use the following commands on computer with nix and a
patched version of direnv:

direnv allow
devenv up

And it will automatically start and instance of postgresql and mosquitto
for development.

And the environment variables are already configured for teslamate.

So then can start teslamate with:

npm install --prefix ./assets && npm run deploy --prefix ./assets
iex -S mix phx.server

This part is all working as designed. And pretty simple and straight
forward.

2. NIX PACKAGE OF TESLA

This is 99% complete, but some pain points I haven't addressed yet.
Because I don't yet know of good solutions.

* There are two checksums in flake.nix that needs to be updated whenever
  mix.lock or package-lock.json changes.
2024-03-19 09:37:17 +01:00
marvelm
da819054f6 feat: Upgrade web development framework to Phoenix 1.7 (#3615)
* Upgrade to phoenix 1.7.0
The minimal changes necessary to compile the application

* Import Phoenix.Component instead of LiveView

* Fix compilation warnings

* mix format

* Update tests to trim newline characters

* mix gettext.extract --merge

* style: correct linting

* rebuild gettext

* fix: correct spacing before unit for energy added

* fix: use unicode character for whitespace

* fix: spacing with witespace

* fix: use numeric value for charge_energy_added in charging test

* fix: avoid warning about unsued function, which is actually used in plug

* fix: use whitespace in test before charge_energy_added

---------

Co-authored-by: JakobLichterfeld <jakob-lichterfeld@gmx.de>
2024-02-07 19:23:53 +01:00
Nir Klinger
00a704b394 Added expected finish charging localtime to teslamate site (#3646)
* Added expected finish charging localtime to teslamate site

* format text

* fixing indentation

* fixing indentation

* format text

* Remove UTC timezone and use the local timezone
2024-02-02 09:08:46 +01:00
Nir Klinger
b5fa0242a3 Fix an issue when car is could enter sleep mode while dog mode is enabled (#3538)
* Fix an issue when car is could enter sleep mode while dog mode is enabled.

* Update pot files

* revert change

* Fix tests

* Fix tests and issue when try to sleep was not showing

* Fix lint issue
2023-12-12 13:18:03 +01:00
libotony
c520af5732 ui: sync meta theme-color with header background color (#2840) 2023-11-16 08:49:22 +01:00
Nir Klinger
fba87d7e88 added tire low pressure icon to teslamate web (#3424)
* added tire low pressure icon to teslamate web

* updated new fields to mqtt md

* Update default.pot and errors.pot
2023-11-13 19:07:03 -06:00
Adrian Kumpf
9df62aee54 Update repo URL 2023-11-12 19:30:36 +01:00
Adrian Kumpf
b545eaf8f4 Remove donation links 2023-11-12 19:26:52 +01:00
Matthias Wirtz
ed70976770 Endpoints Query Param, Docker 60s delay fixed, Typo fixed, Update several Dependencies (#3398)
* Endpoints Query Param, Docker 60s delay fixed, Typo fixed

* Update dependencies
2023-11-12 17:51:14 +01:00
Martin Hüser
8377f361ce fix gpx format (#2925)
some tools, e.g. Garmin Basecamp, expect a proper namespace
definition in the xml root element and are more sensitive to
xml schema violations.

Track point elevation is specified to be an element of type
xsd:decimal in the gpx schema. But Teslamate renders an
empty element <ele></ele> when no elevation data is present.
This fix does not render an <ele> element when no elevation
is present

Also the gpx schema requires a "creator" attribute on the
gpx root element.
2023-01-13 14:00:36 +01:00
Adrian Kumpf
4931217ca7 Update Elixir dependencies 2023-01-13 11:02:14 +01:00
Adrian Kumpf
a413e8ce2c Add setting to select tire pressure units 2022-07-18 11:35:14 +02:00
Adrian Kumpf
a0e12c3808 Store marketing names
... and identify new Model S and X.

Closes #2494, #2496
2022-04-22 15:42:25 +02:00
Adrian Kumpf
7d2a841f1f Bump deps 2022-04-04 14:24:04 +02:00
Adrian Kumpf
bbdc2d25ae Move encryption key warning into .container 2022-02-18 17:21:16 +01:00
Adrian Kumpf
0d6e288c70 Encrypt API tokens (#2360)
Store API tokens encrypted in the database.

During the database migration a randomly generated key will be used encrypt the tokens if no ENCRYPTION_KEY environment variable was provided.

If the application is started without the presence of an ENCRYPTION_KEY (or if the key failed to decrypt the existing tokens), the UI will display a warning with further instructions.
2022-02-18 17:03:13 +01:00
cwanja
66254de906 Update summary.html.heex (#2390)
* Update summary.html.heex

Create a link on the summary page to link to Not a Tesla App release notes page per discussion request #2367 

Full disclosure - not proficient in Elixir, but understand HTML and capable of digging through other code and comparing. Just not sure how the `@summary.version` is going to be treated in the link text.

* Fix string interpolation

* Update tests

Co-authored-by: Adrian Kumpf <8999358+adriankumpf@users.noreply.github.com>
2022-01-28 12:16:17 +01:00
Adrian Kumpf
d6d4d62ac7 Skip unnecessary locale downloads 2022-01-23 23:57:24 +01:00
Adrian Kumpf
6c53788738 Don't suspend logging while downloading an update
Fixes #2194
2022-01-22 13:00:50 +01:00
James Bogosian
963831deee Enable zoom on live view of the car. (#2184)
* Enable zoom on live view of the car.

* Switch to using drag/pinch-to-zoom/scroll-to-zoom

* Remove data-zoom attrbiute as parameters are directly set in the JS.

* Directly set parameters for zoom instead of relying on attribute from DOM.

* Switch to use hover/tap to show/hide zoom control.
2022-01-21 19:28:20 +01:00
Adrian Kumpf
8aa772872a Remove support for logins with username/password 2022-01-21 19:09:32 +01:00
Adrian Kumpf
b4ad1ff2cd Remove unnecessary id attributes 2022-01-01 17:29:36 +01:00
Adrian Kumpf
1992af38c3 Show token sign-up form by default 2021-11-12 17:39:20 +01:00
Adrian Kumpf
628b6f0a4c Fix locale detection
Fixes #2141
2021-11-12 17:02:29 +01:00
Adrian Kumpf
5a9da881b4 Force locale download only in :prod 2021-11-05 17:21:43 +01:00
dependabot[bot]
9509ccde76 Bump ex_cldr from 2.23.2 to 2.24.1 (#2121)
* Bump ex_cldr from 2.23.2 to 2.24.1

Bumps [ex_cldr](https://github.com/elixir-cldr/cldr) from 2.23.2 to 2.24.1.
- [Release notes](https://github.com/elixir-cldr/cldr/releases)
- [Changelog](https://github.com/elixir-cldr/cldr/blob/master/CHANGELOG.md)
- [Commits](https://github.com/elixir-cldr/cldr/compare/v2.23.2...v2.24.1)

---
updated-dependencies:
- dependency-name: ex_cldr
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Replace custom PutSession plug

* Bust cldr chache

* Bump phoenix_live_view and tzdata

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adrian Kumpf <8999358+adriankumpf@users.noreply.github.com>
2021-11-05 17:19:37 +01:00
herbit
b1b53654e5 Added Apple mobile web app capable meta tag (#2128)
Enable to run the website in full screen mode on iPhones. This is useful in combination when starting TeslaMate with an app icon from the home screen.
2021-11-05 17:08:43 +01:00
Adrian Kumpf
1425f82b49 Update dependencies 2021-10-31 16:18:23 +01:00
Adrian Kumpf
6c0c0eeaa9 Display marketing names
Related to #2030
2021-10-06 12:25:18 +02:00
Adrian Kumpf
70468ea762 Migrate from webpack to esbuild 2021-09-22 22:07:14 +02:00
Adrian Kumpf
7c0dc3b870 Upgrade phoenix to 1.6 2021-09-22 20:38:02 +02:00
Adrian Kumpf
537452effe Migrate to HEEx templates 2021-09-22 17:10:48 +02:00
Adrian Kumpf
e15fef7216 Uprade phoenix_live_view to 0.16 2021-09-22 17:10:48 +02:00
Adrian Kumpf
405e9d1b24 Remove error message when switching forms 2021-09-10 11:11:14 +02:00
Adrian Kumpf
7f661a5a25 Update error message of recaptcha 2021-09-10 11:11:14 +02:00
Adrian Kumpf
e4234b4f25 Split auth code into smaller modules 2021-08-30 16:16:21 +02:00
Adrian Kumpf
be76577d5b Enter captcha code in a separate view
Addresses #1836
2021-07-16 18:28:25 +02:00
Adrian Kumpf
1ee8f844fa Disable sign-in button if captcha code is missing 2021-07-08 12:05:39 +02:00
Adrian Kumpf
92aae0d67f Fix API tokens form
Fixes #1666
2021-06-02 19:37:17 +02:00