@@ -321,37 +274,36 @@ const onCustomInstallClick = onSubmit(async () => {
:to="{ name: 'app-install', params: { id: app.id } }"
class="card-link"
>
- {{ app.manifest.name }}
+ {{ app.name }}
-
- {{ $t('app_state_' + app.state) }}
+ {{ $t(`app_state_${app.quality.state}`) }}
- {{ app.manifest.description }}
+ {{ app.description }}
{
class="align-self-end position-relative mt-auto"
>
{{ $t('orphaned') }}
@@ -390,33 +342,6 @@ const onCustomInstallClick = onSubmit(async () => {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -449,13 +374,9 @@ const onCustomInstallClick = onSubmit(async () => {
}
.card-deck {
- padding: 0;
- margin-bottom: 0;
- display: flex;
- flex-flow: row wrap;
-
- > * {
+ .card {
flex-basis: 100%;
+ outline: none;
@include media-breakpoint-up(md) {
flex-basis: 50%;
@@ -466,14 +387,15 @@ const onCustomInstallClick = onSubmit(async () => {
flex-basis: 33%;
max-width: calc(33.3% - 1rem);
}
- }
- .card {
&:hover {
color: $white;
background-color: $dark;
border-color: $dark;
}
+ &:focus {
+ box-shadow: 0 0 0 $btn-focus-width rgba($dark, 0.5);
+ }
:deep(.card-link) {
color: inherit;
diff --git a/app/src/views/app/appData.ts b/app/src/views/app/appData.ts
new file mode 100644
index 00000000..15f275b3
--- /dev/null
+++ b/app/src/views/app/appData.ts
@@ -0,0 +1,19 @@
+import type { AppLevel, AppState } from '@/types/core/api'
+
+export function formatAppQuality(app: { state: AppState; level: AppLevel }) {
+ const variants = {
+ working: 'success',
+ lowquality: 'warning',
+ inprogress: 'danger',
+ broken: 'danger',
+ thirdparty: 'danger',
+ } as const
+ const working = app.state === 'working'
+ const state: keyof typeof variants =
+ working && app.level <= 0
+ ? 'broken'
+ : working && app.level <= 4
+ ? 'lowquality'
+ : app.state
+ return { state, variant: variants[state] }
+}