Skip to content

Commit 1568aad

Browse files
committed
Progress on browser support
1 parent e148cbd commit 1568aad

File tree

9 files changed

+321
-8
lines changed

9 files changed

+321
-8
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,6 @@
2929
[![react.js](https://www.vectorlogo.zone/logos/reactjs/reactjs-ar21.svg)](https://reactjs.org/ "UI Framework")
3030
[![TypeScript](https://www.vectorlogo.zone/logos/typescriptlang/typescriptlang-ar21.svg)](https://www.typescriptlang.org/ "Programming Language")
3131
[![SimpleShare.dev](https://www.vectorlogo.zone/logos/simplesharedev/simplesharedev-ar21.svg)](http://simpleshare.dev/ "Privacy-friendly sharing links")
32-
[![VectorLogoZone](https://www.vectorlogo.zone/logos/vectorlogozone/vectorlogozone-ar21.svg)](https://www.vectorlogo.zone/ "Logos")
32+
[![svgrepo](https://www.vectorlogo.zone/logos/svgrepo/svgrepo-ar21.svg)](https://www.svgrepo.com/svg/249535/browser-accept "browser icon (modified)")
33+
[![VectorLogoZone](https://www.vectorlogo.zone/logos/vectorlogozone/vectorlogozone-ar21.svg)](https://www.vectorlogo.zone/ "Logos")
34+

docker-run.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ docker build \
1515
#exit 0
1616

1717
docker run \
18-
--env PORT='4000' \
18+
--env PORT=4000 \
1919
--expose 4000 \
20+
--interactive \
2021
--publish 4000:4000 \
22+
--rm \
23+
--tty \
2124
regexplanet-next

public/images/browsers/browser-ar21.svg

Lines changed: 153 additions & 0 deletions
Loading

public/images/browsers/browser-icon.svg

Lines changed: 149 additions & 0 deletions
Loading

src/app/advanced/[engine]/index.html/TestForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function TestForm(props: TestFormProps) {
3838
const [testInput, setTestInput] = useState<TestInput>(props.testInput);
3939

4040
const inputRows = testInput.inputs.map((input, index) => (
41-
<div className="mb-2" key={`key${index}`}>
41+
<div className="mb-2" key={`ikey${index}`}>
4242
{index <= 0 ? <label htmlFor={`row${index}`} className="col-sm-2 col-form-label">Inputs</label> : <></> }
4343
<input type="text" className="form-control" id={`input${index}`} name="input" defaultValue={input} />
4444
</div>

src/app/share/index.html/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ async function lookupShareCode(shareCode: string): Promise<ShareFormState> {
1818
};
1919
}
2020
//shareCode = "yyyyfud6z4r";
21-
const response = await fetch(`https://www.regexplanet.com/share/index.json?share=${shareCode}`);
21+
const shareApiUrl = shareCode.indexOf('-') === -1
22+
? `https://appengine.regexplanet.com/share/index.json?share=${shareCode}`
23+
: `https://www.regex.zone/share/lookup.json?share=${shareCode}`;
24+
const response = await fetch(shareApiUrl);
2225
const data = await response.json();
2326
console.log(`server response=${JSON.stringify(data)}`);
2427
if (data.success) {

src/components/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function Footer() {
1818
{link.label}
1919
</Link>);
2020
if (index < links.length - 1) {
21-
initial.push(<span className="mx-1" key={`key${index}`}>|</span>);
21+
initial.push(<span className="mx-1" key={`fkey${index}`}>|</span>);
2222
}
2323
}
2424
);

src/engines/browser.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ export const browser: RegexEngine = {
2222
handle: "browser",
2323
level: "alpha",
2424
links: {},
25-
logo_icon: "https://www.vectorlogo.zone/logos/firefox/firefox-icon.svg", // LATER: dynamic
26-
logo_ar21: "https://www.vectorlogo.zone/logos/firefox/firefox-ar21.svg", // LATER: dynamic
25+
logo_icon: "/images/browsers/browser-icon.svg",
26+
logo_ar21: "/images/browsers/browser-ar21.svg",
2727
nodeping_url: undefined,
28+
notfound: ["javascript", "typescript"],
2829
options: [
2930
{
3031
code: "d",
@@ -63,7 +64,7 @@ export const browser: RegexEngine = {
6364
short_name: "Your Browser",
6465
source_url: "https://github.com/regexplanet/regexplanet-next",
6566
status_url: undefined,
66-
//test_url: "javascript:browserTest",
67+
test_url: "javascript:",
6768
};
6869

6970

src/engines/dotnet.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ export const dotnet: RegexEngine = {
2222
logo_ar21: "https://www.vectorlogo.zone/logos/dotnet/dotnet-ar21.svg",
2323
options: [],
2424
short_name: ".NET",
25+
status_url: "https://dotnet.gcr.regexplanet.com/status.json",
26+
test_url: "https://dotnet.gcr.regexplanet.com/test.json",
2527
};

0 commit comments

Comments
 (0)