Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/unreleased/appopen-patch-edit.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Enhancement: apps: added temporary patch for Office apps

This PR adds the handling of language and theme input
parameters, and returns an app_for_editing additional
parameter in response if appropriate.

https://github.com/cs3org/reva/pull/5703
6 changes: 6 additions & 0 deletions changelog/unreleased/projects-deleted-status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: add deleted status to the projects table

The status column of the projects table now accepts the deleted status, on top
of the existing creating, active, archiving and archived ones.

https://github.com/cs3org/reva/pull/5730
22 changes: 22 additions & 0 deletions internal/http/services/appprovider/appprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,28 @@ func (s *svc) handleOpen(w http.ResponseWriter, r *http.Request) {
appForEditing = m[1]
}

// UI-related parameters
// TODO(lopresti) this overrides pkg/app/provider/wopi/wopi.go,
// we need to drop that one and the corresponding config entry
lang := r.Form.Get("lang")
if lang != "" {
appFullURL, err := url.Parse(openRes.AppUrl.AppUrl)
if err != nil {
writeError(w, r, appErrorServerError, "error parsing the app URL", err)
return
}
q := appFullURL.Query()
q.Set("ui", lang) // EuroOffice + Office365
q.Set("lang", lang) // Collabora
q.Set("rs", lang) // Office365, https://learn.microsoft.com/en-us/microsoft-365/cloud-storage-partner-program/online/discovery#dc_llcc
appFullURL.RawQuery = q.Encode()
openRes.AppUrl.AppUrl = appFullURL.String()
}
theme := r.Form.Get("ui_theme")
if theme == "light" || theme == "dark" {
openRes.AppUrl.FormParameters["UITheme"] = theme
}

// recreate the structure to be able to marshal the AppUrl.Target as a string and to add the optional forced viewmode reason
resPayload := map[string]any{
"app_url": openRes.AppUrl.AppUrl,
Expand Down
2 changes: 1 addition & 1 deletion pkg/projects/manager/sql/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type Project struct {
StorageID string `gorm:"size:255"`
Path string
Name string `gorm:"size:255;uniqueIndex:i_name_archived_at"`
// Status of the project (e.g., active, creating, archiving, archived, etc.)
// Status of the project (e.g., active, creating, archiving, archived, deleted, etc.)
Status projects.ProjectStatus `gorm:"size:50;index:idx_status;default:'active'"`
// Owner of the project
Owner string `gorm:"size:255"`
Expand Down
1 change: 1 addition & 0 deletions pkg/projects/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const (
ProjectStatusActive ProjectStatus = "active"
ProjectStatusArchiving ProjectStatus = "archiving"
ProjectStatusArchived ProjectStatus = "archived"
ProjectStatusDeleted ProjectStatus = "deleted"
)

func (ps ProjectStatus) AsString() string { return string(ps) }
Expand Down
Loading