style(frontend): apply ultracite 7.12 formatting and lint rules
This commit is contained in:
1 parent
fc4758aa0b
commit
c8e5cff871
109 files changed
+845
-817
No files matched your search
@@ -48,17 +48,17 @@
|
||||
{#if ready && isVideo}
|
||||
<button class="tile" onclick={onopen} type="button">
|
||||
<video
|
||||
src={ready.url}
|
||||
muted
|
||||
playsinline
|
||||
preload="metadata"
|
||||
src={ready.url}
|
||||
use:poster
|
||||
></video>
|
||||
<span class="play"><Icon name="large-play" size="2rem" /></span>
|
||||
</button>
|
||||
{:else if ready}
|
||||
<button class="tile" onclick={onopen} type="button">
|
||||
<img src={ready.url} alt="attachment">
|
||||
<img alt="attachment" src={ready.url}>
|
||||
</button>
|
||||
{:else if inline?.state === "not-downloaded"}
|
||||
<button class="tile placeholder" onclick={queue} type="button">
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</script>
|
||||
|
||||
<div class="Audio" class:own>
|
||||
<button class="toggle" onclick={toggle} type="button" aria-label="Play audio">
|
||||
<button aria-label="Play audio" class="toggle" onclick={toggle} type="button">
|
||||
<Icon name={paused ? "play" : "pause"} size="1.625rem" />
|
||||
</button>
|
||||
<div class="content">
|
||||
@@ -58,14 +58,14 @@
|
||||
</div>
|
||||
<!-- biome-ignore lint/a11y/useMediaCaption: archived audio track has no captions -->
|
||||
<audio
|
||||
bind:this={element}
|
||||
bind:currentTime
|
||||
bind:duration
|
||||
bind:paused
|
||||
onended={() => element && releasePlayback(element)}
|
||||
onplay={() => element && claimPlayback(element)}
|
||||
preload="metadata"
|
||||
src={url}
|
||||
bind:this={element}
|
||||
bind:currentTime
|
||||
bind:duration
|
||||
bind:paused
|
||||
></audio>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</script>
|
||||
|
||||
<div class="FileChip" class:own>
|
||||
<button class="file-main" type="button" title={name} onclick={save}>
|
||||
<button class="file-main" onclick={save} title={name} type="button">
|
||||
<span class="file-glyph" class:own>
|
||||
<Icon name={saving ? "timer" : "document"} size="1.25rem" />
|
||||
</span>
|
||||
@@ -52,10 +52,10 @@
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
class="file-share"
|
||||
type="button"
|
||||
aria-label="Доступ по ссылке"
|
||||
class="file-share"
|
||||
onclick={share}
|
||||
type="button"
|
||||
>
|
||||
<Icon name="allow-share" size="1.125rem" />
|
||||
</button>
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
return;
|
||||
}
|
||||
anim = lottieModule.default.loadAnimation({
|
||||
container: target,
|
||||
renderer: "svg",
|
||||
loop: true,
|
||||
autoplay: true,
|
||||
animationData: json,
|
||||
autoplay: true,
|
||||
container: target,
|
||||
loop: true,
|
||||
renderer: "svg",
|
||||
});
|
||||
} catch {
|
||||
// tgs decode/render failed — leave empty
|
||||
@@ -47,8 +47,8 @@
|
||||
|
||||
<div
|
||||
class="TgsSticker"
|
||||
bind:this={container}
|
||||
style="--tgs-size: {size}rem;"
|
||||
bind:this={container}
|
||||
></div>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@@ -38,26 +38,26 @@
|
||||
|
||||
<div class="RoundVideoWrap">
|
||||
<button
|
||||
aria-label="Play video message"
|
||||
class="RoundVideo"
|
||||
onclick={toggle}
|
||||
type="button"
|
||||
aria-label="Play video message"
|
||||
>
|
||||
<!-- svelte-ignore a11y_media_has_caption -->
|
||||
<!-- biome-ignore lint/a11y/useMediaCaption: archived round video has no captions -->
|
||||
<video
|
||||
bind:this={element}
|
||||
bind:currentTime
|
||||
bind:duration
|
||||
bind:paused
|
||||
onended={() => element && releasePlayback(element)}
|
||||
onplay={() => element && claimPlayback(element)}
|
||||
playsinline
|
||||
preload="auto"
|
||||
src={url}
|
||||
bind:this={element}
|
||||
bind:currentTime
|
||||
bind:duration
|
||||
bind:paused
|
||||
use:poster
|
||||
></video>
|
||||
<svg class="RoundVideoRing" viewBox="0 0 200 200" aria-hidden="true">
|
||||
<svg aria-hidden="true" class="RoundVideoRing" viewBox="0 0 200 200">
|
||||
<circle
|
||||
class="RoundVideoProgress"
|
||||
cx="100"
|
||||
@@ -78,9 +78,11 @@
|
||||
{#if transcript}
|
||||
<button
|
||||
class="transcribe"
|
||||
class:active={showTranscript}
|
||||
onclick={() => (showTranscript = !showTranscript)}
|
||||
onclick={() => {
|
||||
showTranscript = !showTranscript;
|
||||
}}
|
||||
type="button"
|
||||
class:active={showTranscript}
|
||||
>
|
||||
<Icon name="transcribe" size="1rem" />
|
||||
Transcription
|
||||
|
||||
@@ -96,15 +96,15 @@
|
||||
<div class="VoiceWrap" class:own>
|
||||
<div class="Voice">
|
||||
<button
|
||||
aria-label="Play voice"
|
||||
class="toggle"
|
||||
onclick={toggle}
|
||||
type="button"
|
||||
aria-label="Play voice"
|
||||
>
|
||||
<Icon
|
||||
class={paused ? "nudge" : ""}
|
||||
name={paused ? "play" : "pause"}
|
||||
size="1.5rem"
|
||||
class={paused ? "nudge" : ""}
|
||||
/>
|
||||
</button>
|
||||
<div class="body">
|
||||
@@ -113,20 +113,20 @@
|
||||
{#each peaks as peak, i (i)}
|
||||
<span
|
||||
class="bar"
|
||||
class:filled={i / peaks.length < progress}
|
||||
style:height={`${Math.round(peak * 100)}%`}
|
||||
class:filled={i / peaks.length < progress}
|
||||
></span>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="time">{formatDuration(elapsed)}</div>
|
||||
</div>
|
||||
<button
|
||||
aria-label="Show transcription"
|
||||
class="transcribe"
|
||||
class:active={showTranscript && Boolean(text)}
|
||||
disabled={pending}
|
||||
onclick={onTranscribe}
|
||||
type="button"
|
||||
aria-label="Show transcription"
|
||||
class:active={showTranscript && Boolean(text)}
|
||||
>
|
||||
{#if pending}
|
||||
<Spinner color={own ? "white" : "gray"} size="1rem" />
|
||||
@@ -136,14 +136,14 @@
|
||||
</button>
|
||||
<!-- biome-ignore lint/a11y/useMediaCaption: archived voice note has no captions -->
|
||||
<audio
|
||||
onended={() => element && releasePlayback(element)}
|
||||
onplay={() => element && claimPlayback(element)}
|
||||
preload="metadata"
|
||||
src={url}
|
||||
bind:this={element}
|
||||
bind:currentTime
|
||||
bind:duration
|
||||
bind:paused
|
||||
onplay={() => element && claimPlayback(element)}
|
||||
onended={() => element && releasePlayback(element)}
|
||||
preload="metadata"
|
||||
src={url}
|
||||
></audio>
|
||||
</div>
|
||||
{#if text && showTranscript}
|
||||
|
||||
Reference in new issue
Block a user