Add tooltips
This commit is contained in:
parent
d8fe96eb85
commit
8b3c2027f4
|
@ -32,7 +32,7 @@
|
||||||
import { capitalise } from "@/helpers"
|
import { capitalise } from "@/helpers"
|
||||||
import { Utils, JsonFormatter } from "@budibase/frontend-core"
|
import { Utils, JsonFormatter } from "@budibase/frontend-core"
|
||||||
import { licensing } from "@/stores/portal"
|
import { licensing } from "@/stores/portal"
|
||||||
import { BindingMode, SidePanel } from "@budibase/types"
|
import { BindingMode } from "@budibase/types"
|
||||||
import type {
|
import type {
|
||||||
EnrichedBinding,
|
EnrichedBinding,
|
||||||
Snippet,
|
Snippet,
|
||||||
|
@ -71,6 +71,17 @@
|
||||||
let expressionError: string | undefined
|
let expressionError: string | undefined
|
||||||
let evaluating = false
|
let evaluating = false
|
||||||
|
|
||||||
|
const enum SidePanel {
|
||||||
|
Bindings = "Bindings",
|
||||||
|
Evaluation = "Evaluation",
|
||||||
|
Snippets = "Snippets",
|
||||||
|
}
|
||||||
|
const SidePanelIcons: Record<SidePanel, string> = {
|
||||||
|
Bindings: "FlashOn",
|
||||||
|
Evaluation: "Play",
|
||||||
|
Snippets: "Code",
|
||||||
|
}
|
||||||
|
|
||||||
$: useSnippets = allowSnippets && !$licensing.isFreePlan
|
$: useSnippets = allowSnippets && !$licensing.isFreePlan
|
||||||
$: editorModeOptions = getModeOptions(allowHBS, allowJS)
|
$: editorModeOptions = getModeOptions(allowHBS, allowJS)
|
||||||
$: sidePanelOptions = getSidePanelOptions(
|
$: sidePanelOptions = getSidePanelOptions(
|
||||||
|
@ -342,14 +353,15 @@
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
<div class="side-tabs">
|
<div class="side-tabs">
|
||||||
{#each sidePanelOptions as panel}
|
{#each sidePanelOptions as panelOption}
|
||||||
<ActionButton
|
<ActionButton
|
||||||
size="M"
|
size="M"
|
||||||
quiet
|
quiet
|
||||||
selected={sidePanel === panel}
|
selected={sidePanel === panelOption}
|
||||||
on:click={() => changeSidePanel(panel)}
|
on:click={() => changeSidePanel(panelOption)}
|
||||||
|
tooltip={panelOption}
|
||||||
>
|
>
|
||||||
<Icon name={panel} size="S" />
|
<Icon name={SidePanelIcons[panelOption]} size="S" />
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
export * from "./sidepanel"
|
|
||||||
export * from "./codeEditor"
|
export * from "./codeEditor"
|
||||||
export * from "./errors"
|
export * from "./errors"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
export enum SidePanel {
|
|
||||||
Bindings = "FlashOn",
|
|
||||||
Evaluation = "Play",
|
|
||||||
Snippets = "Code",
|
|
||||||
}
|
|
Loading…
Reference in New Issue