diff --git a/src/components/application/joinroom.vue b/src/components/application/joinroom.vue index 0e8b0b25..19f6908e 100644 --- a/src/components/application/joinroom.vue +++ b/src/components/application/joinroom.vue @@ -27,7 +27,7 @@

- +

Recent rooms

@@ -209,9 +215,18 @@ export default { if (this.slRoom && this.slConnected && this.slServer) { this.$router.push('/browse') } - this.recents = JSON.parse(window.localStorage.getItem('recentrooms')) + this.getRecents() }, methods: { + getRecents: function () { + this.recents = JSON.parse(window.localStorage.getItem('recentrooms')) + }, + removeHistoryItem: function (item) { + let recents = JSON.parse(window.localStorage.getItem('recentrooms')) + delete recents[item.server + '/' + item.room] + window.localStorage.setItem('recentrooms', JSON.stringify(recents)) + return this.getRecents() + }, connectionQualityClass: function (value) { if (value < 50) { return ['green--text', 'text--lighten-1']