Toggle navigation
Toggle navigation
This project
Loading...
Sign in
digsig
/
digsig-services
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Stefan Huber
2017-04-03 16:11:31 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
34c631969394d26c7d698be8624a9362ad8a721f
34c63196
1 parent
1b549c86
feature: fullscreen for electron apps via event propagation
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
1 deletions
dist/services/device.d.ts
dist/services/device.js
dist/services/device.js.map
dist/services/repository.js
dist/services/repository.js.map
src/services/device.ts
src/services/repository.ts
dist/services/device.d.ts
View file @
34c6319
export
declare
class
Device
{
reload
():
void
;
exit
():
void
;
fullscreen
(
fullscreen
:
any
):
void
;
}
...
...
dist/services/device.js
View file @
34c6319
...
...
@@ -15,6 +15,14 @@ var Device = (function () {
}
}
};
Device
.
prototype
.
fullscreen
=
function
(
fullscreen
)
{
if
(
window
&&
window
[
'require'
])
{
var
electron
=
window
[
'require'
](
'electron'
);
if
(
electron
&&
electron
.
ipcRenderer
)
{
electron
.
ipcRenderer
.
send
(
'fullscreen'
,
fullscreen
);
}
}
};
return
Device
;
}());
exports
.
Device
=
Device
;
...
...
dist/services/device.js.map
View file @
34c6319
{
"version"
:
3
,
"file"
:
"device.js"
,
"sourceRoot"
:
""
,
"sources"
:[
"../../src/services/device.ts"
],
"names"
:[],
"mappings"
:
";AAAA;IAAA;IAiBA,CAAC;IAfG,uBAAM,GAAN;QACI,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC5B,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QAC7B,CAAC;IACL,CAAC;IAED,qBAAI,GAAJ;QACI,EAAE,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAA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C,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;YACxD,CAAC;QACL,CAAC;IACL,CAAC;IAEL,aAAC;AAAD,CAAC,AA1BD,IA0BC;AA1BY,wBAAM"
}
\ No newline at end of file
...
...
dist/services/repository.js
View file @
34c6319
...
...
@@ -72,6 +72,9 @@ var Repository = (function () {
return
new
Promise
(
function
(
resolve
,
reject
)
{
_this
.
rest
.
heartbeat
(
deviceInfo
)
.
then
(
function
(
response
)
{
if
(
response
&&
typeof
response
.
fullscreen
==
'boolean'
)
{
_this
.
device
.
fullscreen
(
response
.
fullscreen
);
}
if
(
response
&&
response
.
restart
==
1
)
{
_this
.
device
.
reload
();
}
...
...
@@ -105,6 +108,7 @@ var Repository = (function () {
console
.
log
(
"prepare local couch url: "
,
localCouchUrl
);
resolve
(
_this
.
prepare
(
localCouchUrl
));
}).
catch
(
function
()
{
_this
.
_node
=
null
;
resolve
(
_this
.
prepare
(
response
.
db_url
));
});
});
...
...
dist/services/repository.js.map
View file @
34c6319
This diff is collapsed. Click to expand it.
src/services/device.ts
View file @
34c6319
...
...
@@ -15,4 +15,13 @@ export class Device {
}
}
fullscreen
(
fullscreen
)
{
if
(
window
&&
window
[
'require'
])
{
let
electron
=
window
[
'require'
](
'electron'
);
if
(
electron
&&
electron
.
ipcRenderer
)
{
electron
.
ipcRenderer
.
send
(
'fullscreen'
,
fullscreen
);
}
}
}
}
\ No newline at end of file
...
...
src/services/repository.ts
View file @
34c6319
...
...
@@ -78,6 +78,10 @@ export class Repository {
return
new
Promise
<
boolean
>
((
resolve
,
reject
)
=>
{
this
.
rest
.
heartbeat
(
deviceInfo
)
.
then
(
response
=>
{
if
(
response
&&
typeof
response
.
fullscreen
==
'boolean'
)
{
this
.
device
.
fullscreen
(
response
.
fullscreen
);
}
if
(
response
&&
response
.
restart
==
1
)
{
this
.
device
.
reload
();
}
else
if
(
response
&&
response
.
exit
==
1
)
{
...
...
Please
register
or
login
to post a comment