update new prompt to use pinia
This commit is contained in:
parent
50d81f5faf
commit
9c8a033d4e
@ -7,7 +7,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-action">
|
<div class="card-action">
|
||||||
<button
|
<button
|
||||||
@click="$store.commit('closeHovers')"
|
@click="closeHovers()"
|
||||||
class="button button--flat button--grey"
|
class="button button--flat button--grey"
|
||||||
:aria-label="$t('buttons.cancel')"
|
:aria-label="$t('buttons.cancel')"
|
||||||
:title="$t('buttons.cancel')"
|
:title="$t('buttons.cancel')"
|
||||||
@ -27,15 +27,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapMutations } from "vuex";
|
import { mapActions } from "pinia";
|
||||||
import url from "@/utils/url";
|
import url from "@/utils/url";
|
||||||
|
import { useLayoutStore } from "@/stores/layout";
|
||||||
|
import { useFileStore } from "@/stores/file";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "discardEditorChanges",
|
name: "discardEditorChanges",
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(["closeHovers"]),
|
...mapActions(useLayoutStore, ["closeHovers"]),
|
||||||
|
...mapActions(useFileStore, ["updateRequest"]),
|
||||||
submit: async function () {
|
submit: async function () {
|
||||||
this.$store.commit("updateRequest", {});
|
this.updateRequest(null);
|
||||||
|
|
||||||
let uri = url.removeLastDir(this.$route.path) + "/";
|
let uri = url.removeLastDir(this.$route.path) + "/";
|
||||||
this.$router.push({ path: uri });
|
this.$router.push({ path: uri });
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user