Skip to content

Commit

Permalink
add migration (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnGuan authored Aug 23, 2024
1 parent 9d4eced commit 884e5b7
Show file tree
Hide file tree
Showing 4 changed files with 1,117 additions and 1,118 deletions.
25 changes: 25 additions & 0 deletions src/components/AppSetting/AppMigrationBtn.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<template>
<b-tooltip type="is-black" position="is-right" :label="$t('Migrate user data to another space.')">
<b-button
rounded
type="is-info is-light"
size="is-small"
@click="
$messageBus('mircoapp_communicate', {
action: 'open',
peerType: 'settings',
name: 'icewhale_settings',
routerPath: '/migration',
})
"
>
{{ $t("Migration") }}
</b-button>
</b-tooltip>
</template>

<script>
export default {
name: "AppMigrationBtn",
};
</script>
11 changes: 8 additions & 3 deletions src/components/AppSetting/AppTipModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
<VMdEditor ref="editor" v-model="tips" :mode="controlEditorState" :placeholder="$t('Something to remember eg. password')"
left-toolbar right-toolbar>
</VMdEditor>
<div v-if="name" class="is-flex is-flex-direction-row-reverse mt-2">
<div v-if="name" class="flex justify-between items-center mt-2">
<AppMigrationBtn />
<b-icon class="_polymorphic"
:class="{ 'has-text-grey-800': !isEditing, 'has-text-green-default': isDifferentiation, 'has-text-grey-400': !isDifferentiation && isEditing }"
:icon="icon" pack="casa" @click.native="toggle"></b-icon>
Expand All @@ -28,7 +29,9 @@

<!-- Modal-Card Footer Start-->
<footer v-if="!name" class="modal-card-foot is-flex is-align-items-center">
<div class="is-flex-grow-1"></div>
<div class="is-flex-grow-1">

</div>
<div class="is-flex is-flex-direction-row-reverse">
<b-button rounded size="is-small" type="is-primary" @click="$emit('submit') && $emit('close')">
{{ $t('Next Steps') }}
Expand All @@ -48,6 +51,7 @@ import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
import '@kangc/v-md-editor/lib/theme/style/github.css';
// import hljs from 'highlight.js';
import { ice_i18n } from "@/mixins/base/common-i18n";
import AppMigrationBtn from "@/components/AppSetting/AppMigrationBtn.vue";
VMdEditor.use(githubTheme, {
// Hljs: hljs,
Expand All @@ -57,7 +61,8 @@ VMdEditor.use(githubTheme, {
export default {
name: "TipEditorModal",
components: {
VMdEditor
VMdEditor,
AppMigrationBtn,
},
data() {
return {
Expand Down
Loading

0 comments on commit 884e5b7

Please sign in to comment.