diff --git a/Makefile b/Makefile index 13ce153..1346601 100644 --- a/Makefile +++ b/Makefile @@ -120,6 +120,11 @@ check-default-ports: @lsof -i:8080 > /dev/null && (echo "Port 8080 already in use"; exit 1) || true @lsof -i:8081 > /dev/null && (echo "Port 8081 already in use"; exit 1) || true +.PHONY: optimize +optimize: + find client/assets/ -iname '*.png' -print0 | xargs -0 -n1 optipng -strip all + find docs/ -iname '*.png' -print0 | xargs -0 -n1 optipng -strip all + # The following targets are only available for CI usage build/smocker.tar.gz: diff --git a/client/assets/logo.png b/client/assets/logo.png index 85d2ecb..8abc8a0 100644 Binary files a/client/assets/logo.png and b/client/assets/logo.png differ diff --git a/client/assets/logo180.png b/client/assets/logo180.png new file mode 100644 index 0000000..c9f875a Binary files /dev/null and b/client/assets/logo180.png differ diff --git a/client/components/History.tsx b/client/components/History.tsx index 5ef3254..5b9a8aa 100644 --- a/client/components/History.tsx +++ b/client/components/History.tsx @@ -17,6 +17,7 @@ import { Typography, } from "antd"; import dayjs from "dayjs"; +import { getReasonPhrase } from "http-status-codes"; import yaml from "js-yaml"; import orderBy from "lodash/orderBy"; import * as React from "react"; @@ -65,6 +66,16 @@ const EntryComponent = React.memo( responseStatusColor = "orange"; } } + + let responseStatusTitle = "Unknown HTTP status code"; + try { + responseStatusTitle = getReasonPhrase(value.response.status); + } catch { + if (value.response.status >= 600) { + responseStatusTitle = "Smocker error"; + } + } + return (
@@ -104,8 +115,10 @@ const EntryComponent = React.memo(
{value.context.mock_type === "proxy" && Proxified} - {value.response.status} - {value.response.status > 600 && ( + + {value.response.status} + + {value.response.status >= 600 && ( diff --git a/client/components/Navbar.tsx b/client/components/Navbar.tsx index ac0b0c7..da38096 100644 --- a/client/components/Navbar.tsx +++ b/client/components/Navbar.tsx @@ -1,7 +1,7 @@ import { Layout, Menu, Row } from "antd"; import * as React from "react"; import { Link, useLocation } from "react-router-dom"; -import Logo from "../assets/logo.png"; +import Logo from "../assets/logo180.png"; import { cleanQueryParams } from "../modules/utils"; import "./Navbar.scss"; diff --git a/client/index.html b/client/index.html index 0328c7f..23837e7 100644 --- a/client/index.html +++ b/client/index.html @@ -1,10 +1,15 @@ + - - + + + Smocker diff --git a/docs/.vuepress/public/logo/cover.png b/docs/.vuepress/public/logo/cover.png index 7cf4c21..6aaa7aa 100644 Binary files a/docs/.vuepress/public/logo/cover.png and b/docs/.vuepress/public/logo/cover.png differ diff --git a/docs/.vuepress/public/logo/favicon/android-chrome-192x192.png b/docs/.vuepress/public/logo/favicon/android-chrome-192x192.png index d33a9bb..222d8df 100644 Binary files a/docs/.vuepress/public/logo/favicon/android-chrome-192x192.png and b/docs/.vuepress/public/logo/favicon/android-chrome-192x192.png differ diff --git a/docs/.vuepress/public/logo/favicon/android-chrome-512x512.png b/docs/.vuepress/public/logo/favicon/android-chrome-512x512.png index 7da2a0f..97fc55d 100644 Binary files a/docs/.vuepress/public/logo/favicon/android-chrome-512x512.png and b/docs/.vuepress/public/logo/favicon/android-chrome-512x512.png differ diff --git a/docs/.vuepress/public/logo/favicon/apple-touch-icon.png b/docs/.vuepress/public/logo/favicon/apple-touch-icon.png index c98ea43..aedb808 100644 Binary files a/docs/.vuepress/public/logo/favicon/apple-touch-icon.png and b/docs/.vuepress/public/logo/favicon/apple-touch-icon.png differ diff --git a/docs/.vuepress/public/logo/favicon/favicon-16x16.png b/docs/.vuepress/public/logo/favicon/favicon-16x16.png index 216c5c9..8336d9c 100644 Binary files a/docs/.vuepress/public/logo/favicon/favicon-16x16.png and b/docs/.vuepress/public/logo/favicon/favicon-16x16.png differ diff --git a/docs/.vuepress/public/logo/favicon/favicon-32x32.png b/docs/.vuepress/public/logo/favicon/favicon-32x32.png index 026d311..dcf88e5 100644 Binary files a/docs/.vuepress/public/logo/favicon/favicon-32x32.png and b/docs/.vuepress/public/logo/favicon/favicon-32x32.png differ diff --git a/docs/.vuepress/public/logo/favicon/mstile-150x150.png b/docs/.vuepress/public/logo/favicon/mstile-150x150.png index 87249fc..3dea086 100644 Binary files a/docs/.vuepress/public/logo/favicon/mstile-150x150.png and b/docs/.vuepress/public/logo/favicon/mstile-150x150.png differ diff --git a/docs/.vuepress/public/logo/logo-h280.png b/docs/.vuepress/public/logo/logo-h280.png index 851ced4..f4a0ad5 100644 Binary files a/docs/.vuepress/public/logo/logo-h280.png and b/docs/.vuepress/public/logo/logo-h280.png differ diff --git a/docs/.vuepress/public/logo/logo-h50.png b/docs/.vuepress/public/logo/logo-h50.png index d230c58..b814ec5 100644 Binary files a/docs/.vuepress/public/logo/logo-h50.png and b/docs/.vuepress/public/logo/logo-h50.png differ diff --git a/docs/.vuepress/public/logo/logo-horizontal.png b/docs/.vuepress/public/logo/logo-horizontal.png index d74d3f4..59d7b8f 100644 Binary files a/docs/.vuepress/public/logo/logo-horizontal.png and b/docs/.vuepress/public/logo/logo-horizontal.png differ diff --git a/docs/.vuepress/public/logo/logo-vertical.png b/docs/.vuepress/public/logo/logo-vertical.png index e9c5ded..432ba09 100644 Binary files a/docs/.vuepress/public/logo/logo-vertical.png and b/docs/.vuepress/public/logo/logo-vertical.png differ diff --git a/docs/.vuepress/public/logo/logo-w500.png b/docs/.vuepress/public/logo/logo-w500.png index c5fb56d..8dd92c1 100644 Binary files a/docs/.vuepress/public/logo/logo-w500.png and b/docs/.vuepress/public/logo/logo-w500.png differ diff --git a/docs/.vuepress/public/screenshots/screenshot-add-mocks.png b/docs/.vuepress/public/screenshots/screenshot-add-mocks.png index 17c3418..e380257 100644 Binary files a/docs/.vuepress/public/screenshots/screenshot-add-mocks.png and b/docs/.vuepress/public/screenshots/screenshot-add-mocks.png differ diff --git a/docs/.vuepress/public/screenshots/screenshot-empty-history.png b/docs/.vuepress/public/screenshots/screenshot-empty-history.png index 54ba19d..340b81b 100644 Binary files a/docs/.vuepress/public/screenshots/screenshot-empty-history.png and b/docs/.vuepress/public/screenshots/screenshot-empty-history.png differ diff --git a/docs/.vuepress/public/screenshots/screenshot-empty-mocks.png b/docs/.vuepress/public/screenshots/screenshot-empty-mocks.png index 838b616..e27048c 100644 Binary files a/docs/.vuepress/public/screenshots/screenshot-empty-mocks.png and b/docs/.vuepress/public/screenshots/screenshot-empty-mocks.png differ diff --git a/docs/.vuepress/public/screenshots/screenshot-hello-world-200.png b/docs/.vuepress/public/screenshots/screenshot-hello-world-200.png index 6515b78..5fa46c7 100644 Binary files a/docs/.vuepress/public/screenshots/screenshot-hello-world-200.png and b/docs/.vuepress/public/screenshots/screenshot-hello-world-200.png differ diff --git a/docs/.vuepress/public/screenshots/screenshot-hello-world-666.png b/docs/.vuepress/public/screenshots/screenshot-hello-world-666.png index 8e7a31e..406b52c 100644 Binary files a/docs/.vuepress/public/screenshots/screenshot-hello-world-666.png and b/docs/.vuepress/public/screenshots/screenshot-hello-world-666.png differ diff --git a/docs/.vuepress/public/screenshots/screenshot-history-666.png b/docs/.vuepress/public/screenshots/screenshot-history-666.png index 7d73c24..12c87e6 100644 Binary files a/docs/.vuepress/public/screenshots/screenshot-history-666.png and b/docs/.vuepress/public/screenshots/screenshot-history-666.png differ diff --git a/docs/.vuepress/public/screenshots/screenshot-history-visualize.png b/docs/.vuepress/public/screenshots/screenshot-history-visualize.png index 7224708..11bc41e 100644 Binary files a/docs/.vuepress/public/screenshots/screenshot-history-visualize.png and b/docs/.vuepress/public/screenshots/screenshot-history-visualize.png differ diff --git a/docs/.vuepress/public/screenshots/screenshot-history.png b/docs/.vuepress/public/screenshots/screenshot-history.png index f8a82ff..214469b 100644 Binary files a/docs/.vuepress/public/screenshots/screenshot-history.png and b/docs/.vuepress/public/screenshots/screenshot-history.png differ diff --git a/docs/.vuepress/public/screenshots/screenshot-mocks.png b/docs/.vuepress/public/screenshots/screenshot-mocks.png index df55bd8..0462969 100644 Binary files a/docs/.vuepress/public/screenshots/screenshot-mocks.png and b/docs/.vuepress/public/screenshots/screenshot-mocks.png differ diff --git a/docs/.vuepress/public/screenshots/screenshot-sessions.png b/docs/.vuepress/public/screenshots/screenshot-sessions.png index a6ea610..2a8fc4f 100644 Binary files a/docs/.vuepress/public/screenshots/screenshot-sessions.png and b/docs/.vuepress/public/screenshots/screenshot-sessions.png differ