-
Notifications
You must be signed in to change notification settings - Fork 85
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
Web #88
Merged
Merged
Web #88
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Checks for binary data in a file before serving it to the editor, and correctly sets the Content-type to application/octet-stream so the editor can warn the user - Sends along size data for each file in the list of files so the editor can display it as a tool tip on the files on the left and also warn the user about loading very very large files. -
- Passes Content-type to callback when loading a file. - Adds file size in human readable form (1K, 3.53M, etc...) as a tool tip on each file in the list. - Checks file size and warns if more than... really big. - Checks for binary files and warns user. - Allows editing all files, no matter the extension - Checks for know image file extensions first and just displays them (preview images)
Changes required to support changing into new folders. - New logo, folder.png, is expected to be next the the existing page.png logo for folders to make it clear which is what, with sub class in css set by type as the list is built. - "vars" is passed as a sort of global variable to track vars.dir. - if the server provides '..' as a directory name, then it's expected that there are folders below the current one which we can move into. No checking is done of the path, but the method used to remove the last folder in the vars.dir string is surprisingly robust. - Right click context menu is removed for folders. Also some changes made to improve language hinting to the ace.js editor.
Folder icon to help visually differentiate folders from files.
Add a "fake" folder called ".." if we are not already at root.
Track and correct permissions settings on replaced files.
- Make the directory list a bit wider. TODO: Make it user adjustable. - Prevent long directory lists form expanding the window vertically, scroll the list in place instead. - Improved language detection... that part is a real mess and needs more work.
Making things happen in the current folder rather than the root folder.
- Create files works - Upload files works - Saving files retains permissions of original file - bug fix: don't return "ok" to the browser before you know it's ok. - Multiple small improvements related to debug messages, and formatting. TODO: The basic functions should be broken out. E.g. replaceFile(old, new), createFile(name), getDir(path), etc... TODO: Delete file (actually copy to /tmp) TODO: Chmod file? e.g. toggle executable.
Was loading the editor file, ace.js, from the internet instead of locally by default. Changed to try local first, then remote. Also added syntax highlighting for bash scripts detected by the start of the file having the `#!/bin/bash` tag
Allow local loading of the syntax highlighting definitions for the files we might encounter on Dexter.
Enable searching
Default to trying to open autoexec.jobs. If we eventually make the change to moving the jobs that run automatically out of RunDexRun then this will make it /super/ easy for users to edit that.
JamesNewton
changed the base branch from
Stable_2020_02_04_ConeDrive
to
Stable_Conedrive
June 17, 2020 00:32
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds the ability to edit files on the robot via web browser. Changes the web server to support serving all files under /srv/samba/share (vs just the files under /srv/samba/share/www previously) and adds functions for saving modified versions of those files back (while checking and retaining permissions) and for uploading or creating new files. The editor is based on
https://github.com/ajaxorg/ace-builds
and supports syntax highlighting for javascript (and it knows .dde is javascript), C / C++, bash (e.g. RunDexRun) and a few other files we might have on Dexter as well as standard text files. The idea is stolen from
https://github.com/me-no-dev/ESPAsyncWebServer/blob/master/src/edit.htm
and modified to better fit the Dexter environment. e.g. to support changing folders, longer lists of files, etc... than you might find on the ESP-8266 uC.
Nothing in this pull should cause /any/ problems with the robots essential functions.
Closes:
#85