Skip to content

Commit

Permalink
fix: fixed some ui bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wushuangs committed Nov 11, 2024
1 parent 30f583c commit cf7eb04
Show file tree
Hide file tree
Showing 14 changed files with 661 additions and 37 deletions.
3 changes: 3 additions & 0 deletions packages/frontend/src/assets/esc-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions packages/frontend/src/assets/search-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/frontend/src/components/ConfirmDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const onCancel = async () => {
border-radius: 8px;
}
.message {
max-width: 310px;
max-width: calc(100% - 45px);
font-size: 12px;
line-height: 16px;
}
Expand Down
19 changes: 11 additions & 8 deletions packages/frontend/src/components/UpgradeComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,40 +21,42 @@
class="content"
v-if="['completed', 'not_running'].includes(upgradeStore.state)"
>
<div>Congratulations</div>
<div>Update successful</div>
<div>{{ t('upgrade.success_title') }}</div>
<div>{{ t('upgrade.success_message') }}</div>
</div>

<div class="content" v-else-if="upgradeStore.state === 'failed'">
<div>Upgrade failed</div>
<div>Upgrade failed,please try again</div>
<div>{{ t('upgrade.fail_title') }}</div>
<div>{{ t('upgrade.fail_message') }}</div>
</div>

<div class="content" v-else>
<div>Upgrading System</div>
<div>Please wait a moment</div>
<div>{{ t('upgrade.running_title') }}</div>
<div>{{ t('upgrade.running_message') }}</div>
</div>

<div
class="confirm"
v-if="!['started', 'running'].includes(upgradeStore.state)"
@click="confirm"
>
Confirm
{{ t('buttons.confirm') }}
</div>
<div class="confirm" v-else style="opacity: 0"></div>
</div>
</template>
<script lang="ts">
import { defineComponent, ref, onMounted, onUnmounted } from 'vue';
import { useUpgradeStore } from '../stores/upgrade';
import { useI18n } from 'vue-i18n';
export default defineComponent({
name: 'UpgradeComponent',
components: {},
setup(props, context) {
const upgradeStore = useUpgradeStore();
const timer = ref();
const { t } = useI18n();
const confirm = () => {
context.emit('closeUpgrade');
Expand Down Expand Up @@ -82,7 +84,8 @@ export default defineComponent({
return {
upgradeStore,
confirm
confirm,
t
};
}
});
Expand Down
Loading

0 comments on commit cf7eb04

Please sign in to comment.