Skip to content

Commit

Permalink
Update dependencies and fixes fullscreen shortcut (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosrg9 committed Sep 13, 2022
1 parent 1618f70 commit 5cf99c6
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 47 deletions.
83 changes: 44 additions & 39 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@
name: Build/release

on:
- push

jobs:
release:
runs-on: macos-12

steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v3
with:
node-version: 14

- name: Install dependencies
run: "npm install"

- name: Brew install rpm
uses: ConorMacBride/install-package@v1
with:
brew: rpm

- name: Compile to Javascript
run: "npm run compile"

- name: Build/release YouTube TV app
uses: samuelmeuli/[email protected]
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}

# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
#
# This action does not work correctly, it should add the generated artifacts to a release
# automatically, but it does not.
#

#name: Build/release
#
#on:
# - push
#
#jobs:
# release:
# runs-on: macos-12
#
# steps:
# - name: Check out Git repository
# uses: actions/checkout@v3
#
# - name: Install Node.js, NPM and Yarn
# uses: actions/setup-node@v3
# with:
# node-version: 14
#
# - name: Install dependencies
# run: "npm install"
#
# - name: Brew install rpm
# uses: ConorMacBride/install-package@v1
# with:
# brew: rpm
#
# - name: Compile to Javascript
# run: "npm run compile"
#
# - name: Build/release YouTube TV app
# uses: samuelmeuli/[email protected]
# with:
# # GitHub token, automatically provided to the action
# # (No need to define this secret in the repo settings)
# github_token: ${{ secrets.github_token }}
#
# # If the commit is tagged with a version (e.g. "v1.0.0"),
# # release the app after building
# release: ${{ startsWith(github.ref, 'refs/tags/v') }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ dist/
msi/
msi-packager.js
.DS_Store
package-lock.json
package-lock.json
*.js
!renderers/main/injection.js
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "youtube-tv-electron",
"productName": "YouTube TV",
"version": "2.3.1",
"version": "2.3.2",
"description": "Cliente de YouTube TV sencillo para escritorio basado en electron.",
"main": "main.js",
"scripts": {
Expand Down
9 changes: 3 additions & 6 deletions renderers/main/main.renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ export class Renderer {
// Get the current window size.
const [ width, height ] = this.window.getSize();

const sizes: Size = { width: emuWidth, height: emuHeight };

this.window.webContents.disableDeviceEmulation();

this.window.webContents.enableDeviceEmulation({
Expand Down Expand Up @@ -206,7 +204,7 @@ export class Renderer {
}
})

globalShortcut.register('ctrl+f', () => { this.fullScreen = true; })
globalShortcut.register('ctrl+f', () => { this.fullScreen = null; })

globalShortcut.register('ctrl+d', () => { this.window.webContents.toggleDevTools(); })

Expand Down Expand Up @@ -241,13 +239,12 @@ export class Renderer {
if (typeof value !== 'string') return;
if (value.length < 1) return;

/* this.fullScreen = true; */
this.window.setFullScreen(true)
this.fullScreen = true;
this.window.webContents.loadURL(this._url + value, { userAgent: this.userAgent })
}

public set fullScreen(value: boolean | null) {
if (typeof value === null) {
if (value === null) {
this._fullScreen = !this._fullScreen;
this.window.fullScreen = this._fullScreen;
} else {
Expand Down

0 comments on commit 5cf99c6

Please sign in to comment.