1
mirror of https://github.com/home-assistant/frontend synced 2024-08-19 13:25:07 +02:00
Commit Graph

63 Commits

Author SHA1 Message Date
Paulus Schoutsen
87bd9ed48a
Ask for reload on service worker change (#1302)
* Ask for reload on service worker change

* Lint and remove alert

* Fix it once and for all

* Lint
2018-06-19 15:50:41 -04:00
Paulus Schoutsen
890c31fb96 Add calendar translation and icon 2018-06-15 12:59:43 -04:00
Paulus Schoutsen
4d48a63141
Further simplify build (#1256)
* Remove manual copy

* Use Webpack to create gzip versions
2018-06-04 07:06:12 -04:00
Paulus Schoutsen
8133102bcb
Re-add service worker caching (#1247)
* Re-add service worker caching

* Lint
2018-06-03 07:38:22 -04:00
Paulus Schoutsen
c3d67133c2
Improve custom panel support (#1236)
* Add custom panel

* Lint

* Add reference to docs

* Use panel.config
2018-06-01 10:06:28 -04:00
Paulus Schoutsen
66012da4de
Generate Hass and Hass.io specific iconset (#1214)
* Generate hass icons

* Generate Hass.io icons

* Convert hass.io to use hassio iconset

* Convert src to use hass iconset

* Give mdi-icons a chunk name

* gen-index-html aware of hass-icons

* Use ha-icon for rendering state icon
2018-05-27 17:04:18 -04:00
Paulus Schoutsen
f51503af4f
Write old mdi.html exactly as hass.io expects (#1213)
* Write old mdi.html exactly as hass.io expects

* Create build dir if it doesn't exist
2018-05-26 19:55:08 -04:00
Paulus Schoutsen
71196b9704
Load icons via JS (#1211) 2018-05-26 11:50:03 -04:00
Paulus Schoutsen
bc27f854f1
More cleanup (#1185)
* More cleanup

* Set up correct urls authorize.html

* Fix polymer lint

* Remove reference to bower

* Tweak uglify settings
2018-05-17 17:51:07 -04:00
Paulus Schoutsen
cb0db95abe
Build hassio panel (#1184)
* Fix hass.io panel

* Add develop scripts

* Build hassio on Travis
2018-05-16 23:03:48 -04:00
Paulus Schoutsen
23a2a479a5
Remove rollup (#1179)
* Remove rollup

* Fix build

* Add copy webpack plugin

* Touch service worker

* Remove unused ha-config-js-.js
2018-05-16 07:54:29 -04:00
Paulus Schoutsen
96d7ec7cda
Embed the preact code directly (#1177)
* Embed the preact code directly

* Do not transform object rest spread

* Lint

* Ignore preact from lint
2018-05-15 17:56:32 -04:00
Paulus Schoutsen
68fb35a401 Fix authorize path 2018-05-15 13:46:40 -04:00
Paulus Schoutsen
a4afc2e37a
Polymer 3 modulize (#1154)
* Version bump to 20180510.1

* Fix hass util

* Fix translations

* Bye paper-time-input

* Add webpack config

* Add webpack to package.json

* Fix translation import

* Disable web animations polyfill bad import

* Disable importHref import

* Update webpack config to build authorize.js

* Build translations json

* Build frontend correctly

* Run eslint --fix

* Load markdown JS on demand (#1155)

* Add HTML imports (#1160)

* Fix localize (#1161)

* Fix Roboto in build (#1162)

* Load web animations polyfill (#1163)

* P3: Fix chart js (#1164)

* P3: Fix Chart JS

* Update timeline package

* P3: panel resolver (#1165)

* WIP

* Initial importing of panels

* Fix panel resolver

* Fix automation and script editor (#1166)

* Expose Polymer and Polymer.Element on window (#1167)

* Remove unused import

* eslint --fix

* Es5 build (#1168)

* Build for ES5

* Fix build_frontend

* Remove stale comment

* Migrate to use paper-material-styles (#1170)

* Send parsed date to history/logbook (#1171)

* Fork app storage behavior (#1172)

* Add paper input with type time (#1173)

* Fix authorize

* Lint

* Sort imports

* Lint

* Remove eslint-html

* Do not lint authorize.html

* Fix polymer lint

* Try chrome 62 for wct

* P3: Add patched iconset (#1175)

* Add patched iconset

* Lint

* Test with latest Chrome again

* Use less window.hassUtil

* Teporarily use my fecha fork

* Import correct intl.messageFormat

* Update wct-browser-legacy to 1.0.0

* Include polyfill in right place

* Fix IntlMessageFormat

* Fix test not having a global scope

* Rollup <_<

* Fork app-localize-behavior

* Disable wct tests

* Lint
2018-05-15 13:31:47 -04:00
Paulus Schoutsen
3b7a206cec
Add an authorize page for authentication (#1147)
* Use authorize page if auth provider

* Add webcomponent polyfill

* More fixes

* ES5 fix

* Lint

* Use redirect_uri

* upgrade uglify to fix tests?

* Update browsers used for testing
2018-05-10 14:25:36 -04:00
Paulus Schoutsen
9116f5733d
Include util.js for hass.io (#1152) 2018-05-09 10:47:56 -04:00
Paulus Schoutsen
eeba117e4b Fix hass.io panel (#1148) 2018-05-08 17:54:38 +02:00
Adam Mills
7acab579b4 Use new lokalise builtin unzip for download (#900) 2018-02-17 19:49:14 -08:00
Paulus Schoutsen
4c5d85746c
Fingerprint charts (#883)
* Fingerprint charts URL

* cache in service worker
2018-02-11 09:01:17 -08:00
Boyi C
c6030e6edc Replace Google Charts with Chart.js (#429)
* chartjs test

* [WIP] Modified for Chart.js

* Tweaking styles ( tooltips and lines )

* Almost done
TODO:
Change tooltips to HTML tag
Improve color function

* More work on Tooltips

* Improve update logic
Fix linting

* resolve conflict

* [WIP]
Create new tooltip mode hack.
Add axis padding to top and botton to prevent axis cutoff

* TODO: cleanup

* FIXME: tooltip in history graph not working correctly
reorganize some code

* fix build problem

* Fix color and tooltip issue
Fix label max width for timeline chart

* update dep

* Fix strange color after build due to `uglify` bug with reference the minified version.
Make line chart behavior more similar to Google Charts.
Make the chart honor to `unknown` and other state by manually calculate point value.

* fix bugs

* Remove label for only one data in timeline chart.
Fix bug for infinite loop in some cases

* Add HTML legend to chart.

* Fix isSingleDevice bug due to calculation.
Add isSingleDevice property support.

* fix for lint

* Replace innerHTML code with polymer node.

* Replace tooltip with HTML code

* fix tooltip style

* move default tooltip mode to plugin

* LINTING

* fix
Move localize history data to Timeline Chart.
Fix timeline static color.
Rework on chart resize.

* Bug fix:
Chart may disappear on some case.
Timeline chart calculation issue.
Change timeline chart hidden logic.

* fix tooltip
rework for resize event

* lint

* element

* Replace `var` to `let`.
Move import and ChartJs injection code to `ha-chart-scripts.html`.

* lint: convert more let to const

* fix font
fix undef

* update bower.json

* move

* Load chart code on demand
2018-02-09 22:39:15 -08:00
Andrey
21ee9b297d Switch to babel env preset (#859) 2018-02-01 16:18:47 -08:00
Andrey
13f8fa7e11 Add version to JS (#839)
* Add version to JS

* Throw if version wasn't found
2018-01-26 23:27:11 -08:00
Paulus Schoutsen
9c2f6e591d
Run Hass.io panel in an iframe (#678)
* Run Hass.io in an iframe

* Update hass.io build script

* Lint

* Lint

* Fix build script

* Lint
2018-01-21 00:39:56 -08:00
Adam Mills
8649c5352b Core config translations (#821)
* Config dashboard translations

* Simplify config pages

* Core/Core/Validation

* Core/Core/Reloading

* Core/Core/Server_Management

* Core/Push_Notifications

* Core/Translation

* Core/Themes

* Initial hassbian config translations

* Switch to sentence cases
2018-01-20 22:08:22 -08:00
Paulus Schoutsen
783f356679
Add timer card and badge (#810)
* Add timer card and badge

* Disable interval on disconnect

* Tests!

* One more test case

* Remove padStart

* Remove state from timer state card
2018-01-19 09:26:06 -08:00
Andrey
cf4d867fa1 Fix sw urls caching (#739)
* Fix sw urls caching

* Remove navigateFallback

* Syntax fix
2017-12-23 14:29:55 -08:00
Adam Mills
34fd3e4899 Map and mailbox translations (#748)
* Map translations

* Mailbox panel translations
2017-12-22 21:16:02 -08:00
Andrey
b16bc88eb5 Switch to Zopfli compression (#744)
* Switch to Zopfli compression

* Lint
2017-12-22 21:12:54 -08:00
Adam Mills
097a8cfdc6
Translations for logbook/history panels (#741)
* Translations for logbook/history panels

* Switch to base localize function

* Move periods to generic durations keys

These are going to end up part of a duration class of keys that will be
more widely used.
2017-12-22 14:22:13 -05:00
Adam Mills
e0a63a2ee3
Panel translation fragments (#691)
* Move flatten to separate gulp task

* Split translation fragments into separate files

* Load translation fragments when switching panels

* Fix gulpfile lint

* Move app-location to home-assistant.html

* Compute panel navigation in home-assistant.html

* Only pass down panelUrl from home-assistant.html

* Store panelUrl on hass

* Store computed panel on hass object

* Revert "Store computed panel on hass object"

This reverts commit 0f150b1faa2b91588a432ab346821b633b349d1a.

IMO this didn't really make the code cleaner. Just wanted to see how it
would look. Keeping it here as a reverted commit in case we do want to
use it.
2017-12-05 09:12:42 -05:00
Paulus Schoutsen
90e6f59a74
Merge script and automation editor JS (#693)
* Merge script and automation editor JS

* Also consolidate the files
2017-11-30 11:38:21 -08:00
Paulus Schoutsen
10ddb7faac
Minify once, reduce build warnings (#692)
* Minify once, reduce build warnings

* Remove rollup-plugin-uglify

* address comment
2017-11-26 17:20:55 -08:00
Paulus Schoutsen
3d90d1d016
Tweak index.html (#657) 2017-11-20 21:52:35 -08:00
Andrey
7db89d5bc2 Clean rollup (#634) 2017-11-16 21:19:29 -08:00
Adam Mills
70c082716f MVP tests for hass-util.html (#629)
* MVP tests for hass-util.html

* MVP util.js to allow individual JS function export

* Use mocha to unit test js logic

* Isolate mocha test directory

* Move mocha opts to separate file

* Default export of util function

* Use reify for mocha tests instead of babel
2017-11-15 21:42:54 -08:00
Adam Mills
3ff9fe1041 Build ES5/ES6 in parallel to share gulp deps (#615)
* Build ES5/ES6 in parallel to share gulp deps

* Rollup es5 files into build-temp-es5

* Use correct ES5 path for compatibility.js
2017-11-15 18:05:52 -08:00
Paulus Schoutsen
6fac4e9027
Expose build type on window (#630)
* Expose build type on window

* Build two panels for Hass.io
2017-11-14 22:39:20 -08:00
Adam Mills
8cf0c0e94d Fix build attempting to include translationMaster (#628)
* Fix build attempting to include translationMaster

* Use full gulp path to run with no extra setup
2017-11-14 20:36:46 -08:00
Adam Mills
056e9e0d74 Translations for core states (#575)
* Fix deeper nested translations build

* Make fallback to message optional

* Use translated state names

* Remove unused switch cases

* Use src en.json as fallback instead of downloaded

* Use separate translations for badge states

* Eliminate unnecessary StatesMixin

* Remove now unused localize fallback parameter

* Fix capitalization to match material guidelines

* Move media player text generation back to model

* Make localize args object

* Change Mixin to use computed function

* Revert to normal args spread for haLocalize

* Rename to computeHaLocalize

* Allow state to default for badge and media player

* Denormalize en.json with Lokalise placeholders

* Fix cleanups missed after master merge

* Split zwave query stage states to separate keys

* Throw error to fail gulp build

* Fix zwave template and regression on general state
2017-11-12 17:48:42 -08:00
Paulus Schoutsen
3701683d4b
Pre-construct frontend index.html (#609)
* Pre-construct frontend index.html

* Only preload things that matter

* Fix entry point in dev mode

* Template Service worker url

* Update referenced service worker
2017-11-11 13:30:14 -08:00
Adam Mills
508b5d6d77
Minify translations downloaded from Lokalise (#611) 2017-11-11 15:33:47 -05:00
Andrey
adac8e55d7 Updates packages and clean gulp/ JS (#610) 2017-11-11 11:32:22 -08:00
Andrey
152df2297a Change serving of JS-version dependent files to frontend_es5 and frontend_latest (#608) 2017-11-10 21:44:03 -08:00
Andrey
583abedd34 Support serving ES6 JS to clients (#596)
* Support serving ES6 JS to clients

* Make es6 default dir and es5 a special dir

* Fix package building

* Fix build_frontend script
2017-11-10 09:05:37 -08:00
Andrey
0dc3bc7926
Update gen-service-worker.js 2017-11-05 21:51:30 +02:00
andrey-git
3025b6049f Update rules 2017-11-05 20:59:46 +02:00
andrey-git
db9dc653e0 Remove stale comment 2017-11-05 19:55:55 +02:00
andrey-git
2596d2ba52 Change networkFirst to networkOnly 2017-11-05 19:38:39 +02:00
andrey-git
904c3db3ea Fix rules for SW file caching. 2017-11-05 19:26:27 +02:00
Adam Mills
90b80880ed Store current translations in git (#563)
* Store current translations in git

* Handle empty strings in translation downloads

* Use more consice filtering

* Skip empty keys on translation download
2017-11-04 16:44:07 -07:00