Skip to content

Commit 952fac9

Browse files
committed
번들 설정 페이지 즉시 이동 버튼 및 닫기 버튼 추가
1 parent 9cf514d commit 952fac9

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

src/languages/ko/bundle/store.ts

+1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ export default {
1010
'remove-bundle-desc': '$0 번들을 삭제하시겠습니까?<br>* 방송에서 사용하고 있는 경우 오류가 발생할 수 있습니다.',
1111
'remove-bundle-success': '$0 번들이 삭제되었습니다.',
1212
'install-scucess': '$0 번들이 설치되었습니다.',
13+
'move-bundle-page': '번들 설정 페이지로 이동',
1314
};

src/views/Bundle/bundle-mixin.ts

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Component, Mixins } from 'vue-property-decorator';
22
import GlobalMixins from '@/plugins/mixins';
33
import { BundlePackage } from '@/interface/bundle';
4+
import { SweetAlertOptions } from 'sweetalert2';
45

56
const { ipcRenderer } = window.require('electron');
67
const fs = window.require('fs');
@@ -53,17 +54,33 @@ export default class BundleMixin extends Mixins(GlobalMixins) {
5354
});
5455
return;
5556
}
56-
ipcRenderer.sendSync('zip:uncompress-buffer', res.data[0], this.getBundlePath(pkg));
57+
58+
const p = this.getBundlePath(pkg);
59+
ipcRenderer.sendSync('zip:uncompress-buffer', res.data[0], p);
5760

5861
if ( showNoti ) {
59-
this.$swal({
62+
const option: SweetAlertOptions = {
6063
icon: 'success',
6164
toast: true,
6265
position: 'top-end',
6366
html: this.$t('bundle.store.install-scucess', pkg.name),
6467
timer: 3000,
6568
showCloseButton: false,
6669
showConfirmButton: false,
70+
showCancelButton: true,
71+
cancelButtonText: this.$t('close'),
72+
};
73+
74+
if ( pkg.page ) {
75+
option.showConfirmButton = true;
76+
option.confirmButtonText = this.$t('bundle.store.move-bundle-page');
77+
}
78+
79+
this.$swal(option).then((result) => {
80+
if ( pkg.page && result.isConfirmed ) {
81+
this.$emit('close');
82+
this.$assign(`/bundle/${path.basename(p)}/`);
83+
}
6784
});
6885
}
6986
}
@@ -88,6 +105,8 @@ export default class BundleMixin extends Mixins(GlobalMixins) {
88105
timer: 3000,
89106
showCloseButton: false,
90107
showConfirmButton: false,
108+
showCancelButton: true,
109+
cancelButtonText: this.$t('close'),
91110
html: this.$t('bundle.store.remove-bundle-success', pkg.name),
92111
});
93112
}

src/views/SideMenu/Index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default class SideMenu extends Mixins(GlobalMixins) {
127127
console.log('sidemenu update');
128128
for ( const route of this.Routes ) {
129129
if ( route.name.toLowerCase() === 'bundle' ) {
130-
route.childs = createBundleRouter();
130+
route.children = createBundleRouter();
131131
break;
132132
}
133133
}

0 commit comments

Comments
 (0)