mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2026-09-27 04:51:45 +00:00
fix(web): drop stale base64 overhead from max size display
This commit is contained in:
@@ -4,14 +4,12 @@
|
||||
|
||||
import { status } from '$lib/stores/status'
|
||||
|
||||
// Due to encoding overhead (~35%) with base64
|
||||
// https://en.wikipedia.org/wiki/Base64
|
||||
const overhead = 1 / 1.35
|
||||
// Payload is raw bytes (msgpack + cipher), no base64 padding overhead.
|
||||
</script>
|
||||
|
||||
<span>
|
||||
{#if $status !== null}
|
||||
{prettyBytes($status.max_size * overhead, { binary: true })}
|
||||
{prettyBytes($status.max_size, { binary: true })}
|
||||
{:else}
|
||||
{$_('common.loading')}
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user