|
|
|
@ -20,8 +20,10 @@ let app = new Vue({
@@ -20,8 +20,10 @@ let app = new Vue({
|
|
|
|
|
lastVisited: null |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.showToast("You're now following " + this.getDisplayName(), 'darkgreen'); |
|
|
|
|
this.showToast( |
|
|
|
|
"You're now following " + this.getDisplayName(), |
|
|
|
|
'darkgreen' |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
this.userNameToAdd = ''; |
|
|
|
|
this.nameForList = ''; |
|
|
|
@ -61,6 +63,34 @@ let app = new Vue({
@@ -61,6 +63,34 @@ let app = new Vue({
|
|
|
|
|
this.followedAccounts = this.followedAccounts.sort(function (a, b) { |
|
|
|
|
return new Date(b.lastVisited) - new Date(a.lastVisited) |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getRandomAvatarFrom9GAG() { |
|
|
|
|
let random = Math.floor(Math.random() * Math.floor(182)); |
|
|
|
|
return 'https://accounts-cdn.9gag.com/avatar/default_' + random + '_100_v0.jpg'; |
|
|
|
|
}, |
|
|
|
|
unfollowAccount(account) { |
|
|
|
|
let app = this; |
|
|
|
|
|
|
|
|
|
iziToast.show({ |
|
|
|
|
theme: 'dark', |
|
|
|
|
color: '#303030', |
|
|
|
|
message: 'Do you really want to unfollow ' + account.name + '?', |
|
|
|
|
position: 'center', |
|
|
|
|
buttons: [ |
|
|
|
|
['<button>Yes</button>', function (instance, toast) { |
|
|
|
|
account.deleted = true; |
|
|
|
|
app.updateStorage(); |
|
|
|
|
instance.hide({ |
|
|
|
|
transitionOut: 'fadeOutUp', |
|
|
|
|
}, toast, 'confirmUnfollow'); |
|
|
|
|
}, true], // true to focus
|
|
|
|
|
['<button>Cancel</button>', function (instance, toast) { |
|
|
|
|
instance.hide({ |
|
|
|
|
transitionOut: 'fadeOutUp', |
|
|
|
|
}, toast, 'buttonName'); |
|
|
|
|
}] |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|