提交 f8471f73 编写于 作者: L LeoKu

Add new feature: regenerate

上级 c6ac2e16
......@@ -74,6 +74,7 @@
<BatchDownloadModal
:visible="avatarListVisible"
:avatar-list="avatarList"
@regenerate="generateMultiple"
@close=";(avatarListVisible = false), (avatarList = [])"
/>
......
......@@ -6,10 +6,14 @@
<div class="right">
<button
type="button"
class="regenerate-btn"
:disabled="making"
class="download-btn"
@click="make"
@click="emit('regenerate')"
>
{{ t(`text.regenerate`) }}
</button>
<button type="button" class="download-btn" @click="make">
{{
making
? `${t('text.downloadingMultiple')}(${madeCount}/${
......@@ -57,6 +61,7 @@ import ModalWrapper from './ModalWrapper.vue'
const props = defineProps<{ visible?: boolean; avatarList?: AvatarOption[] }>()
const emit = defineEmits<{
(e: 'regenerate'): void
(e: 'close'): void
}>()
......@@ -137,6 +142,12 @@ async function make() {
align-items: center;
margin-left: auto;
.download-btn {
color: #fff;
background-color: var.$color-accent;
}
.regenerate-btn,
.download-btn {
display: flex;
align-items: center;
......@@ -144,15 +155,13 @@ async function make() {
height: 2rem;
margin-left: 1rem;
padding: 0 1rem;
color: #fff;
background-color: var.$color-accent;
border-radius: 0.4rem;
cursor: pointer;
&:disabled,
&[disabled] {
color: rgba(#fff, 0.8);
cursor: default;
cursor: not-allowed;
}
}
}
......
......@@ -42,6 +42,7 @@ export default {
downloadTip: 'LONG PRESS or RIGHT CLICK to save',
downloadMultiple: 'Download',
downloadingMultiple: 'Downloading',
downloadMultipleTip: 'Automatically generate avatar for you',
downloadMultipleTip: 'Automatically generated',
regenerate: 'Regenerate',
},
}
......@@ -43,5 +43,6 @@ export default {
downloadMultiple: '开始下载',
downloadingMultiple: '正在下载',
downloadMultipleTip: '已为你自动生成头像',
regenerate: '换一批',
},
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册