-
Notifications
You must be signed in to change notification settings - Fork 257
Expand file tree
/
Copy pathLocalModList.vue
More file actions
78 lines (64 loc) · 2.41 KB
/
Copy pathLocalModList.vue
File metadata and controls
78 lines (64 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<template>
<div class="pane">
<div class="search-and-sort">
<SearchAndSort />
</div>
<DisableModModal />
<UninstallModModal />
<AssociatedModsModal />
<ManagerUpdateBanner/>
<ConcerningPackageBanner/>
<slot name="above-list"></slot>
<div class="tags has-addons" v-if="filters.size > 0">
<span class="margin-right" v-for="filter in filters">
<a href="#" @click="removeFilter(filter)">
<div class="tag has-addons">
<span>{{ filter }}</span>
</div>
<span class="tag is-delete"> </span>
</a>
</span>
</div>
<div class="mod-list-content">
<div class="draggable-content">
<Suspense>
<LocalModDraggableList/>
<template #fallback>
<SkeletonLocalModCard :mod="mod" v-for="mod of visibleModList"/>
</template>
</Suspense>
</div>
</div>
<slot name="below-list"></slot>
</div>
</template>
<script lang="ts" setup>
import AssociatedModsModal from './LocalModList/AssociatedModsModal.vue';
import DisableModModal from './LocalModList/DisableModModal.vue';
import UninstallModModal from './LocalModList/UninstallModModal.vue';
import SearchAndSort from './LocalModList/SearchAndSort.vue';
import { getStore } from '../../providers/generic/store/StoreProvider';
import { State } from '../../store';
import { computed, defineAsyncComponent } from 'vue';
import SkeletonLocalModCard from './LocalModList/SkeletonLocalModCard.vue';
import ManagerUpdateBanner from '../banner/ManagerUpdateBanner.vue';
import ConcerningPackageBanner from '@r2/components/banner/ConcerningPackageBanner.vue';
const store = getStore<State>();
const LocalModDraggableList = defineAsyncComponent(() => import('./LocalModList/LocalModDraggableList.vue'));
const visibleModList = computed(() => store.getters['profile/visibleModList']);
const filters = computed(() => store.state.profile.filters);
function removeFilter(filter: string) {
store.commit('profile/removeFilter', filter);
}
</script>
<style lang="scss" scoped>
.pane {
display: flex;
flex-direction: column;
width: 100%;
.mod-list-content {
flex: 1;
overflow-y: auto;
}
}
</style>