Skip to content

Commit 1f7c0a9

Browse files
committed
fix shared with page to handle when share item is updated
1 parent 06477bc commit 1f7c0a9

File tree

8 files changed

+20
-15
lines changed

8 files changed

+20
-15
lines changed

src/components/drive/DriveShare.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ module.exports = {
274274
this.existingProps = null;
275275
this.loadSecretLinks();
276276
this.refreshFiles();
277+
this.refresh();
277278
},
278279
formatDateTime(dateTime) {
279280
let date = new Date(dateTime.toString() + "+00:00"); //adding UTC TZ in ISO_OFFSET_DATE_TIME ie 2021-12-03T10:25:30+00:00
@@ -295,6 +296,7 @@ module.exports = {
295296
that.secretLinksList.splice(index, 1);
296297
that.existingProps = null;
297298
that.refreshFiles();
299+
that.refresh();
298300
}).exceptionally(function (throwable) {
299301
console.log(throwable);
300302
that.showSpinner = false;

src/i18n/en-GB.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,5 +491,6 @@ module.exports = {
491491
"DRIVE.MOVING.TITLE":"Moving file(s)",
492492
"DRIVE.MOVING.COMPLETE":"Completing move and refreshing folder...",
493493
"DRIVE.COPYING.TITLE":"Copying file(s)",
494-
"DRIVE.COPYING.COMPLETE":"Completing copy and refreshing folder..."
494+
"DRIVE.COPYING.COMPLETE":"Completing copy and refreshing folder...",
495+
"SHAREDWITH.TITLE": "Shared With"
495496
}

src/i18n/es.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,5 +491,6 @@ module.exports = {
491491
"DRIVE.MOVING.TITLE": "Moviendo archivo(s)",
492492
"DRIVE.MOVING.COMPLETE": "Completando movimiento y actualizando carpeta...",
493493
"DRIVE.COPYING.TITLE": "Copiando archivo(s)",
494-
"DRIVE.COPYING.COMPLETE": "Completando copia y actualizando carpeta..."
494+
"DRIVE.COPYING.COMPLETE": "Completando copia y actualizando carpeta...",
495+
"SHAREDWITH.TITLE": "Compartido con"
495496
}

src/i18n/fr.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,5 +491,6 @@ module.exports = {
491491
"DRIVE.MOVING.TITLE": "Déplacement de fichiers",
492492
"DRIVE.MOVING.COMPLETE": "Fin du déplacement et actualisation du dossier...",
493493
"DRIVE.COPYING.TITLE": "Copie de fichiers",
494-
"DRIVE.COPYING.COMPLETE": "Fin de la copie et actualisation du dossier..."
494+
"DRIVE.COPYING.COMPLETE": "Fin de la copie et actualisation du dossier...",
495+
"SHAREDWITH.TITLE": "Partagé avec"
495496
}

src/i18n/it.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,5 +491,6 @@ module.exports = {
491491
"DRIVE.MOVING.TITLE":"Spostamento file",
492492
"DRIVE.MOVING.COMPLETE":"Completamento spostamento e aggiornamento cartella...",
493493
"DRIVE.COPYING.TITLE":"Copia file",
494-
"DRIVE.COPYING.COMPLETE":"Completamento copia e aggiornamento cartella..."
494+
"DRIVE.COPYING.COMPLETE":"Completamento copia e aggiornamento cartella...",
495+
"SHAREDWITH.TITLE": "Condiviso con"
495496
}

src/i18n/pl.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,5 +491,6 @@ module.exports = {
491491
"DRIVE.MOVING.TITLE":"Przenoszenie pliku(ów)",
492492
"DRIVE.MOVING.COMPLETE":"Kończenie przenoszenia i odświeżanie folderu...",
493493
"DRIVE.COPYING.TITLE":"Kopiowanie pliku(ów)",
494-
"DRIVE.COPYING.COMPLETE":"Kończenie kopiowania i odświeżanie folderu..."
494+
"DRIVE.COPYING.COMPLETE":"Kończenie kopiowania i odświeżanie folderu...",
495+
"SHAREDWITH.TITLE": "Udostępnione z"
495496
}

src/i18n/zh-CN.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,5 +465,6 @@ module.exports = {
465465
"NEW.FOLDER.NAME.MESSAGE":"创建文件夹",
466466
"PROMPT.OK":"好的",
467467
"PROMPT.CANCEL":"取消",
468-
"PROMPT.SET":"设定"
468+
"PROMPT.SET":"设定",
469+
"SHAREDWITH.TITLE": "共享对象"
469470
}

src/views/SharedWith.vue

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,7 @@
2020
<li id='open-in-app' style="padding-bottom: 5px;color: black;" v-for="app in availableApps" v-on:keyup.enter="appOpen($event, app.name, app.path, app.file)" v-on:click="appOpen($event, app.name, app.path, app.file)">{{app.contextMenuText}}</li>
2121
</ul>
2222
<div>
23-
<h3>Shared Items</h3>
24-
<div class="flex-container">
25-
<div class="flex-item" style="margin: 10px;">
26-
<button id='submit-search' class="btn btn-success" @click="findShared()">Recalculate</button>
27-
</div>
28-
</div>
23+
<h3>{{ translate("SHAREDWITH.TITLE") }}</h3>
2924
<div v-if="sharedItemsList!=0" class="table-responsive">
3025
<table class="table">
3126
<thead>
@@ -346,9 +341,11 @@ module.exports = {
346341
if (isShared){
347342
let fullPath = that.currentEntry.path + '/' + that.currentEntry.name;
348343
that.context.getByPath(fullPath).thenApply(function(fileOpt){
349-
that.sharedItemsList.splice(index, 1);
350-
that.addSharedItem(sharedWithState, fileOpt.ref, fullPath);
351-
that.currentEntry = null;
344+
if (fileOpt.ref != null) {
345+
that.sharedItemsList.splice(index, 1);
346+
let fileSharingState = sharedWithState.get(that.currentEntry.name);
347+
that.addSharedItem(fileSharingState, fileOpt.ref, fullPath);
348+
}
352349
});
353350
} else {
354351
that.sharedItemsList.splice(index, 1);

0 commit comments

Comments
 (0)