Skip to content

Commit 650d7e7

Browse files
committed
fix(panel): adds loading support & fix scrollbar
1 parent 206ae01 commit 650d7e7

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

src/components/AppComponent.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const onBack = () => {
7878
:on-after-leave="onAfterLeave"
7979
auto-focus
8080
>
81-
<NDrawerContent>
81+
<NDrawerContent :native-scrollbar="false">
8282
<!-- Header -->
8383
<NFlex justify="space-between" class="panel-header">
8484
<NButton circle quaternary @click="onBack">
@@ -150,7 +150,7 @@ main {
150150
151151
&-header {
152152
position: sticky;
153-
top: 0;
153+
top: 1rem;
154154
}
155155
156156
&-content {

src/components/views/panel/PanelButtonProgress.vue

+7-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ const props = defineProps({
4343
type: Boolean,
4444
required: false,
4545
},
46+
loading: {
47+
type: Boolean,
48+
required: false,
49+
},
4650
4751
icon: {
4852
type: Object as PropType<Component>,
@@ -134,7 +138,7 @@ const renderLabel = (option: SelectOption & { icon: Component }) => [
134138
:to="root"
135139
:render-label="renderLabel"
136140
trigger="focus"
137-
:disabled="disabled"
141+
:disabled="disabled || loading"
138142
v-bind="select"
139143
:on-update:show="_show => !_show && trigger?.$el?.blur()"
140144
:on-update-value="onSelect"
@@ -146,6 +150,7 @@ const renderLabel = (option: SelectOption & { icon: Component }) => [
146150
round
147151
:secondary="!filled"
148152
:disabled="disabled"
153+
:loading="loading"
149154
:type="type"
150155
>
151156
<template #icon>
@@ -157,6 +162,7 @@ const renderLabel = (option: SelectOption & { icon: Component }) => [
157162
</ProgressTooltip>
158163

159164
<NModal
165+
v-if="false"
160166
v-model:show="showPicker"
161167
:to="root"
162168
:style="{

src/components/views/panel/ShowPanelButtons.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ onMounted(() => {
169169
}"
170170
:icon="activeLists?.length ? IconCheckedList : IconListEmpty"
171171
:filled="!!activeLists?.length"
172-
:disabled="listsLoading"
172+
:loading="listsLoading"
173173
type="warning"
174174
@on-select="onListUpdate"
175175
>
@@ -197,7 +197,7 @@ onMounted(() => {
197197
:progress="collectionProgress"
198198
:percentage="collectionPercentage"
199199
:filled="collected"
200-
:disabled="collectionLoading"
200+
:loading="collectionLoading"
201201
type="info"
202202
@on-select="onCollectionUpdate"
203203
>
@@ -218,7 +218,7 @@ onMounted(() => {
218218
:progress="watchedProgress"
219219
:percentage="watchedPercentage"
220220
:filled="watched"
221-
:disabled="watchedLoading"
221+
:loading="watchedLoading"
222222
@on-select="onWatchedUpdate"
223223
>
224224
{{ i18n(`label__history__${ watched ? 'remove' : 'add' }`) }}

0 commit comments

Comments
 (0)