added dialog for shared items fix #2
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing

This commit is contained in:
Artem Anufrij
2023-02-17 22:08:04 +01:00
parent 4d4fb4b4e9
commit eb98a8ce95
13 changed files with 191 additions and 13 deletions

View File

@@ -111,6 +111,12 @@ export default {
context.dispatch("selectAlbum", album);
}
},
getAlbumById(context, id) {
return new Promise(resolve => {
let album = context.getters.collection.find(item => item._id == id);
resolve(album);
});
},
gotoPrevAlbum(context) {
let prevAlbum = context.getters.prevAlbum;
if (prevAlbum._id) {
@@ -163,8 +169,11 @@ export default {
});
},
shareDisable(context, album) {
axios.delete(context.rootGetters.server + "/api/albums/" + album._id + "/share", context.rootGetters.headers).then(() => {
album.share = {};
return new Promise(resolve => {
axios.delete(context.rootGetters.server + "/api/albums/" + album._id + "/share", context.rootGetters.headers).then(() => {
album.share = {};
resolve();
});
});
}
}