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 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",
|
||||||
@ -113,6 +106,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
action(overwrite, rename);
|
action(overwrite, rename);
|
||||||
|
if (!conflict) {
|
||||||
|
this.$store.commit("closeHovers");
|
||||||
|
return;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
<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')"
|
||||||
>
|
>
|
||||||
@ -42,6 +43,11 @@ 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