Skip to content

Commit 52a259b

Browse files
authored
Merge pull request #5 from bugphix/v1.5.2
footer version handling text
2 parents 32d054a + 8734ce2 commit 52a259b

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

assets/js/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Bugphix.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Bugphix
1616

1717
public function version()
1818
{
19-
return 'v1.5.1';
19+
return 'v1.5.2';
2020
}
2121

2222
public function asset($asset = '')

src/Resources/js/components/App.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
target="_blank"
9191
) Bugphix
9292

93-
span(v-html="version")
93+
span(v-html="versionText")
9494

9595
.column
9696
p.copyright
@@ -144,7 +144,7 @@ export default {
144144
window.location.reload();
145145
},
146146
checkVersion(){
147-
this.version = '' + window.Bugphix.app_version || '1.0';
147+
this.version = window.Bugphix.app_version || '1.0';
148148
fetch('https://api.github.com/repos/bugphix/bugphix-laravel/releases')
149149
.then((response) => {
150150
return response.json();
@@ -155,7 +155,7 @@ export default {
155155
const { name, html_url } = latestVersion;
156156
157157
if(this.version !== '' && this.version !== name){
158-
this.version = `<a href="${html_url}" target="_blank"><strong>New version available! (${name})</strong></a>`;
158+
this.version = `<a href="${html_url}" target="_blank"><strong>New version available! (${name})</strong></a>`;
159159
}
160160
}
161161
});
@@ -178,6 +178,11 @@ export default {
178178
const {assets_url} = window.Bugphix;
179179
return `${assets_url}/images/logo.png`
180180
},
181+
versionText(){
182+
if(!this.version) return;
183+
184+
return `${this.version}`;
185+
}
181186
},
182187
watch: {
183188
$route(to, from) {

0 commit comments

Comments
 (0)