[ui] rudimentary "detail" mode

feat/vaults
Tomáš Mládek 2022-02-09 23:58:56 +01:00
parent 578a3fdcd8
commit 15c524c07d
No known key found for this signature in database
GPG Key ID: ED21612889E75EC5
1 changed files with 16 additions and 1 deletions

View File

@ -11,6 +11,9 @@
export let only: boolean;
let editable = false;
let detail = only;
let detailChanged = false;
$: if (!detailChanged) detail = only;
function visit() {
window.open(normUrl(`/browse/${address}`), "_blank");
@ -23,13 +26,21 @@
});
</script>
<div class="view" class:editable>
<div class="view" class:editable class:detail>
<header>
<IconButton
name="pencil"
on:click={() => (editable = !editable)}
active={editable}
/>
<IconButton
name="fullscreen"
on:click={() => {
detail = !detail;
detailChanged = true;
}}
active={detail}
/>
<IconButton name="bookmark" on:click={() => visit()} disabled={only} />
<IconButton
name="x-circle"
@ -58,6 +69,10 @@
border-style: dashed;
}
&.detail {
max-width: 100%;
}
header {
font-size: 20px;
position: relative;