diff --git a/src/components/PageEdit.tsx b/src/components/PageEdit.tsx
index defb2a1..64a8906 100644
--- a/src/components/PageEdit.tsx
+++ b/src/components/PageEdit.tsx
@@ -1,17 +1,18 @@
import React from "react";
import { useState, useEffect } from "react";
-import { Input, Tab, TabList, Toolbar, Tooltip } from "@fluentui/react-components";
+import { Badge, Input, Tab, TabList, Toolbar, Tooltip } from "@fluentui/react-components";
import {
// ArrowDownloadRegular,
PlayRegular,
ClipboardRegular,
DeleteRegular,
// BookDefault28Regular,
- // DocumentFolderRegular,
+ DocumentRegular,
+ DocumentFolderRegular,
// SettingsRegular,
} from "@fluentui/react-icons";
-import { SnipWithSource, completeSnip, getExportSnipFromExportJson, getSnipExportJson } from "../core/Snip";
+import { SnipSource, SnipWithSource, completeSnip, getExportSnipFromExportJson, getSnipExportJson } from "../core/Snip";
import { saveCurrentSnipReference, saveCurrentSnipToRun } from "../core/storage";
import { TooltipButton } from "./TooltipButton";
import { updateMonacoLibs } from "../core/updateMonacoLibs";
@@ -140,6 +141,9 @@ export function PageEdit({ initialSnip }: { initialSnip: SnipWithSource }) {
} />
*/}
} onClick={buttonDeleteSnip} />
+
+ {/** Label */}
+ {getSourceBadge(snip)}
);
}
+
+function getSourceBadge(snip: SnipWithSource) {
+ const iconLocal = ;
+ const iconEmbed = ;
+
+ function getIconForSource(source: SnipSource) {
+ switch (source) {
+ case "local":
+ return iconLocal;
+ case "embed":
+ return iconEmbed;
+ default:
+ console.log("Unknown Source");
+ return iconLocal;
+ }
+ }
+ const source = snip.source;
+ return (
+
+
+ {source}
+
+
+ );
+}