diff --git a/packages/client/src/components/form/range.vue b/packages/client/src/components/form/range.vue index c0fc8c65100df2a9a9b65c94fa417b339947f8b8..db21c35717f76ad9ef8319966b24172d6c3432d1 100644 --- a/packages/client/src/components/form/range.vue +++ b/packages/client/src/components/form/range.vue @@ -1,5 +1,5 @@ <template> -<div class="timctyfi" :class="{ disabled }"> +<div class="timctyfi" :class="{ disabled, easing }"> <div class="label"><slot name="label"></slot></div> <div v-adaptive-border class="body"> <div ref="containerEl" class="container"> @@ -28,9 +28,11 @@ const props = withDefaults(defineProps<{ step?: number; textConverter?: (value: number) => string, showTicks?: boolean; + easing?: boolean; }>(), { step: 1, textConverter: (v) => v.toString(), + easing: false, }); const emit = defineEmits<{ @@ -198,7 +200,6 @@ const onMousedown = (ev: MouseEvent | TouchEvent) => { height: 100%; background: var(--accent); opacity: 0.5; - //transition: width 0.2s cubic-bezier(0,0,0,1); } } @@ -231,7 +232,6 @@ const onMousedown = (ev: MouseEvent | TouchEvent) => { cursor: grab; background: var(--accent); border-radius: 999px; - //transition: left 0.2s cubic-bezier(0,0,0,1); &:hover { background: var(--accentLighten); @@ -239,5 +239,21 @@ const onMousedown = (ev: MouseEvent | TouchEvent) => { } } } + + &.easing { + > .body { + > .container { + > .track { + > .highlight { + transition: width 0.2s cubic-bezier(0,0,0,1); + } + } + + > .thumb { + transition: left 0.2s cubic-bezier(0,0,0,1); + } + } + } + } } </style> diff --git a/packages/client/src/pages/settings/general.vue b/packages/client/src/pages/settings/general.vue index 2710a41eccdc57710ececa8c737c8ca5d70371d6..9072bcefc949b25b0e6ca40cc3ec2677485343a5 100644 --- a/packages/client/src/pages/settings/general.vue +++ b/packages/client/src/pages/settings/general.vue @@ -81,7 +81,7 @@ <option value="force">{{ i18n.ts._nsfw.force }}</option> </FormSelect> - <FormRange v-model="numberOfPageCache" :min="1" :max="10" :step="1" class="_formBlock"> + <FormRange v-model="numberOfPageCache" :min="1" :max="10" :step="1" easing class="_formBlock"> <template #label>{{ i18n.ts.numberOfPageCache }}</template> <template #caption>{{ i18n.ts.numberOfPageCacheDescription }}</template> </FormRange>