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

78 Commits

Author SHA1 Message Date
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
Andrey
a79f98efbf Add webcomponents-bundle.js.map to dev version (#1216) 2018-05-27 11:56:22 -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
9393bb2fba
Include ha-iconset-svg with mdi (#1212) 2018-05-26 14:28:14 -04:00
Paulus Schoutsen
71196b9704
Load icons via JS (#1211) 2018-05-26 11:50:03 -04:00
Paulus Schoutsen
29912d1b63 Update release script 2018-05-26 08:36:02 -04:00
cdce8p
34ec3e0ae5 Fix yarn dev script (#1186)
* Fix yarn dev script

* Removed yarn dev

* Update bootstrap
2018-05-18 15:17:50 -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
47642957c8 Don't run bower anymore when doing release 2018-05-15 14:14:38 -04:00
Paulus Schoutsen
646f0bb718 Stub service worker 2018-05-15 14:06:08 -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
Adam Mills
288478978f Always run translation upload on master (#1106)
This ensures that if the master build gets cancelled when translations
change, or if any other weird situation happens, we know the
translations will be uploaded after the next build.
2018-04-18 14:11:31 -04:00
Adam Mills
e719f113d9 Fix for Lokalise backend misinterpretation of keys (#1107)
The Lokalise server has a bug that the internal portion of key
references was misinterpreted as a symfony key, and was getting auto
converted by the convert placeholders feature. Since we don't use this
we're turning it off to work around the bug.
2018-04-18 14:11:03 -04:00
Paulus Schoutsen
6d547aaf21 Update release script to use twine 2018-04-17 10:17:09 -04:00
Kory Prince
209a118833 Remove extra quoting to resolve issues on macOS (#1039) 2018-03-28 16:18:48 -07:00
Kory Prince
6c2126fb5f Use build script for markdown-js.html (#1038)
* add script to build and minify markdown-js.html from npm

* update markdown-js.html from build script
2018-03-27 23:52:27 -07:00
Andrey
46a2f4fd72 Make sure packages are up to date when releasing (#1004) 2018-03-17 17:26:45 -07:00
Adam Mills
1fbad393bf
Lokalise upload fix (#976)
* Pin lokalise sceript to working version

* Include cleanups from the home-assistant scripts
2018-03-07 09:46:33 -05:00
Adam Mills
7acab579b4 Use new lokalise builtin unzip for download (#900) 2018-02-17 19:49:14 -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
b16bc88eb5 Switch to Zopfli compression (#744)
* Switch to Zopfli compression

* Lint
2017-12-22 21:12:54 -08: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
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
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
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
Adam Mills
86128d54b4 Auto deploy base translations with Travis (#599) 2017-11-09 19:15:55 -08:00
Adam Mills
f81429702c
Replace existing translations on upload (#597) 2017-11-09 13:42:45 -05:00
Adam Mills
5722b6bbdb
Accept Lokalise token from environment (#598) 2017-11-08 23:59:10 -05:00
Adam Mills
aa389bf206 Safety check for translations upload script (#573) 2017-11-05 20:11:12 -08: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
Adam Mills
6959b1849f Store language native names in git (#556)
* Don't delete the gitignore file

* Store translation native names in git
2017-11-03 21:31:22 -07:00
Adam Mills
fdf2fa3d3f Migrate to Lokalise for managing translations (#555) 2017-11-03 20:34:47 -07:00
Paulus Schoutsen
7e3d3b757c Update release script 2017-10-26 22:22:42 -07:00
Paulus Schoutsen
6e90b70b0c Make script/release executable 2017-10-26 22:17:14 -07:00
Andrey
7bd7f14913 Call build from bootstrap. Allow nonfingerprinted mdi. (#476) 2017-10-26 20:26:38 -07:00
Adam Mills
29fad98754 Core POC support for polymer i18n (#227)
* Core POC support for polymer i18n

* Move translation from core.js to html

* Replace fetch with XHR

* Convert translation pipeline to gulp

* Convert from polyglot to Polymer localize

* Pass through missing keys for custom panels

* Store promise to be reused

* Use cacheFirst sw handler for translations

* Write full filenames to translationFingerprints

* Precache en translation

* Convert home-assistant-main to ES6 class

* Create a localization mixin

* Cleanup

* Add polymer tags to annotate for linter

* Rename fingerprints to translationMetadata

* Build translation native names into metadata

* Add language selection UI to sidebar

* Provide separate message namespace argument

* Store language/resources on hass object

* Store translationMetadata on hass

* Move language selector to config panel

* Temporarily hide language selector

* Small cleanups

* Use dynamic-align for more flexible layout

* Migrate to fetch API

* Only send change events for user selection events

* Update for new linting rules

* Migrate build_frontend changes
2017-10-25 18:12:23 -07:00
Paulus Schoutsen
417d8e7ed8 Consolidate frontend (#468)
* Consolidate frontend

* Remove no longer needed cd

* Get Roboto from bower_components

* Remove external dependency from update_mdi.py

* Copy leaflet assets on build time

* Tweak Dockerfile

* Create Python package

* Set zip_safe to False

* Update build scripts

* Version bump to 20171021.0

* Fix service worker

* Version bump to 20171021.2

* Update docker ignore

* Tweak Dockerfile thanks to Adam
2017-10-24 19:36:30 -07:00
Paulus Schoutsen
512b07963b Add build using polymer-build (#344)
* Add build using polymer-build

* Use bundle strategies to tweak stripExcludes

* Only vulcanize hass.io panel

* Rename hassio panel generate script

* Remove hydrolysis

* Get it all somewhat working

* Fixes

* Allow ES2015 + fix minify JS

* Clarify we need to fix service worker minify

* Move service worker template out of tasks folder

* Fix broken CSS

* Wrap it up

* Fix maps
2017-08-02 21:31:04 -07:00
Paulus Schoutsen
35c4e1d5ae ES5 cleanup 2017-07-16 22:19:02 -07:00
Paulus Schoutsen
31af2968da Log error in vulcanize.js when one is raised 2017-07-01 15:01:45 -07:00
Paulus Schoutsen
c5a5f41d3c Fix hassio panel build 2017-05-19 14:54:26 -07:00
Paulus Schoutsen
44e925a9ff Load Hass.io panel from supervisor in prod 2017-05-11 23:43:19 -07:00
Paulus Schoutsen
ca82a411aa Add automation editor (#275)
* Add automation editor

* Build JS before running tests

* Add browser warning

* Re-order from/to in state
2017-05-09 09:37:10 -07:00
Adam Mills
5207629e87 Add Object.assign polyfill support (#210)
* Add Object.assign polyfill support

* Remove redundant polyfill check

* Use ES6 in compatibility.js
2017-02-14 12:01:32 -08:00