Skip to content

Commit

Permalink
Proxy information
Browse files Browse the repository at this point in the history
  • Loading branch information
tso committed Dec 26, 2018
1 parent 5712436 commit f53946b
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 67 deletions.
3 changes: 3 additions & 0 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const app = new Vue({
this.darkTheme = !this.darkTheme;
streamlabs.userSettings.set('dark_theme', this.darkTheme);
},
openRelease: function() {
streamlabsOBS.v1.External.openExternalLink('https://github.com/tso/sc2-auto-scene-switcher/releases/tag/v0.0.7');
},
}
});

Expand Down
2 changes: 1 addition & 1 deletion app/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ html, body {
background-color: rgb(26, 36, 44);
}

h3, label {
p, h3, label {
color: rgb(190, 190, 190);
margin-bottom: 0;
}
Expand Down
104 changes: 54 additions & 50 deletions app/index.html
Original file line number Diff line number Diff line change
@@ -1,50 +1,54 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Starcraft II Auto Scene Switcher</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="base.css"/>
<script src="https://cdn.streamlabs.com/slobs-platform/lib/streamlabs-platform.min.js"></script>
<script type="text/javascript" src="vue.js"></script>
<script defer type="text/javascript" src="app.js"></script>
</head>
<body>
<div class="container mt-3" id="app">
<button v-on:click="toggleTheme" class="btn btn-secondary btn-sm theme-toggle">Theme Toggle</button>
<link v-if="darkTheme" rel="stylesheet" type="text/css" href="dark.css"/>

<div v-if="alert" class="alert alert-primary" role="alert">Settings saved succesfully.</div>
<h3>StarCraft II Auto Scene Switcher</h3>

<div class="form-container mt-4">
<label for="sc2InGameScene">In game scene</label>
<select v-model="sc2InGameScene" class="form-control" id="sc2InGameScene">
<option v-for="scene in scenes">
{{ scene.name }}
</option>
</select>

<label for="sc2ReplayScene">In replay scene</label>
<select v-model="sc2ReplayScene" class="form-control" id="sc2ReplayScene">
<option v-for="scene in scenes">
{{ scene.name }}
</option>
</select>

<label for="sc2OutOfGameScene">Out of game scene</label>
<select v-model="sc2OutOfGameScene" class="form-control" id="sc2OutOfGameScene">
<option v-for="scene in scenes">
{{ scene.name }}
</option>
</select>
</div>

<div class="mt-4 float-right">
<button class="btn btn-secondary btn-cancel" v-on:click="cancel">Cancel</button>
<button class="btn btn-primary btn-save ml-1" v-on:click="save">Save</button>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Starcraft II Auto Scene Switcher</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="base.css"/>
<script src="https://cdn.streamlabs.com/slobs-platform/lib/streamlabs-platform.min.js"></script>
<script type="text/javascript" src="vue.js"></script>
<script defer type="text/javascript" src="app.js"></script>
</head>
<body>
<div class="container mt-3" id="app">
<button v-on:click="toggleTheme" class="btn btn-secondary btn-sm theme-toggle">Theme Toggle</button>
<link v-if="darkTheme" rel="stylesheet" type="text/css" href="dark.css"/>

<div v-if="alert" class="alert alert-primary" role="alert">Settings saved succesfully.</div>
<h3>StarCraft II Auto Scene Switcher</h3>
<p>
Remember that you need to run the proxy server to allow this app
to access the StarCraft II client API. You can download that <a v-on:click="openRelease" href="https://github.com/tso/sc2-auto-scene-switcher/releases/tag/v0.0.7">here.</a>
</p>

<div class="form-container mt-4">
<label for="sc2InGameScene">In game scene</label>
<select v-model="sc2InGameScene" class="form-control" id="sc2InGameScene">
<option v-for="scene in scenes">
{{ scene.name }}
</option>
</select>

<label for="sc2ReplayScene">In replay scene</label>
<select v-model="sc2ReplayScene" class="form-control" id="sc2ReplayScene">
<option v-for="scene in scenes">
{{ scene.name }}
</option>
</select>

<label for="sc2OutOfGameScene">Out of game scene</label>
<select v-model="sc2OutOfGameScene" class="form-control" id="sc2OutOfGameScene">
<option v-for="scene in scenes">
{{ scene.name }}
</option>
</select>
</div>

<div class="mt-4 float-right">
<button class="btn btn-secondary btn-cancel" v-on:click="cancel">Cancel</button>
<button class="btn btn-primary btn-save ml-1" v-on:click="save">Save</button>
</div>
</div>
</body>
</html>
33 changes: 17 additions & 16 deletions app/manifest.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"version": "0.0.6",
"name": "StarCraft II Auto Scene Switcher",
"permissions": [
"slobs.scenes-sources"
],
"sources": [],
"pages": [
{
"slot": "top_nav",
"file": "index.html",
"allowPopout": false,
"persistent": true
}
]
}
{
"version": "0.0.7",
"name": "StarCraft II Auto Scene Switcher",
"permissions": [
"slobs.scenes-sources",
"slobs.external-links"
],
"sources": [],
"pages": [
{
"slot": "top_nav",
"file": "index.html",
"allowPopout": false,
"persistent": true
}
]
}

0 comments on commit f53946b

Please sign in to comment.