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