From 777526ce820778387c27e55dcc4df57269ac1c69 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Thu, 30 Jan 2020 01:53:18 +0100 Subject: [PATCH] Upload: Refactor UX Signed-off-by: Michael Mayer --- frontend/src/component/p-navigation.vue | 29 +++- frontend/src/component/p-photo-search.vue | 12 +- frontend/src/dialog/dialogs.js | 2 + frontend/src/dialog/p-upload-dialog.vue | 168 ++++++++++++++++++++++ frontend/src/pages/albums.vue | 10 +- frontend/src/pages/library.vue | 8 +- frontend/src/pages/library/originals.vue | 4 +- frontend/src/pages/photos.vue | 25 +++- frontend/src/resources/themes.json | 12 +- frontend/src/routes.js | 7 - internal/api/upload.go | 3 + 11 files changed, 252 insertions(+), 28 deletions(-) create mode 100644 frontend/src/dialog/p-upload-dialog.vue diff --git a/frontend/src/component/p-navigation.vue b/frontend/src/component/p-navigation.vue index fc1c485e5..ea8db2e85 100644 --- a/frontend/src/component/p-navigation.vue +++ b/frontend/src/component/p-navigation.vue @@ -7,6 +7,12 @@ {{ page.title }} + + + + cloud_upload + + - + Logs @@ -40,7 +40,7 @@ diff --git a/frontend/src/resources/themes.json b/frontend/src/resources/themes.json index ef3758a27..af43ddb1d 100644 --- a/frontend/src/resources/themes.json +++ b/frontend/src/resources/themes.json @@ -9,7 +9,7 @@ "accent": "#9E9E9E", "error": "#E57373", "info": "#0097A7", - "success": "#00BFA5", + "success": "#00897B", "warning": "#FFE082", "remove": "#E57373", "restore": "#64B5F6", @@ -32,7 +32,7 @@ "accent": "#757575", "error": "#E57373", "info": "#0097A7", - "success": "#00BFA5", + "success": "#00897B", "warning": "#FFE082", "remove": "#E57373", "restore": "#64B5F6", @@ -55,7 +55,7 @@ "accent": "#9E9E9E", "error": "#E57373", "info": "#0097A7", - "success": "#00BFA5", + "success": "#00897B", "warning": "#FFE082", "remove": "#E57373", "restore": "#64B5F6", @@ -78,7 +78,7 @@ "accent": "#B0BEC5", "error": "#E57373", "info": "#0097A7", - "success": "#00BFA5", + "success": "#00897B", "warning": "#FFE082", "remove": "#E57373", "restore": "#64B5F6", @@ -101,7 +101,7 @@ "accent": "#B0BEC5", "error": "#E57373", "info": "#0097A7", - "success": "#00BFA5", + "success": "#00897B", "warning": "#FFE082", "remove": "#E57373", "restore": "#64B5F6", @@ -124,7 +124,7 @@ "accent": "#757575", "error": "#E57373", "info": "#0097A7", - "success": "#00BFA5", + "success": "#00897B", "warning": "#FFE082", "remove": "#E57373", "restore": "#64B5F6", diff --git a/frontend/src/routes.js b/frontend/src/routes.js index 1fd848263..8a3792d86 100644 --- a/frontend/src/routes.js +++ b/frontend/src/routes.js @@ -99,13 +99,6 @@ export default [ path: "/library/logs", component: Library, meta: {title: "Server Logs", auth: true, background: "application-light"}, - props: {tab: 3}, - }, - { - name: "library_upload", - path: "/library/upload", - component: Library, - meta: {title: "Photo Upload", auth: true, background: "application-light"}, props: {tab: 2}, }, { diff --git a/internal/api/upload.go b/internal/api/upload.go index c3c46d915..39c3fa8bb 100644 --- a/internal/api/upload.go +++ b/internal/api/upload.go @@ -9,6 +9,7 @@ import ( "time" "github.com/photoprism/photoprism/internal/config" + "github.com/photoprism/photoprism/internal/event" "github.com/photoprism/photoprism/pkg/txt" "github.com/gin-gonic/gin" @@ -37,6 +38,8 @@ func Upload(router *gin.RouterGroup, conf *config.Config) { return } + event.Publish("upload.start", event.Data{"time": start}) + files := f.File["files"] uploaded := len(files) var uploads []string