Skip to content

Commit

Permalink
Fixed vibrate, testing share
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchas committed Jul 9, 2022
1 parent 1f1c092 commit 18f3296
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/components/plugins/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export default {
// Sends notifications to root component to display
Vue.prototype.toast = function(title, body, color, icon, path, info) {
this.$root.$children[0].$refs.toastComponent.showToast(title, body, color, icon, path, info);
if(this.$store.getters["Device/hasSmallScreen"] && this.$store.getters["Device/hasTouch"]){
// navigator.vibrate(15);
if(window.navigator.vibrate){
navigator.vibrate(15);
}
};
Vue.prototype.hello = function(message, icon, color) {
this.$root.$children[0].$refs.alertComponent.showAlert(message, icon, color);
if(this.$store.getters["Device/hasSmallScreen"] && this.$store.getters["Device/hasTouch"]){
// navigator.vibrate(15);
if(window.navigator.vibrate ){
navigator.vibrate(15);
}
};

Expand Down
6 changes: 5 additions & 1 deletion src/views/apps/Animations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

<h2 class="ptop-sm">Tasks.</h2>


</div>


Expand Down Expand Up @@ -46,6 +45,7 @@ export default {
},

mounted() {

},
created: function () {
},
Expand All @@ -55,6 +55,10 @@ export default {

methods: {

testVib: function(){
navigator.vibrate(15);
},


}
};
Expand Down
3 changes: 2 additions & 1 deletion src/views/apps/Colors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,8 @@ export default {
// Export functions
exportWith: function(key){
if(key == "Link"){
this.copyToClipboard(window.location.href);
this.share("Link", window.location.href)
// this.copyToClipboard(window.location.href);
this.hello("Link copied to Clipboard!", "far fa-copy", "green");
}else if(key == "Print"){
this.hello("Printing!", "far fa-print", "green");
Expand Down

0 comments on commit 18f3296

Please sign in to comment.