From 32465e9e84ba7f436f135c1cae7a5ed91fe9830b Mon Sep 17 00:00:00 2001 From: nikhilmaske-2001 Date: Sat, 9 Sep 2023 13:01:12 +0530 Subject: [PATCH] Feat: Added a basic regex tester page. Part of #72 --- src/components/Sidebar/sidebarLists.js | 5 ++ src/pages/RegexTester/index.vue | 86 ++++++++++++++++++++++++++ src/pages/RegexTester/style.css | 17 +++++ src/router/routes.js | 6 ++ 4 files changed, 114 insertions(+) create mode 100644 src/pages/RegexTester/index.vue create mode 100644 src/pages/RegexTester/style.css diff --git a/src/components/Sidebar/sidebarLists.js b/src/components/Sidebar/sidebarLists.js index d5b52f2..97bb435 100644 --- a/src/components/Sidebar/sidebarLists.js +++ b/src/components/Sidebar/sidebarLists.js @@ -55,4 +55,9 @@ export const sideBarList = [ iconClass: "bi bi-filetype-sql", route: "/sql-formatter", }, + { + name: "Regex Tester", + iconClass: "bi bi-regex", + route: "/regex-tester" + } ]; diff --git a/src/pages/RegexTester/index.vue b/src/pages/RegexTester/index.vue new file mode 100644 index 0000000..bd6063c --- /dev/null +++ b/src/pages/RegexTester/index.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/pages/RegexTester/style.css b/src/pages/RegexTester/style.css new file mode 100644 index 0000000..52ed751 --- /dev/null +++ b/src/pages/RegexTester/style.css @@ -0,0 +1,17 @@ +.fixed-textarea { + resize: none; + /* Prevent textarea from being resizable */ + height: auto; +} + +#stringInput { + height: 450px +} + +.match-found { + color: darkgreen; +} + +.match-not-found { + color: red; +} \ No newline at end of file diff --git a/src/router/routes.js b/src/router/routes.js index f6c0f70..d0f4f8a 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -10,6 +10,7 @@ import JSONToYAML from "../pages/JSONConverter/index.vue"; import JWTDebugger from "../pages/JWTDebugger/index.vue"; import SQLFormatter from "../pages/SQLFormatter/index.vue"; import Index from "../pages/Index/index.vue"; +import RegexTester from "../pages/RegexTester/index.vue"; const routes = [ { @@ -67,6 +68,11 @@ const routes = [ component: SQLFormatter, name: "SQL Formatter", }, + { + path: "/regex-tester", + component: RegexTester, + name: "Regex Tester" + }, // { // path: "/:slug",