From 207982b6288f3c3f616d66d95f6577b9856083d4 Mon Sep 17 00:00:00 2001
From: Han Wang <44352119+hanywang2@users.noreply.github.com>
Date: Tue, 5 Jul 2022 16:00:10 -0400
Subject: [PATCH] Display connections list (#120)
* Add community link and setup for treeview
* Add icon for tree view
* Add icons to groups
* List docs in activity bar
* Add prefill doc
* Add UI for selected doc
* Create docs on selected doc or input
* Revert ISDev to false
* Remove settings.json
* Add setup to refresh documents
* Add new view for connections
* Add display of connections
* Add connections list display
* Update readme and sidebar title
* Update connections on auth and logout
* Add Discord to README
---
server/src/routes/links.ts | 9 +-
vscode/README.md | 4 +-
vscode/assets/icons/connect-dark.svg | 4 +
vscode/assets/icons/connect.svg | 4 +
vscode/assets/icons/github.svg | 4 +-
vscode/package.json | 16 ++-
vscode/src/components/viewProvider.ts | 4 +-
vscode/src/extension.ts | 31 +++++-
vscode/src/treeviews/connections.ts | 126 ++++++----------------
vscode/src/treeviews/documents.ts | 148 ++++++++++++++++++++++++++
vscode/src/utils/git.ts | 104 +++++++++---------
11 files changed, 291 insertions(+), 163 deletions(-)
create mode 100644 vscode/assets/icons/connect-dark.svg
create mode 100644 vscode/assets/icons/connect.svg
create mode 100644 vscode/src/treeviews/documents.ts
diff --git a/server/src/routes/links.ts b/server/src/routes/links.ts
index 85b85f0..937955c 100644
--- a/server/src/routes/links.ts
+++ b/server/src/routes/links.ts
@@ -12,10 +12,17 @@ linksRouter.get('/', userMiddleware, async (req, res) => {
const { org } = res.locals.user;
let matchQuery: any = { org: org._id };
- if (req.query?.repo && req.query?.gitOrg) {
+ if (req.query?.repo) {
matchQuery.repo = req.query.repo;
+ }
+
+ if (req.query?.gitOrg) {
matchQuery.gitOrg = req.query.gitOrg;
}
+
+ if (req.query?.file) {
+ matchQuery.file = req.query.file;
+ }
try {
const codes = await Code.aggregate([
diff --git a/vscode/README.md b/vscode/README.md
index 6de8055..2957fd1 100644
--- a/vscode/README.md
+++ b/vscode/README.md
@@ -1,6 +1,6 @@
-# 🌿 Document Connect
+# 🌿 Document Connector
-![](https://img.shields.io/github/checks-status/mintlify/mintlify/38f1d5b1fd9397e56f5da3ec2d254b09859a579f) [![Stars](https://img.shields.io/github/stars/mintlify/mintlify?style=social)](https://github.com/mintlify/mintlify) [![Twitter](https://img.shields.io/twitter/follow/mintlify?style=social)](https://twitter.com/mintlify)
+![](https://img.shields.io/github/checks-status/mintlify/mintlify/38f1d5b1fd9397e56f5da3ec2d254b09859a579f) [![discord](https://img.shields.io/discord/911693009253466123?logo=Discord&logoColor=white)](https://discord.gg/6W7GuYuxra) [![Stars](https://img.shields.io/github/stars/mintlify/mintlify?style=social)](https://github.com/mintlify/mintlify) [![Twitter](https://img.shields.io/twitter/follow/mintlify?style=social)](https://twitter.com/mintlify)
Link documentation to your codebase
diff --git a/vscode/assets/icons/connect-dark.svg b/vscode/assets/icons/connect-dark.svg
new file mode 100644
index 0000000..56d7668
--- /dev/null
+++ b/vscode/assets/icons/connect-dark.svg
@@ -0,0 +1,4 @@
+
diff --git a/vscode/assets/icons/connect.svg b/vscode/assets/icons/connect.svg
new file mode 100644
index 0000000..c8e1c83
--- /dev/null
+++ b/vscode/assets/icons/connect.svg
@@ -0,0 +1,4 @@
+
diff --git a/vscode/assets/icons/github.svg b/vscode/assets/icons/github.svg
index a8d1174..d6386b7 100644
--- a/vscode/assets/icons/github.svg
+++ b/vscode/assets/icons/github.svg
@@ -1,3 +1,3 @@
-