remove old wiki links & use new open in new tab icon

This commit is contained in:
Sidney Alcantara
2021-09-29 17:33:02 +10:00
parent 6c14cecd51
commit 60fa342485
13 changed files with 23 additions and 39 deletions

View File

@@ -1,5 +1,5 @@
import { Stack, Typography, Grid, Tooltip, Chip, Button } from "@mui/material";
import OpenIcon from "@mui/icons-material/OpenInNew";
import InlineOpenInNewIcon from "components/InlineOpenInNewIcon";
export interface ICodeEditorHelperProps {
docLink: string;
additionalVariables?: {
@@ -67,12 +67,13 @@ export default function CodeEditorHelper({
<Button
size="small"
endIcon={<OpenIcon />}
target="_blank"
rel="noopener noreferrer"
href={docLink}
style={{ flexShrink: 0 }}
>
Examples & docs
<InlineOpenInNewIcon />
</Button>
</Stack>
);

View File

@@ -3,7 +3,7 @@ import EmptyState, { IEmptyStateProps } from "./EmptyState";
import { Button } from "@mui/material";
import ReloadIcon from "@mui/icons-material/Refresh";
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
import InlineOpenInNewIcon from "components/InlineOpenInNewIcon";
import meta from "../../package.json";
class ErrorBoundary extends React.Component<
IEmptyStateProps & { render?: (errorMessage: string) => React.ReactNode }
@@ -48,9 +48,9 @@ class ErrorBoundary extends React.Component<
}
target="_blank"
rel="noopener noreferrer"
endIcon={<OpenInNewIcon />}
>
Report issue
<InlineOpenInNewIcon />
</Button>
)}
</>

View File

@@ -28,7 +28,7 @@ export default function AccessDenied() {
<Typography>
If you are the project owner, please follow{" "}
<MuiLink
href={WIKI_LINKS.securityRules}
href={WIKI_LINKS.setupRoles}
target="_blank"
rel="noopener noreferrer"
>

View File

@@ -165,14 +165,12 @@ export default function About() {
</LoadingButton>
) : (
<Button
href={WIKI_LINKS.updating}
href={WIKI_LINKS.setupUpdate}
target="_blank"
rel="noopener noreferrer"
endIcon={
<InlineOpenInNewIcon sx={{ fontSize: "18px !important" }} />
}
>
How to update
<InlineOpenInNewIcon />
</Button>
)}
</Grid>

View File

@@ -5,7 +5,7 @@ import { ISetupStepBodyProps } from "pages/Setup";
import { Button, Typography, Stack, TextField } from "@mui/material";
import LoadingButton from "@mui/lab/LoadingButton";
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
import InlineOpenInNewIcon from "components/InlineOpenInNewIcon";
import SetupItem from "./SetupItem";
@@ -62,7 +62,7 @@ export default function Step1RowyRun({
if (!isValidRowyRunUrl && paramsRowyRunUrl) console.log(paramsRowyRunUrl);
}, [paramsRowyRunUrl, isValidRowyRunUrl]);
const deployButton = !window.location.hostname.includes(
const deployButton = window.location.hostname.includes(
EXTERNAL_LINKS.rowyAppHostName
) ? (
<a
@@ -83,9 +83,9 @@ export default function Step1RowyRun({
href={EXTERNAL_LINKS.rowyRunDocs}
target="_blank"
rel="noopener noreferrer"
endIcon={<OpenInNewIcon />}
>
Deploy instructions
<InlineOpenInNewIcon />
</Button>
);

View File

@@ -3,7 +3,6 @@ import { ISetupStepBodyProps } from "pages/Setup";
import { Typography, Link, Stack } from "@mui/material";
import LoadingButton from "@mui/lab/LoadingButton";
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
import InlineOpenInNewIcon from "components/InlineOpenInNewIcon";
import SetupItem from "./SetupItem";
@@ -102,9 +101,9 @@ export default function Step2ServiceAccount({
href={`https://console.cloud.google.com/run/deploy/${region}/rowy-run?project=${projectId}`}
target="_blank"
rel="noopener noreferrer"
endIcon={<OpenInNewIcon />}
>
Set up service account
<InlineOpenInNewIcon />
</LoadingButton>
<LoadingButton
variant="contained"
@@ -121,7 +120,7 @@ export default function Step2ServiceAccount({
Some roles are missing. Also make sure your Firebase project has
Firestore and Authentication enabled.{" "}
<Link
href={WIKI_LINKS.firebaseProject}
href={WIKI_LINKS.setupFirebaseProject}
target="_blank"
rel="noopener noreferrer"
color="text.primary"

View File

@@ -3,7 +3,7 @@ import { ISetupStepBodyProps } from "pages/Setup";
import { Typography, Stack, Button, IconButton } from "@mui/material";
import LoadingButton from "@mui/lab/LoadingButton";
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
import InlineOpenInNewIcon from "components/InlineOpenInNewIcon";
import SetupItem from "./SetupItem";
import SignInWithGoogle from "./SignInWithGoogle";
@@ -99,9 +99,9 @@ export default function Step3ProjectOwner({
}/authentication/providers`}
target="_blank"
rel="noopener noreferrer"
endIcon={<OpenInNewIcon />}
>
Set up in Firebase Console
<InlineOpenInNewIcon />
</Button>
<Button

View File

@@ -146,7 +146,7 @@ export default function DefaultValueInput({
{config.defaultValue?.type === "dynamic" && (
<>
<CodeEditorHelper docLink={WIKI_LINKS.defaultValues} />
<CodeEditorHelper docLink={WIKI_LINKS.howToDefaultValues} />
<div className={classes.codeEditorContainer}>
<CodeEditor
height={120}

View File

@@ -4,7 +4,7 @@ import firebase from "firebase/app";
import { Button, Link, Typography } from "@mui/material";
import LoadingButton from "@mui/lab/LoadingButton";
import DownloadIcon from "@mui/icons-material/FileDownloadOutlined";
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
import InlineOpenInNewIcon from "components/InlineOpenInNewIcon";
import GoIcon from "@mui/icons-material/ChevronRight";
import Modal from "components/Modal";
@@ -126,14 +126,7 @@ export default function ExtensionMigration({
display="block"
>
Read the Extensions documentation
<OpenInNewIcon
aria-label="Open in new tab"
sx={{
fontSize: "1rem",
ml: 0.5,
verticalAlign: "middle",
}}
/>
<InlineOpenInNewIcon />
</Link>
<LoadingButton

View File

@@ -61,7 +61,7 @@ const Settings = ({ config, handleChange }) => {
<div>
<InputLabel>Derivative script</InputLabel>
<CodeEditorHelper docLink={WIKI_LINKS.derivatives} />
<CodeEditorHelper docLink={WIKI_LINKS.fieldTypesDerivative} />
<Suspense fallback={<FieldSkeleton height={200} />}>
<CodeEditor
script={config.script}

View File

@@ -46,13 +46,6 @@ const WIKI_PATHS = {
extensionsSendgridEmail: "/extensions/sendgrid-email",
extensionsTwilioMessage: "/extensions/twilio-message",
extensionsSlackMessage: "/extensions/slack-message",
updating: "/Updating",
derivatives: "/field-types/derivative",
defaultValues: "/Default-Values",
functions: "/Cloud-Functions",
securityRules: "/Role-Based-Security-Rules",
setUpAuth: "/Setting-Up-Firebase-Authentication",
};
export const WIKI_LINKS = _mapValues(
WIKI_PATHS,

View File

@@ -1,5 +1,5 @@
import { Button } from "@mui/material";
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
import InlineOpenInNewIcon from "components/InlineOpenInNewIcon";
import AuthLayout from "components/Auth/AuthLayout";
@@ -20,12 +20,12 @@ export default function AuthSetupGuide() {
<Button
variant="contained"
color="primary"
endIcon={<OpenInNewIcon />}
href={WIKI_LINKS.setUpAuth}
href={WIKI_LINKS.setupFirebaseProject}
target="_blank"
rel="noopener noreferrer"
>
Setup guide
<InlineOpenInNewIcon />
</Button>
</AuthLayout>
);

View File

@@ -88,7 +88,7 @@ export default function DeployPage() {
<Typography sx={{ mt: 3 }}>
Dont have a project? Follow our{" "}
<Link
href={WIKI_LINKS.firebaseProject}
href={WIKI_LINKS.setupFirebaseProject}
target="_blank"
rel="noopener noreferrer"
>