Fix version dropdowns and add link hover/active colors in markdown (#398)

* Fix version dropdowns and add link hover/active colors in markdown

* Add 'Clear filters' button to version filtering

* *Actually* fix #394

* semicolon
This commit is contained in:
Prospector 2022-03-07 07:27:10 -08:00 committed by GitHub
parent b82efb6e3c
commit bdefa4a967
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 9 deletions

View File

@ -166,6 +166,14 @@
a { a {
color: var(--color-link); color: var(--color-link);
&:focus-visible,
&:hover {
color: var(--color-link-hover);
}
&:active {
color: var(--color-link-active);
}
} }
img { img {
@ -431,6 +439,8 @@
.multiselect--above .multiselect__content-wrapper { .multiselect--above .multiselect__content-wrapper {
border-top: none !important; border-top: none !important;
border-top-left-radius: var(--size-rounded-card) !important;
border-top-right-radius: var(--size-rounded-card) !important;
} }
.multiselect { .multiselect {
@ -481,12 +491,6 @@
line-height: 20px; line-height: 20px;
} }
} }
.multiselect--above {
.multiselect__content-wrapper {
border-top-left-radius: var(--size-rounded-card);
border-top-right-radius: var(--size-rounded-card);
}
}
.multiselect__content-wrapper { .multiselect__content-wrapper {
background: var(--color-dropdown-bg); background: var(--color-dropdown-bg);
border: none; border: none;

View File

@ -8,7 +8,7 @@
v-model="selectedLoader" v-model="selectedLoader"
:options="getValidLoaders()" :options="getValidLoaders()"
:multiple="false" :multiple="false"
:searchable="true" :searchable="false"
:show-no-results="false" :show-no-results="false"
:close-on-select="true" :close-on-select="true"
:clear-search-on-select="false" :clear-search-on-select="false"
@ -32,8 +32,8 @@
:searchable="true" :searchable="true"
:show-no-results="false" :show-no-results="false"
:close-on-select="false" :close-on-select="false"
:clear-search-on-select="false"
:show-labels="false" :show-labels="false"
:hide-selected="true"
:selectable="() => selectedGameVersions.length <= 6" :selectable="() => selectedGameVersions.length <= 6"
placeholder="Filter versions..." placeholder="Filter versions..."
@input="updateVersionFilters()" @input="updateVersionFilters()"
@ -48,18 +48,35 @@
description="Include snapshots" description="Include snapshots"
:border="false" :border="false"
/> />
<button
title="Clear filters"
:disabled="
selectedLoader === getDefaultLoader() &&
selectedGameVersions.length === 0
"
class="iconified-button"
@click="
selectedLoader = getDefaultLoader()
selectedGameVersions = []
"
>
<CrossIcon />
Clear filters
</button>
</div> </div>
</template> </template>
<script> <script>
import Multiselect from 'vue-multiselect' import Multiselect from 'vue-multiselect'
import Checkbox from '~/components/ui/Checkbox' import Checkbox from '~/components/ui/Checkbox'
import CrossIcon from '~/assets/images/utils/x.svg?inline'
export default { export default {
name: 'VersionFilterControl', name: 'VersionFilterControl',
components: { components: {
Multiselect, Multiselect,
Checkbox, Checkbox,
CrossIcon,
}, },
props: { props: {
versions: { versions: {
@ -134,11 +151,35 @@ export default {
.multiselect { .multiselect {
flex: 1; flex: 1;
min-width: fit-content;
} }
.checkbox-outer { .checkbox-outer {
min-width: fit-content; min-width: fit-content;
} }
} }
.circle-button {
display: flex;
max-width: 2rem;
padding: 0.5rem;
background-color: var(--color-button-bg);
border-radius: var(--size-rounded-max);
box-shadow: inset 0px -1px 1px rgba(17, 24, 39, 0.1);
&:hover,
&:focus-visible {
background-color: var(--color-button-bg-hover);
color: var(--color-button-text-hover);
}
&:active {
background-color: var(--color-button-bg-active);
color: var(--color-button-text-active);
}
svg {
height: 1rem;
width: 1rem;
}
}
</style> </style>