Fix edit theme dialog title logic (#2205)
* Fix edit theme dialog title logic As you can see from the code and the actual behavior, both share the same code whether adding or editing a theme. So why does the title show up as "Edit Theme" no matter what? It does seem strange in a way. This feature appears to have been added in v2.0.0, but no one seems to have cared about the issue during the two years. Nonetheless, when I realized this recently, I decided to fix it. Hopefully this will make things clearer for those users who may not be able to tell the difference. Now, when the "Add theme" button is clicked, the dialog title will show "Add theme". If you right-click on a user-created theme, the dialog title will show "Edit theme". * Apply suggestions from lyswhut Simpler code Co-authored-by: lyswhut <lyswhut@qq.com> --------- Co-authored-by: lyswhut <lyswhut@qq.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<material-modal :show="modelValue" max-height="90%" teleport="#view" @close="handleCancel">
|
||||
<main :class="$style.main">
|
||||
<h2>{{ $t('theme_edit_modal__title') }}</h2>
|
||||
<h2>{{ themeId ? $t('theme_edit_modal__title_edit') : $t('theme_edit_modal__title_add') }}</h2>
|
||||
<div class="scroll" :class="$style.content">
|
||||
<div :class="[$style.group, $style.base]">
|
||||
<div :class="$style.groupContent">
|
||||
|
||||
Reference in New Issue
Block a user