Skip to content

Commit

Permalink
Added a quick Link to the Login Page for getting an API key and fixed…
Browse files Browse the repository at this point in the history
… showing login all the time
  • Loading branch information
phppirate committed May 12, 2017
1 parent 40d63f0 commit 799a31d
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 3 deletions.
10 changes: 9 additions & 1 deletion app/css/app.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<div class="panel-body">
<div>
<input class="form-control" type="text" ref="token" name="api_token" id="api_token" placeholder="API Token">
<div class="help-text"><a href="#" @click.prevent="openExternal('https://forge.laravel.com/user/profile#/api')">Get one here</a></div>
</div>
<div>
<button class="btn is-success btn-block" @click="logIn" v-if="! connecting">Connect</button>
Expand Down
19 changes: 18 additions & 1 deletion app/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ var store = new __WEBPACK_IMPORTED_MODULE_2_vuex__["a" /* default */].Store({
mutations: __WEBPACK_IMPORTED_MODULE_6__vuex_mutations_js__["a" /* default */]
});

window.openExternal = function (url) {
shell.openExternal(url);
};

console.log(router);

window.appl = new __WEBPACK_IMPORTED_MODULE_0_vue___default.a({
Expand Down Expand Up @@ -211,6 +215,19 @@ window.appl = new __WEBPACK_IMPORTED_MODULE_0_vue___default.a({
this.isOnline = status;
this.checkLoggedIn();
},
openExternal: function (_openExternal) {
function openExternal(_x2) {
return _openExternal.apply(this, arguments);
}

openExternal.toString = function () {
return _openExternal.toString();
};

return openExternal;
}(function (url) {
openExternal(url);
}),
listen: function listen() {
var _this = this;

Expand All @@ -225,7 +242,7 @@ window.appl = new __WEBPACK_IMPORTED_MODULE_0_vue___default.a({
window.addEventListener('offline', function () {
return _this.updateNetworkStatus(false);
});

this.updateNetworkStatus();
// Left this here to Remond me how to use my own Job Queue Manager :)
//
// let job1 = new Job('http://muni-api.dev/api/test')
Expand Down
9 changes: 8 additions & 1 deletion src/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ let store = new Vuex.Store({
mutations
});

window.openExternal = (url) => {
shell.openExternal(url);
}

console.log(router);


Expand Down Expand Up @@ -68,6 +72,9 @@ window.appl = new Vue({
this.isOnline = status
this.checkLoggedIn();
},
openExternal(url){
openExternal(url);
},
listen(){
// Handle the Case that a user is Offline
// So you don't Just see Infinate Spinner
Expand All @@ -76,7 +83,7 @@ window.appl = new Vue({
this.isOnline = window.navigator.onLine;
window.addEventListener('online', () => this.updateNetworkStatus());
window.addEventListener('offline', () => this.updateNetworkStatus(false));

this.updateNetworkStatus()
// Left this here to Remond me how to use my own Job Queue Manager :)
//
// let job1 = new Job('http://muni-api.dev/api/test')
Expand Down
7 changes: 7 additions & 0 deletions src/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,11 @@ pre{
font-size: 56px;
margin-bottom: 15px;
}
}

.help-text, .help-text a{
color: #aaa;
text-decoration: none;
padding: 0px 0px 10px;
text-align: right;
}

0 comments on commit 799a31d

Please sign in to comment.