From bb126c0545c7b722a21105548a14849fe74100a6 Mon Sep 17 00:00:00 2001
From: "Adrian O.V" <83074853+CodexAdrian@users.noreply.github.com>
Date: Wed, 12 Apr 2023 22:29:40 -0400
Subject: [PATCH] Project wireup (#80)
* Remove unneeded style
* Base modpack wire up
* Run lint
* Thats not supposed to be there
* Remove errant class
* Fix safety
* Username => ID
* fix id missing
* Fix bug with clicking
* remove unnecessary
* Update Versions.vue
* Addressed changes
* Lintttt
---
.../src/assets/stylesheets/global.scss | 7 ---
theseus_gui/src/components/GridDisplay.vue | 18 -------
.../src/components/ui/AccountsCard.vue | 8 ++-
.../src/components/ui/InstallConfirmModal.vue | 54 +++++++++++++++++++
theseus_gui/src/pages/Project.vue | 7 ---
theseus_gui/src/pages/index.js | 3 +-
theseus_gui/src/pages/project/Index.vue | 23 +++++---
theseus_gui/src/pages/project/Version.vue | 16 +++++-
theseus_gui/src/pages/project/Versions.vue | 27 ++++++++--
9 files changed, 111 insertions(+), 52 deletions(-)
create mode 100644 theseus_gui/src/components/ui/InstallConfirmModal.vue
delete mode 100644 theseus_gui/src/pages/Project.vue
diff --git a/theseus_gui/src/assets/stylesheets/global.scss b/theseus_gui/src/assets/stylesheets/global.scss
index 50bd54a8..ea9b6cc8 100644
--- a/theseus_gui/src/assets/stylesheets/global.scss
+++ b/theseus_gui/src/assets/stylesheets/global.scss
@@ -18,13 +18,6 @@
margin: var(--gap-sm) 0;
}
-.small-card-divider {
- background-color: var(--color-button-bg);
- border: none;
- color: var(--color-button-bg);
- height: 1px;
-}
-
.no-wrap {
white-space: nowrap;
}
diff --git a/theseus_gui/src/components/GridDisplay.vue b/theseus_gui/src/components/GridDisplay.vue
index e25c7ddc..2c7122d1 100644
--- a/theseus_gui/src/components/GridDisplay.vue
+++ b/theseus_gui/src/components/GridDisplay.vue
@@ -1,5 +1,4 @@
@@ -62,7 +62,7 @@ const appendProfiles = (accounts) => {
return accounts.map((account) => {
return {
...account,
- profile_picture: `https://crafthead.net/helm/${account.username}/128`,
+ profile_picture: `https://crafthead.net/helm/${account.id}/128`,
}
})
}
@@ -74,9 +74,7 @@ const displayAccounts = computed(() =>
)
const selectedAccount = ref(
- await users().then((accounts) =>
- accounts.find((account) => account.id === settings.value.default_user)
- )
+ accounts.value.find((account) => account.id === settings.value.default_user)
)
const refreshValues = async () => {
diff --git a/theseus_gui/src/components/ui/InstallConfirmModal.vue b/theseus_gui/src/components/ui/InstallConfirmModal.vue
new file mode 100644
index 00000000..a08275b9
--- /dev/null
+++ b/theseus_gui/src/components/ui/InstallConfirmModal.vue
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+ This project is already installed on your system. Are you sure you want to install it again?
+
+
+
+
+
+
+
+
+
+
diff --git a/theseus_gui/src/pages/Project.vue b/theseus_gui/src/pages/Project.vue
deleted file mode 100644
index 3cf20c35..00000000
--- a/theseus_gui/src/pages/Project.vue
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/theseus_gui/src/pages/index.js b/theseus_gui/src/pages/index.js
index e037822c..cf05aec5 100644
--- a/theseus_gui/src/pages/index.js
+++ b/theseus_gui/src/pages/index.js
@@ -1,7 +1,6 @@
import Index from './Index.vue'
import Browse from './Browse.vue'
import Library from './Library.vue'
-import Project from './Project.vue'
import Settings from './Settings.vue'
-export { Index, Browse, Library, Project, Settings }
+export { Index, Browse, Library, Settings }
diff --git a/theseus_gui/src/pages/project/Index.vue b/theseus_gui/src/pages/project/Index.vue
index fdcfb35d..30c02ff0 100644
--- a/theseus_gui/src/pages/project/Index.vue
+++ b/theseus_gui/src/pages/project/Index.vue
@@ -29,7 +29,7 @@
-
+
diff --git a/theseus_gui/src/pages/project/Version.vue b/theseus_gui/src/pages/project/Version.vue
index 925ccb21..b524bdd3 100644
--- a/theseus_gui/src/pages/project/Version.vue
+++ b/theseus_gui/src/pages/project/Version.vue
@@ -6,7 +6,7 @@
Auto-Featured
-
-
+ install(version.id)">
@@ -117,7 +117,7 @@
Downloads
-
+
@@ -151,6 +151,10 @@ defineProps({
type: Array,
required: true,
},
+ install: {
+ type: Function,
+ required: true,
+ },
})
@@ -174,6 +178,19 @@ defineProps({
.table-row {
display: grid;
grid-template-columns: min-content 1fr 1fr 1.5fr;
+ transition: opacity 0.5s ease-in-out, filter 0.2s ease-in-out, scale 0.05s ease-in-out,
+ outline 0.2s ease-in-out;
+
+ &.selectable:focus-visible,
+ &.selectable:hover {
+ cursor: pointer;
+ filter: brightness(0.85);
+ }
+
+ &.selectable:active {
+ filter: brightness(0.8);
+ scale: 0.99;
+ }
}
.table-head {