-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic support for redo functionality
- Loading branch information
1 parent
37ee1a7
commit 61d2ba9
Showing
5 changed files
with
75 additions
and
5 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
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,29 @@ | ||
<script setup lang="ts"> | ||
import { useHistoryStore } from '@/store/HistoryStore' | ||
import ToolButton from './ToolButton.vue' | ||
import HistoryService from '@/services/history/HistoryService' | ||
const historyStore = useHistoryStore() | ||
function handleUndoClick() { | ||
HistoryService.redo() | ||
} | ||
</script> | ||
|
||
<template> | ||
<ToolButton | ||
id="redo-button" | ||
name="Redo" | ||
:is-active="false" | ||
:is-disabled="!historyStore.isRedoPossible" | ||
@click="handleUndoClick" | ||
> | ||
<FontAwesomeIcon :icon="['fas', 'arrow-rotate-right']" /> | ||
</ToolButton> | ||
</template> | ||
|
||
<style lang="scss"> | ||
#redo-button { | ||
order: 4; | ||
} | ||
</style> |
File renamed without changes.
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