forked from stream-labs/desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Platform settings in settings window (stream-labs#901)
* tmp commit * switch to developer settings * fixed some stuff * finish file input, dsiable app paltform settings * remove v-if false * before embarking on name source refactor (build errors) * working end to end demo * hook up app reload * added popout, reload, uninstalled UI * banner image support in the showcase * add ability to copy url for unpacked apps * add deep nesting support to the guest api * guest api security * working modular API system with permissions * modified guest API system to work in all windows * support for events over platform API * more source events * refactoring and web security/session implementation * add initial source size with relative and absolute modes * tmp scenes module * add basic scenes/sources API * use dev server intead of file:// protocol * working script blocking system * disable eval for security * use server app id hash instead of manifest app id * fetch dev mode state from the server * scene events, dev mode works in child window * add obs settings api module * remove example module, add buildPath * add timeout to reload * app load validations * support persistent app slots * disable main window when app is popped out * whitelist minified app sdk url * various fixes * add a method to switch to a scene * get build ready for distribution * disable patch notes for now * add streaming recording module * build 2 * first pass authorization module * switch to protocol redirect instead of navigation * final touchs on authorization module * build 3 * ovrstream * add theme module * build 4 * added per-source app settings * expose scene collections schema * formatting * build 5 * add sllowPopout option to pages * external links * expose available source types * add app module, and redirect to settings * build 6 * allow web requests from cross origin iframes that cannot access the parent window * add/remove sources/sceneitems api * Platform load prod app (stream-labs#840) * can load production apps now * removed linebreak * only add app to local storage if unpacked * update interface name and remove line break * tagged union pattern * working with live.platform * added app store to slobs * changed icon for store on topnav * attempting discrim union * reverted discrim union * commented out app store * added logs * fixed another conflict * fix popout, add reload button * Platform notification api (stream-labs#874) * added notifications module * Added notifications module api, tested locally * uncomment install production apps * cloned interface and types to isolate data structure between api and rest of slobs * removed unrequested apis * removed actions from notifications * restrict loading apps with duplicate keys (stream-labs#883) * build 7 * implement hotkeys module * build 8 * wow I can't type * guest API improvements * resolve merge conflict * back out window title change * cleanup for settings * Platform app store events (stream-labs#871) * can load production apps now * removed linebreak * only add app to local storage if unpacked * update interface name and remove line break * tagged union pattern * working with live.platform * added app store to slobs * changed icon for store on topnav * attempting discrim union * reverted discrim union * install App callback from app store * minor * commented out app store * pushing for andy * removed dev tools * added logs * added platform app store service and fix logs * removed nodeIntegration and popups on app store webview * fixed more conflict * fixed another conflict * only open dev tools for app store if devMode * fixed andys comments and unload/reload prod apps when login/out * added nightmode to app store url * finished chat slot * uncomment out install prod apps * devmode -> unpacked * Platform production scripts (stream-labs#894) * can load production apps now * removed linebreak * only add app to local storage if unpacked * update interface name and remove line break * tagged union pattern * working with live.platform * added app store to slobs * changed icon for store on topnav * attempting discrim union * reverted discrim union * commented out app store * added logs * fixed another conflict * can import scripts in production apps, and append build to filepath only when unpacked * fixed andys comments * fixed andys comments * script request starts with app.url * removed comment and validatemanifest only if unpacked * removed logs * removed log * fixed conflicts :( * added settings tab * add enable to loadedapps * installed apps [] * can reset and enable, need to handle dup ids * settings tab to control prod apps * added icon * added loadedApp.enabled:boolean * fix enabled and dup ids * check if same before setEnable
- Loading branch information
Showing
19 changed files
with
338 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<template> | ||
<div class="section"> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th> {{ $t('icon') }} </th> | ||
<th> {{ $t('name')}} </th> | ||
<th> {{ $t('vers')}} </th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr | ||
v-for="app in installedApps" | ||
:key="app.id" | ||
> | ||
<td> <img :src="app.icon" alt="-" width='50'> </td> | ||
<td> {{ app.manifest.name }} </td> | ||
<td> {{ app.manifest.version }} </td> | ||
<td> | ||
<button | ||
v-if="isEnabled(app.id)" | ||
@click="reload(app.id)" | ||
class="button button--action">Reload</button> | ||
<button | ||
v-if="noUnpackedVersionLoaded(app.id)" | ||
@click="toggleEnable(app)" | ||
class="button button--default"> | ||
{{ isEnabled(app.id) ? 'Disable' : 'Enable' }} | ||
</button> | ||
<div v-else> | ||
<button | ||
disabled | ||
class="button button--default"> | ||
{{ $t('Unpacked vers loaded') }} | ||
</button> | ||
<i | ||
v-tooltip.left=" $t('You must unload unpacked version before enabling this app.') " | ||
class="icon-question" | ||
/> | ||
</div> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" src="./InstalledApps.vue.ts"></script> | ||
|
||
<style lang="less" scoped> | ||
table td:last-child { | ||
text-align: right; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import Vue from 'vue'; | ||
import { Component } from 'vue-property-decorator'; | ||
import { Inject } from 'util/injector'; | ||
import { PlatformAppsService, ILoadedApp } from 'services/platform-apps'; | ||
|
||
@Component({}) | ||
export default class InstalledApps extends Vue { | ||
@Inject() platformAppsService: PlatformAppsService; | ||
|
||
get installedApps() { | ||
// installed == production apps | ||
return this.platformAppsService.productionApps; | ||
} | ||
|
||
get enabledInstalledAppIds(): string[] { | ||
return this.installedApps | ||
.filter(app => app.enabled) | ||
.map(app => app.id); | ||
} | ||
|
||
isEnabled(appId: string) { | ||
return this.enabledInstalledAppIds.includes(appId); | ||
} | ||
|
||
reload(appId: string) { | ||
this.platformAppsService.reloadApp(appId); | ||
} | ||
|
||
toggleEnable(app: ILoadedApp) { | ||
if (this.isEnabled(app.id)) this.platformAppsService.setEnabled(app.id, false); | ||
else this.platformAppsService.setEnabled(app.id, true); | ||
} | ||
|
||
noUnpackedVersionLoaded(appId: string) { | ||
return !this.platformAppsService.enabledApps.find(app => app.id === appId && app.unpacked); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.