merge: upstream

This commit is contained in:
Marie 2024-02-03 20:19:44 +01:00
commit 11628e4b6a
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
285 changed files with 3413 additions and 1913 deletions

View file

@ -38,6 +38,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts">
export type Tab = {
key: string;
title: string;
onClick?: (ev: MouseEvent) => void;
} & (
| {
@ -120,8 +121,9 @@ function onTabWheel(ev: WheelEvent) {
let entering = false;
async function enter(el: HTMLElement) {
async function enter(element: Element) {
entering = true;
const el = element as HTMLElement;
const elementWidth = el.getBoundingClientRect().width;
el.style.width = '0';
el.style.paddingLeft = '0';
@ -135,11 +137,12 @@ async function enter(el: HTMLElement) {
setTimeout(renderTab, 170);
}
function afterEnter(el: HTMLElement) {
function afterEnter(element: Element) {
//el.style.width = '';
}
async function leave(el: HTMLElement) {
async function leave(element: Element) {
const el = element as HTMLElement;
const elementWidth = el.getBoundingClientRect().width;
el.style.width = elementWidth + 'px';
el.style.paddingLeft = '';
@ -148,7 +151,8 @@ async function leave(el: HTMLElement) {
el.style.paddingLeft = '0';
}
function afterLeave(el: HTMLElement) {
function afterLeave(element: Element) {
const el = element as HTMLElement;
el.style.width = '';
}