Add files via upload
This commit is contained in:
parent
8d610fb61b
commit
af4bd5bde3
@ -83,12 +83,18 @@ export default {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (this.$route.path === this.dest) {
|
||||||
|
this.$store.commit("closeHovers");
|
||||||
|
action(false, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let dstItems = (await api.fetch(this.dest)).items;
|
let dstItems = (await api.fetch(this.dest)).items;
|
||||||
let conflict = upload.checkConflict(items, dstItems);
|
let conflict = upload.checkConflict(items, dstItems);
|
||||||
|
|
||||||
let overwrite = false;
|
let overwrite = false;
|
||||||
let rename = false;
|
let rename = false;
|
||||||
window.sessionStorage.setItem('destDir', this.dest);
|
|
||||||
if (conflict) {
|
if (conflict) {
|
||||||
this.$store.commit("showHover", {
|
this.$store.commit("showHover", {
|
||||||
prompt: "replace-rename",
|
prompt: "replace-rename",
|
||||||
@ -106,6 +112,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
action(overwrite, rename);
|
action(overwrite, rename);
|
||||||
|
|
||||||
if (!conflict) {
|
if (!conflict) {
|
||||||
this.$store.commit("closeHovers");
|
this.$store.commit("closeHovers");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -28,7 +28,6 @@
|
|||||||
<button
|
<button
|
||||||
class="button button--flat button--red"
|
class="button button--flat button--red"
|
||||||
@click="(event) => showConfirm(event, 'overwrite')"
|
@click="(event) => showConfirm(event, 'overwrite')"
|
||||||
:disabled="$route.path === dest"
|
|
||||||
:aria-label="$t('buttons.replace')"
|
:aria-label="$t('buttons.replace')"
|
||||||
:title="$t('buttons.replace')"
|
:title="$t('buttons.replace')"
|
||||||
>
|
>
|
||||||
@ -43,11 +42,6 @@ import { mapState } from "vuex";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "replace-rename",
|
name: "replace-rename",
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dest: window.sessionStorage.getItem('destDir'),
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: mapState(["showConfirm"]),
|
computed: mapState(["showConfirm"]),
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user