macro icon

This commit is contained in:
Jan Prochazka 2020-11-01 12:54:27 +01:00
parent 8ff44e41b1
commit c9308255a7
6 changed files with 19 additions and 40 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 491.556 491.556" style="enable-background:new 0 0 491.556 491.556;" xml:space="preserve">
<path id="XMLID_680_" d="M480.537,132.385c-6.372-2.813-13.814-1.418-18.729,3.502l-49.891,49.868l-91.012-16.093l-16.101-91.018
l49.894-49.867c4.911-4.921,6.307-12.356,3.5-18.728c-2.805-6.364-9.258-10.36-16.197-10.029
C308,1.608,274.485,15.334,248.51,41.316c-39.887,39.872-50.913,97.498-33.435,147.364L19.369,384.429
c-24.516,24.5-24.516,64.24,0,88.749c11.756,11.764,27.712,18.378,44.363,18.378c16.635,0,32.605-6.615,44.361-18.37l196.679-196.68
c49.196,16.044,105.395,4.654,144.471-34.447c25.976-25.968,39.708-59.475,41.314-93.468
C490.864,141.644,486.909,135.206,480.537,132.385z M94.214,435.747c-10.328,10.329-27.094,10.329-37.422,0
c-10.346-10.344-10.346-27.094,0-37.439c10.328-10.327,27.094-10.327,37.422,0C104.544,408.653,104.544,425.402,94.214,435.747z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,11 +1,11 @@
import _ from 'lodash'; import _ from 'lodash';
import { filterName } from '@dbgate/datalib'; import { filterName } from '@dbgate/datalib';
import { StartIcon } from '../icons'; import { MacroIcon, StartIcon } from '../icons';
const macroAppObject = () => ({ name, type, title, group }, { setOpenedTabs }) => { const macroAppObject = () => ({ name, type, title, group }, { setOpenedTabs }) => {
const key = name; const key = name;
// const Icon = (props) => <i className="fas fa-archive" />; // const Icon = (props) => <i className="fas fa-archive" />;
const Icon = StartIcon; const Icon = MacroIcon;
const matcher = (filter) => filterName(filter, name, title); const matcher = (filter) => filterName(filter, name, title);
const groupTitle = group; const groupTitle = group;

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import ToolbarButton from '../widgets/ToolbarButton'; import ToolbarButton from '../widgets/ToolbarButton';
import styled from 'styled-components'; import styled from 'styled-components';
import { ReferenceIcon } from '../icons'; import { MacroIcon } from '../icons';
import { TabPage, TabControl } from '../widgets/TabControl'; import { TabPage, TabControl } from '../widgets/TabControl';
import theme from '../theme'; import theme from '../theme';
import JavaScriptEditor from '../sqleditor/JavaScriptEditor'; import JavaScriptEditor from '../sqleditor/JavaScriptEditor';
@ -63,7 +63,7 @@ function MacroHeader({ selectedMacro, setSelectedMacro, onExecute }) {
return ( return (
<Container> <Container>
<Header> <Header>
<ReferenceIcon /> <MacroIcon />
<HeaderText>{selectedMacro.title}</HeaderText> <HeaderText>{selectedMacro.title}</HeaderText>
</Header> </Header>
<Buttons> <Buttons>

View File

@ -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; export default macros;

View File

@ -62,6 +62,7 @@ export const ViewIcon = (props) => getIconImage('view2.svg', props);
export const ArchiveTableIcon = (props) => getIconImage('archtable.svg', props); export const ArchiveTableIcon = (props) => getIconImage('archtable.svg', props);
export const DatabaseIcon = (props) => getIconImage('database.svg', props); export const DatabaseIcon = (props) => getIconImage('database.svg', props);
export const ServerIcon = (props) => getIconImage('server.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 MicrosoftIcon = (props) => getIconImage('microsoft.svg', props);
export const MySqlIcon = (props) => getIconImage('mysql.svg', props); export const MySqlIcon = (props) => getIconImage('mysql.svg', props);