From 4c338c6e038433b7497d48a7f8888cfcda1a1018 Mon Sep 17 00:00:00 2001
From: George Tsiolis <tsiolis.g@gmail.com>
Date: Mon, 21 Nov 2022 16:54:36 +0000
Subject: [PATCH] Revert removing the workspace download feature

Reverts https://github.com/gitpod-io/gitpod/pull/14393
---
 .../src/workspaces/WorkspaceEntry.tsx         | 23 ++++++-------------
 1 file changed, 7 insertions(+), 16 deletions(-)

diff --git a/components/dashboard/src/workspaces/WorkspaceEntry.tsx b/components/dashboard/src/workspaces/WorkspaceEntry.tsx
index a5575324e0044b..532f8188e7d944 100644
--- a/components/dashboard/src/workspaces/WorkspaceEntry.tsx
+++ b/components/dashboard/src/workspaces/WorkspaceEntry.tsx
@@ -57,6 +57,11 @@ export function WorkspaceEntry({ desc, model, isAdmin, stopWorkspace }: Props) {
         pathname: "/start/",
         hash: "#" + ws.id,
     });
+    const downloadURL = new GitpodHostUrl(window.location.href)
+        .with({
+            pathname: `/workspace-download/get/${ws.id}`,
+        })
+        .toString();
     const menuEntries: ContextMenuEntry[] = [
         {
             title: "Open",
@@ -86,22 +91,8 @@ export function WorkspaceEntry({ desc, model, isAdmin, stopWorkspace }: Props) {
     }
     menuEntries.push({
         title: "Download",
-        customContent: (
-            <div className="">
-                <span className="block text-gray-300 dark:text-gray-500">Download</span>
-                <span className="text-gray-400">
-                    Deprecated.{" "}
-                    <a
-                        href="https://github.com/gitpod-io/gitpod/issues/7901"
-                        className="gp-link"
-                        target="_blank"
-                        rel="noreferrer"
-                    >
-                        Learn more
-                    </a>
-                </span>
-            </div>
-        ),
+        href: downloadURL,
+        download: `${ws.id}.tar`,
     });
     if (!isAdmin) {
         menuEntries.push(