feat: electron based app
No files matched your search
@@ -1,12 +0,0 @@
|
||||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
> 0.5%
|
||||
last 2 versions
|
||||
Firefox ESR
|
||||
not dead
|
||||
not IE 9-11 # For IE 9-11 support, remove 'not'.
|
||||
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"es6": true,
|
||||
"es2017": true
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 10,
|
||||
"project": [
|
||||
"./src/tsconfig.app.json",
|
||||
"./src/tsconfig.spec.json",
|
||||
"./e2e/tsconfig.e2e.json"
|
||||
],
|
||||
"sourceType": "module",
|
||||
"ecmaFeatures": {
|
||||
"modules": true
|
||||
}
|
||||
},
|
||||
"plugins": ["@typescript-eslint", "@angular-eslint/eslint-plugin"],
|
||||
"rules": {
|
||||
"@typescript-eslint/indent": [
|
||||
"error",
|
||||
4,
|
||||
{
|
||||
"SwitchCase": 1,
|
||||
"CallExpression": { "arguments": "first" },
|
||||
"FunctionExpression": { "parameters": "first" },
|
||||
"FunctionDeclaration": { "parameters": "first" }
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-empty-function": 0,
|
||||
"@typescript-eslint/no-var-requires": 0,
|
||||
"@typescript-eslint/no-explicit-any": 0,
|
||||
"@typescript-eslint/no-unsafe-call": 0,
|
||||
"@typescript-eslint/no-unsafe-member-access": 0,
|
||||
"@typescript-eslint/no-unsafe-assignment": 0,
|
||||
"@typescript-eslint/no-unsafe-return": 0,
|
||||
"@typescript-eslint/no-floating-promises": 0,
|
||||
"@angular-eslint/use-injectable-provided-in": "error",
|
||||
"@angular-eslint/no-attribute-decorator": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.component.html"],
|
||||
"parser": "@angular-eslint/template-parser",
|
||||
"plugins": ["@angular-eslint/template"],
|
||||
"rules": {
|
||||
"@angular-eslint/template/banana-in-a-box": "error",
|
||||
"@angular-eslint/template/no-negated-async": "error"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
name: Deploy to GitHub Pages
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Build and Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@releases/v2
|
||||
env:
|
||||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||
BASE_BRANCH: master
|
||||
BRANCH: gh-pages
|
||||
FOLDER: dist/iptv-player
|
||||
BUILD_SCRIPT: npm install && npm run-script build-and-deploy
|
||||
@@ -4,16 +4,16 @@
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
# Only exists if Bazel was run
|
||||
/bazel-out
|
||||
/app-builds
|
||||
/release
|
||||
main.js
|
||||
src/**/*.js
|
||||
!src/karma.conf.js
|
||||
*.js.map
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# profiling files
|
||||
chrome-profiler-events*.json
|
||||
speed-measure-plugin*.json
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
@@ -25,11 +25,10 @@ speed-measure-plugin*.json
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
@@ -37,9 +36,14 @@ speed-measure-plugin*.json
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
testem.log
|
||||
/typings
|
||||
package-lock.json
|
||||
|
||||
# e2e
|
||||
/e2e/*.js
|
||||
!/e2e/protractor.conf.js
|
||||
/e2e/*.map
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
language: node_js
|
||||
node_js:
|
||||
- '12'
|
||||
- '10'
|
||||
dist: xenial
|
||||
sudo: required
|
||||
services:
|
||||
- xvfb
|
||||
before_script:
|
||||
- export DISPLAY=:99.0
|
||||
install:
|
||||
- npm set progress=false
|
||||
- npm install
|
||||
script:
|
||||
- ng lint
|
||||
- npm run test
|
||||
- npm run e2e
|
||||
- npm run build
|
||||
@@ -1,21 +1,3 @@
|
||||
{
|
||||
"peacock.color": "#557c9b",
|
||||
"workbench.colorCustomizations": {
|
||||
"activityBar.background": "#7295b1",
|
||||
"activityBar.foreground": "#15202b",
|
||||
"activityBar.inactiveForeground": "#15202b99",
|
||||
"activityBarBadge.background": "#e8d6e0",
|
||||
"activityBarBadge.foreground": "#15202b",
|
||||
"titleBar.activeBackground": "#557c9b",
|
||||
"titleBar.inactiveBackground": "#557c9b99",
|
||||
"titleBar.activeForeground": "#e7e7e7",
|
||||
"titleBar.inactiveForeground": "#e7e7e799",
|
||||
"statusBar.background": "#557c9b",
|
||||
"statusBarItem.hoverBackground": "#7295b1",
|
||||
"statusBar.foreground": "#e7e7e7",
|
||||
"activityBar.activeBackground": "#7295b1",
|
||||
"activityBar.activeBorder": "#e8d6e0",
|
||||
"statusBar.border": "#557c9b",
|
||||
"titleBar.border": "#557c9b"
|
||||
}
|
||||
"i18n-ally.localesPaths": "src/assets/i18n"
|
||||
}
|
||||
@@ -0,0 +1,628 @@
|
||||
## 8.0.0 (2020-07-13)
|
||||
|
||||
* [Bumped Version] 8.0.0 ([0a5db45](https://github.com/maximegris/angular-electron/commit/0a5db45))
|
||||
* added "style" key to "schematics" ([6f5bbc5](https://github.com/maximegris/angular-electron/commit/6f5bbc5))
|
||||
* Create FUNDING.yml ([087570a](https://github.com/maximegris/angular-electron/commit/087570a))
|
||||
* misc/ update README (Angular & Electron version) ([2d33b15](https://github.com/maximegris/angular-electron/commit/2d33b15))
|
||||
* ref/ Upgrade to Angular 10.3 & Electron 9.1 ([84f0519](https://github.com/maximegris/angular-electron/commit/84f0519))
|
||||
* Update README.md ([11d0a17](https://github.com/maximegris/angular-electron/commit/11d0a17))
|
||||
|
||||
|
||||
|
||||
## <small>7.2.1 (2020-06-20)</small>
|
||||
|
||||
* [Bumped Version] 7.2.1 ([cabd11e](https://github.com/maximegris/angular-electron/commit/cabd11e))
|
||||
* ref/ keep only 1 eslint config ([e942747](https://github.com/maximegris/angular-electron/commit/e942747))
|
||||
|
||||
|
||||
|
||||
## 7.2.0 (2020-06-20)
|
||||
|
||||
* [Bumped Version] 7.2.0 ([a98a84a](https://github.com/maximegris/angular-electron/commit/a98a84a))
|
||||
* feat/ merge electron-builder npm scripts ([ddd92b3](https://github.com/maximegris/angular-electron/commit/ddd92b3))
|
||||
* fix/ ng lint with eslint ([92d7419](https://github.com/maximegris/angular-electron/commit/92d7419))
|
||||
* misc/ upgrade Electron (9.0.4) / Angular (9.1.11) ([21f7401](https://github.com/maximegris/angular-electron/commit/21f7401))
|
||||
* ref/ electron remote deprecated ([a8628fc](https://github.com/maximegris/angular-electron/commit/a8628fc))
|
||||
|
||||
|
||||
|
||||
## 7.1.0 (2020-05-02)
|
||||
|
||||
* [Bumped Version] 7.1.0 ([8dffcea](https://github.com/maximegris/angular-electron/commit/8dffcea))
|
||||
* feat/ VSCode : add Debugging config for man process (#465) + Karma ([acc62d9](https://github.com/maximegris/angular-electron/commit/acc62d9)), closes [#465](https://github.com/maximegris/angular-electron/issues/465)
|
||||
* fix/ Karma configuration to debug easily ([273e752](https://github.com/maximegris/angular-electron/commit/273e752))
|
||||
|
||||
|
||||
|
||||
## <small>7.0.5 (2020-04-26)</small>
|
||||
|
||||
* [Bumped Version] 7.0.5 ([63eed52](https://github.com/maximegris/angular-electron/commit/63eed52))
|
||||
* Upgrade Angular 9.1.3 & Electron 8.2.3 ([00b9d43](https://github.com/maximegris/angular-electron/commit/00b9d43))
|
||||
|
||||
|
||||
|
||||
## <small>7.0.4 (2020-04-20)</small>
|
||||
|
||||
* [Bumped Version] 7.0.4 ([dbce7a0](https://github.com/maximegris/angular-electron/commit/dbce7a0))
|
||||
* ref/ make app reloading/working with and without usehash routing strategy ([386ce67](https://github.com/maximegris/angular-electron/commit/386ce67))
|
||||
* Transparent background issue fix for Linux ([4c0c169](https://github.com/maximegris/angular-electron/commit/4c0c169))
|
||||
|
||||
|
||||
|
||||
## <small>7.0.3 (2020-04-11)</small>
|
||||
|
||||
* [Bumped Version] 7.0.3 ([6206066](https://github.com/maximegris/angular-electron/commit/6206066))
|
||||
* fix/ polyfills in tsconfig ([cf4f172](https://github.com/maximegris/angular-electron/commit/cf4f172))
|
||||
* misc/ changelog ([19f6027](https://github.com/maximegris/angular-electron/commit/19f6027))
|
||||
|
||||
|
||||
|
||||
## <small>7.0.2 (2020-04-11)</small>
|
||||
|
||||
* [Bumped Version] 7.0.2 ([c4c36f6](https://github.com/maximegris/angular-electron/commit/c4c36f6))
|
||||
* Fix a typo in README.md ([86ac910](https://github.com/maximegris/angular-electron/commit/86ac910))
|
||||
* misc/ Changelog ([67437ba](https://github.com/maximegris/angular-electron/commit/67437ba))
|
||||
* misc/ maj angular 9.1.1 & electron 8.2.1 ([061e01e](https://github.com/maximegris/angular-electron/commit/061e01e))
|
||||
* misc/ maj eslint dep ([09fc1f7](https://github.com/maximegris/angular-electron/commit/09fc1f7))
|
||||
* moved all app icons to assets/icons folder ([7d6bb69](https://github.com/maximegris/angular-electron/commit/7d6bb69))
|
||||
* ref/ set allowRendererProcessReuse to true ([7c5c43b](https://github.com/maximegris/angular-electron/commit/7c5c43b))
|
||||
|
||||
|
||||
|
||||
## <small>7.0.1 (2020-02-22)</small>
|
||||
|
||||
* [Bumped Version] 7.0.1 ([7a84ca0](https://github.com/maximegris/angular-electron/commit/7a84ca0))
|
||||
* fix/ README dependencies version ([7276d96](https://github.com/maximegris/angular-electron/commit/7276d96))
|
||||
* misc/ upgrade Angular 9.0.2 & Electron 8.0.1 ([174b36f](https://github.com/maximegris/angular-electron/commit/174b36f))
|
||||
* ref/ travis test node 10 & 12 ([8b7ee5b](https://github.com/maximegris/angular-electron/commit/8b7ee5b))
|
||||
|
||||
|
||||
|
||||
## 7.0.0 (2020-02-09)
|
||||
|
||||
* [Bumped Version] 7.0.0 ([0f304d2](https://github.com/maximegris/angular-electron/commit/0f304d2))
|
||||
* cast isElectron to boolean #429 ([ee06695](https://github.com/maximegris/angular-electron/commit/ee06695)), closes [#429](https://github.com/maximegris/angular-electron/issues/429)
|
||||
* feat/ update angular 8 deps ([7df49ff](https://github.com/maximegris/angular-electron/commit/7df49ff))
|
||||
* feat/ update to Angular 9 & Electron 8 ([a304034](https://github.com/maximegris/angular-electron/commit/a304034))
|
||||
* fix/ e2e tests ([395d2da](https://github.com/maximegris/angular-electron/commit/395d2da))
|
||||
* hot reload note ([28e1854](https://github.com/maximegris/angular-electron/commit/28e1854))
|
||||
* ref/ upgrade electron to v8 ([320ce2f](https://github.com/maximegris/angular-electron/commit/320ce2f))
|
||||
|
||||
|
||||
|
||||
## <small>6.4.1 (2019-12-25)</small>
|
||||
|
||||
* feat/ update Electron (7.1.2) ([3d76ff5](https://github.com/maximegris/angular-electron/commit/3d76ff5))
|
||||
* misc/ maj changelog ([eb46727](https://github.com/maximegris/angular-electron/commit/eb46727))
|
||||
* reef/ update stale bot ([671b7c9](https://github.com/maximegris/angular-electron/commit/671b7c9))
|
||||
* ref/ remove usunsed files ([9bf5824](https://github.com/maximegris/angular-electron/commit/9bf5824))
|
||||
|
||||
|
||||
|
||||
## 6.4.0 (2019-11-19)
|
||||
|
||||
* [Bumped Version] 6.4.0 ([fac9eef](https://github.com/maximegris/angular-electron/commit/fac9eef))
|
||||
* #412 change selector of WebviewDirective ([76e7918](https://github.com/maximegris/angular-electron/commit/76e7918)), closes [#412](https://github.com/maximegris/angular-electron/issues/412)
|
||||
* eslint-migration ([7637f45](https://github.com/maximegris/angular-electron/commit/7637f45))
|
||||
* eslint-migration - disable warnings/errors ([99e7ec0](https://github.com/maximegris/angular-electron/commit/99e7ec0))
|
||||
* eslint-migration - fix removed translation import ([2f64f37](https://github.com/maximegris/angular-electron/commit/2f64f37))
|
||||
* eslint-migration - remove tslint.json configuration ([3c1f9f6](https://github.com/maximegris/angular-electron/commit/3c1f9f6))
|
||||
* karma-electron ([21f97fd](https://github.com/maximegris/angular-electron/commit/21f97fd))
|
||||
* karma-electron - remove chrome deps for travis ([0f09907](https://github.com/maximegris/angular-electron/commit/0f09907))
|
||||
* misc/ add npmrc ([9d94f9c](https://github.com/maximegris/angular-electron/commit/9d94f9c))
|
||||
* misc/ typo README ([d52b03a](https://github.com/maximegris/angular-electron/commit/d52b03a))
|
||||
* permissive eslint rules to remove linter warnings ([964b57f](https://github.com/maximegris/angular-electron/commit/964b57f))
|
||||
* require is not defined ([632c454](https://github.com/maximegris/angular-electron/commit/632c454))
|
||||
|
||||
|
||||
|
||||
## <small>6.3.1 (2019-11-01)</small>
|
||||
|
||||
* [Bumped Version] 6.3.1 ([671b6a3](https://github.com/maximegris/angular-electron/commit/671b6a3))
|
||||
* #395 - require is not defined ([c4b2cb6](https://github.com/maximegris/angular-electron/commit/c4b2cb6)), closes [#395](https://github.com/maximegris/angular-electron/issues/395)
|
||||
* changelog ([39b0bca](https://github.com/maximegris/angular-electron/commit/39b0bca))
|
||||
|
||||
|
||||
|
||||
## 6.3.0 (2019-10-25)
|
||||
|
||||
* [Bumped Version] 6.3.0 ([09f9646](https://github.com/maximegris/angular-electron/commit/09f9646))
|
||||
* misc/ change Electron version to 7.0.0 in README ([6a4e2de](https://github.com/maximegris/angular-electron/commit/6a4e2de))
|
||||
* misc/ remove link to dependenciesci ([93d5a8c](https://github.com/maximegris/angular-electron/commit/93d5a8c))
|
||||
* misc/ upgrade Electron 7 ([d732340](https://github.com/maximegris/angular-electron/commit/d732340))
|
||||
|
||||
|
||||
|
||||
## 6.2.0 (2019-09-29)
|
||||
|
||||
* [Bumped Version] 6.2.0 ([8838e0e](https://github.com/maximegris/angular-electron/commit/8838e0e))
|
||||
* Maj Changelog ([bc4c950](https://github.com/maximegris/angular-electron/commit/bc4c950))
|
||||
* misc/ add Stale to close unactive issues ([398bdf1](https://github.com/maximegris/angular-electron/commit/398bdf1))
|
||||
* Upgrade Angular 8.2.8 & Electron 6.0.10 ([2ecda63](https://github.com/maximegris/angular-electron/commit/2ecda63))
|
||||
|
||||
|
||||
|
||||
## 6.1.0 (2019-08-15)
|
||||
|
||||
* [Bumped Version] 6.1.0 ([b47c594](https://github.com/maximegris/angular-electron/commit/b47c594))
|
||||
* [DELETE]: vscode settings removed ([becc9b4](https://github.com/maximegris/angular-electron/commit/becc9b4))
|
||||
* [UPDATE]: Typescript version fixes ([a284c23](https://github.com/maximegris/angular-electron/commit/a284c23))
|
||||
* Angular src restructured as modular as per angular official guidelines, .travis.yml support added fo ([5983703](https://github.com/maximegris/angular-electron/commit/5983703))
|
||||
* bump tslint & codelyzer versions, update tslint rules & alphabetize ([8425cdc](https://github.com/maximegris/angular-electron/commit/8425cdc))
|
||||
* Corejs path updates ([88056d6](https://github.com/maximegris/angular-electron/commit/88056d6))
|
||||
* Electron 6.0.0 ([1aef350](https://github.com/maximegris/angular-electron/commit/1aef350))
|
||||
* fix/ Version Electron in README ([acf0d4f](https://github.com/maximegris/angular-electron/commit/acf0d4f))
|
||||
* misc/ upgrade Angular 8.2 / Spectron 7 ([6e2211f](https://github.com/maximegris/angular-electron/commit/6e2211f))
|
||||
* Update dependencies ([bd51f28](https://github.com/maximegris/angular-electron/commit/bd51f28))
|
||||
|
||||
|
||||
|
||||
## <small>6.0.1 (2019-05-31)</small>
|
||||
|
||||
* [Bumped Version] 6.0.1 ([4f9cef3](https://github.com/maximegris/angular-electron/commit/4f9cef3))
|
||||
* Add CI for macOS. ([3ba02e3](https://github.com/maximegris/angular-electron/commit/3ba02e3))
|
||||
* ref/ strict version build-angular & zonejs ([5a24b56](https://github.com/maximegris/angular-electron/commit/5a24b56))
|
||||
* ref/ strict version codelyzer ([6ede0c8](https://github.com/maximegris/angular-electron/commit/6ede0c8))
|
||||
* Remove Node.js v12. ([ccbf6cd](https://github.com/maximegris/angular-electron/commit/ccbf6cd))
|
||||
* Run CI for Node.js version 10 ([2538965](https://github.com/maximegris/angular-electron/commit/2538965))
|
||||
* Use service xvfb. ([4db31e3](https://github.com/maximegris/angular-electron/commit/4db31e3))
|
||||
|
||||
|
||||
|
||||
## 6.0.0 (2019-05-31)
|
||||
|
||||
* [Bumped Version] 6.0.0 ([fb719ab](https://github.com/maximegris/angular-electron/commit/fb719ab))
|
||||
* bump angular version ([7a564a0](https://github.com/maximegris/angular-electron/commit/7a564a0))
|
||||
* Fix Travis CI link ([10aaa4c](https://github.com/maximegris/angular-electron/commit/10aaa4c))
|
||||
* Not gitignore src/karma.conf.js ([7599320](https://github.com/maximegris/angular-electron/commit/7599320))
|
||||
* ref/ upgrade Angular 8 and Electron 5 ([92334cf](https://github.com/maximegris/angular-electron/commit/92334cf))
|
||||
* update versions and prepare for electron 5 ([07a5786](https://github.com/maximegris/angular-electron/commit/07a5786))
|
||||
* version bump ([bb1d6bb](https://github.com/maximegris/angular-electron/commit/bb1d6bb))
|
||||
* feat(CI): update Ubuntu and Node versions in Travis ([e0ff557](https://github.com/maximegris/angular-electron/commit/e0ff557))
|
||||
* fix: type conflicts ([a2971bf](https://github.com/maximegris/angular-electron/commit/a2971bf))
|
||||
* fix(e2e): add mocha types ([20e1e89](https://github.com/maximegris/angular-electron/commit/20e1e89))
|
||||
* fix(e2e): without devTools ([2581983](https://github.com/maximegris/angular-electron/commit/2581983)), closes [/github.com/electron/spectron/issues/174#issuecomment-319242097](https://github.com//github.com/electron/spectron/issues/174/issues/issuecomment-319242097)
|
||||
* chore: Spectron for e2e tests ([901438a](https://github.com/maximegris/angular-electron/commit/901438a))
|
||||
|
||||
|
||||
|
||||
## 5.1.0 (2018-11-30)
|
||||
|
||||
* [Bumped Version] 5.1.0 ([b790e12](https://github.com/maximegris/angular-electron/commit/b790e12))
|
||||
* fix/ typo Angular 7 ([fde371f](https://github.com/maximegris/angular-electron/commit/fde371f))
|
||||
* fix/ typo README ([723233c](https://github.com/maximegris/angular-electron/commit/723233c))
|
||||
* fix/ typo script npm electron:windows ([45bab44](https://github.com/maximegris/angular-electron/commit/45bab44))
|
||||
* ref/ remve npx - fix vulnerabilities ([41aeb57](https://github.com/maximegris/angular-electron/commit/41aeb57))
|
||||
* update README ([f146d5d](https://github.com/maximegris/angular-electron/commit/f146d5d))
|
||||
|
||||
|
||||
|
||||
## 5.0.0 (2018-11-11)
|
||||
|
||||
* Fix typos in README file ([0440ee9](https://github.com/maximegris/angular-electron/commit/0440ee9))
|
||||
* ref/ Generate changelog ([a89b3ce](https://github.com/maximegris/angular-electron/commit/a89b3ce))
|
||||
* ref/ Upgrade to Angular 7 ([315a79b](https://github.com/maximegris/angular-electron/commit/315a79b))
|
||||
* Update electron-builder.json files rule ([82c7bcf](https://github.com/maximegris/angular-electron/commit/82c7bcf))
|
||||
* Update Version Electron 2 to 3 #hacktoberfest ([f083328](https://github.com/maximegris/angular-electron/commit/f083328))
|
||||
|
||||
|
||||
|
||||
## <small>4.2.2 (2018-08-22)</small>
|
||||
|
||||
* fix/ build serve & electron with single tsc command ([9106c8f](https://github.com/maximegris/angular-electron/commit/9106c8f))
|
||||
* fix/ typo README ([a9448aa](https://github.com/maximegris/angular-electron/commit/a9448aa))
|
||||
|
||||
|
||||
|
||||
## <small>4.2.1 (2018-08-22)</small>
|
||||
|
||||
* fix/ jslib in main process error ([ef33f5e](https://github.com/maximegris/angular-electron/commit/ef33f5e))
|
||||
|
||||
|
||||
|
||||
## 4.2.0 (2018-08-19)
|
||||
|
||||
* [Bumped Version] V4.2.0 ([0da3856](https://github.com/maximegris/angular-electron/commit/0da3856))
|
||||
* fix/ electron builder output directories #200 ([f4535e5](https://github.com/maximegris/angular-electron/commit/f4535e5)), closes [#200](https://github.com/maximegris/angular-electron/issues/200)
|
||||
* Make sure tsconfig be used. ([961c8b1](https://github.com/maximegris/angular-electron/commit/961c8b1))
|
||||
* ref/ remove some directories of tsconfig.app.json ([1adad4a](https://github.com/maximegris/angular-electron/commit/1adad4a))
|
||||
* Upgrade Angular (6.1.2) deps ([d8818c1](https://github.com/maximegris/angular-electron/commit/d8818c1))
|
||||
|
||||
|
||||
|
||||
## 4.1.0 (2018-06-27)
|
||||
|
||||
* Allow Angular Using Electron Modules ([ec705ee](https://github.com/maximegris/angular-electron/commit/ec705ee))
|
||||
* fix/ version angular (revert 6.0.6 -> 6.0.5) ([63a41b8](https://github.com/maximegris/angular-electron/commit/63a41b8))
|
||||
* fix/ version ts-node ([0d8341a](https://github.com/maximegris/angular-electron/commit/0d8341a))
|
||||
* ref/ postinstall web & electron ([50657d0](https://github.com/maximegris/angular-electron/commit/50657d0))
|
||||
* update README ([1d48e32](https://github.com/maximegris/angular-electron/commit/1d48e32))
|
||||
* feat(zone): add zone-patch-electron to patch Electron native APIs in polyfills ([01842e2](https://github.com/maximegris/angular-electron/commit/01842e2))
|
||||
|
||||
|
||||
|
||||
## 4.0.0 (2018-05-25)
|
||||
|
||||
* misc/ remove unused packages ([a7e33b6](https://github.com/maximegris/angular-electron/commit/a7e33b6))
|
||||
* misc/ update Changelog ([b758122](https://github.com/maximegris/angular-electron/commit/b758122))
|
||||
* ref/ upgrade angular to 6.0.3 ([e7fac6e](https://github.com/maximegris/angular-electron/commit/e7fac6e))
|
||||
* refactor: update electron, electron-builder to latest (2.0.2, 20.14.7) ([f19e6ee](https://github.com/maximegris/angular-electron/commit/f19e6ee))
|
||||
* refactor: upgrade to NodeJS 8, Angular 6, CLI 6, Electron 2.0, RxJS 6.1 ([e37efdb](https://github.com/maximegris/angular-electron/commit/e37efdb))
|
||||
* refactor(hooks): replace hooks to ng-cli fileReplacements logic ([c940037](https://github.com/maximegris/angular-electron/commit/c940037))
|
||||
* fix(test): create polyfills-test.ts for karma test & setup Travis CI ([7fbc68c](https://github.com/maximegris/angular-electron/commit/7fbc68c))
|
||||
* fix(travis): set progress to false (speed up npm) ([be48531](https://github.com/maximegris/angular-electron/commit/be48531))
|
||||
|
||||
|
||||
|
||||
## <small>3.4.1 (2018-05-25)</small>
|
||||
|
||||
* misc/ update changelog ([70b359f](https://github.com/maximegris/angular-electron/commit/70b359f))
|
||||
* Modify electron builder configuration to remove source code and tests ([0cf6899](https://github.com/maximegris/angular-electron/commit/0cf6899))
|
||||
* version 3.4.1 ([308ea9c](https://github.com/maximegris/angular-electron/commit/308ea9c))
|
||||
|
||||
|
||||
|
||||
## 3.4.0 (2018-05-25)
|
||||
|
||||
* misc/ update changelog ([7d5eeb3](https://github.com/maximegris/angular-electron/commit/7d5eeb3))
|
||||
* ref/ remove contributors ([6dc97a1](https://github.com/maximegris/angular-electron/commit/6dc97a1))
|
||||
* The file is unused ([05c9e39](https://github.com/maximegris/angular-electron/commit/05c9e39))
|
||||
* Translation issue ([35354b1](https://github.com/maximegris/angular-electron/commit/35354b1))
|
||||
* version 3.4.0 ([06d6b0f](https://github.com/maximegris/angular-electron/commit/06d6b0f))
|
||||
|
||||
|
||||
|
||||
## 3.3.0 (2018-04-15)
|
||||
|
||||
* add Changelog file ([71083f1](https://github.com/maximegris/angular-electron/commit/71083f1))
|
||||
* fix/ typo README.md (production variables) ([a8c2b63](https://github.com/maximegris/angular-electron/commit/a8c2b63))
|
||||
* version 3.3.0 ([a88bda6](https://github.com/maximegris/angular-electron/commit/a88bda6))
|
||||
* version 3.3.0 changelog ([ddfbbf9](https://github.com/maximegris/angular-electron/commit/ddfbbf9))
|
||||
|
||||
|
||||
|
||||
## 3.2.0 (2018-04-15)
|
||||
|
||||
* fix e2e tests based on PR #161 and terminate the npm process after test execution ([fccf348](https://github.com/maximegris/angular-electron/commit/fccf348)), closes [#161](https://github.com/maximegris/angular-electron/issues/161)
|
||||
* fix/ app e2e spec ([8046b2a](https://github.com/maximegris/angular-electron/commit/8046b2a))
|
||||
* Including electron to eliminate Electron not found err sg ([d78203f](https://github.com/maximegris/angular-electron/commit/d78203f))
|
||||
* provide webFrame access ([6bd044e](https://github.com/maximegris/angular-electron/commit/6bd044e))
|
||||
* ref/ add node/electron module import as exemple : fs and remote ([e3ad12d](https://github.com/maximegris/angular-electron/commit/e3ad12d))
|
||||
* remove copyfiles ([9af5138](https://github.com/maximegris/angular-electron/commit/9af5138))
|
||||
* update dependencies ([89963ab](https://github.com/maximegris/angular-electron/commit/89963ab))
|
||||
* version 3.2.0 ([8dc69fa](https://github.com/maximegris/angular-electron/commit/8dc69fa))
|
||||
|
||||
|
||||
|
||||
## 3.1.0 (2018-03-15)
|
||||
|
||||
* Added option -o to script npm run ng:serve so that it really open the browser ([72aff8d](https://github.com/maximegris/angular-electron/commit/72aff8d))
|
||||
* Fix to change environment ([448d68b](https://github.com/maximegris/angular-electron/commit/448d68b))
|
||||
* version 3.1.0 ([f7c71e7](https://github.com/maximegris/angular-electron/commit/f7c71e7))
|
||||
|
||||
|
||||
|
||||
## <small>3.0.1 (2018-03-07)</small>
|
||||
|
||||
* fix/ icon app ([22699ef](https://github.com/maximegris/angular-electron/commit/22699ef))
|
||||
* version 3.0.1 ([5258ff1](https://github.com/maximegris/angular-electron/commit/5258ff1))
|
||||
|
||||
|
||||
|
||||
## 3.0.0 (2018-02-25)
|
||||
|
||||
* fix/ TranslateModule test ([7863aa9](https://github.com/maximegris/angular-electron/commit/7863aa9))
|
||||
* Ng not ejected anymore ([67ab31c](https://github.com/maximegris/angular-electron/commit/67ab31c))
|
||||
* pin all dependency versions ([0558d6a](https://github.com/maximegris/angular-electron/commit/0558d6a))
|
||||
* update dependencies and fix unit tests ([4d3ca6e](https://github.com/maximegris/angular-electron/commit/4d3ca6e))
|
||||
|
||||
|
||||
|
||||
## <small>2.7.1 (2018-02-15)</small>
|
||||
|
||||
* ref/ dernière version cli ([3df8158](https://github.com/maximegris/angular-electron/commit/3df8158))
|
||||
* version 2.7.1 ([1ae6f7a](https://github.com/maximegris/angular-electron/commit/1ae6f7a))
|
||||
|
||||
|
||||
|
||||
## 2.7.0 (2018-02-15)
|
||||
|
||||
* Correction of a word. ([d6655c7](https://github.com/maximegris/angular-electron/commit/d6655c7))
|
||||
* feat/ add webview directive ([e1b5600](https://github.com/maximegris/angular-electron/commit/e1b5600))
|
||||
* migrate Angular to 5.2.0 ([b8cf343](https://github.com/maximegris/angular-electron/commit/b8cf343))
|
||||
* ref/ Remove sponsor ([2a28239](https://github.com/maximegris/angular-electron/commit/2a28239))
|
||||
* ref/ update angular & dep ([e3b1fab](https://github.com/maximegris/angular-electron/commit/e3b1fab))
|
||||
* ref/ upgrade electron (security issue) ([f6a0c4e](https://github.com/maximegris/angular-electron/commit/f6a0c4e))
|
||||
* version bump + logo resize ([3545d16](https://github.com/maximegris/angular-electron/commit/3545d16))
|
||||
* fix: fixes maximegris/angular-electron#118 ([6d21e69](https://github.com/maximegris/angular-electron/commit/6d21e69)), closes [maximegris/angular-electron#118](https://github.com/maximegris/angular-electron/issues/118)
|
||||
* fix: fixes maximegris/angular-electron#98 ([136344b](https://github.com/maximegris/angular-electron/commit/136344b)), closes [maximegris/angular-electron#98](https://github.com/maximegris/angular-electron/issues/98)
|
||||
|
||||
|
||||
|
||||
## <small>2.4.1 (2017-12-14)</small>
|
||||
|
||||
* fix/ Manage icons for linux binary generation ([ccd0601](https://github.com/maximegris/angular-electron/commit/ccd0601))
|
||||
* version 2.4.1 ([5fcfca0](https://github.com/maximegris/angular-electron/commit/5fcfca0))
|
||||
|
||||
|
||||
|
||||
## 2.4.0 (2017-12-08)
|
||||
|
||||
* Use HttpClientModule ([5704e2e](https://github.com/maximegris/angular-electron/commit/5704e2e))
|
||||
* version 2.4.0 ([0437b33](https://github.com/maximegris/angular-electron/commit/0437b33))
|
||||
|
||||
|
||||
|
||||
## 2.3.0 (2017-12-04)
|
||||
|
||||
* add ngx translate ([facda37](https://github.com/maximegris/angular-electron/commit/facda37))
|
||||
|
||||
|
||||
|
||||
## 2.2.0 (2017-11-28)
|
||||
|
||||
* Brought back scripts defined in webpack.config.js ([441da3d](https://github.com/maximegris/angular-electron/commit/441da3d))
|
||||
* migrate to Angular 5.0.3 ([f4bc5b2](https://github.com/maximegris/angular-electron/commit/f4bc5b2))
|
||||
* Update LICENSE badge ([fa783aa](https://github.com/maximegris/angular-electron/commit/fa783aa))
|
||||
* Update to electron-builder ([0e94b52](https://github.com/maximegris/angular-electron/commit/0e94b52))
|
||||
|
||||
|
||||
|
||||
## <small>2.1.1 (2017-11-19)</small>
|
||||
|
||||
* Move codesponsor ([064be4c](https://github.com/maximegris/angular-electron/commit/064be4c))
|
||||
|
||||
|
||||
|
||||
## 2.1.0 (2017-11-19)
|
||||
|
||||
* Add codesponsor ([87e695d](https://github.com/maximegris/angular-electron/commit/87e695d))
|
||||
* Add script for winportable ([2be2dae](https://github.com/maximegris/angular-electron/commit/2be2dae))
|
||||
* Add support for building a Windows self-contained executable ([7cfa790](https://github.com/maximegris/angular-electron/commit/7cfa790))
|
||||
* fix/ electron-packager need favicon >= 256x256 on Windows ([d2c253f](https://github.com/maximegris/angular-electron/commit/d2c253f))
|
||||
* fix/ refact webpack config (inspired by ng eject Angular 5) ([d1c30ac](https://github.com/maximegris/angular-electron/commit/d1c30ac))
|
||||
* fix/ replace aotPlugin in no prod mode ([a0caf1e](https://github.com/maximegris/angular-electron/commit/a0caf1e))
|
||||
* fix/ Replace AotPlugin to AngularCompilerPlugin ([bef106e](https://github.com/maximegris/angular-electron/commit/bef106e))
|
||||
* fix/ Update README Angular 5 ([93c6949](https://github.com/maximegris/angular-electron/commit/93c6949))
|
||||
* fix/ webpack template path ([518b66b](https://github.com/maximegris/angular-electron/commit/518b66b))
|
||||
* Mgrate to Angular 5.0.2 ([bd7bed6](https://github.com/maximegris/angular-electron/commit/bd7bed6))
|
||||
* Update package.json ([b16cf73](https://github.com/maximegris/angular-electron/commit/b16cf73))
|
||||
* Version 2.1.0 ([fccef2f](https://github.com/maximegris/angular-electron/commit/fccef2f))
|
||||
|
||||
|
||||
|
||||
## 2.0.0 (2017-11-13)
|
||||
|
||||
* Add buffer to externals ([7e797f0](https://github.com/maximegris/angular-electron/commit/7e797f0))
|
||||
* Edit a typo on README ([956a2bc](https://github.com/maximegris/angular-electron/commit/956a2bc))
|
||||
* Fix #55 , and also added functionality for scripts global building ([012a894](https://github.com/maximegris/angular-electron/commit/012a894)), closes [#55](https://github.com/maximegris/angular-electron/issues/55)
|
||||
* Fix #55 removed bootstraps.css which for example purpose before. ([41445eb](https://github.com/maximegris/angular-electron/commit/41445eb)), closes [#55](https://github.com/maximegris/angular-electron/issues/55)
|
||||
* License MIT ([73494b7](https://github.com/maximegris/angular-electron/commit/73494b7))
|
||||
* Migrate to Angular 5 ([3a3ffe1](https://github.com/maximegris/angular-electron/commit/3a3ffe1))
|
||||
|
||||
|
||||
|
||||
## 1.9.0 (2017-09-22)
|
||||
|
||||
* feat/ launch electron & webpack in // (npm run start) ([8c37cc4](https://github.com/maximegris/angular-electron/commit/8c37cc4))
|
||||
* ref/ Exclude node_modules (tslint) ([412a0a5](https://github.com/maximegris/angular-electron/commit/412a0a5))
|
||||
|
||||
|
||||
|
||||
## <small>1.8.1 (2017-09-22)</small>
|
||||
|
||||
* ref/ add package-lock in gitignore ([4edd98d](https://github.com/maximegris/angular-electron/commit/4edd98d))
|
||||
* remove package-lock ([8e98627](https://github.com/maximegris/angular-electron/commit/8e98627))
|
||||
* upgrade angular version 4.4.3 ([10d0f87](https://github.com/maximegris/angular-electron/commit/10d0f87))
|
||||
* version 1.8.1 ([70879d1](https://github.com/maximegris/angular-electron/commit/70879d1))
|
||||
|
||||
|
||||
|
||||
## 1.8.0 (2017-09-09)
|
||||
|
||||
* upgrade lib version ([2ac2aa0](https://github.com/maximegris/angular-electron/commit/2ac2aa0))
|
||||
|
||||
|
||||
|
||||
## 1.7.0 (2017-08-18)
|
||||
|
||||
* ref/ Update Angular (4.3.5) / Electron (1.7.2) / Electron Packager (8.7.2) / Typescript (2.5.0) ([f97cd81](https://github.com/maximegris/angular-electron/commit/f97cd81))
|
||||
|
||||
|
||||
|
||||
## <small>1.6.1 (2017-07-27)</small>
|
||||
|
||||
* fix/ angular-cli error in prod compilation with aot ([c26a5ae](https://github.com/maximegris/angular-electron/commit/c26a5ae))
|
||||
* version 1.6.1 ([899babd](https://github.com/maximegris/angular-electron/commit/899babd))
|
||||
|
||||
|
||||
|
||||
## 1.6.0 (2017-07-16)
|
||||
|
||||
* ajout package-lock npm v5 ([09c0840](https://github.com/maximegris/angular-electron/commit/09c0840))
|
||||
* Change background img ([7e58717](https://github.com/maximegris/angular-electron/commit/7e58717))
|
||||
* Fix npm run build:prod ([c23bade](https://github.com/maximegris/angular-electron/commit/c23bade))
|
||||
* fix/ Bindings not updating automatically #44 ([2a90191](https://github.com/maximegris/angular-electron/commit/2a90191)), closes [#44](https://github.com/maximegris/angular-electron/issues/44)
|
||||
* fix/ e2e test with jasmine2 ([9c51f32](https://github.com/maximegris/angular-electron/commit/9c51f32))
|
||||
* fix/ typescript issues ([bb0a6ab](https://github.com/maximegris/angular-electron/commit/bb0a6ab))
|
||||
* increment version deps ([bde452c](https://github.com/maximegris/angular-electron/commit/bde452c))
|
||||
* Revert last pull request - break production compilation ([ccc9064](https://github.com/maximegris/angular-electron/commit/ccc9064))
|
||||
* upgrade angular version to 4.3.0 ([ab16959](https://github.com/maximegris/angular-electron/commit/ab16959))
|
||||
|
||||
|
||||
|
||||
## 1.5.0 (2017-06-10)
|
||||
|
||||
* fix/ karma Unit test ([ea13d6d](https://github.com/maximegris/angular-electron/commit/ea13d6d))
|
||||
* fix/ remove yarn because of error with module dep in prod builds ([8a49a45](https://github.com/maximegris/angular-electron/commit/8a49a45))
|
||||
* update yarn lock ([18c0e62](https://github.com/maximegris/angular-electron/commit/18c0e62))
|
||||
|
||||
|
||||
|
||||
## <small>1.4.4 (2017-06-08)</small>
|
||||
|
||||
* fix/ Fix npm run lint ([db7972a](https://github.com/maximegris/angular-electron/commit/db7972a))
|
||||
* ref/ electron ./dist more generic ([7e71add](https://github.com/maximegris/angular-electron/commit/7e71add))
|
||||
* Replace const icon to let icon ([dadf65f](https://github.com/maximegris/angular-electron/commit/dadf65f))
|
||||
|
||||
|
||||
|
||||
## <small>1.4.3 (2017-06-06)</small>
|
||||
|
||||
* fix/ favicon path during packaging ([aa2b012](https://github.com/maximegris/angular-electron/commit/aa2b012))
|
||||
* remove build node 8 till node-sass failed ([34f201d](https://github.com/maximegris/angular-electron/commit/34f201d))
|
||||
* v1.4.3 ([4961fb0](https://github.com/maximegris/angular-electron/commit/4961fb0))
|
||||
|
||||
|
||||
|
||||
## <small>1.4.2 (2017-05-31)</small>
|
||||
|
||||
* Change dep versions ([62d08d3](https://github.com/maximegris/angular-electron/commit/62d08d3))
|
||||
* install npm dep when building ([56948d0](https://github.com/maximegris/angular-electron/commit/56948d0))
|
||||
* Minor update ([5f282b7](https://github.com/maximegris/angular-electron/commit/5f282b7))
|
||||
* No hot reload in browser ([7892f0d](https://github.com/maximegris/angular-electron/commit/7892f0d))
|
||||
* update Electron v1.6.10 ([f2f2080](https://github.com/maximegris/angular-electron/commit/f2f2080))
|
||||
* upgrade ng/electron dependencies ([78b0f27](https://github.com/maximegris/angular-electron/commit/78b0f27))
|
||||
* chore(package): bump dependencies ([b62c7b6](https://github.com/maximegris/angular-electron/commit/b62c7b6))
|
||||
|
||||
|
||||
|
||||
## 1.4.0 (2017-05-23)
|
||||
|
||||
* 1.4.0 ([23213c4](https://github.com/maximegris/angular-electron/commit/23213c4))
|
||||
* Change style home page ([93dcc52](https://github.com/maximegris/angular-electron/commit/93dcc52))
|
||||
* Fixed compiler warnings ([fca6b15](https://github.com/maximegris/angular-electron/commit/fca6b15))
|
||||
* ref/ electron main from js to ts ([835d32b](https://github.com/maximegris/angular-electron/commit/835d32b))
|
||||
* Remove caret & tilde ([dd98155](https://github.com/maximegris/angular-electron/commit/dd98155))
|
||||
|
||||
|
||||
|
||||
## <small>1.3.5 (2017-05-18)</small>
|
||||
|
||||
* Add new tags ([cd07a86](https://github.com/maximegris/angular-electron/commit/cd07a86))
|
||||
* v 1.3.5 ([d528a71](https://github.com/maximegris/angular-electron/commit/d528a71))
|
||||
|
||||
|
||||
|
||||
## <small>1.3.4 (2017-05-12)</small>
|
||||
|
||||
* feat/ add nodejs native lib in webpack config ([27d9bc6](https://github.com/maximegris/angular-electron/commit/27d9bc6))
|
||||
* Fix issue #15 ([d77cbf1](https://github.com/maximegris/angular-electron/commit/d77cbf1)), closes [#15](https://github.com/maximegris/angular-electron/issues/15)
|
||||
* Ref/ Electron packager in external file ([17b04e8](https://github.com/maximegris/angular-electron/commit/17b04e8))
|
||||
* version 1.3.4 ([374af16](https://github.com/maximegris/angular-electron/commit/374af16))
|
||||
|
||||
|
||||
|
||||
## <small>1.3.3 (2017-05-10)</small>
|
||||
|
||||
* Chapters order ([a772b9c](https://github.com/maximegris/angular-electron/commit/a772b9c))
|
||||
* Chapters order ([06547e5](https://github.com/maximegris/angular-electron/commit/06547e5))
|
||||
* Delete spec file of electron.service ([083498e](https://github.com/maximegris/angular-electron/commit/083498e))
|
||||
* Fix issue #15 ([e7cd6e6](https://github.com/maximegris/angular-electron/commit/e7cd6e6)), closes [#15](https://github.com/maximegris/angular-electron/issues/15)
|
||||
* Move Browser mode chapter ([8818750](https://github.com/maximegris/angular-electron/commit/8818750))
|
||||
* Version 1.3.3 ([f4db75b](https://github.com/maximegris/angular-electron/commit/f4db75b))
|
||||
|
||||
|
||||
|
||||
## <small>1.3.2 (2017-05-05)</small>
|
||||
|
||||
* Add comments of how conditional import works ([e6c1b3b](https://github.com/maximegris/angular-electron/commit/e6c1b3b))
|
||||
* Conditional import of Electron/NodeJS libs - The app can be launch in browser mode ([c434f8a](https://github.com/maximegris/angular-electron/commit/c434f8a))
|
||||
* Fix indentation ([6a9836a](https://github.com/maximegris/angular-electron/commit/6a9836a))
|
||||
* Fix prepree2e script ([b2af4fd](https://github.com/maximegris/angular-electron/commit/b2af4fd))
|
||||
* Set e2e tests ([d223974](https://github.com/maximegris/angular-electron/commit/d223974))
|
||||
* Suround electron browser by try/catch ([88be472](https://github.com/maximegris/angular-electron/commit/88be472))
|
||||
* Update @types/node ([9d43304](https://github.com/maximegris/angular-electron/commit/9d43304))
|
||||
* Update readme with e2e info ([01bbf13](https://github.com/maximegris/angular-electron/commit/01bbf13))
|
||||
* update version ([0849a0a](https://github.com/maximegris/angular-electron/commit/0849a0a))
|
||||
|
||||
|
||||
|
||||
## <small>1.3.1 (2017-05-05)</small>
|
||||
|
||||
* Add routing module ([7334ce8](https://github.com/maximegris/angular-electron/commit/7334ce8))
|
||||
* Fixed hardcoded path in glob copy, blocking assets after eject ([815d519](https://github.com/maximegris/angular-electron/commit/815d519))
|
||||
* update comments in dev/prod env files ([7cf6a51](https://github.com/maximegris/angular-electron/commit/7cf6a51))
|
||||
* Version 1.3.1 ([f18ac77](https://github.com/maximegris/angular-electron/commit/f18ac77))
|
||||
|
||||
|
||||
|
||||
## 1.3.0 (2017-05-01)
|
||||
|
||||
* Fix webpack prod/dev env ([8549da1](https://github.com/maximegris/angular-electron/commit/8549da1))
|
||||
|
||||
|
||||
|
||||
## <small>1.2.1 (2017-04-30)</small>
|
||||
|
||||
* allowJs ([4efd188](https://github.com/maximegris/angular-electron/commit/4efd188))
|
||||
* Example url background in scss ([3705a35](https://github.com/maximegris/angular-electron/commit/3705a35))
|
||||
* Fix electron build (extract-zip workaround) ([a7ee90e](https://github.com/maximegris/angular-electron/commit/a7ee90e))
|
||||
* Fix webpack config url in css ([cea4be5](https://github.com/maximegris/angular-electron/commit/cea4be5))
|
||||
* html loader ([c55558a](https://github.com/maximegris/angular-electron/commit/c55558a))
|
||||
* update version 1.2.1 ([78e8da7](https://github.com/maximegris/angular-electron/commit/78e8da7))
|
||||
|
||||
|
||||
|
||||
## 1.2.0 (2017-04-19)
|
||||
|
||||
* Set one example of css class in app component ([a15775f](https://github.com/maximegris/angular-electron/commit/a15775f))
|
||||
* Update npm dependencies ([0a93ebe](https://github.com/maximegris/angular-electron/commit/0a93ebe))
|
||||
|
||||
|
||||
|
||||
## <small>1.1.2 (2017-04-18)</small>
|
||||
|
||||
* Fix typo & fix script electron:mac ([bd06859](https://github.com/maximegris/angular-electron/commit/bd06859))
|
||||
* Set theme jekyll-theme-architect ([644d857](https://github.com/maximegris/angular-electron/commit/644d857))
|
||||
* update README ([97fa63d](https://github.com/maximegris/angular-electron/commit/97fa63d))
|
||||
* update README ([23fc0a9](https://github.com/maximegris/angular-electron/commit/23fc0a9))
|
||||
* update README ([a8dcf6a](https://github.com/maximegris/angular-electron/commit/a8dcf6a))
|
||||
* v1.1.2 ([e29e467](https://github.com/maximegris/angular-electron/commit/e29e467))
|
||||
|
||||
|
||||
|
||||
## <small>1.1.1 (2017-04-12)</small>
|
||||
|
||||
* Fix webpack.config file path (travisci) ([a172df9](https://github.com/maximegris/angular-electron/commit/a172df9))
|
||||
* live reload on disk ([7bb2f8b](https://github.com/maximegris/angular-electron/commit/7bb2f8b))
|
||||
* Remove unused dependency (webpack-dev-server) ([e9150f4](https://github.com/maximegris/angular-electron/commit/e9150f4))
|
||||
|
||||
|
||||
|
||||
## 1.1.0 (2017-04-12)
|
||||
|
||||
* add depdencies CI & Licence ([6ceb0f2](https://github.com/maximegris/angular-electron/commit/6ceb0f2))
|
||||
* Override webpack configuration ([60d6116](https://github.com/maximegris/angular-electron/commit/60d6116))
|
||||
|
||||
|
||||
|
||||
## <small>1.0.3 (2017-04-07)</small>
|
||||
|
||||
* Add TravisCI ([e5640fd](https://github.com/maximegris/angular-electron/commit/e5640fd))
|
||||
* v1.0.3 ([9866d53](https://github.com/maximegris/angular-electron/commit/9866d53))
|
||||
|
||||
|
||||
|
||||
## <small>1.0.2 (2017-04-07)</small>
|
||||
|
||||
* Add TravisCI ([ef4b80e](https://github.com/maximegris/angular-electron/commit/ef4b80e))
|
||||
* Fix typo ([f964c3f](https://github.com/maximegris/angular-electron/commit/f964c3f))
|
||||
* Fix typo ([e42bb5e](https://github.com/maximegris/angular-electron/commit/e42bb5e))
|
||||
* Update README ([3bb45b3](https://github.com/maximegris/angular-electron/commit/3bb45b3))
|
||||
* Update README with angular-cli doc ([5a57578](https://github.com/maximegris/angular-electron/commit/5a57578))
|
||||
* v1.0.2 ([1bd8e0e](https://github.com/maximegris/angular-electron/commit/1bd8e0e))
|
||||
|
||||
|
||||
|
||||
## <small>1.0.1 (2017-04-03)</small>
|
||||
|
||||
* feat/ Add electron-packager scripts ([57891dc](https://github.com/maximegris/angular-electron/commit/57891dc))
|
||||
* ref/ update README ([7fddc20](https://github.com/maximegris/angular-electron/commit/7fddc20))
|
||||
* update README ([9a983c1](https://github.com/maximegris/angular-electron/commit/9a983c1))
|
||||
* v1.0.0 ([7a21eb9](https://github.com/maximegris/angular-electron/commit/7a21eb9))
|
||||
* v1.0.1 ([68275a3](https://github.com/maximegris/angular-electron/commit/68275a3))
|
||||
* chore: initial commit from @angular/cli ([616a69e](https://github.com/maximegris/angular-electron/commit/616a69e))
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
Copyright 2020 - Maxime GRIS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -4,15 +4,13 @@
|
||||
| :------------------------------------------------------------------: | :-------------------------------------------------------: |
|
||||
|  |  |
|
||||
|
||||
## Minimalistic IPTV application developed as a PWA to use on my Chromebook.
|
||||
## Minimalistic IPTV player application developed as a cross-platform Electron application.
|
||||
|
||||
**Features:**
|
||||
|
||||
- M3U8 playlists support
|
||||
- Upload playlists from your file system
|
||||
- Upload remote playlists via URL
|
||||
- Group-based channel list
|
||||
- Search for channels
|
||||
- Save channels as favorites
|
||||
- PWA support
|
||||
|
||||
*Note: Demo application deployed on GitHub Pages subdomain is not working correctly with the streams hosted in not secured context (http), because of the mixed-content policy.*
|
||||
@@ -0,0 +1 @@
|
||||
theme: jekyll-theme-architect
|
||||
@@ -1,130 +1,171 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"iptv-player": {
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "scss"
|
||||
}
|
||||
},
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist/iptv-player",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"aot": true,
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets",
|
||||
"src/app/data",
|
||||
"src/manifest.webmanifest",
|
||||
"src/manifest.json",
|
||||
"src/background.js"
|
||||
],
|
||||
"styles": ["src/styles.scss"],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb",
|
||||
"maximumError": "10kb"
|
||||
}
|
||||
],
|
||||
"serviceWorker": true,
|
||||
"ngswConfigPath": "ngsw-config.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "iptv-player:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "iptv-player:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "iptv-player:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets",
|
||||
"src/manifest.webmanifest"
|
||||
],
|
||||
"styles": ["src/styles.scss"],
|
||||
"scripts": []
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"tsconfig.app.json",
|
||||
"tsconfig.spec.json",
|
||||
"e2e/tsconfig.json"
|
||||
],
|
||||
"exclude": ["**/node_modules/**"]
|
||||
}
|
||||
},
|
||||
"e2e": {
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "e2e/protractor.conf.js",
|
||||
"devServerTarget": "iptv-player:serve"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "iptv-player:serve:production"
|
||||
}
|
||||
}
|
||||
}
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"angular-electron": {
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"projectType": "application",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-builders/custom-webpack:browser",
|
||||
"options": {
|
||||
"outputPath": "dist",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"tsConfig": "src/tsconfig.app.json",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"assets": [
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": [],
|
||||
"customWebpackConfig": {
|
||||
"path": "./angular.webpack.js"
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"dev": {
|
||||
"optimization": false,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": true,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": false,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": false,
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.dev.ts"
|
||||
}
|
||||
]
|
||||
},
|
||||
"web": {
|
||||
"optimization": false,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": true,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": false,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": false,
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.web.ts"
|
||||
}
|
||||
]
|
||||
},
|
||||
"production": {
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-builders/custom-webpack:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "angular-electron:build"
|
||||
},
|
||||
"configurations": {
|
||||
"dev": {
|
||||
"browserTarget": "angular-electron:build:dev"
|
||||
},
|
||||
"web": {
|
||||
"browserTarget": "angular-electron:build:web"
|
||||
},
|
||||
"production": {
|
||||
"browserTarget": "angular-electron:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "angular-electron:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-builders/custom-webpack:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills-test.ts",
|
||||
"tsConfig": "src/tsconfig.spec.json",
|
||||
"karmaConfig": "src/karma.conf.js",
|
||||
"scripts": [],
|
||||
"styles": [
|
||||
"src/styles.scss"
|
||||
],
|
||||
"assets": [
|
||||
"src/assets"
|
||||
],
|
||||
"customWebpackConfig": {
|
||||
"path": "./angular.webpack.js",
|
||||
"target": "electron-renderer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-eslint/builder:lint",
|
||||
"options": {
|
||||
"eslintConfig": ".eslintrc.json",
|
||||
"tsConfig": [
|
||||
"src/tsconfig.app.json",
|
||||
"src/tsconfig.spec.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "iptv-player"
|
||||
"angular-electron-e2e": {
|
||||
"root": "e2e",
|
||||
"projectType": "application",
|
||||
"architect": {
|
||||
"lint": {
|
||||
"builder": "@angular-eslint/builder:lint",
|
||||
"options": {
|
||||
"eslintConfig": ".eslintrc.json",
|
||||
"tsConfig": [
|
||||
"e2e/tsconfig.e2e.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "angular-electron",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"prefix": "app",
|
||||
"style": "scss"
|
||||
},
|
||||
"@schematics/angular:directive": {
|
||||
"prefix": "app"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Custom angular webpack configuration
|
||||
*/
|
||||
|
||||
module.exports = (config, options) => {
|
||||
config.target = 'electron-renderer';
|
||||
if (options.customWebpackConfig.target) {
|
||||
config.target = options.customWebpackConfig.target;
|
||||
} else if (options.fileReplacements) {
|
||||
for(let fileReplacement of options.fileReplacements) {
|
||||
if (fileReplacement.replace !== 'src/environments/environment.ts') {
|
||||
continue;
|
||||
}
|
||||
|
||||
let fileReplacementParts = fileReplacement['with'].split('.');
|
||||
if (['dev', 'prod', 'test', 'electron-renderer'].indexOf(fileReplacementParts[1]) < 0) {
|
||||
config.target = fileReplacementParts[1];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Api = void 0;
|
||||
var electron_1 = require("electron");
|
||||
var iptv_playlist_parser_1 = require("iptv-playlist-parser");
|
||||
var axios_1 = require("axios");
|
||||
var akita_1 = require("@datorama/akita");
|
||||
var Datastore = require('nedb');
|
||||
var db = new Datastore({ filename: 'data.db', autoload: true });
|
||||
var Api = /** @class */ (function () {
|
||||
function Api() {
|
||||
var _this = this;
|
||||
electron_1.ipcMain.on('parse-playlist-by-url', function (event, args) {
|
||||
axios_1.default.get(args.url).then(function (result) {
|
||||
var array = result.data.split('\n');
|
||||
var parsedPlaylist = _this.parsePlaylist(array);
|
||||
var playlistObject = _this.createPlaylistObject(args.title, parsedPlaylist);
|
||||
_this.insertToDb(playlistObject);
|
||||
event.sender.send('parse-url-response', {
|
||||
payload: playlistObject,
|
||||
});
|
||||
});
|
||||
});
|
||||
electron_1.ipcMain.on('parse-playlist', function (event, args) {
|
||||
var parsedPlaylist = _this.parsePlaylist(args.playlist);
|
||||
var playlistObject = _this.createPlaylistObject(args.title, parsedPlaylist);
|
||||
_this.insertToDb(playlistObject);
|
||||
event.sender.send('parse-response', { payload: playlistObject });
|
||||
});
|
||||
electron_1.ipcMain.on('playlists-all', function (event, args) {
|
||||
db.find({}, { count: 1, title: 1, _id: 1 }, function (err, playlists) {
|
||||
event.sender.send('playlist-all-result', {
|
||||
payload: playlists,
|
||||
});
|
||||
});
|
||||
});
|
||||
electron_1.ipcMain.on('playlist-by-id', function (event, args) {
|
||||
db.findOne({ _id: args.id }, function (err, playlist) {
|
||||
event.sender.send('playlist-by-id-result', {
|
||||
payload: playlist,
|
||||
});
|
||||
});
|
||||
});
|
||||
electron_1.ipcMain.on('playlist-remove-by-id', function (event, args) {
|
||||
db.remove({ _id: args.id }, function (err, playlist) {
|
||||
event.sender.send('playlist-remove-by-id-result', {
|
||||
message: 'playlist was removed',
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Saves playlist to the localStorage
|
||||
* @param name name of the playlist
|
||||
* @param playlist playlist to save
|
||||
*/
|
||||
Api.prototype.createPlaylistObject = function (name, playlist) {
|
||||
return {
|
||||
id: akita_1.guid(),
|
||||
_id: akita_1.guid(),
|
||||
filename: name,
|
||||
title: name,
|
||||
count: playlist.items.length,
|
||||
playlist: playlist,
|
||||
importDate: new Date().getMilliseconds(),
|
||||
lastUsage: new Date().getMilliseconds(),
|
||||
favorites: [],
|
||||
};
|
||||
};
|
||||
/**
|
||||
* Parses string based array to playlist object
|
||||
* @param m3uArray m3u playlist as array with strings
|
||||
*/
|
||||
Api.prototype.parsePlaylist = function (m3uArray) {
|
||||
var playlistAsString = m3uArray.join('\n');
|
||||
return iptv_playlist_parser_1.parse(playlistAsString);
|
||||
};
|
||||
/**
|
||||
* Inserts new playlist to the database
|
||||
* @param playlist playlist to add
|
||||
*/
|
||||
Api.prototype.insertToDb = function (playlist) {
|
||||
db.insert(playlist, function (err, newrec) {
|
||||
console.log('playlist was saved...', newrec._id);
|
||||
});
|
||||
};
|
||||
return Api;
|
||||
}());
|
||||
exports.Api = Api;
|
||||
//# sourceMappingURL=api.js.map
|
||||
@@ -0,0 +1,102 @@
|
||||
import { ipcMain } from 'electron';
|
||||
import { parse } from 'iptv-playlist-parser';
|
||||
import axios from 'axios';
|
||||
import { guid } from '@datorama/akita';
|
||||
import { Playlist } from './src/app/playlist-uploader/playlist.interface';
|
||||
|
||||
const Datastore = require('nedb');
|
||||
const db = new Datastore({ filename: 'data.db', autoload: true });
|
||||
|
||||
export class Api {
|
||||
constructor() {
|
||||
ipcMain.on('parse-playlist-by-url', (event, args) => {
|
||||
axios.get(args.url).then((result) => {
|
||||
const array = result.data.split('\n');
|
||||
const parsedPlaylist = this.parsePlaylist(array);
|
||||
const playlistObject = this.createPlaylistObject(
|
||||
args.title,
|
||||
parsedPlaylist
|
||||
);
|
||||
this.insertToDb(playlistObject);
|
||||
event.sender.send('parse-url-response', {
|
||||
payload: playlistObject,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on('parse-playlist', (event, args) => {
|
||||
const parsedPlaylist = this.parsePlaylist(args.playlist);
|
||||
const playlistObject = this.createPlaylistObject(
|
||||
args.title,
|
||||
parsedPlaylist
|
||||
);
|
||||
this.insertToDb(playlistObject);
|
||||
event.sender.send('parse-response', { payload: playlistObject });
|
||||
});
|
||||
|
||||
ipcMain.on('playlists-all', (event, args) => {
|
||||
db.find({}, { count: 1, title: 1, _id: 1 }, function (
|
||||
err,
|
||||
playlists
|
||||
) {
|
||||
event.sender.send('playlist-all-result', {
|
||||
payload: playlists,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on('playlist-by-id', (event, args) => {
|
||||
db.findOne({ _id: args.id }, function (err, playlist) {
|
||||
event.sender.send('playlist-by-id-result', {
|
||||
payload: playlist,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on('playlist-remove-by-id', (event, args) => {
|
||||
db.remove({ _id: args.id }, function (err, playlist) {
|
||||
event.sender.send('playlist-remove-by-id-result', {
|
||||
message: 'playlist was removed',
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves playlist to the localStorage
|
||||
* @param name name of the playlist
|
||||
* @param playlist playlist to save
|
||||
*/
|
||||
createPlaylistObject(name: string, playlist: any): Playlist {
|
||||
return {
|
||||
id: guid(),
|
||||
_id: guid(),
|
||||
filename: name,
|
||||
title: name,
|
||||
count: playlist.items.length,
|
||||
playlist,
|
||||
importDate: new Date().getMilliseconds(),
|
||||
lastUsage: new Date().getMilliseconds(),
|
||||
favorites: [],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses string based array to playlist object
|
||||
* @param m3uArray m3u playlist as array with strings
|
||||
*/
|
||||
parsePlaylist(m3uArray: any[]): any {
|
||||
const playlistAsString = m3uArray.join('\n');
|
||||
return parse(playlistAsString);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts new playlist to the database
|
||||
* @param playlist playlist to add
|
||||
*/
|
||||
insertToDb(playlist) {
|
||||
db.insert(playlist, function (err, newrec) {
|
||||
console.log('playlist was saved...', newrec._id);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
const Application = require('spectron').Application;
|
||||
const electronPath = require('electron'); // Require Electron from the binaries included in node_modules.
|
||||
const path = require('path');
|
||||
|
||||
export default function setup(): void {
|
||||
beforeEach(async function () {
|
||||
this.app = new Application({
|
||||
// Your electron path can be any binary
|
||||
// i.e for OSX an example path could be '/Applications/MyApp.app/Contents/MacOS/MyApp'
|
||||
// But for the sake of the example we fetch it from our node_modules.
|
||||
path: electronPath,
|
||||
|
||||
// Assuming you have the following directory structure
|
||||
|
||||
// |__ my project
|
||||
// |__ ...
|
||||
// |__ main.js
|
||||
// |__ package.json
|
||||
// |__ index.html
|
||||
// |__ ...
|
||||
// |__ test
|
||||
// |__ spec.js <- You are here! ~ Well you should be.
|
||||
|
||||
// The following line tells spectron to look and use the main.js file
|
||||
// and the package.json located 1 level above.
|
||||
args: [path.join(__dirname, '..')],
|
||||
webdriverOptions: {}
|
||||
});
|
||||
await this.app.start();
|
||||
const browser = this.app.client;
|
||||
await browser.waitUntilWindowLoaded();
|
||||
|
||||
browser.timeouts('script', 15000);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
if (this.app && this.app.isRunning()) {
|
||||
return this.app.stop();
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { expect } from 'chai';
|
||||
import { SpectronClient } from 'spectron';
|
||||
|
||||
import commonSetup from './common-setup';
|
||||
|
||||
describe('angular-electron App', function () {
|
||||
commonSetup.apply(this);
|
||||
|
||||
let browser: any;
|
||||
let client: SpectronClient;
|
||||
|
||||
beforeEach(function () {
|
||||
client = this.app.client;
|
||||
browser = client as any;
|
||||
});
|
||||
|
||||
it('should display message saying App works !', async function () {
|
||||
const text = await browser.getText('app-home h1');
|
||||
expect(text).to.equal('App works !');
|
||||
});
|
||||
|
||||
it('creates initial windows', async function () {
|
||||
const count = await client.getWindowCount();
|
||||
expect(count).to.equal(1);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -1,32 +0,0 @@
|
||||
// @ts-check
|
||||
// Protractor configuration file, see link for more information
|
||||
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
||||
|
||||
const { SpecReporter } = require('jasmine-spec-reporter');
|
||||
|
||||
/**
|
||||
* @type { import("protractor").Config }
|
||||
*/
|
||||
exports.config = {
|
||||
allScriptsTimeout: 11000,
|
||||
specs: [
|
||||
'./src/**/*.e2e-spec.ts'
|
||||
],
|
||||
capabilities: {
|
||||
'browserName': 'chrome'
|
||||
},
|
||||
directConnect: true,
|
||||
baseUrl: 'http://localhost:4200/',
|
||||
framework: 'jasmine',
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
defaultTimeoutInterval: 30000,
|
||||
print: function() {}
|
||||
},
|
||||
onPrepare() {
|
||||
require('ts-node').register({
|
||||
project: require('path').join(__dirname, './tsconfig.json')
|
||||
});
|
||||
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
||||
}
|
||||
};
|
||||
@@ -1,23 +0,0 @@
|
||||
import { AppPage } from './app.po';
|
||||
import { browser, logging } from 'protractor';
|
||||
|
||||
describe('workspace-project App', () => {
|
||||
let page: AppPage;
|
||||
|
||||
beforeEach(() => {
|
||||
page = new AppPage();
|
||||
});
|
||||
|
||||
it('should display welcome message', () => {
|
||||
page.navigateTo();
|
||||
expect(page.getTitleText()).toEqual('iptv-player app is running!');
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
// Assert that there are no errors emitted from the browser
|
||||
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
|
||||
expect(logs).not.toContain(jasmine.objectContaining({
|
||||
level: logging.Level.SEVERE,
|
||||
} as logging.Entry));
|
||||
});
|
||||
});
|
||||
@@ -1,11 +0,0 @@
|
||||
import { browser, by, element } from 'protractor';
|
||||
|
||||
export class AppPage {
|
||||
navigateTo() {
|
||||
return browser.get(browser.baseUrl) as Promise<any>;
|
||||
}
|
||||
|
||||
getTitleText() {
|
||||
return element(by.css('app-root .content span')).getText() as Promise<string>;
|
||||
}
|
||||
}
|
||||
@@ -3,11 +3,11 @@
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"module": "commonjs",
|
||||
"target": "es2018",
|
||||
"types": [
|
||||
"jasmine",
|
||||
"jasminewd2",
|
||||
"node"
|
||||
"mocha"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"e2e/**/*.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"productName": "iptvnator",
|
||||
"directories": {
|
||||
"output": "release/"
|
||||
},
|
||||
"files": [
|
||||
"**/*",
|
||||
"!**/*.ts",
|
||||
"!*.code-workspace",
|
||||
"!LICENSE.md",
|
||||
"!package.json",
|
||||
"!package-lock.json",
|
||||
"!src/",
|
||||
"!e2e/",
|
||||
"!hooks/",
|
||||
"!angular.json",
|
||||
"!_config.yml",
|
||||
"!karma.conf.js",
|
||||
"!tsconfig.json",
|
||||
"!tslint.json"
|
||||
],
|
||||
"win": {
|
||||
"icon": "dist/assets/icons",
|
||||
"target": [
|
||||
"portable"
|
||||
]
|
||||
},
|
||||
"mac": {
|
||||
"icon": "dist/assets/icons",
|
||||
"target": [
|
||||
"dmg"
|
||||
]
|
||||
},
|
||||
"linux": {
|
||||
"icon": "dist/assets/icons",
|
||||
"target": [
|
||||
"AppImage",
|
||||
"Snap"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
import { app, BrowserWindow, screen } from 'electron';
|
||||
import * as path from 'path';
|
||||
import * as url from 'url';
|
||||
import { Api } from './api';
|
||||
|
||||
let win: BrowserWindow = null;
|
||||
const args = process.argv.slice(1),
|
||||
serve = args.some((val) => val === '--serve');
|
||||
|
||||
function createWindow(): BrowserWindow {
|
||||
const electronScreen = screen;
|
||||
const size = electronScreen.getPrimaryDisplay().workAreaSize;
|
||||
|
||||
// Create the browser window.
|
||||
win = new BrowserWindow({
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: size.width,
|
||||
height: size.height,
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
allowRunningInsecureContent: serve ? true : false,
|
||||
},
|
||||
resizable: true,
|
||||
darkTheme: true,
|
||||
});
|
||||
win.setMenu(null);
|
||||
|
||||
if (serve) {
|
||||
win.webContents.openDevTools();
|
||||
|
||||
require('electron-reload')(__dirname, {
|
||||
electron: require(`${__dirname}/node_modules/electron`),
|
||||
});
|
||||
win.loadURL('http://localhost:4200');
|
||||
} else {
|
||||
win.loadURL(
|
||||
url.format({
|
||||
pathname: path.join(__dirname, 'dist/index.html'),
|
||||
protocol: 'file:',
|
||||
slashes: true,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
// Emitted when the window is closed.
|
||||
win.on('closed', () => {
|
||||
// Dereference the window object, usually you would store window
|
||||
// in an array if your app supports multi windows, this is the time
|
||||
// when you should delete the corresponding element.
|
||||
win = null;
|
||||
});
|
||||
|
||||
return win;
|
||||
}
|
||||
|
||||
try {
|
||||
app.allowRendererProcessReuse = true;
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
// Added 400 ms to fix the black background issue while using transparent window. More details at https://github.com/electron/electron/issues/15947
|
||||
app.on('ready', () => setTimeout(createWindow, 400));
|
||||
|
||||
// Quit when all windows are closed.
|
||||
app.on('window-all-closed', () => {
|
||||
// On OS X it is common for applications and their menu bar
|
||||
// to stay active until the user quits explicitly with Cmd + Q
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
|
||||
app.on('activate', () => {
|
||||
// On OS X it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (win === null) {
|
||||
createWindow();
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
// Catch Error
|
||||
throw e;
|
||||
}
|
||||
|
||||
new Api();
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
|
||||
"index": "/index.html",
|
||||
"assetGroups": [
|
||||
{
|
||||
"name": "app",
|
||||
"installMode": "prefetch",
|
||||
"resources": {
|
||||
"files": [
|
||||
"/favicon.ico",
|
||||
"/index.html",
|
||||
"/manifest.webmanifest",
|
||||
"/*.css",
|
||||
"/*.js"
|
||||
]
|
||||
}
|
||||
}, {
|
||||
"name": "assets",
|
||||
"installMode": "lazy",
|
||||
"updateMode": "prefetch",
|
||||
"resources": {
|
||||
"files": [
|
||||
"/assets/**",
|
||||
"/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,67 +1,117 @@
|
||||
{
|
||||
"name": "iptv-player",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"build-and-deploy": "ng build --prod --base-href '/my-iptv-player-pwa/'",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~10.0.5",
|
||||
"@angular/cdk": "^10.1.0",
|
||||
"@angular/common": "~10.0.5",
|
||||
"@angular/compiler": "~10.0.5",
|
||||
"@angular/core": "~10.0.5",
|
||||
"@angular/flex-layout": "^10.0.0-beta.32",
|
||||
"@angular/forms": "~10.0.5",
|
||||
"@angular/material": "^10.1.0",
|
||||
"@angular/platform-browser": "~10.0.5",
|
||||
"@angular/platform-browser-dynamic": "~10.0.5",
|
||||
"@angular/router": "~10.0.5",
|
||||
"@angular/service-worker": "~10.0.5",
|
||||
"@datorama/akita": "^4.23.2",
|
||||
"hls.js": "^0.12.4",
|
||||
"iptv-playlist-parser": "git+https://github.com/4gray/iptv-playlist-parser.git",
|
||||
"material-icons": "^0.3.1",
|
||||
"ngx-filter-pipe": "^2.1.2",
|
||||
"ngx-indexed-db": "^5.0.4",
|
||||
"ngx-uploader": "^10.0.0",
|
||||
"rxjs": "~6.5.5",
|
||||
"tslib": "^2.0.0",
|
||||
"uuid": "^8.2.0",
|
||||
"zone.js": "~0.10.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^0.1000.4",
|
||||
"@angular/cli": "^10.0.4",
|
||||
"@angular/compiler-cli": "~10.0.5",
|
||||
"@angular/language-service": "~10.0.5",
|
||||
"@types/hls.js": "^0.12.6",
|
||||
"@types/jasmine": "~3.3.8",
|
||||
"@types/jasminewd2": "^2.0.8",
|
||||
"@types/node": "^12.11.1",
|
||||
"codelyzer": "^6.0.0",
|
||||
"jasmine-core": "~3.5.0",
|
||||
"jasmine-spec-reporter": "~5.0.0",
|
||||
"karma": "~5.0.0",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||
"karma-jasmine": "~3.3.0",
|
||||
"karma-jasmine-html-reporter": "^1.5.4",
|
||||
"lodash": "^4.17.19",
|
||||
"protractor": "~7.0.0",
|
||||
"ts-node": "~7.0.0",
|
||||
"tslint": "~6.1.0",
|
||||
"typescript": "~3.9.7"
|
||||
},
|
||||
"akitaCli": {
|
||||
"customFolderName": "true",
|
||||
"template": "angular",
|
||||
"basePath": "./src/app/"
|
||||
}
|
||||
}
|
||||
"name": "iptvnator",
|
||||
"version": "0.0.1",
|
||||
"description": "IPTV player applicaion.",
|
||||
"homepage": "https://github.com/4gray/my-iptv-player-pwa",
|
||||
"author": {
|
||||
"name": "4gray",
|
||||
"email": "dev@artslab.info"
|
||||
},
|
||||
"keywords": [
|
||||
"angular",
|
||||
"electron",
|
||||
"typescript",
|
||||
"m3u",
|
||||
"m3u8",
|
||||
"player",
|
||||
"iptv",
|
||||
"video",
|
||||
"tv"
|
||||
],
|
||||
"main": "main.js",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"ng": "ng",
|
||||
"start": "npm-run-all -p electron:serve ng:serve",
|
||||
"build": "npm run electron:serve-tsc && ng build --base-href ./",
|
||||
"build:dev": "npm run build -- -c dev",
|
||||
"build:prod": "npm run build -- -c production",
|
||||
"ng:serve": "ng serve",
|
||||
"ng:serve:web": "ng serve -c web -o",
|
||||
"electron:serve-tsc": "tsc -p tsconfig-serve.json",
|
||||
"electron:serve": "wait-on tcp:4200 && npm run electron:serve-tsc && npx electron . --serve",
|
||||
"electron:local": "npm run build:prod && npx electron .",
|
||||
"electron:build": "npm run build:prod && electron-builder build",
|
||||
"test": "ng test --watch=false",
|
||||
"test:watch": "ng test",
|
||||
"e2e": "npm run build:prod && cross-env TS_NODE_PROJECT='e2e/tsconfig.e2e.json' mocha --timeout 300000 --require ts-node/register e2e/**/*.e2e.ts",
|
||||
"version": "conventional-changelog -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md",
|
||||
"lint": "ng lint"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "9.2.0",
|
||||
"@angular-devkit/build-angular": "0.1000.2",
|
||||
"@angular-eslint/builder": "0.0.1-alpha.32",
|
||||
"@angular-eslint/eslint-plugin": "0.0.1-alpha.32",
|
||||
"@angular-eslint/eslint-plugin-template": "0.0.1-alpha.32",
|
||||
"@angular-eslint/template-parser": "0.0.1-alpha.32",
|
||||
"@angular/cli": "10.0.2",
|
||||
"@angular/common": "10.0.3",
|
||||
"@angular/compiler": "10.0.3",
|
||||
"@angular/compiler-cli": "10.0.3",
|
||||
"@angular/core": "10.0.3",
|
||||
"@angular/forms": "10.0.3",
|
||||
"@angular/language-service": "10.0.3",
|
||||
"@angular/platform-browser": "10.0.3",
|
||||
"@angular/platform-browser-dynamic": "10.0.3",
|
||||
"@angular/router": "10.0.3",
|
||||
"@ngx-translate/core": "13.0.0",
|
||||
"@ngx-translate/http-loader": "6.0.0",
|
||||
"@types/jasmine": "3.5.11",
|
||||
"@types/jasminewd2": "2.0.8",
|
||||
"@types/mocha": "7.0.2",
|
||||
"@types/node": "12.12.6",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/eslint-plugin-tslint": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"chai": "4.2.0",
|
||||
"conventional-changelog-cli": "2.0.34",
|
||||
"core-js": "3.6.5",
|
||||
"cross-env": "7.0.2",
|
||||
"electron": "9.1.0",
|
||||
"electron-builder": "22.7.0",
|
||||
"electron-reload": "1.5.0",
|
||||
"eslint": "7.4.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"jasmine-core": "3.5.0",
|
||||
"jasmine-spec-reporter": "5.0.2",
|
||||
"karma": "5.1.0",
|
||||
"karma-coverage-istanbul-reporter": "3.0.3",
|
||||
"karma-electron": "6.3.0",
|
||||
"karma-jasmine": "3.3.1",
|
||||
"karma-jasmine-html-reporter": "1.5.4",
|
||||
"mocha": "7.2.0",
|
||||
"npm-run-all": "4.1.5",
|
||||
"rxjs": "6.6.0",
|
||||
"spectron": "11.1.0",
|
||||
"ts-node": "8.10.2",
|
||||
"tslib": "2.0.0",
|
||||
"typescript": "3.9.6",
|
||||
"wait-on": "5.0.1",
|
||||
"webdriver-manager": "12.1.7",
|
||||
"zone.js": "0.10.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "10.0.8",
|
||||
"@angular/cdk": "10.1.2",
|
||||
"@angular/flex-layout": "10.0.0-beta.32",
|
||||
"@angular/material": "10.1.2",
|
||||
"@datorama/akita": "5.2.2",
|
||||
"@types/hls.js": "0.13.0",
|
||||
"axios": "0.19.2",
|
||||
"custom-electron-titlebar": "3.2.3",
|
||||
"electron-better-ipc": "1.1.1",
|
||||
"hls.js": "0.14.8",
|
||||
"iptv-playlist-parser": "0.5.0",
|
||||
"lodash": "4.17.19",
|
||||
"material-icons": "0.3.1",
|
||||
"nedb": "1.8.0",
|
||||
"ngx-filter-pipe": "2.1.2",
|
||||
"ngx-uploader": "10.0.0",
|
||||
"uuid": "8.3.0"
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,26 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { PlaylistUploaderComponent } from './components/playlist-uploader/playlist-uploader.component';
|
||||
import { VideoPlayerComponent } from './components/video-player/video-player.component';
|
||||
import { PageNotFoundComponent } from './shared/components';
|
||||
import { PlaylistUploaderComponent } from './playlist-uploader/playlist-uploader.component';
|
||||
import { VideoPlayerComponent } from './video-player/video-player.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: PlaylistUploaderComponent
|
||||
component: PlaylistUploaderComponent,
|
||||
},
|
||||
{
|
||||
path: 'iptv',
|
||||
component: VideoPlayerComponent
|
||||
}
|
||||
component: VideoPlayerComponent,
|
||||
},
|
||||
{
|
||||
path: '**',
|
||||
component: PageNotFoundComponent,
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes)],
|
||||
exports: [RouterModule]
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class AppRoutingModule {}
|
||||
@@ -1,3 +1,3 @@
|
||||
#video {
|
||||
width: 100%;
|
||||
}
|
||||
:host {
|
||||
|
||||
}
|
||||
@@ -1,35 +1,21 @@
|
||||
import { TestBed, async } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ElectronService } from './core/services';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
RouterTestingModule
|
||||
],
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
declarations: [AppComponent],
|
||||
providers: [ElectronService],
|
||||
imports: [RouterTestingModule, TranslateModule.forRoot()]
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
it('should create the app', () => {
|
||||
it('should create the app', async(() => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have as title 'iptv-player'`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app.title).toEqual('iptv-player');
|
||||
});
|
||||
|
||||
it('should render title', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.debugElement.nativeElement;
|
||||
expect(compiled.querySelector('.content span').textContent).toContain('iptv-player app is running!');
|
||||
});
|
||||
}));
|
||||
});
|
||||
@@ -1,16 +1,44 @@
|
||||
import { Component, NgZone } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { AppConfig } from '../environments/environment';
|
||||
import { akitaDevtools } from '@datorama/akita';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { Titlebar, Color } from 'custom-electron-titlebar';
|
||||
import { ElectronService } from './services/electron.service';
|
||||
|
||||
new Titlebar({
|
||||
backgroundColor: Color.fromHex('#000'),
|
||||
});
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.scss']
|
||||
styleUrls: ['./app.component.scss'],
|
||||
})
|
||||
export class AppComponent {
|
||||
constructor(private ngZone: NgZone) {
|
||||
if (!environment.production) {
|
||||
constructor(
|
||||
private electronService: ElectronService,
|
||||
private ngZone: NgZone,
|
||||
private translate: TranslateService
|
||||
) {
|
||||
if (!AppConfig.production) {
|
||||
akitaDevtools(ngZone);
|
||||
}
|
||||
this.translate.setDefaultLang('en');
|
||||
console.log('AppConfig', AppConfig);
|
||||
|
||||
if (electronService.isElectron) {
|
||||
console.log(process.env);
|
||||
console.log('Run in electron');
|
||||
console.log(
|
||||
'Electron ipcRenderer',
|
||||
this.electronService.ipcRenderer
|
||||
);
|
||||
console.log(
|
||||
'NodeJS childProcess',
|
||||
this.electronService.childProcess
|
||||
);
|
||||
} else {
|
||||
console.log('Run in browser');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,33 @@
|
||||
import 'reflect-metadata';
|
||||
import '../polyfills';
|
||||
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { HttpClientModule, HttpClient } from '@angular/common/http';
|
||||
import { SharedModule } from './shared/shared.module';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { ChannelListContainerComponent } from './components/channel-list-container/channel-list-container.component';
|
||||
import { ServiceWorkerModule } from '@angular/service-worker';
|
||||
import { environment } from '../environments/environment';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import { NgxUploaderModule } from 'ngx-uploader';
|
||||
import { PlaylistUploaderComponent } from './components/playlist-uploader/playlist-uploader.component';
|
||||
import { VideoPlayerComponent } from './components/video-player/video-player.component';
|
||||
import { MaterialModule } from './material.module';
|
||||
import { RecentPlaylistsComponent } from './components/recent-playlists/recent-playlists.component';
|
||||
import { FilterPipeModule } from 'ngx-filter-pipe';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { NgxIndexedDBModule } from 'ngx-indexed-db';
|
||||
import { dbConfig } from './db.config';
|
||||
|
||||
// NG Translate
|
||||
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
||||
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { PlaylistUploaderComponent } from './playlist-uploader/playlist-uploader.component';
|
||||
import { NgxUploaderModule } from 'ngx-uploader';
|
||||
import { VideoPlayerComponent } from './video-player/video-player.component';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { RecentPlaylistsComponent } from './recent-playlists/recent-playlists.component';
|
||||
import { ChannelListContainerComponent } from './channel-list-container/channel-list-container.component';
|
||||
import { FilterPipeModule } from 'ngx-filter-pipe';
|
||||
import { M3uService } from './services/m3u-service.service';
|
||||
|
||||
// AoT requires an exported function for factories
|
||||
export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
|
||||
return new TranslateHttpLoader(http, './assets/i18n/', '.json');
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@@ -29,21 +38,24 @@ import { dbConfig } from './db.config';
|
||||
RecentPlaylistsComponent,
|
||||
],
|
||||
imports: [
|
||||
AppRoutingModule,
|
||||
BrowserModule,
|
||||
CommonModule,
|
||||
BrowserAnimationsModule,
|
||||
FlexLayoutModule,
|
||||
FilterPipeModule,
|
||||
BrowserModule,
|
||||
FormsModule,
|
||||
HttpClientModule,
|
||||
NgxIndexedDBModule.forRoot(dbConfig),
|
||||
MaterialModule,
|
||||
NgxUploaderModule,
|
||||
ServiceWorkerModule.register('ngsw-worker.js', {
|
||||
enabled: environment.production,
|
||||
SharedModule,
|
||||
AppRoutingModule,
|
||||
FilterPipeModule,
|
||||
TranslateModule.forRoot({
|
||||
loader: {
|
||||
provide: TranslateLoader,
|
||||
useFactory: HttpLoaderFactory,
|
||||
deps: [HttpClient],
|
||||
},
|
||||
}),
|
||||
NgxUploaderModule,
|
||||
],
|
||||
providers: [],
|
||||
providers: [M3uService],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule {}
|
||||
@@ -18,9 +18,9 @@
|
||||
<p matLine>
|
||||
{{ i+1 + '. ' + channel?.name || 'Unnamed Channel' }}
|
||||
</p>
|
||||
<button mat-icon-button color="primary" (click)="favChannel(channel, $event)">
|
||||
<!-- <button mat-icon-button color="primary" (click)="favChannel(channel, $event)">
|
||||
<mat-icon>star{{ channel.fav ? '' : '_outline' }}</mat-icon>
|
||||
</button>
|
||||
</button> -->
|
||||
<mat-divider></mat-divider>
|
||||
</mat-list-item>
|
||||
</mat-accordion>
|
||||
@@ -33,25 +33,27 @@
|
||||
<ng-container *ngFor="let groups of groupedChannels | keyvalue">
|
||||
<mat-expansion-panel>
|
||||
<mat-expansion-panel-header *ngIf="groups.value.length > 0">
|
||||
{{groups.key || 'Ungrouped'}} ({{groups.value.length}})
|
||||
{{(groups.key || 'Ungrouped') | titlecase}} ({{groups.value.length}})
|
||||
</mat-expansion-panel-header>
|
||||
<mat-list-item *ngFor="let channel of groups.value; index as i"
|
||||
[class.active]="selected?.id === channel.id" (click)="selectChannel(channel)">
|
||||
<p matLine>
|
||||
{{ i+1 + '. ' + channel?.name || 'Unnamed Channel' }}
|
||||
</p>
|
||||
<button mat-icon-button color="primary" (click)="favChannel(channel, $event)">
|
||||
<mat-icon>star{{ channel.fav ? '' : '_outline' }}</mat-icon>
|
||||
</button>
|
||||
<mat-divider></mat-divider>
|
||||
</mat-list-item>
|
||||
<ng-template matExpansionPanelContent>
|
||||
<mat-list-item *ngFor="let channel of groups.value; index as i"
|
||||
[class.active]="selected?.id === channel.id" (click)="selectChannel(channel)">
|
||||
<p matLine>
|
||||
{{ i+1 + '. ' + channel?.name || 'Unnamed Channel' }}
|
||||
</p>
|
||||
<!-- <button mat-icon-button color="primary" (click)="favChannel(channel, $event)">
|
||||
<mat-icon>star{{ channel.fav ? '' : '_outline' }}</mat-icon>
|
||||
</button> -->
|
||||
<mat-divider></mat-divider>
|
||||
</mat-list-item>
|
||||
</ng-template>
|
||||
</mat-expansion-panel>
|
||||
</ng-container>
|
||||
</mat-accordion>
|
||||
</mat-nav-list>
|
||||
</mat-tab>
|
||||
|
||||
<mat-tab label="Favorites">
|
||||
<!-- <mat-tab label="Favorites">
|
||||
<mat-nav-list>
|
||||
<mat-list-item *ngFor="let channel of favs | filterBy: searchTerm; index as i"
|
||||
[class.active]="selected?.id === channel.id" (click)="selectChannel(channel)">
|
||||
@@ -64,5 +66,5 @@
|
||||
<mat-divider></mat-divider>
|
||||
</mat-list-item>
|
||||
</mat-nav-list>
|
||||
</mat-tab>
|
||||
</mat-tab> -->
|
||||
</mat-tab-group>
|
||||
@@ -1,7 +1,3 @@
|
||||
.full-width {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#top-panel {
|
||||
background: #eee;
|
||||
}
|
||||
@@ -14,6 +10,11 @@
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
::ng-deep .mat-tab-header, ::ng-deep .mat-tab-labels {
|
||||
height: 63px;
|
||||
line-height: 63px;
|
||||
}
|
||||
|
||||
::ng-deep .mat-expansion-panel-body {
|
||||
padding: 0 !important;
|
||||
}
|
||||
@@ -24,3 +25,16 @@
|
||||
padding: 3px 10px !important;
|
||||
margin: 3px 10px !important;
|
||||
}
|
||||
|
||||
|
||||
::ng-deep {
|
||||
.mat-tab-label {
|
||||
height: 63px !important;
|
||||
}
|
||||
.mat-tab-label-content {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.mat-expansion-panel {
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { Channel, ChannelStore, ChannelQuery } from 'src/app/state';
|
||||
import { NgxIndexedDBService } from 'ngx-indexed-db';
|
||||
import { Playlist } from '../playlist-uploader/playlist-uploader.component';
|
||||
import { Channel, ChannelStore, ChannelQuery } from '../state';
|
||||
|
||||
import * as _ from 'lodash';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { Store } from '@datorama/akita';
|
||||
|
||||
@Component({
|
||||
selector: 'app-channel-list-container',
|
||||
@@ -23,8 +23,8 @@ export class ChannelListContainerComponent {
|
||||
@Input('channelList')
|
||||
set channelList(value: Channel[]) {
|
||||
// deep copy
|
||||
this._channelList = JSON.parse(JSON.stringify(value));
|
||||
this.groupedChannels = _.groupBy(this._channelList, 'group.title');
|
||||
this._channelList = value; //JSON.parse(JSON.stringify(value));
|
||||
this.groupedChannels = _.groupBy(value, 'group.title');
|
||||
}
|
||||
|
||||
/** Object with channels sorted by grouped */
|
||||
@@ -39,9 +39,7 @@ export class ChannelListContainerComponent {
|
||||
/** List with favorited channels */
|
||||
favs: Channel[] = [];
|
||||
|
||||
/**
|
||||
* Search term for channel filter
|
||||
*/
|
||||
/** Search term for channel filter */
|
||||
searchTerm: any = {
|
||||
name: '',
|
||||
};
|
||||
@@ -50,13 +48,11 @@ export class ChannelListContainerComponent {
|
||||
* Creates an instance of ChannelListContainerComponent
|
||||
* @param channelQuery akita's channel query
|
||||
* @param channelStore akita's channel store
|
||||
* @param dbService service to work with indexed db
|
||||
* @param snackBar service to push snackbar notifications
|
||||
*/
|
||||
constructor(
|
||||
private channelQuery: ChannelQuery,
|
||||
private channelStore: ChannelStore,
|
||||
private dbService: NgxIndexedDBService,
|
||||
private snackBar: MatSnackBar
|
||||
) {
|
||||
this.channelQuery
|
||||
@@ -75,6 +71,10 @@ export class ChannelListContainerComponent {
|
||||
selectChannel(channel: Channel): void {
|
||||
this.selected = channel;
|
||||
this.changeChannel.emit(channel);
|
||||
this.channelStore.update((store) => ({
|
||||
...store,
|
||||
active: channel,
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -85,22 +85,14 @@ export class ChannelListContainerComponent {
|
||||
favChannel(channel: Channel, clickEvent: MouseEvent): void {
|
||||
clickEvent.stopPropagation();
|
||||
channel.fav = !channel.fav;
|
||||
this.snackBar.open('Favorites were updated!');
|
||||
this.snackBar.open('Favorites were updated!', null, { duration: 2000 });
|
||||
|
||||
this.channelStore.update(channel.id, { fav: channel.fav });
|
||||
// update channels fav flag in the indexed db
|
||||
// update channels fav flag in the database
|
||||
this.channelStore.update((store) => {
|
||||
const favorites = channel.fav
|
||||
? [...store.favorites, channel.id]
|
||||
: [...store.favorites.filter((favId) => channel.id !== favId)];
|
||||
this.dbService
|
||||
.getByID('playlists', store.playlistId)
|
||||
.then((dataset: Playlist) => {
|
||||
this.dbService.update('playlists', {
|
||||
...dataset,
|
||||
favorites,
|
||||
});
|
||||
});
|
||||
|
||||
return {
|
||||
favorites,
|
||||
@@ -1,58 +0,0 @@
|
||||
:host {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.drop-container {
|
||||
height: 200px;
|
||||
border: 2px dashed #ccc;
|
||||
border-radius: 3px;
|
||||
margin: 0 auto;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#file input {
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ccc;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.upload-title {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
.input-file {
|
||||
width: 0.1px;
|
||||
height: 0.1px;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.input-file + label {
|
||||
font-size: 1.25em;
|
||||
font-weight: 700;
|
||||
color: white;
|
||||
background-color: black;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.input-file:focus + label,
|
||||
.input-file + label:hover {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.input-file + label {
|
||||
cursor: pointer;
|
||||
line-height: 35px;
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
.upload-icon {
|
||||
font-size: 80px;
|
||||
width: 80px;
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
<mat-card *ngIf="(playlists).length > 0">
|
||||
<mat-card-content>
|
||||
<app-recent-playlists [playlists]="playlists" (playlistClicked)="setPlaylist($event)" (removeClicked)="removePlaylist($event)">
|
||||
</app-recent-playlists>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<br />
|
||||
<mat-card>
|
||||
<mat-card-subtitle>Add playlist via file upload</mat-card-subtitle>
|
||||
<div class="drop-container" ngFileDrop [options]="options" (uploadOutput)="onUploadOutput($event)"
|
||||
[uploadInput]="uploadInput">
|
||||
<div>
|
||||
<mat-icon class="upload-icon">save_alt</mat-icon>
|
||||
</div>
|
||||
<p class="upload-title">
|
||||
Drag & drop files here
|
||||
</p>
|
||||
<p>or</p>
|
||||
<input type="file" ngFileSelect [options]="options" (uploadOutput)="onUploadOutput($event)" class="input-file"
|
||||
name="file" id="file" [uploadInput]="uploadInput" multiple>
|
||||
<label for="file">
|
||||
Choose a file
|
||||
</label>
|
||||
</div>
|
||||
</mat-card>
|
||||
<mat-progress-bar *ngIf="isLoading" mode="indeterminate"></mat-progress-bar>
|
||||
@@ -1,3 +0,0 @@
|
||||
mat-list-item {
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import { DBConfig } from 'ngx-indexed-db';
|
||||
|
||||
export const PLAYLISTS_STORE = 'playlists';
|
||||
|
||||
export const dbConfig: DBConfig = {
|
||||
name: 'MyIptvDb',
|
||||
version: 1,
|
||||
objectStoresMeta: [{
|
||||
store: PLAYLISTS_STORE,
|
||||
storeConfig: { keyPath: 'id', autoIncrement: true },
|
||||
storeSchema: [
|
||||
{ name: 'title', keypath: 'title', options: { unique: false } },
|
||||
{ name: 'filename', keypath: 'filename', options: { unique: false } },
|
||||
{ name: 'playlist', keypath: 'playlist', options: { unique: false } },
|
||||
{ name: 'importDate', keypath: 'importDate', options: { unique: false } },
|
||||
{ name: 'lastUsage', keypath: 'lastUsage', options: { unique: false } },
|
||||
]
|
||||
}]
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
<div style="padding: 15px;">
|
||||
<div class="logo-container">
|
||||
<img src="./assets/icons/tv-icon.png" class="logo" />
|
||||
</div>
|
||||
<mat-card>
|
||||
<div fxLayout="row" fxFlexAlign="start start">
|
||||
<div fxFlex="50">
|
||||
<mat-tab-group [dynamicHeight]="true">
|
||||
<mat-tab label="Add via file upload">
|
||||
<ng-template matTabContent>
|
||||
<div class="drop-container" ngFileDrop [options]="options"
|
||||
(uploadOutput)="onUploadOutput($event)" [uploadInput]="uploadInput">
|
||||
<mat-icon class="upload-icon">save_alt</mat-icon>
|
||||
<p class="upload-title">
|
||||
Drag & drop files here
|
||||
</p>
|
||||
<p>or</p>
|
||||
<input type="file" ngFileSelect [options]="options"
|
||||
(uploadOutput)="onUploadOutput($event)" class="input-file" name="file" id="file"
|
||||
[uploadInput]="uploadInput" multiple>
|
||||
<label for="file">
|
||||
Choose a playlist
|
||||
</label>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab label="Add via URL">
|
||||
<ng-template matTabContent>
|
||||
<div class="url-form">
|
||||
<mat-form-field class="full-width">
|
||||
<input matInput placeholder="Playlist URL (m3u, m3u8)" [(ngModel)]="playlistUrl">
|
||||
</mat-form-field>
|
||||
<button mat-flat-button [disabled]="!playlistUrl" color="primary" (click)="sendUrl()">ADD PLAYLIST</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</div>
|
||||
<div fxFlex="50" id="recent-playlists">
|
||||
<mat-card-subtitle>Recently added playlists ({{playlists.length}})</mat-card-subtitle>
|
||||
<app-recent-playlists [playlists]="playlists" (playlistClicked)="getPlaylist($event)"
|
||||
(removeClicked)="removePlaylist($event)">
|
||||
</app-recent-playlists>
|
||||
</div>
|
||||
</div>
|
||||
</mat-card>
|
||||
<mat-progress-bar *ngIf="isLoading" mode="indeterminate"></mat-progress-bar>
|
||||
</div>
|
||||
@@ -0,0 +1,99 @@
|
||||
mat-card {
|
||||
padding: 0 !important;
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.logo-container {
|
||||
text-align: center;
|
||||
|
||||
.logo {
|
||||
width: 128px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
::ng-deep {
|
||||
.mat-tab-label-content {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#recent-playlists {
|
||||
border-radius: 0 4px 4px 0;
|
||||
background: #eee;
|
||||
padding: 16px 0;
|
||||
border-left: 1px solid #ccc;
|
||||
|
||||
.mat-card-subtitle {
|
||||
padding: 0px 16px;
|
||||
text-transform: uppercase;
|
||||
border-bottom: 1px solid #ccc;
|
||||
height: 32px;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.drop-container {
|
||||
margin: 10px;
|
||||
padding: 10px;
|
||||
height: 300px;
|
||||
border: 2px dashed #ccc;
|
||||
border-radius: 3px;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.url-form {
|
||||
margin: 15px;
|
||||
height: 304px;
|
||||
}
|
||||
|
||||
#file input {
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ccc;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.upload-title {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
.input-file {
|
||||
width: 0.1px;
|
||||
height: 0.1px;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.input-file + label {
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
color: white;
|
||||
background-color: #3f51b5;
|
||||
display: inline-block;
|
||||
text-transform: uppercase;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.input-file:focus + label,
|
||||
.input-file + label:hover {
|
||||
background-color: #202b69;
|
||||
}
|
||||
|
||||
.input-file + label {
|
||||
cursor: pointer;
|
||||
line-height: 35px;
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
.upload-icon {
|
||||
font-size: 80px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, EventEmitter } from '@angular/core';
|
||||
import { Component, EventEmitter, NgZone } from '@angular/core';
|
||||
import {
|
||||
UploadOutput,
|
||||
UploadInput,
|
||||
@@ -6,66 +6,79 @@ import {
|
||||
humanizeBytes,
|
||||
UploaderOptions,
|
||||
} from 'ngx-uploader';
|
||||
import { ChannelStore, createChannel } from 'src/app/state';
|
||||
import { M3uService } from 'src/app/services/m3u-service.service';
|
||||
import { ChannelStore, createChannel } from '../state';
|
||||
import { Router } from '@angular/router';
|
||||
import { NgxIndexedDBService } from 'ngx-indexed-db';
|
||||
import { PLAYLISTS_STORE } from 'src/app/db.config';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { guid, ID } from '@datorama/akita';
|
||||
|
||||
/**
|
||||
* Describes playlist interface
|
||||
*/
|
||||
export interface Playlist {
|
||||
id?: ID;
|
||||
title: string;
|
||||
filename: string;
|
||||
playlist: any;
|
||||
importDate: number;
|
||||
lastUsage: number;
|
||||
favorites: string[];
|
||||
}
|
||||
import { Playlist } from './playlist.interface';
|
||||
|
||||
@Component({
|
||||
selector: 'app-playlist-uploader',
|
||||
templateUrl: './playlist-uploader.component.html',
|
||||
styleUrls: ['./playlist-uploader.component.css'],
|
||||
styleUrls: ['./playlist-uploader.component.scss'],
|
||||
})
|
||||
export class PlaylistUploaderComponent {
|
||||
renderer = window.require('electron').ipcRenderer;
|
||||
playlistUrl = '';
|
||||
|
||||
formData: FormData;
|
||||
files: UploadFile[];
|
||||
uploadInput: EventEmitter<UploadInput>;
|
||||
humanizeBytes: Function;
|
||||
files: UploadFile[] = [];
|
||||
uploadInput: EventEmitter<UploadInput> = new EventEmitter<UploadInput>();
|
||||
humanizeBytes: any = humanizeBytes;
|
||||
dragOver: boolean;
|
||||
options: UploaderOptions;
|
||||
options: UploaderOptions = {
|
||||
allowedContentTypes: [
|
||||
'application/x-mpegurl',
|
||||
'application/octet-stream',
|
||||
'audio/x-mpegurl',
|
||||
],
|
||||
concurrency: 1,
|
||||
maxUploads: 1,
|
||||
};
|
||||
playlists: Playlist[] = [];
|
||||
isLoading = false;
|
||||
|
||||
/**
|
||||
* Creates an instanceof PlaylistUploaderComponent
|
||||
* @param channelStore channels store
|
||||
* @param dbService indexeddb service
|
||||
* @param m3uService m3u service
|
||||
* @param router angulars router
|
||||
* @param snackBar snackbars with notification messages
|
||||
*/
|
||||
constructor(
|
||||
private channelStore: ChannelStore,
|
||||
private dbService: NgxIndexedDBService,
|
||||
private m3uService: M3uService,
|
||||
private ngZone: NgZone,
|
||||
private router: Router,
|
||||
private snackBar: MatSnackBar
|
||||
) {
|
||||
this.getPlaylists();
|
||||
// get all playlists
|
||||
this.renderer.send('playlists-all');
|
||||
// set all renderer listeners
|
||||
this.setRendererListeners();
|
||||
}
|
||||
|
||||
this.options = {
|
||||
concurrency: 1,
|
||||
maxUploads: 1,
|
||||
};
|
||||
this.files = [];
|
||||
this.uploadInput = new EventEmitter<UploadInput>();
|
||||
this.humanizeBytes = humanizeBytes;
|
||||
setRendererListeners(): void {
|
||||
this.renderer.on('parse-response', (event, response) => {
|
||||
this.ngZone.run(() => this.setPlaylist(response.payload));
|
||||
});
|
||||
|
||||
this.renderer.on('parse-url-response', (event, response) => {
|
||||
this.ngZone.run(() => this.setPlaylist(response.payload));
|
||||
});
|
||||
|
||||
this.renderer.on('playlist-all-result', (event, response) => {
|
||||
this.ngZone.run(() => (this.playlists = response.payload));
|
||||
});
|
||||
this.renderer.on('playlist-by-id-result', (event, response) => {
|
||||
this.ngZone.run(() => this.setPlaylist(response.payload));
|
||||
});
|
||||
this.renderer.on('playlist-remove-by-id-result', () => {
|
||||
this.ngZone.run(() => {
|
||||
this.snackBar.open('Done! Playlist was removed.', null, {
|
||||
duration: 2000,
|
||||
});
|
||||
this.renderer.send('playlists-all');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,8 +87,8 @@ export class PlaylistUploaderComponent {
|
||||
*/
|
||||
onUploadOutput(output: UploadOutput): void {
|
||||
if (output.type === 'allAddedToQueue') {
|
||||
this.isLoading = true;
|
||||
if (this.files.length > 0) {
|
||||
this.isLoading = true;
|
||||
const fileReader = new FileReader();
|
||||
fileReader.onload = (fileLoadedEvent) =>
|
||||
this.handlePlaylist(fileLoadedEvent);
|
||||
@@ -110,7 +123,14 @@ export class PlaylistUploaderComponent {
|
||||
output.type === 'rejected' &&
|
||||
typeof output.file !== 'undefined'
|
||||
) {
|
||||
console.log(output.file.name + ' rejected');
|
||||
this.snackBar.open(
|
||||
`File was rejected, unsupported file format (${output.file.name}).`,
|
||||
null,
|
||||
{
|
||||
duration: 2000,
|
||||
}
|
||||
);
|
||||
this.isLoading = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,12 +138,13 @@ export class PlaylistUploaderComponent {
|
||||
* Parse and store uploaded playlist
|
||||
* @param fileLoadedEvent
|
||||
*/
|
||||
handlePlaylist(fileLoadedEvent: any): void {
|
||||
handlePlaylist(fileLoadedEvent: Event): void {
|
||||
const result = (fileLoadedEvent.target as FileReader).result;
|
||||
const array = (result as string).split('\n');
|
||||
const playlist = this.m3uService.parsePlaylist(array);
|
||||
const playlistObject = this.savePlaylist(this.files[0].name, playlist);
|
||||
this.setPlaylist(playlistObject);
|
||||
this.renderer.send('parse-playlist', {
|
||||
title: this.files[0].name,
|
||||
playlist: array,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,37 +155,11 @@ export class PlaylistUploaderComponent {
|
||||
this.router.navigateByUrl('/iptv', { skipLocationChange: true });
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves playlist to the localStorage
|
||||
* @param name name of the playlist
|
||||
* @param playlist playlist to save
|
||||
*/
|
||||
savePlaylist(name: string, playlist: any): Playlist {
|
||||
const playlistObject = {
|
||||
id: guid(),
|
||||
filename: name,
|
||||
title: name,
|
||||
playlist,
|
||||
importDate: new Date().getMilliseconds(),
|
||||
lastUsage: new Date().getMilliseconds(),
|
||||
favorites: [],
|
||||
};
|
||||
this.dbService.add<Playlist>('playlists', playlistObject).then(() => {
|
||||
console.log('playlist saved!');
|
||||
sendUrl(): void {
|
||||
this.renderer.send('parse-playlist-by-url', {
|
||||
title: this.getLastUrlSegment(this.playlistUrl),
|
||||
url: this.playlistUrl,
|
||||
});
|
||||
return playlistObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads all saved playlists from the browser store
|
||||
*/
|
||||
getPlaylists(): void {
|
||||
this.dbService.getAll('playlists').then(
|
||||
(playlists: Playlist[]) => (this.playlists = playlists),
|
||||
(error) => {
|
||||
console.error(error);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -186,14 +181,30 @@ export class PlaylistUploaderComponent {
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the provided playlist from the indexedDb
|
||||
* @param playlist playlist to remove
|
||||
* Removes the provided playlist from the database
|
||||
* @param playlistId playlist id to remove
|
||||
*/
|
||||
removePlaylist(playlist: Playlist): void {
|
||||
this.dbService.delete(PLAYLISTS_STORE, playlist.id);
|
||||
this.getPlaylists();
|
||||
this.snackBar.open('Done! Playlist was removed.', null, {
|
||||
duration: 2000,
|
||||
});
|
||||
removePlaylist(playlistId: string): void {
|
||||
this.renderer.send('playlist-remove-by-id', { id: playlistId });
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests playlist by id
|
||||
* @param playlistId playlist id
|
||||
*/
|
||||
getPlaylist(playlistId: string): void {
|
||||
this.renderer.send('playlist-by-id', { id: playlistId });
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns last segment (part after last slash "/") of the given URL
|
||||
* @param value URL as string
|
||||
*/
|
||||
getLastUrlSegment(value: string): string {
|
||||
if (value && value.length > 1) {
|
||||
return value.substr(value.lastIndexOf('/') + 1);
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { ID } from '@datorama/akita';
|
||||
|
||||
/**
|
||||
* Describes playlist interface
|
||||
*/
|
||||
export interface Playlist {
|
||||
id: ID;
|
||||
_id: string;
|
||||
title: string;
|
||||
filename: string;
|
||||
playlist: any;
|
||||
importDate: number;
|
||||
lastUsage: number;
|
||||
favorites: string[];
|
||||
count: number;
|
||||
}
|
||||
@@ -1,16 +1,15 @@
|
||||
<mat-nav-list>
|
||||
<div mat-subheader>Recently added playlists ({{playlists.length}})</div>
|
||||
<a mat-list-item *ngFor="let item of playlists; last as last" (click)="playlistClicked.emit(item)">
|
||||
<a mat-list-item *ngFor="let item of playlists; last as last" (click)="playlistClicked.emit(item._id)">
|
||||
<mat-icon mat-list-icon>folder</mat-icon>
|
||||
<div mat-line>{{ item.title || item.filename }}</div>
|
||||
<div mat-line>Channels: {{ item.playlist?.items?.length }}</div>
|
||||
<div mat-line>Channels: {{ item.count }}</div>
|
||||
<!--<button mat-icon-button color="primary" (click)="$event.stopPropagation(); renameClicked.emit(item)" matTooltip="Rename playlist">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>-->
|
||||
<button mat-icon-button color="primary" (click)="$event.stopPropagation(); removeClicked.emit(item)"
|
||||
<button mat-icon-button color="primary" (click)="$event.stopPropagation(); removeClicked.emit(item._id)"
|
||||
matTooltip="Remove playlist">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
<mat-divider *ngIf="!last"></mat-divider>
|
||||
</a>
|
||||
</mat-nav-list>
|
||||
</mat-nav-list>
|
||||
@@ -0,0 +1,10 @@
|
||||
mat-list-item {
|
||||
cursor: pointer;
|
||||
}
|
||||
.mat-list-base {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
mat-nav-list {
|
||||
max-height: 325px;
|
||||
overflow: auto;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { Playlist } from '../playlist-uploader/playlist-uploader.component';
|
||||
import { Playlist } from 'app/playlist-uploader/playlist.interface';
|
||||
|
||||
@Component({
|
||||
selector: 'app-recent-playlists',
|
||||
@@ -11,10 +11,10 @@ export class RecentPlaylistsComponent {
|
||||
@Input() playlists: Playlist[];
|
||||
|
||||
/** Emits on playlist selection */
|
||||
@Output() playlistClicked: EventEmitter<Playlist> = new EventEmitter();
|
||||
@Output() playlistClicked: EventEmitter<string> = new EventEmitter();
|
||||
|
||||
/** Emits on playlist remove click */
|
||||
@Output() removeClicked: EventEmitter<Playlist> = new EventEmitter();
|
||||
@Output() removeClicked: EventEmitter<string> = new EventEmitter();
|
||||
|
||||
/** Emits on playlist rename click */
|
||||
@Output() renameClicked: EventEmitter<Playlist> = new EventEmitter();
|
||||
@@ -0,0 +1,12 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ElectronService } from './electron.service';
|
||||
|
||||
describe('ElectronService', () => {
|
||||
beforeEach(() => TestBed.configureTestingModule({}));
|
||||
|
||||
it('should be created', () => {
|
||||
const service: ElectronService = TestBed.get(ElectronService);
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
// If you import a module but never use any of the imported values other than as TypeScript types,
|
||||
// the resulting javascript file will look as if you never imported the module at all.
|
||||
import { ipcRenderer, webFrame, remote } from 'electron';
|
||||
import * as childProcess from 'child_process';
|
||||
import * as fs from 'fs';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ElectronService {
|
||||
ipcRenderer: typeof ipcRenderer;
|
||||
webFrame: typeof webFrame;
|
||||
remote: typeof remote;
|
||||
childProcess: typeof childProcess;
|
||||
fs: typeof fs;
|
||||
|
||||
get isElectron(): boolean {
|
||||
return !!(window && window.process && window.process.type);
|
||||
}
|
||||
|
||||
constructor() {
|
||||
// Conditional imports
|
||||
if (this.isElectron) {
|
||||
this.ipcRenderer = window.require('electron').ipcRenderer;
|
||||
this.webFrame = window.require('electron').webFrame;
|
||||
this.remote = window.require('electron').remote;
|
||||
this.childProcess = window.require('child_process');
|
||||
this.fs = window.require('fs');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from './page-not-found/page-not-found.component';
|
||||
@@ -0,0 +1,3 @@
|
||||
<p>
|
||||
page-not-found works!
|
||||
</p>
|
||||
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PageNotFoundComponent } from './page-not-found.component';
|
||||
|
||||
describe('PageNotFoundComponent', () => {
|
||||
let component: PageNotFoundComponent;
|
||||
let fixture: ComponentFixture<PageNotFoundComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PageNotFoundComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PageNotFoundComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-page-not-found',
|
||||
templateUrl: './page-not-found.component.html',
|
||||
styleUrls: ['./page-not-found.component.scss']
|
||||
})
|
||||
export class PageNotFoundComponent implements OnInit {
|
||||
constructor() {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from './webview/webview.directive';
|
||||
@@ -0,0 +1,8 @@
|
||||
import { WebviewDirective } from './webview.directive';
|
||||
|
||||
describe('WebviewDirective', () => {
|
||||
it('should create an instance', () => {
|
||||
const directive = new WebviewDirective();
|
||||
expect(directive).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
import { Directive } from '@angular/core';
|
||||
|
||||
@Directive({
|
||||
selector: 'webview'
|
||||
})
|
||||
export class WebviewDirective {
|
||||
constructor() { }
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
import { PageNotFoundComponent } from './components/';
|
||||
import { WebviewDirective } from './directives/';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { MaterialModule } from 'app/material.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [PageNotFoundComponent, WebviewDirective],
|
||||
imports: [
|
||||
CommonModule,
|
||||
TranslateModule,
|
||||
FormsModule,
|
||||
MaterialModule,
|
||||
FlexLayoutModule,
|
||||
],
|
||||
exports: [
|
||||
TranslateModule,
|
||||
WebviewDirective,
|
||||
FormsModule,
|
||||
MaterialModule,
|
||||
FlexLayoutModule,
|
||||
],
|
||||
})
|
||||
export class SharedModule {}
|
||||
@@ -5,6 +5,7 @@ import { Channel } from './channel.model';
|
||||
export interface ChannelState extends EntityState<Channel> {
|
||||
favorites: string[];
|
||||
playlistId: string;
|
||||
active: Channel;
|
||||
}
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
@@ -14,6 +15,7 @@ export class ChannelStore extends EntityStore<ChannelState> {
|
||||
super({
|
||||
favorites: [],
|
||||
playlistId: '',
|
||||
active: undefined,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#video-player {
|
||||
width: 100%;
|
||||
height: calc(100vh - 72px);
|
||||
height: calc(100vh - 100px);
|
||||
}
|
||||
|
||||
.main-container {
|
||||
@@ -19,3 +19,7 @@
|
||||
width: 400px;
|
||||
min-width: 400px;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
@@ -21,10 +21,14 @@
|
||||
<mat-toolbar color="primary">
|
||||
<button
|
||||
mat-icon-button
|
||||
(click)="drawer.toggle()">
|
||||
mat-toolbar="Add to favorites"
|
||||
(click)="drawer.toggle()"
|
||||
matTooltip="Open channels list">
|
||||
<mat-icon>menu</mat-icon>
|
||||
</button>
|
||||
myIPTV
|
||||
{{ (activeChannel$ | async)?.name}}
|
||||
<div class="spacer"></div>
|
||||
<!-- <mat-icon>star_outline</mat-icon> -->
|
||||
</mat-toolbar>
|
||||
|
||||
<!-- player component -->
|
||||
@@ -1,8 +1,7 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import * as Hls from 'hls.js';
|
||||
import { ChannelQuery, Channel } from 'src/app/state';
|
||||
import { ChannelQuery, Channel } from '../state';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { MatSidenav } from '@angular/material/sidenav';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
@@ -12,33 +11,26 @@ import * as _ from 'lodash';
|
||||
styleUrls: ['./video-player.component.css'],
|
||||
})
|
||||
export class VideoPlayerComponent implements OnInit {
|
||||
/**
|
||||
* Channels list
|
||||
*/
|
||||
/** Channels list */
|
||||
channels$: Observable<Channel[]>;
|
||||
|
||||
/**
|
||||
* Video player DOM element
|
||||
*/
|
||||
/** Video player DOM element */
|
||||
videoPlayer: HTMLVideoElement;
|
||||
|
||||
/**
|
||||
* HLS object
|
||||
*/
|
||||
/** HLS object */
|
||||
hls = new Hls();
|
||||
|
||||
/**
|
||||
* Name of the selected channel
|
||||
*/
|
||||
/** Name of the selected channel */
|
||||
channelTitle: string;
|
||||
|
||||
/**
|
||||
* Sidebar object
|
||||
*/
|
||||
/** Active selected channel */
|
||||
activeChannel$: Observable<Channel>;
|
||||
|
||||
/** Sidebar object */
|
||||
@ViewChild('sidenav') sideNav: MatSidenav;
|
||||
|
||||
/**
|
||||
* Creates an instance of VideoPlayerOmponent
|
||||
* Creates an instance of VideoPlayerComponent
|
||||
* @param channelQuery akita's channel query
|
||||
*/
|
||||
constructor(private channelQuery: ChannelQuery) {}
|
||||
@@ -51,12 +43,13 @@ export class VideoPlayerComponent implements OnInit {
|
||||
this.videoPlayer = document.getElementById(
|
||||
'video-player'
|
||||
) as HTMLVideoElement;
|
||||
this.activeChannel$ = this.channelQuery.select((state) => state.active);
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes sidebar
|
||||
*/
|
||||
close() {
|
||||
close(): void {
|
||||
this.sideNav.close();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"PAGES": {
|
||||
"HOME": {
|
||||
"TITLE": "App works !",
|
||||
"GO_TO_DETAIL": "Go to Detail"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 606 B |
|
After Width: | Height: | Size: 848 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 792 B |
|
Before Width: | Height: | Size: 958 B |
|
After Width: | Height: | Size: 7.9 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
@@ -1,14 +0,0 @@
|
||||
chrome.app.runtime.onLaunched.addListener(function() {
|
||||
chrome.app.window.create('index.html', {
|
||||
id: 'appWindow',
|
||||
frame: {
|
||||
color: '#11575c'
|
||||
},
|
||||
innerBounds: {
|
||||
width: 960,
|
||||
height: 540,
|
||||
minWidth: 340,
|
||||
minHeight: 540
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
// The file contents for the current environment will overwrite these during build.
|
||||
// The build system defaults to the dev environment which uses `index.ts`, but if you do
|
||||
// `ng build --env=prod` then `index.prod.ts` will be used instead.
|
||||
// The list of which env maps to which file can be found in `.angular-cli.json`.
|
||||
|
||||
export const AppConfig = {
|
||||
production: false,
|
||||
environment: 'DEV'
|
||||
};
|
||||
@@ -1,3 +1,4 @@
|
||||
export const environment = {
|
||||
production: true
|
||||
export const AppConfig = {
|
||||
production: true,
|
||||
environment: 'PROD'
|
||||
};
|
||||
@@ -1,16 +1,4 @@
|
||||
// This file can be replaced during build by using the `fileReplacements` array.
|
||||
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
|
||||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
production: false
|
||||
export const AppConfig = {
|
||||
production: false,
|
||||
environment: 'LOCAL',
|
||||
};
|
||||
|
||||
/*
|
||||
* For easier debugging in development mode, you can import the following file
|
||||
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
||||
*
|
||||
* This import should be commented out in production mode because it will have a negative impact
|
||||
* on performance if an error is thrown.
|
||||
*/
|
||||
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
||||
@@ -0,0 +1,9 @@
|
||||
// The file contents for the current environment will overwrite these during build.
|
||||
// The build system defaults to the dev environment which uses `index.ts`, but if you do
|
||||
// `ng build --env=prod` then `index.prod.ts` will be used instead.
|
||||
// The list of which env maps to which file can be found in `.angular-cli.json`.
|
||||
|
||||
export const AppConfig = {
|
||||
production: false,
|
||||
environment: 'DEV'
|
||||
};
|
||||
|
Before Width: | Height: | Size: 948 B |
@@ -1,22 +1,14 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>IptvPlayer</title>
|
||||
<base href="/">
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
<link rel="manifest" href="manifest.webmanifest">
|
||||
<meta
|
||||
name="theme-color"
|
||||
content="#1976d2">
|
||||
</head>
|
||||
<body class="mat-typography">
|
||||
<app-root></app-root>
|
||||
<noscript>
|
||||
Please enable JavaScript to continue using this application.
|
||||
</noscript>
|
||||
</body>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>IPTVnator</title>
|
||||
<base href="/">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="assets/icons/favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,5 +1,5 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
// https://karma-runner.github.io/0.13/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
@@ -7,26 +7,38 @@ module.exports = function (config) {
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-electron'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage-istanbul-reporter'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
client:{
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, './coverage/iptv-player'),
|
||||
reports: ['html', 'lcovonly', 'text-summary'],
|
||||
dir: require('path').join(__dirname, '../coverage'),
|
||||
reports: [ 'html', 'lcovonly' ],
|
||||
fixWebpackSourcePaths: true
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false,
|
||||
restartOnFileChange: true
|
||||
browsers: ['AngularElectron'],
|
||||
customLaunchers: {
|
||||
AngularElectron: {
|
||||
base: 'Electron',
|
||||
flags: [
|
||||
'--remote-debugging-port=9222'
|
||||
],
|
||||
browserWindowOptions: {
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
nodeIntegrationInSubFrames: true,
|
||||
allowRunningInsecureContent: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
@@ -2,11 +2,14 @@ import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
import { AppConfig } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
if (AppConfig.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
platformBrowserDynamic()
|
||||
.bootstrapModule(AppModule, {
|
||||
preserveWhitespaces: false
|
||||
})
|
||||
.catch(err => console.error(err));
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "myIPTV",
|
||||
"short_name": "myiptv",
|
||||
"description": "IPTV Player for Chrome",
|
||||
"version": "0.0.1",
|
||||
"version_name": "0.0.1",
|
||||
"icons": {
|
||||
"72": "assets/icons/icon-72x72.png",
|
||||
"96": "assets/icons/icon-96x96.png",
|
||||
"128": "assets/icons/icon-128x128.png",
|
||||
"144": "assets/icons/icon-144x144.png",
|
||||
"152": "assets/icons/icon-152x152.png",
|
||||
"192": "assets/icons/icon-192x192.png",
|
||||
"384": "assets/icons/icon-384x384.png",
|
||||
"512": "assets/icons/icon-512x512.png"
|
||||
},
|
||||
"app": {
|
||||
"background": {
|
||||
"scripts": ["background.js"]
|
||||
}
|
||||
},
|
||||
"permissions": [
|
||||
"app.window.fullscreen",
|
||||
"storage",
|
||||
"system.cpu",
|
||||
"system.display",
|
||||
"system.memory",
|
||||
"system.network",
|
||||
"system.storage"
|
||||
]
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
{
|
||||
"name": "IPTV Player",
|
||||
"short_name": "IPTV Player",
|
||||
"theme_color": "#1976d2",
|
||||
"background_color": "#fafafa",
|
||||
"display": "standalone",
|
||||
"scope": "./",
|
||||
"start_url": "./",
|
||||
"icons": [
|
||||
{
|
||||
"src": "assets/icons/icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-128x128.png",
|
||||
"sizes": "128x128",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-152x152.png",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-384x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
import 'core-js/es/reflect';
|
||||
import 'zone.js/dist/zone';
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* @license
|
||||
* Your First PWA Codelab (https://g.co/codelabs/pwa)
|
||||
* Copyright 2019 Google Inc. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
// CODELAB: Update cache names any time any of the cached files change.
|
||||
const CACHE_NAME = 'static-cache-v1';
|
||||
|
||||
// CODELAB: Add list of files to cache here.
|
||||
const FILES_TO_CACHE = [];
|
||||
|
||||
self.addEventListener('install', evt => {
|
||||
console.log('[ServiceWorker] Install');
|
||||
// CODELAB: Precache static resources here.
|
||||
|
||||
self.skipWaiting();
|
||||
});
|
||||
|
||||
self.addEventListener('activate', evt => {
|
||||
console.log('[ServiceWorker] Activate');
|
||||
// CODELAB: Remove previous cached data from disk.
|
||||
|
||||
self.clients.claim();
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', evt => {
|
||||
console.log('[ServiceWorker] Fetch', evt.request.url);
|
||||
// CODELAB: Add fetch event handler here.
|
||||
});
|
||||
@@ -7,9 +7,61 @@ $material-icons-font-path: '~material-icons/iconfont/';
|
||||
|
||||
body,
|
||||
html {
|
||||
background: #eee;
|
||||
background: #56598e;
|
||||
font-family: caption;
|
||||
}
|
||||
|
||||
.mat-toolbar.mat-primary {
|
||||
background: #000000;
|
||||
}
|
||||
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
height: 100%;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
/* CAN (MUST) BE REMOVED ! Sample Global style */
|
||||
.container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
|
||||
.title {
|
||||
color: white;
|
||||
margin: 0;
|
||||
padding: 50px 20px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #fff !important;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
background: #ed3330;
|
||||
padding: 20px;
|
||||
border-radius: 5px;
|
||||
display: inline-block;
|
||||
border: none;
|
||||
transition: all 0.4s ease 0s;
|
||||
|
||||
&:hover {
|
||||
background: #fff;
|
||||
color: #ed3330 !important;
|
||||
letter-spacing: 1px;
|
||||
-webkit-box-shadow: 0px 5px 40px -10px rgba(0,0,0,0.57);
|
||||
-moz-box-shadow: 0px 5px 40px -10px rgba(0,0,0,0.57);
|
||||
box-shadow: 5px 40px -10px rgba(0,0,0,0.57);
|
||||
transition: all 0.4s ease 0s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.full-width {
|
||||
width: 100%;
|
||||
}
|
||||