mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 17:06:01 +00:00
macro icon
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user