Skip to content

Commit

Permalink
Fix readonly reactivity and right column overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
myieye committed Sep 25, 2024
1 parent 5b78f22 commit fd9ad1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions frontend/viewer/src/ProjectView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@
comment: true,
});
const readonly = !$permissions.write || !$features.write;
$: readonly = !$permissions.write || !$features.write;
const currentView = initView(views[0]);
const viewSettings = initViewSettings({hideEmptyFields: false});
Expand Down Expand Up @@ -331,7 +330,7 @@
</div>
{/if}
</div>
<div class="side-scroller h-full pl-6 border-l-2 gap-4 flex flex-col col-start-3" class:border-l-2={$selectedEntry && !expandList} class:max-lg:border-l-2={pickedEntry && !readonly} class:max-lg:hidden={!pickedEntry || readonly} class:lg:hidden={expandList}>
<div class="side-scroller pl-6 border-l-2 gap-4 flex flex-col col-start-3" class:border-l-2={$selectedEntry && !expandList} class:max-lg:border-l-2={pickedEntry && !readonly} class:max-lg:hidden={!pickedEntry || readonly} class:lg:hidden={expandList}>
<div class="hidden" class:sm:hidden={expandList}>
<Button icon={collapseActionBar ? mdiArrowCollapseLeft : mdiArrowCollapseRight} class="aspect-square w-10" size="sm" iconOnly rounded variant="outline" on:click={() => collapseActionBar = !collapseActionBar} />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
{/if}
</div>

<SenseEditor {sense} on:change={() => dispatch('change', {entry, sense})}/>
<SenseEditor {sense} {readonly} on:change={() => dispatch('change', {entry, sense})}/>

<div class="grid-layer border-l border-dashed pl-4 space-y-4 rounded-lg">
{#each sense.exampleSentences as example, j (example.id)}
Expand Down

0 comments on commit fd9ad1b

Please sign in to comment.