From dfbf3aebde6cf024e6b6cd87d58af239cf3d63dc Mon Sep 17 00:00:00 2001
From: Rémy Raes <contact@remyraes.com>
Date: Thu, 8 Jun 2023 01:53:46 +0200
Subject: fix: Don't show deprecated mods (#382)

* fix: don't show deprecated mods
* feat: add setting to settings view
* feat: display deprecated mod cards in red
---
 src-vue/src/components/ThunderstoreModCard.vue | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

(limited to 'src-vue/src/components/ThunderstoreModCard.vue')

diff --git a/src-vue/src/components/ThunderstoreModCard.vue b/src-vue/src/components/ThunderstoreModCard.vue
index a0e8c481..c25b19a2 100644
--- a/src-vue/src/components/ThunderstoreModCard.vue
+++ b/src-vue/src/components/ThunderstoreModCard.vue
@@ -1,5 +1,5 @@
 <template>
-    <el-card :body-style="{ padding: '0px' }">
+    <el-card :body-style="getBodyStyle" :style="getCardStyle">
         <img
             :src="latestVersion.icon"
             class="image"
@@ -89,6 +89,14 @@ export default defineComponent({
         isBeingUpdated: false
     }),
     computed: {
+        getBodyStyle(): Object {
+            return this.mod.is_deprecated ? { 'background-color': 'rgba(255, 0, 0, 0.42)' } : {};
+        },
+
+        getCardStyle(): Object {
+            return this.mod.is_deprecated ? { 'border': '1px solid red' } : {};
+        },
+
         latestVersion(): ThunderstoreModVersion {
             return this.mod.versions[0];
         },
@@ -264,6 +272,11 @@ export default defineComponent({
     display: inline-block;
     max-width: 178px;
     margin: 5px;
+    --el-card-padding: 0;
+}
+
+.deprecated {
+    background-color: red !important;
 }
 
 .author {
-- 
cgit v1.2.3

