mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 06:26:00 +00:00
icons
This commit is contained in:
@@ -31,7 +31,8 @@ const FileNameWrapper = styled.span`
|
||||
export default function FilesTabsPanel() {
|
||||
return files.map(file => (
|
||||
<FileTabItem {...file}>
|
||||
<TableIcon /><FileNameWrapper>{file.name}</FileNameWrapper>
|
||||
<TableIcon />
|
||||
<FileNameWrapper>{file.name}</FileNameWrapper>
|
||||
</FileTabItem>
|
||||
));
|
||||
}
|
||||
|
||||
72
web/src/icons.js
Normal file
72
web/src/icons.js
Normal file
@@ -0,0 +1,72 @@
|
||||
import React from 'react';
|
||||
|
||||
function getIconImage(src, { size = 16, style = {}, className, title }) {
|
||||
if (src.endsWith(".svg")) {
|
||||
src = "/icons/" + src;
|
||||
}
|
||||
// if (props.alignToLine) {
|
||||
// style["position"] = "relative";
|
||||
// style["top"] = "-2px";
|
||||
// style["marginRight"] = "4px";
|
||||
// }
|
||||
return (
|
||||
<img
|
||||
width={size}
|
||||
height={size}
|
||||
src={src}
|
||||
style={style}
|
||||
className={className}
|
||||
title={title}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export const TableIcon = (props) => getIconImage("table2.svg", props);
|
||||
export const ViewIcon = (props) => getIconImage("view2.svg", props);
|
||||
export const DatabaseIcon = (props) => getIconImage("database.svg", props);
|
||||
export const ServerIcon = (props) => getIconImage("server.svg", props);
|
||||
|
||||
export const MicrosoftIcon = (props) => getIconImage("microsoft.svg", props);
|
||||
export const MySqlIcon = (props) => getIconImage("mysql.svg", props);
|
||||
export const PostgreSqlIcon = (props) => getIconImage("postgresql.svg", props);
|
||||
export const SqliteIcon = (props) => getIconImage("sqlite.svg", props);
|
||||
|
||||
export const ProcedureIcon = (props) => getIconImage("procedure2.svg", props);
|
||||
export const FunctionIcon = (props) => getIconImage("function.svg", props);
|
||||
export const TriggerIcon = (props) => getIconImage("trigger.svg", props);
|
||||
|
||||
export const HomeIcon = (props) => getIconImage("home.svg", props);
|
||||
export const PrimaryKeyIcon = (props) => getIconImage("primarykey.svg", props);
|
||||
export const ForeignKeyIcon = (props) => getIconImage("foreignkey.svg", props);
|
||||
export const ComplexKeyIcon = (props) => getIconImage("complexkey.svg", props);
|
||||
export const VariableIcon = (props) => getIconImage("variable.svg", props);
|
||||
export const UniqueIcon = (props) => getIconImage("unique.svg", props);
|
||||
export const IndexIcon = (props) => getIconImage("index.svg", props);
|
||||
|
||||
export const StartIcon = (props) => getIconImage("start.svg", props);
|
||||
export const DownCircleIcon = (props) => getIconImage("down_circle.svg", props);
|
||||
|
||||
export const ColumnIcon = (props) => getIconImage("column.svg", props);
|
||||
|
||||
export const SqlIcon = (props) => getIconImage("sql.svg", props);
|
||||
export const ExcelIcon = (props) => getIconImage("excel.svg", props);
|
||||
export const DiagramIcon = (props) => getIconImage("diagram.svg", props);
|
||||
export const QueryDesignIcon = (props) => getIconImage("querydesign.svg", props);
|
||||
export const LocalDbIcon = (props) => getIconImage("localdb.svg", props);
|
||||
export const CsvIcon = (props) => getIconImage("csv.svg", props);
|
||||
export const ChangeSetIcon = (props) => getIconImage("changeset.svg", props);
|
||||
export const BinaryFileIcon = (props) => getIconImage("binaryfile.svg", props);
|
||||
|
||||
export const ReferenceIcon = (props) => getIconImage("reference.svg", props);
|
||||
export const LinkIcon = (props) => getIconImage("link.svg", props);
|
||||
|
||||
export const SequenceIcon = (props) => getIconImage("sequence.svg", props);
|
||||
export const CheckIcon = (props) => getIconImage("check.svg", props);
|
||||
|
||||
export const LinkedServerIcon = (props) => getIconImage("linkedserver.svg", props);
|
||||
|
||||
export const EmptyIcon = (props) =>
|
||||
getIconImage(
|
||||
"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",
|
||||
props
|
||||
);
|
||||
@@ -1,40 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
export default function TableIcon({ size=16 }) {
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 502 502"
|
||||
enable-background="new 0 0 502 502"
|
||||
>
|
||||
<rect
|
||||
x="10"
|
||||
y="66.375"
|
||||
style={{ fill: "#4EC9DC" }}
|
||||
width="482"
|
||||
height="73.896"
|
||||
/>
|
||||
<rect
|
||||
x="10"
|
||||
y="140.039"
|
||||
style={{ fill: "#D1DCEB" }}
|
||||
width="482"
|
||||
height="295.586"
|
||||
/>
|
||||
<g>
|
||||
<path
|
||||
d="M492,445.625c5.522,0,10-4.477,10-10V66.375c0-5.523-4.478-10-10-10H10c-5.522,0-10,4.477-10,10v369.25
|
||||
c0,5.523,4.478,10,10,10H492z M482,277.832H381.5v-53.896H482V277.832z M20,223.936h100.5v53.896H20V223.936z M361.5,150.271
|
||||
v53.664H261v-53.664H361.5z M241,150.271v53.664H140.5v-53.664H241z M140.5,223.936H241v53.896H140.5V223.936z M261,223.936h100.5
|
||||
v53.896H261V223.936z M381.5,203.936v-53.664H482v53.664H381.5z M120.5,150.271v53.664H20v-53.664H120.5z M20,297.832h100.5
|
||||
v53.896H20V297.832z M140.5,297.832H241v53.896H140.5V297.832z M261,297.832h100.5v53.896H261V297.832z M381.5,297.832H482v53.896
|
||||
H381.5V297.832z M20,130.039V76.375h462v53.664H20z M20,371.729h100.5v53.896H20V371.729z M140.5,371.729H241v53.896H140.5
|
||||
V371.729z M261,371.729h100.5v53.896H261V371.729z M482,425.625H381.5v-53.896H482V425.625z"
|
||||
/>
|
||||
<path d="M209,107.625h192c5.522,0,10-4.477,10-10s-4.478-10-10-10H209c-5.522,0-10,4.477-10,10S203.478,107.625,209,107.625z" />
|
||||
<path d="M436,107.625h22c5.522,0,10-4.477,10-10s-4.478-10-10-10h-22c-5.522,0-10,4.477-10,10S430.478,107.625,436,107.625z" />
|
||||
</g>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
|
||||
export { default as TableIcon } from "./TableIcon";
|
||||
|
||||
Reference in New Issue
Block a user