IceWhaleTech / CasaOS

CasaOS - A simple, easy-to-use, elegant open-source Personal Cloud system.
https://casaos.io
Apache License 2.0
26.28k stars 1.44k forks source link

Expand support of files for text editor #1575

Open Dysta opened 10 months ago

Dysta commented 10 months ago

Is your feature request related to an issue? Please describe. Currently, a few file extensions open a text editor in the web view. Some common extensions like .toml, .cfg are not supported and ask to be downloaded if we click on them

Describe the solution you want When clicking on a .toml or .cfg, it opens a text editor like a .json file

Describe the alternatives you considered A workaround is to add the .txt extension to the file, then open it, do what we need, save it, and remove the .txt extension.

Additional context Currently unsupported extension that are common to edit:

I will update this list if I find more extension

ETWang1991 commented 10 months ago

Understand your needs, I have recorded it

jerrykuku commented 10 months ago

I'll add support for .toml combined .cfg file editing in the next update, and in the meantime you can help list more file types.

henrikhjelmse commented 10 months ago

I took the liberty of writing a little list.

.conf .config .toml .ini .json .yaml .yml .xml .rc .env .service .conf.d .sh .htaccess .cfg .gitconfig .vim .curlrc .wgetrc .gitignore .editorconfig .hgrc .properties .jshintrc .txt .md .log .html .css .php .js .bat .r .pl .rb .c .cpp .java .src .py .h .tex .rtf .eps .svg .jsonld .ttl .n3 .rss .atom .yarnrc .gitattributes .srt .tsv .vcard .ics .plaintext .asc .sql .url .csv .diff

config <-- file named config

jerrykuku commented 10 months ago

Ok I will update them.

henrikhjelmse commented 10 months ago

i belive it is better to check metadata if it is a textfile or not.

udance4ever commented 7 months ago

something that would be scalable is in the dot (…) menu to “Open as…” “text file” or something along these lines…