mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 00:06:01 +00:00
save split button
This commit is contained in:
20
packages/web/src/buttons/ToolStripSaveButton.svelte
Normal file
20
packages/web/src/buttons/ToolStripSaveButton.svelte
Normal file
@@ -0,0 +1,20 @@
|
||||
<script lang="ts">
|
||||
import getElectron from '../utility/getElectron';
|
||||
|
||||
import ToolStripCommandButton from './ToolStripCommandButton.svelte';
|
||||
import ToolStripSplitDropDownButton from './ToolStripSplitDropDownButton.svelte';
|
||||
|
||||
export let idPrefix;
|
||||
|
||||
const electron = getElectron();
|
||||
</script>
|
||||
|
||||
<ToolStripCommandButton
|
||||
command={`${idPrefix}.save`}
|
||||
component={ToolStripSplitDropDownButton}
|
||||
menu={[
|
||||
{ command: `${idPrefix}.save` },
|
||||
{ command: `${idPrefix}.saveAs` },
|
||||
electron && { command: `${idPrefix}.saveToDisk` },
|
||||
]}
|
||||
/>
|
||||
Reference in New Issue
Block a user