Skip to content

Commit

Permalink
add label for new button settings #176
Browse files Browse the repository at this point in the history
Signed-off-by: nicolaskolbenschlag <nicolas.kolbenschlag@googlemail.com>
  • Loading branch information
nicolaskolbenschlag committed Jan 23, 2023
1 parent ebd682f commit bcf4ce9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
19 changes: 12 additions & 7 deletions Apps/frontend/src/components/SettingsButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import { getAllChannelConfig } from "../rest/ChannelConfigController";
import { availableChannelConfigPresets } from "../stores";
import { clickOutside } from "../helper";
import { Tooltip } from "sveltestrap";
import { TOOLTIP_BUTTON_SETTINGS } from "../labels";
$: panelHeight = 0;
Expand All @@ -17,6 +19,7 @@
$presetPopupOpen = true;
loadAllChannelConfigPresets();
}
let button;
</script>

{#if $presetPopupOpen}
Expand All @@ -32,10 +35,12 @@
</nav>
{/if}

<div>
<button
class="icon-button mui-icon--settings"
on:click={showPopup}
data-cy="settings-button"
/>
</div>
<button
bind:this={button}
class="icon-button mui-icon--settings"
on:click={showPopup}
data-cy="settings-button"
/>
<Tooltip target={button} placement="bottom">
{TOOLTIP_BUTTON_SETTINGS}
</Tooltip>
7 changes: 4 additions & 3 deletions Apps/frontend/src/labels.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
export const LABEL_HEADER_LOAD_FROM_LIST_CHANNEL_CONFIG = "Load Existing:";
export const LABEL_HEADER_CREATE_CHANNEL_CONFIG = "Create New: ";

export const TOOLTIP_BUTTON_GND = "GND";
export const TOOLTIP_BUTTON_DISTRIBUTE = "Distributes enabled channels vertically";
export const TOOLTIP_BUTTON_RESET = "Cleans the canvas and stops plotting";
export const TOOLTIP_BUTTON_GND = "Enable GND";
export const TOOLTIP_BUTTON_DISTRIBUTE = "Distribute vertically";
export const TOOLTIP_BUTTON_RESET = "Clean canvas and stop";
export const TOOLTIP_BUTTON_OFFOFF_ON = "Turn on";
export const TOOLTIP_BUTTON_OFFOFF_OFF = "Turn off";
export const TOOLTIP_BUTTON_SETTINGS = "Open settings";

/* Log messages */
export const ERR_MSG_COULD_NOT_RETRIEVE_CHANNEL_CONFIG =
Expand Down

0 comments on commit bcf4ce9

Please sign in to comment.