Skip to content

Commit

Permalink
Update v1.110
Browse files Browse the repository at this point in the history
This should be the first stable release of ArozOS with merge of v1.110 and v1.110-sp1 release

- Added Simple Web Downloader module
- Added new error interfaces
- Added context menu for floatWindow objects
- Added module installer using Git and Zip methods
- Added "include()" function for AGI interface
- Added playlist function in AirMusic WebApp
- Added startup flags setting toggle interface
- Added OEM information page (for vendor only)
- Added unzip handler
- Added floatWindow animation on window maximize
- Added default WebApp change button in File Properties page
- Added new Desktop Theme - "snow"
- Added shortcut handler for File Explorer
- Added estimation info icon on Storage Quota tab

- Fixed minor bugs in Desktop background loader
- Fixed minor bugs in Multi-selection opening in File Manager
- Fixed critical bugs in File Manager path parser
- Fixed logical bugs in File Manager "previous page" function
- Fixed selection bug in File Selector under folder mode
- Fixed bug in Manga Cafe scanner
- Fixed Sharing link cleanup bug
- Fixed media server on Safari with UTF-8 filename issue
- Fixed shortcut rename bug on Desktop

- File Operation fallback for websocket open fail
- Minor update in floatWindow css
- Reduced Low Memory Upload mode chunk size from 4MB to 512KB
- Completed Desktop New File -> File format menu
- Optimized File Manager context menu
- Optimized nmcli based WiFi scan support for older Linux kernels
- Trash bin optimization + Web-socket connection mode
  • Loading branch information
TC pushbot 5 authored and TC pushbot 5 committed Feb 12, 2021
1 parent 941b1d6 commit 8df8690
Show file tree
Hide file tree
Showing 185 changed files with 4,206 additions and 5,018 deletions.
3 changes: 3 additions & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ test/deviceB/*
tmp/*
files/users*
__debug_bin
experimentals/*

#Database related
*.db
Expand All @@ -27,6 +28,8 @@ system/cron.json
#Logs related
system/aecron/*.log

#Webapp related
web/teleprompter/*

#Subservice related
subservice/backup/.suspended
Expand Down
5 changes: 5 additions & 0 deletions src/AGI Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,11 @@ execpkg("ffmpeg",'-i "files/users/TC/Desktop/群青.mp3" "files/users/TC/Desktop
```

#### Structure & OOP
```
includes("hello world.js"); //Include another js / agi file within the current running one, return false if failed
```

### User Functions
Users function are function group that only be usable when the interface is started from a user request.

Expand Down
1 change: 0 additions & 1 deletion src/agi.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func AGIInit() {
return
}

log.Println(token)
//Validate Token
if authAgent.TokenValid(token) == true {
//Valid
Expand Down
67 changes: 67 additions & 0 deletions src/desktop.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func DesktopInit() {
router.HandleFunc("/system/desktop/preference", desktop_preference_handler)
router.HandleFunc("/system/desktop/createShortcut", desktop_shortcutHandler)

//API related to desktop based operations
router.HandleFunc("/system/desktop/opr/renameShortcut", desktop_handleShortcutRename)

//Initialize desktop database
err := sysdb.NewTable("desktop")
if err != nil {
Expand Down Expand Up @@ -112,6 +115,70 @@ func desktop_hostdetailHandler(w http.ResponseWriter, r *http.Request) {
sendJSONResponse(w, string(jsonString))
}

func desktop_handleShortcutRename(w http.ResponseWriter, r *http.Request) {
//Check if the user directory already exists
userinfo, err := userHandler.GetUserInfoFromRequest(w, r)
if err != nil {
sendErrorResponse(w, "User not logged in")
return
}

//Get the shortcut file that is renaming
target, err := mv(r, "src", false)
if err != nil {
sendErrorResponse(w, "Invalid shortcut file path given")
return
}

//Get the new name
new, err := mv(r, "new", false)
if err != nil {
sendErrorResponse(w, "Invalid new name given")
return
}

//Check if the file actually exists and it is on desktop
rpath, err := userinfo.VirtualPathToRealPath(target)
if err != nil {
sendErrorResponse(w, err.Error())
return
}

if target[:14] != "user:/Desktop/" {
sendErrorResponse(w, "Shortcut not on desktop")
return
}

if !fileExists(rpath) {
sendErrorResponse(w, "File not exists")
return
}

//OK. Change the name of the shortcut
originalShortcut, err := ioutil.ReadFile(rpath)
if err != nil {
sendErrorResponse(w, "Shortcut file read failed")
return
}

lines := strings.Split(string(originalShortcut), "\n")
if len(lines) < 4 {
//Invalid shortcut properties
sendErrorResponse(w, "Invalid shortcut file")
return
}

//Change the 2nd line to the new name
lines[1] = new
newShortcutContent := strings.Join(lines, "\n")
err = ioutil.WriteFile(rpath, []byte(newShortcutContent), 0755)
if err != nil {
sendErrorResponse(w, err.Error())
return
}
sendOK(w)
}

func desktop_listFiles(w http.ResponseWriter, r *http.Request) {
//Check if the user directory already exists
userinfo, _ := userHandler.GetUserInfoFromRequest(w, r)
Expand Down
Binary file removed src/doc/auth_api.txt
Binary file not shown.
Loading

0 comments on commit 8df8690

Please sign in to comment.