Skip to content

Commit 3752336

Browse files
authored
Remove hide view button on some places (#906)
* do not show hideView button for SettingsPanel embedded in dialogs * remove hide view button fully * apply formatting changes --------- Co-authored-by: Logende <[email protected]>
1 parent 077bf31 commit 3752336

4 files changed

Lines changed: 3 additions & 18 deletions

File tree

meta_configurator/src/components/panels/shared-components/PanelSettings.vue

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ import Button from 'primevue/button';
1111
import PropertiesPanel from '@/components/panels/gui-editor/PropertiesPanel.vue';
1212
import {JsonSchemaWrapper} from '@/schema/jsonSchemaWrapper';
1313
import {getDataForMode, getSchemaForMode} from '@/data/useDataLink';
14-
import {useSettings} from '@/settings/useSettings.ts';
1514
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome';
1615
1716
const props = defineProps<{
1817
panelDisplayName: string;
19-
panelType: string;
18+
panelType?: string;
2019
settingsHeader?: string;
2120
panelSettingsPath: Path;
2221
sessionMode: SessionMode;
@@ -68,14 +67,6 @@ const settingsName = computed(() => {
6867
}
6968
return props.panelDisplayName + ' Settings';
7069
});
71-
72-
function hideView() {
73-
const mode = props.sessionMode;
74-
const settings = useSettings().value;
75-
settings.panels[mode] = settings.panels[mode].filter(
76-
panel => panel.panelType !== props.panelType
77-
);
78-
}
7970
</script>
8071

8172
<template>
@@ -89,10 +80,6 @@ function hideView() {
8980
@click="copyToClipboard()">
9081
<FontAwesomeIcon icon="fa-regular fa-clone" />
9182
</Button>
92-
93-
<Button text severity="secondary" v-tooltip.left="'Hide view'" @click="hideView()">
94-
<FontAwesomeIcon icon="fa-solid fa-eye-slash" />
95-
</Button>
9683
</template>
9784
<slot></slot>
9885
<div class="properties-panel-container">

meta_configurator/src/components/toolbar/dialogs/data-export/DataExportDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ defineExpose({show: openDialog, close: hideDialog, activateSchemaMode, activateD
117117
<div class="flex flex-column gap-3 bigger-dialog-content">
118118
<Panel header="Generate a Template with AI Assistance" toggleable :collapsed="true">
119119
<PanelSettings
120-
panel-name="API Key and AI Settings"
120+
panel-display-name="API Key and AI Settings"
121121
settings-header="AI Settings"
122122
:panel-settings-path="['aiIntegration']"
123123
:sessionMode="SessionMode.DataEditor">

meta_configurator/src/components/toolbar/dialogs/data-mapping/DataMappingDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ defineExpose({show: openDialog, close: hideDialog});
207207
:style="{width: '50vw'}">
208208
<div class="space-y-4">
209209
<PanelSettings
210-
panel-name="API Key and AI Settings"
210+
panel-display-name="API Key and AI Settings"
211211
settings-header="AI Settings"
212212
:panel-settings-path="['aiIntegration']"
213213
:sessionMode="SessionMode.DataEditor">

meta_configurator/src/fontawesome.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import {
4444
faLockOpen,
4545
faFileZipper,
4646
faLink,
47-
faEyeSlash,
4847
} from '@fortawesome/free-solid-svg-icons';
4948
import {
5049
faFile,
@@ -87,7 +86,6 @@ export function registerIcons() {
8786
library.add(faTriangleExclamation);
8887
library.add(faTrashArrowUp);
8988
library.add(faEye);
90-
library.add(faEyeSlash);
9189
library.add(faEyeRegular);
9290
library.add(faDiagramProject);
9391
library.add(faCode);

0 commit comments

Comments
 (0)