Browse Source

Improved toasts a bit more, and temporarily disabled custom toast css

Kristian Vos 3 years ago
parent
commit
eb2d6ea813
4 changed files with 19 additions and 15 deletions
  1. 1 1
      frontend/package.json
  2. 9 9
      frontend/src/App.vue
  3. 8 4
      frontend/src/aw.js
  4. 1 1
      frontend/src/pages/Station/index.vue

+ 1 - 1
frontend/package.json

@@ -47,7 +47,7 @@
     "date-fns": "^2.19.0",
     "eslint-config-airbnb-base": "^13.2.0",
     "html-webpack-plugin": "^5.3.1",
-    "toasters": "^2.2.1",
+    "toasters": "^2.2.3",
     "vue": "^2.6.12",
     "vue-content-loader": "^0.2.3",
     "vue-loader": "^15.9.6",

+ 9 - 9
frontend/src/App.vue

@@ -222,12 +222,12 @@ export default {
 	}
 
 	#toasts-container .toast {
-		color: var(--dark-grey-2);
-		background-color: var(--light-grey-3) !important;
+		// color: var(--dark-grey-2);
+		// background-color: var(--light-grey-3) !important;
 
-		&:last-of-type {
-			background-color: var(--light-grey) !important;
-		}
+		// &:last-of-type {
+		// 	background-color: var(--light-grey) !important;
+		// }
 	}
 
 	h1,
@@ -262,11 +262,11 @@ body.night-mode {
 
 	.toast {
 		font-weight: 600;
-		background-color: var(--dark-grey) !important;
+		// background-color: var(--dark-grey) !important;
 
-		&:last-of-type {
-			background-color: var(--dark-grey-2) !important;
-		}
+		// &:last-of-type {
+		// 	background-color: var(--dark-grey-2) !important;
+		// }
 	}
 }
 

+ 8 - 4
frontend/src/aw.js

@@ -11,27 +11,31 @@ let lastTimeCompetitor = 0;
 
 const notConnectedToast = new Toast({
 	content: "ActivityWatch is not connected yet.",
-	persistent: true
+	persistent: true,
+	interactable: false
 });
 notConnectedToast.hide();
 
 const sendingVideoDataToast = new Toast({
 	content: "Sending video data to ActivityWatch.",
-	persistent: true
+	persistent: true,
+	interactable: false
 });
 sendingVideoDataToast.hide();
 
 const deniedToast = new Toast({
 	content:
 		"Another Musare instance is already sending data to ActivityWatch Musare extension. Please only use 1 active tab for stations and editsong.",
-	persistent: true
+	persistent: true,
+	interactable: false
 });
 deniedToast.hide();
 
 const competitorToast = new Toast({
 	content:
 		"Another Musare instance is already sending data to ActivityWatch Musare extension. Please only use 1 active tab for stations and editsong.",
-	persistent: true
+	persistent: true,
+	interactable: false
 });
 competitorToast.hide();
 

+ 1 - 1
frontend/src/pages/Station/index.vue

@@ -1043,7 +1043,7 @@ export default {
 		});
 
 		clearInterval(this.activityWatchVideoDataInterval);
-		
+
 		this.joinStation();
 	},
 	methods: {