Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Commit

Permalink
fix: Small fix for Play URL back button
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoenescu committed Sep 19, 2016
1 parent 34c5752 commit be71c2a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cordova/config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.quasarframework.quasarplay" version="0.0.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.quasarframework.quasarplay" version="0.0.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Quasar Play</name>
<description>
Quasar Play for Quasar Framework
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quasar-play",
"version": "0.0.3",
"version": "0.0.4",
"description": "Quasar Play for Quasar Framework",
"author": "Razvan Stoenescu <[email protected]>",
"scripts": {
Expand Down
13 changes: 12 additions & 1 deletion src/components/play-url/play-url.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class="toolbar primary fixed shadow-1"
:class="{active: active || !showedToolbar}"
>
<button v-go-back="'/play'">
<button @click="goBack()">
<i>close</i>
</button>
<quasar-toolbar-title :padding="1">
Expand Down Expand Up @@ -37,6 +37,8 @@
</template>

<script>
import { Platform } from 'quasar'
export default {
data () {
let url = decodeURIComponent(this.$route.params.url)
Expand Down Expand Up @@ -67,9 +69,18 @@ export default {
}, 350)
this.active = false
},
goBack () {
if (Platform.is.cordova) {
window.history.go(this.historyLevel - 1 - window.history.length)
return
}
this.$router.go('/play')
}
},
ready () {
this.historyLevel = window.history.length
setTimeout(() => {
this.showedToolbar = true
}, 1000)
Expand Down

0 comments on commit be71c2a

Please sign in to comment.