diff --git a/src/components/FullPlayground.tsx b/src/components/FullPlayground.tsx
index 373b247..909919e 100644
--- a/src/components/FullPlayground.tsx
+++ b/src/components/FullPlayground.tsx
@@ -11,8 +11,7 @@ import { useZedTerminalService } from "../spicedb-common/services/zedterminalser
import { parseValidationYAML } from "../spicedb-common/validationfileformat";
import { LinearProgress, Tab, Tabs, Tooltip } from "@material-ui/core";
import AppBar from "@material-ui/core/AppBar";
-import Button from "@material-ui/core/Button";
-import ButtonGroup from "@material-ui/core/ButtonGroup";
+import { Button } from "@/components/ui/button";
import TextField from "@material-ui/core/TextField";
import {
Theme,
@@ -268,22 +267,6 @@ const useStyles = makeStyles((theme: Theme) =>
height: "60vh",
width: "100%",
},
- hideTextOnMed: {
- [theme.breakpoints.down("md")]: {
- justifyContent: "flex-start",
- overflow: "hidden",
- width: "28px",
- minWidth: "28px",
- "& .MuiButton-label": {
- justifyContent: "flex-start",
- overflow: "hidden",
- width: "28px",
- "& .MuiButton-startIcon.MuiButton-iconSizeSmall": {
- marginLeft: "0px",
- },
- },
- },
- },
hide: {
display: "none",
},
@@ -295,18 +278,6 @@ const useStyles = makeStyles((theme: Theme) =>
gridTemplateColumns: "1fr auto",
alignItems: "center",
},
- btnAccept: {
- "& .MuiSvgIcon-root": {
- fill: theme.palette.success.main,
- },
- color: theme.palette.getContrastText(theme.palette.success.main),
- },
- btnRevert: {
- "& .MuiSvgIcon-root": {
- fill: theme.palette.error.main,
- },
- color: theme.palette.getContrastText(theme.palette.error.main),
- },
tenantGraphContainer: {
width: "100%",
height: "100%",
@@ -759,59 +730,59 @@ export function ThemedAppView(props: { datastore: DataStore }) {
)}
{AppConfig().discord.inviteUrl ? (
-
) : (
)}
+ {isSharingEnabled && (
+
+ )}
- }
>
- Download
+
+ Download
}
>
- Load From File
+
+ Load From File
>
)}
@@ -888,11 +859,8 @@ export function ThemedAppView(props: { datastore: DataStore }) {
{currentItem?.kind === DataStoreItemKind.SCHEMA && (
- }
- >
+
)}
@@ -925,115 +893,110 @@ export function ThemedAppView(props: { datastore: DataStore }) {
)}
- {currentItem?.kind === DataStoreItemKind.ASSERTIONS && (
-
- )}
-
- {currentItem?.kind === DataStoreItemKind.EXPECTED_RELATIONS && (
-
- )}
+ {currentItem?.kind !== undefined &&
+ [
+ DataStoreItemKind.ASSERTIONS,
+ DataStoreItemKind.EXPECTED_RELATIONS,
+ ].includes(currentItem.kind) && (
+
+ )}
{currentItem?.kind === DataStoreItemKind.EXPECTED_RELATIONS &&
previousValidationForDiff === undefined && (
-
+ <>
}
onClick={() => handleGenerateAndUpdate(false)}
>
+
Re-Generate
}
onClick={() => handleGenerateAndUpdate(true)}
>
+
Compute and Diff
-
+ >
)}
{currentItem?.kind === DataStoreItemKind.EXPECTED_RELATIONS &&
previousValidationForDiff !== undefined && (
-
- }
- onClick={handleAcceptDiff}
- >
+ <>
+
- }
- onClick={handleRevertDiff}
- >
+
-
+ >
)}
{currentItem?.kind === DataStoreItemKind.SCHEMA && (
- }
- >
- Schema Development Guide
+
)}
{currentItem?.kind === DataStoreItemKind.RELATIONSHIPS && (
- }
- >
- Test Relationships Guide
+
)}
{currentItem?.kind === DataStoreItemKind.ASSERTIONS && (
- }
- >
- Assertions Guide
+
)}
{currentItem?.kind === DataStoreItemKind.EXPECTED_RELATIONS && (
- }
- >
- Expected Relations Guide
+
)}
diff --git a/src/components/InlinePlayground.tsx b/src/components/InlinePlayground.tsx
index 35a9b7b..d0cf448 100644
--- a/src/components/InlinePlayground.tsx
+++ b/src/components/InlinePlayground.tsx
@@ -4,7 +4,7 @@ import { parseSchema } from "../spicedb-common/parsers/dsl/dsl";
import { parseRelationships } from "../spicedb-common/parsing";
import { useDeveloperService } from "../spicedb-common/services/developerservice";
import AppBar from "@material-ui/core/AppBar";
-import Button from "@material-ui/core/Button";
+import { Button } from "@/components/ui/button";
import {
createStyles,
darken,
@@ -193,14 +193,15 @@ function InlinePlaygroundUI(props: { datastore: DataStore }) {
/>
diff --git a/src/components/ValidationButton.tsx b/src/components/ValidationButton.tsx
index 76c7661..e5e794f 100644
--- a/src/components/ValidationButton.tsx
+++ b/src/components/ValidationButton.tsx
@@ -1,5 +1,5 @@
import { DeveloperService } from "../spicedb-common/services/developerservice";
-import Button from "@material-ui/core/Button";
+import { Button } from "@/components/ui/button";
import { Theme, createStyles, makeStyles } from "@material-ui/core/styles";
import { fade } from "@material-ui/core/styles/colorManipulator";
import CheckCircleIcon from "@material-ui/icons/CheckCircle";
@@ -96,8 +96,7 @@ export function ValidateButton(props: {
"Validation not run"}
}
+ variant="secondary"
className={TourElementClass.run}
disabled={
props.developerService.state.status !== "ready" ||
@@ -105,6 +104,7 @@ export function ValidateButton(props: {
}
onClick={props.conductValidation}
>
+
Run