mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-23 19:36:02 +00:00
macro icon
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import _ from 'lodash';
|
||||
import { filterName } from '@dbgate/datalib';
|
||||
import { StartIcon } from '../icons';
|
||||
import { MacroIcon, StartIcon } from '../icons';
|
||||
|
||||
const macroAppObject = () => ({ name, type, title, group }, { setOpenedTabs }) => {
|
||||
const key = name;
|
||||
// const Icon = (props) => <i className="fas fa-archive" />;
|
||||
const Icon = StartIcon;
|
||||
const Icon = MacroIcon;
|
||||
const matcher = (filter) => filterName(filter, name, title);
|
||||
const groupTitle = group;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import ToolbarButton from '../widgets/ToolbarButton';
|
||||
import styled from 'styled-components';
|
||||
import { ReferenceIcon } from '../icons';
|
||||
import { MacroIcon } from '../icons';
|
||||
import { TabPage, TabControl } from '../widgets/TabControl';
|
||||
import theme from '../theme';
|
||||
import JavaScriptEditor from '../sqleditor/JavaScriptEditor';
|
||||
@@ -63,7 +63,7 @@ function MacroHeader({ selectedMacro, setSelectedMacro, onExecute }) {
|
||||
return (
|
||||
<Container>
|
||||
<Header>
|
||||
<ReferenceIcon />
|
||||
<MacroIcon />
|
||||
<HeaderText>{selectedMacro.title}</HeaderText>
|
||||
</Header>
|
||||
<Buttons>
|
||||
|
||||
@@ -270,40 +270,4 @@ return {
|
||||
},
|
||||
];
|
||||
|
||||
// function f() {
|
||||
// const selectedColumnNames = modules.lodash.uniq(selectedCells.map((x) => x.column));
|
||||
// const selectedRowIndexes = modules.lodash.uniq(selectedCells.map((x) => x.row));
|
||||
// const addedColumnNames = modules.lodash.compact(args.year, args.month, args.day, args.hour, args.minute, args.second);
|
||||
// const selectedRows = modules.lodash.groupBy(selectedCells, 'row');
|
||||
|
||||
// const resultRows = rows.map((row, rowIndex) => {
|
||||
// if (!selectedRowIndexes.includes(rowIndex)) return row;
|
||||
// const mom = selectedRows[index].find((x) => {
|
||||
// const m = modules.moment(row[x.column]);
|
||||
// if (m.isValid()) return m;
|
||||
// });
|
||||
// if (!mom) return row;
|
||||
|
||||
// const fields = {
|
||||
// year: mom.year(),
|
||||
// month: mom.month(),
|
||||
// day: mom.day(),
|
||||
// hour: mom.hour(),
|
||||
// minute: mom.minute(),
|
||||
// second: mom.second(),
|
||||
// };
|
||||
|
||||
// return {
|
||||
// ...row,
|
||||
// ...modules.lodash.pick(fields, addedColumnNames),
|
||||
// __insertedFields: addedColumnNames,
|
||||
// };
|
||||
// });
|
||||
// const resultCols = [...cols, ...addedColumnNames];
|
||||
// return {
|
||||
// rows: resultRows,
|
||||
// cols: resultCols,
|
||||
// };
|
||||
// }
|
||||
|
||||
export default macros;
|
||||
|
||||
@@ -62,6 +62,7 @@ export const ViewIcon = (props) => getIconImage('view2.svg', props);
|
||||
export const ArchiveTableIcon = (props) => getIconImage('archtable.svg', props);
|
||||
export const DatabaseIcon = (props) => getIconImage('database.svg', props);
|
||||
export const ServerIcon = (props) => getIconImage('server.svg', props);
|
||||
export const MacroIcon = (props) => getIconImage('double-wrench.svg', props);
|
||||
|
||||
export const MicrosoftIcon = (props) => getIconImage('microsoft.svg', props);
|
||||
export const MySqlIcon = (props) => getIconImage('mysql.svg', props);
|
||||
|
||||
Reference in New Issue
Block a user