hello-smile6 / neofetch-js

Neofetch for the web.
https://neofetch.vercel.app
GNU General Public License v3.0
5 stars 2 forks source link

Revamp OSList system #9

Closed webdev03 closed 2 years ago

webdev03 commented 2 years ago

Not tested yet on Chrome - can you tell me the results?

hello-smile6 commented 2 years ago

Okay, conflicts?

hello-smile6 commented 2 years ago
Uncaught TypeError: Neofetch.osList.chrome.replaceAll is not a function
    at Object.Neofetch.getData (neofetch.js:153:30)
    at neofetch-js-ihad388h…s.vercel.app/:60:29
hello-smile6 commented 2 years ago

Broken...

Icon:
################  ################
    ################  ################
    ################  ################
    ################  ################
    ################  ################
    ################  ################
    ################  ################

    ################  ################
    ################  ################
    ################  ################
    ################  ################
    ################  ################
    ################  ################
    ################  ################
Icon:
             .,coooooooooooooc,.
    .,lllllllllllllllllllll,.
   ;ccccccccccccccccccccccccc;
 'ccccccccccccccccccccccccccccc.
,ooc::::::::okO0000OOkkkkkkkkkkk:
.ooool;;;;:xK0kxxxxxk0XK0000000000.
:oooool;,;OKdddddddddddKX000000000d
lllllool;lNdllllllllllldNK000000000
llllllllloMdcccccccccccoWK000000000
;cllllllllXXc:::::::::c0X000000000d
.ccccllllllONkc;,,,;cxKK0000000000.
.cccccclllllxOOOOOOkxO0000000000;
 .:cccccccclllllllloO0000000OOO,
   ,:ccccccccclllcd0000OOOOOOl.
     '::cccccccccdOOOOOOOkx:.
       ..,::ccccxOOOkkko;.
           ..,:dOkxl:.

We didn't have your OS icon, so we used your browser icon instead.

Seems like you should've used if/else but used if instead.

hello-smile6 commented 2 years ago

@webdev03 Run git pull, I made a commit

hello-smile6 commented 2 years ago

You can revert that commit now

hello-smile6 commented 2 years ago

Figured out the icon issue. The icons can't be indented. Going to fix.

hello-smile6 commented 2 years ago

Fixed an icon.

Before

After

hello-smile6 commented 2 years ago

Looks good. Linux: Screenshot

hello-smile6 commented 2 years ago

Merging, anything else?

webdev03 commented 2 years ago

Wait

webdev03 commented 2 years ago

Lines 117 and 118 both use deprecated navigator.platform is there an alternative?

hello-smile6 commented 2 years ago

Let me see

webdev03 commented 2 years ago

Also, can I have some ASCII art to put for "Unknown"?

hello-smile6 commented 2 years ago

Yes, we could use navigator.userAgentData.platform, but it'd require a major rewrite and every platform check would need changed. Also, we use the platform as the sole source of truth for both Windows and Linux. We could make it use the new version and fallback when necessary, but it'd take a lot of work. It'd be worth it, but it's definitely not a 2-minute change.

hello-smile6 commented 2 years ago

Also, can I have some ASCII art to put for "Unknown"?

Sure. Do a question mark.

hello-smile6 commented 2 years ago

Could you do a new PR for a question mark after this is merged, by chance? This one's a bit big.

hello-smile6 commented 2 years ago

Wait, some of the browser-specific code is missing question marks!

hello-smile6 commented 2 years ago

You didn't tell prettier to ignore the Windows icon

hello-smile6 commented 2 years ago

I got it

hello-smile6 commented 2 years ago

I fixed it

webdev03 commented 2 years ago

Wait, some of the browser-specific code is missing question marks!

?

webdev03 commented 2 years ago

They don't need question marks - navigator.userAgent it's a standard right?

hello-smile6 commented 2 years ago

They don't need question marks - navigator.userAgent it's a standard right?

Not for Node. I'm trying to make it work in Node. If it will work, I can write tests easier.

webdev03 commented 2 years ago

I'll make it work for Node soon if you want. We can use TSUP to export to UMD/AMD/CJS/ESM

hello-smile6 commented 2 years ago

I'll make it work for Node soon if you want. We can use TSUP to export to UMD/AMD/CJS/ESM

No typescript! I just want to make it work no matter what! If it is designed to account for Node from the start, then at the most we'll just have to define navigator if it's undefined. If it's not, it'll be hard.

hello-smile6 commented 2 years ago

Could you revert https://github.com/hello-smile6/neofetch-js/pull/9/commits/8c5847986a6f8de7090498124b703b842cb84015 ? I like the "Unknown" defaults!

hello-smile6 commented 2 years ago

The "Unknown" defaults will make Node support easier.

hello-smile6 commented 2 years ago

@webdev03 Fixed the defaults

webdev03 commented 2 years ago

Oh it's because Unknown hasn't been added to osList yet. If you can provide me the ASCII for Unknown then I can use it!

hello-smile6 commented 2 years ago

Oh it's because Unknown hasn't been added to osList yet. If you can provide me the ASCII for Unknown then I can use it!

Just use this for now. :)

?

Maybe I'll push an update later with a better question mark.

hello-smile6 commented 2 years ago

Just set formatOnPaste to false using vscode settings. That should help for those who have vscode configured to automatically format code.

hello-smile6 commented 2 years ago

@webdev03 Pull the changes

hello-smile6 commented 2 years ago

@webdev03 Can I merge? This is blocking ANSI support.

webdev03 commented 2 years ago

Sure

hello-smile6 commented 2 years ago

Okay!