Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display TXT records with mono space style #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Falci
Copy link

@Falci Falci commented Nov 23, 2021

image

@randomlogin randomlogin requested a review from Ximik November 24, 2021 01:24
@randomlogin
Copy link
Member

randomlogin commented Nov 24, 2021

Not quite sure why, but it renders the other way for me, with margin property being not in force.
image
Browser: chrome Version 92.0.4515.159, but same for firefox.

@@ -51,7 +53,7 @@ const renderRecord = (record: any) => {
resource = <div>IPV6 address: {record.address}</div>;
break;
case "TXT":
resource = <div>TXT: {record.txt}</div>;
resource = <div>TXT: <pre className="txt">{record.txt}</pre></div>;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you hate me if i think this formatting should be applied to all record types?

@Falci
Copy link
Author

Falci commented Dec 10, 2021

@randomlogin tested locally. Now it looks like the first screenshot

@Falci
Copy link
Author

Falci commented Dec 10, 2021

I didn't realised before, but this project uses styleName instead of className.
The css selectors in the imported file will be renamed (scoped)

@pinheadmz
Copy link

I would really like to see this deployed ;-)

By the way, niami does one extra thing with TXT records, which is a regex replacement to remove "escape" backslashes. You can compare with https://www.niami.io/domain/xviii_the_moon what I suggested to Stephan is these two regex: sed 's/\\"/\"/g' sed 's/\\\\/\\/g'

with white-space: pre; font-family: monospace
https://hnsnetwork.com/names/xviii_the_moon
Screen Shot 2022-02-28 at 9 45 05 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants