Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ux improvements #174

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/components/pages/AppDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@
Website Link <i class="fa fa-angle-right float-right" aria-hidden="true"></i>
</div>
</a>
<!--a v-if="app.appInfo.supportUrl != ''" v-bind:href="app.appInfo.supportUrl" class="app-button">
<div>Support <i class="fa fa-angle-right float-right" aria-hidden="true"></i>
</div>
</a-->
<a v-if="app.source != null" v-on:click="openExternal(app.source)" class="app-button" >
<div>Source code <i class="fa fa-angle-right float-right" aria-hidden="true"></i></div>
</a>
Expand Down
2 changes: 2 additions & 0 deletions src/components/pages/AppView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ header.main {

// Buttons at the bottom of the app-details container
a.app-button {
cursor: pointer;
div {
width: calc(100% + 2rem);
padding: 1rem;
Expand All @@ -147,6 +148,7 @@ header.main {
&:hover, &:focus {
text-decoration: none;
outline: none;
color: darken($pebble-color, 5%);
}
}
}
Expand Down
22 changes: 21 additions & 1 deletion src/components/pages/widgets/GetAppButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@ export default {
this.openExternal(this.app.companions[this.$store.state.userParameters.platform].url)
},
check_app () {
if (!this.hardwareSupported || !this.platformSupported || this.added === true || this.loading) return
if (this.added === true || this.loading) return
if (!this.hardwareSupported) {
return this.hardware_compatibility_modal()
}
if (!this.platformSupported) {
return this.platform_compatibility_modal()
}
if (this.permissions.length > 0) {
this.$bvModal.show('modal-permissions')
return
Expand All @@ -97,6 +103,20 @@ export default {
this.permissions = this.app.capabilities
this.permissions.splice(this.permissions.indexOf('configurable'))
}
},
hardware_compatibility_modal () {
this.$bvToast.toast('Sorry! This app is not compatible with your Pebble smartwatch.', {
title: 'Unable to add to locker',
autoHideDelay: 5000,
appendToast: true
})
},
platform_compatibility_modal () {
this.$bvToast.toast('Sorry! This app is not compatible with your smartphone.', {
title: 'Unable to add to locker',
autoHideDelay: 5000,
appendToast: true
})
}
},
watch: {
Expand Down
5 changes: 4 additions & 1 deletion src/components/pages/widgets/SingleCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ export default {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
margin: 7px 6px 5px 6px;
margin: 7px 6px 0px 6px;
}
.card-text {
margin-bottom: 5px;
}

// Make it smaller on small screens
Expand Down
3 changes: 2 additions & 1 deletion src/store/userParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export const hardwareEnum = {
aplite: 'aplite', // OG Pebble and Pebble Steel
basalt: 'basalt', // Pebble Time and Pebble Time Steel
chalk: 'chalk', // Pebble Round
diorite: 'diorite' // Pebble 2
diorite: 'diorite', // Pebble 2
emery: 'emery' // Pebble Time 2
}

const state = {
Expand Down