@@ -287,6 +287,7 @@ renderObjectSelector statements activeObjectName = [hsx|
|]
where
contextMenuId = "context-menu-" <> tshow id
+
renderObject Comment {} id = mempty
renderObject AddConstraint {} id = mempty
renderObject CreateExtension {} id = mempty
@@ -341,3 +342,30 @@ getDefaultValue :: Text -> Text -> Maybe Expression
getDefaultValue columnType value = case Megaparsec.runParser Parser.expression "" value of
Left _ -> Nothing
Right expression -> Just expression
+
+-- | https://github.com/postgres/pgadmin4/blob/master/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/img/table.svg
+tableIcon = preEscapedToHtml [plain||]
+
+-- | https://github.com/postgres/pgadmin4/blob/master/web/pgadmin/browser/server_groups/servers/databases/schemas/types/static/img/type.svg
+enumIcon = preEscapedToHtml [plain||]
+
+-- | https://github.com/postgres/pgadmin4/blob/master/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/img/index.svg
+indexIcon = preEscapedToHtml [plain||]
+
+-- | https://github.com/postgres/pgadmin4/blob/master/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/img/unique_constraint.svg
+uniqueIndexIcon = preEscapedToHtml [plain||]
+
+-- | https://github.com/postgres/pgadmin4/blob/master/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/static/img/check-constraint.svg
+constraintIcon = preEscapedToHtml [plain||]
+
+-- | https://github.com/postgres/pgadmin4/blob/master/web/pgadmin/browser/server_groups/servers/databases/languages/static/img/language.svg
+commentIcon = preEscapedToHtml [plain||]
+
+-- | https://github.com/postgres/pgadmin4/blob/master/web/pgadmin/browser/server_groups/servers/databases/extensions/static/img/extension.svg
+extensionIcon = preEscapedToHtml [plain||]
+
+-- | https://github.com/postgres/pgadmin4/blob/master/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/img/function.svg
+functionIcon = preEscapedToHtml [plain||]
+
+-- | https://github.com/postgres/pgadmin4/blob/master/web/pgadmin/misc/static/explain/img/ex_unknown.svg
+unknownIcon = preEscapedToHtml [plain||]
diff --git a/LICENSE-3RD-PARTY b/LICENSE-3RD-PARTY
new file mode 100644
index 000000000..006987e0e
--- /dev/null
+++ b/LICENSE-3RD-PARTY
@@ -0,0 +1,20 @@
+Schema Editor uses some Icons from pgadmin4
+https://github.com/postgres/pgadmin4
+
+ Copyright (C) 2013 - 2021, The pgAdmin Development Team
+
+ Permission to use, copy, modify, and distribute this software and its
+ documentation for any purpose, without fee, and without a written agreement is
+ hereby granted, provided that the above copyright notice and this paragraph and
+ the following two paragraphs appear in all copies.
+
+ IN NO EVENT SHALL THE PGADMIN DEVELOPMENT TEAM BE LIABLE TO ANY PARTY FOR
+ DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST
+ PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
+ THE PGADMIN DEVELOPMENT TEAM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ THE PGADMIN DEVELOPMENT TEAM SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND
+ THE PGADMIN DEVELOPMENT TEAM HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
+ UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
diff --git a/lib/IHP/static/IDE/schema-designer.css b/lib/IHP/static/IDE/schema-designer.css
index ec2e2f5d4..24bd313f0 100644
--- a/lib/IHP/static/IDE/schema-designer.css
+++ b/lib/IHP/static/IDE/schema-designer.css
@@ -37,6 +37,11 @@
transition: color 0.1s;
}
+.object svg {
+ margin-right: 0.1rem;
+ width:24px;
+}
+
.object-selector, .column-selector, .visual-error {
border: 1px solid #d5d4d5;
user-select: none;
@@ -164,4 +169,4 @@
#schema-designer-viewer {
margin-bottom: 200px; /* Make sure the context menu has a bit of space, see https://github.com/digitallyinduced/ihp/issues/895 */
-}
\ No newline at end of file
+}