Merge branch 'misskey-develop' into merge/2025-03-24

This commit is contained in:
Hazelnoot 2025-03-31 16:07:41 -04:00
commit 2983092c06
59 changed files with 633 additions and 251 deletions

View file

@ -159,12 +159,13 @@ function onMousedown(ev: MouseEvent | TouchEvent) {
const onDrag = (ev: MouseEvent | TouchEvent) => {
ev.preventDefault();
let beforeValue = finalValue.value;
const containerRect = containerEl.value!.getBoundingClientRect();
const pointerX = 'touches' in ev && ev.touches.length > 0 ? ev.touches[0].clientX : 'clientX' in ev ? ev.clientX : 0;
const pointerPositionOnContainer = pointerX - (containerRect.left + (thumbWidth / 2));
rawValue.value = Math.min(1, Math.max(0, pointerPositionOnContainer / (containerEl.value!.offsetWidth - thumbWidth)));
if (props.continuousUpdate) {
if (props.continuousUpdate && beforeValue !== finalValue.value) {
emit('update:modelValue', finalValue.value);
}
};
@ -286,7 +287,7 @@ function onMousedown(ev: MouseEvent | TouchEvent) {
border-radius: var(--MI-radius-ellipse);
&:hover {
background: var(--MI_THEME-accentLighten);
background: hsl(from var(--MI_THEME-accent) h s calc(l + 10));
}
}
}