Browse Source

fix: wording of load all button for admin songs/queuesongs

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan 5 years ago
parent
commit
7c648e452e
2 changed files with 16 additions and 22 deletions
  1. 8 11
      frontend/components/Admin/QueueSongs.vue
  2. 8 11
      frontend/components/Admin/Songs.vue

+ 8 - 11
frontend/components/Admin/QueueSongs.vue

@@ -14,11 +14,11 @@
 				placeholder="Search for Songs"
 			/>
 			<button
-				v-if="!getSetsAutomatically"
+				v-if="!loadAllSongs"
 				class="button is-primary"
-				@click="loadSongsAutomatically()"
+				@click="loadAll()"
 			>
-				Load songs automatically
+				Load all
 			</button>
 			<br />
 			<br />
@@ -114,7 +114,7 @@ export default {
 			searchQuery: "",
 			songs: [],
 			gettingSet: false,
-			getSetsAutomatically: false
+			loadAllSongs: false
 		};
 	},
 	computed: {
@@ -170,23 +170,20 @@ export default {
 				});
 				this.position += 1;
 				this.gettingSet = false;
-				if (
-					this.getSetsAutomatically &&
-					this.maxPosition > this.position - 1
-				)
+				if (this.loadAllSongs && this.maxPosition > this.position - 1)
 					setTimeout(() => {
 						this.getSet();
 					}, 500);
 			});
 		},
 		handleScroll() {
-			if (this.getSetsAutomatically) return false;
+			if (this.loadAllSongs) return false;
 			if (window.scrollY + 50 >= window.scrollMaxY) this.getSet();
 
 			return this.maxPosition === this.position;
 		},
-		loadSongsAutomatically() {
-			this.getSetsAutomatically = true;
+		loadAll() {
+			this.loadAllSongs = true;
 			this.getSet();
 		},
 		init() {

+ 8 - 11
frontend/components/Admin/Songs.vue

@@ -14,11 +14,11 @@
 				placeholder="Search for Songs"
 			/>
 			<button
-				v-if="!getSetsAutomatically"
+				v-if="!loadAllSongs"
 				class="button is-primary"
-				@click="loadSongsAutomatically()"
+				@click="loadAll()"
 			>
-				Load songs automatically
+				Load all
 			</button>
 			<br />
 			<br />
@@ -121,7 +121,7 @@ export default {
 				song: {}
 			},
 			gettingSet: false,
-			getSetsAutomatically: false
+			loadAllSongs: false
 		};
 	},
 	computed: {
@@ -167,23 +167,20 @@ export default {
 				});
 				this.position += 1;
 				this.gettingSet = false;
-				if (
-					this.getSetsAutomatically &&
-					this.maxPosition > this.position - 1
-				)
+				if (this.loadAllSongs && this.maxPosition > this.position - 1)
 					setTimeout(() => {
 						this.getSet();
 					}, 500);
 			});
 		},
 		handleScroll() {
-			if (this.getSetsAutomatically) return false;
+			if (this.loadAllSongs) return false;
 			if (window.scrollY + 50 >= window.scrollMaxY) this.getSet();
 
 			return this.maxPosition === this.position;
 		},
-		loadSongsAutomatically() {
-			this.getSetsAutomatically = true;
+		loadAll() {
+			this.loadAllSongs = true;
 			this.getSet();
 		},
 		init() {