diff --git a/frontend/src/component/p-album-toolbar.vue b/frontend/src/component/p-album-toolbar.vue index 321af918f..fd195fc01 100644 --- a/frontend/src/component/p-album-toolbar.vue +++ b/frontend/src/component/p-album-toolbar.vue @@ -3,7 +3,28 @@ ref="form" autocomplete="off" class="p-photo-search p-album-toolbar" accept-charset="UTF-8" @submit.prevent="filterChange"> - {{ album.AlbumName }} + + + {{ album.AlbumName }} + + + edit + + + @@ -38,10 +59,9 @@ v-show="searchExpanded"> - - + v.length <= 25 || this.$gettext("Title too long"), }; }, methods: { @@ -156,6 +178,9 @@ this.filter.q = ''; this.filterChange(); }, + onSave(album) { + album.update().then((a) => window.document.title = `PhotoPrism: ${a.AlbumName}`); + }, } }; diff --git a/frontend/src/pages/album/photos.vue b/frontend/src/pages/album/photos.vue index ba5ee2d05..4132b4d11 100644 --- a/frontend/src/pages/album/photos.vue +++ b/frontend/src/pages/album/photos.vue @@ -231,8 +231,7 @@ findAlbum() { this.model.find(this.uuid).then(m => { this.model = m; - this.$config.page.title = this.model.AlbumName; - window.document.title = this.model.AlbumName; + window.document.title = `PhotoPrism: ${this.model.AlbumName}`; }); }, }, diff --git a/frontend/src/routes.js b/frontend/src/routes.js index 5361159ad..a7ba08105 100644 --- a/frontend/src/routes.js +++ b/frontend/src/routes.js @@ -41,7 +41,7 @@ export default [ name: "album", path: "/albums/:uuid", component: AlbumPhotos, - meta: {title: ""}, + meta: {title: "Album"}, }, { name: "favorites", diff --git a/internal/api/album.go b/internal/api/album.go index 8c6cce5b5..5a1b68b55 100644 --- a/internal/api/album.go +++ b/internal/api/album.go @@ -133,7 +133,7 @@ func UpdateAlbum(router *gin.RouterGroup, conf *config.Config) { conf.Db().Save(&m) event.Publish("config.updated", event.Data(conf.ClientConfig())) - event.Success(fmt.Sprintf("album \"%s\" updated", m.AlbumName)) + event.Success(fmt.Sprintf("album \"%s\" saved", m.AlbumName)) c.JSON(http.StatusOK, m) }) diff --git a/internal/api/photo.go b/internal/api/photo.go index 0f95fa53b..0a5e92f1c 100644 --- a/internal/api/photo.go +++ b/internal/api/photo.go @@ -60,7 +60,7 @@ func UpdatePhoto(router *gin.RouterGroup, conf *config.Config) { conf.Db().Save(&m) - event.Success("photo updated") + event.Success("photo saved") c.JSON(http.StatusOK, m) })