-
-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added second layer confirmation for Cancel Job (#1978)
Co-authored-by: Stefan Dej <meteyou@gmail.com>
- Loading branch information
1 parent
5cb3080
commit f6f3c77
Showing
7 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<template> | ||
<v-dialog :value="showDialog" width="400" persistent> | ||
<panel | ||
:title="$t('CancelJobDialog.CancelJob')" | ||
toolbar-color="normal" | ||
card-class="cancel-job-dialog" | ||
:icon="mdiStopCircleOutline" | ||
:margin-bottom="false"> | ||
<template #buttons> | ||
<v-btn icon tile @click="closePrompt"> | ||
<v-icon>{{ mdiCloseThick }}</v-icon> | ||
</v-btn> | ||
</template> | ||
<v-card-text>{{ $t('CancelJobDialog.AreYouSure') }}</v-card-text> | ||
<v-card-actions> | ||
<v-spacer /> | ||
<v-btn text @click="closePrompt">{{ $t('CancelJobDialog.No') }}</v-btn> | ||
<v-btn color="primary" text @click="cancelJob">{{ $t('CancelJobDialog.Yes') }}</v-btn> | ||
</v-card-actions> | ||
</panel> | ||
</v-dialog> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Component, Mixins, Prop } from 'vue-property-decorator' | ||
import BaseMixin from '@/components/mixins/base' | ||
import Panel from '@/components/ui/Panel.vue' | ||
import { mdiCloseThick, mdiStopCircleOutline } from '@mdi/js' | ||
@Component({ | ||
components: { Panel }, | ||
}) | ||
export default class CancelJobDialog extends Mixins(BaseMixin) { | ||
mdiCloseThick = mdiCloseThick | ||
mdiStopCircleOutline = mdiStopCircleOutline | ||
@Prop({ type: Boolean, default: false }) showDialog!: boolean | ||
cancelJob() { | ||
this.$emit('cancel-job') | ||
} | ||
closePrompt() { | ||
this.$emit('close') | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters