Skip to content

Commit

Permalink
cleanup: hide foreground opacity slider for solid background
Browse files Browse the repository at this point in the history
  • Loading branch information
vid277 authored and cdxker committed Jan 6, 2025
1 parent 511ece6 commit 7b47137
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions frontends/dashboard/src/pages/dataset/PublicPageSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -703,24 +703,26 @@ const PublicPageControls = () => {
</Show>
</div>
<div class="">
<label class="block" for="">
Foreground Opacity
</label>
<input
type="range"
min="0"
max="100"
onChange={(e) => {
setExtraParams(
"heroPattern",
"foregroundOpacity",
parseInt(e.currentTarget.value) / 100,
);
}}
value={
(extraParams.heroPattern?.foregroundOpacity || 0.5) * 100
}
/>
<Show when={extraParams.heroPattern?.heroPatternName !== "Solid"}>
<label class="block" for="">
Foreground Opacity
</label>
<input
type="range"
min="0"
max="100"
onChange={(e) => {
setExtraParams(
"heroPattern",
"foregroundOpacity",
parseInt(e.currentTarget.value) / 100,
);
}}
value={
(extraParams.heroPattern?.foregroundOpacity || 0.5) * 100
}
/>
</Show>
</div>
</div>
<div class="grow" />
Expand Down

0 comments on commit 7b47137

Please sign in to comment.