Skip to content

Commit 1679987

Browse files
committed
refactor: update auto-imports and component declarations for improved clarity and functionality
- Removed unused icon declarations from auto-imports.d.ts to streamline global definitions. - Added ElInputNumber to auto-imports for enhanced input functionality. - Updated components.d.ts to rename ComponentCustomProperties to GlobalDirectives for better clarity. - Modified main.js to load the Jira issue collector script dynamically for improved integration. - Updated LockedDialog.vue to change the URL for the OP button. - Enhanced Header.vue and Sidebar.vue to improve conditional rendering and user experience.
1 parent 8e57afb commit 1679987

File tree

6 files changed

+32
-18
lines changed

6 files changed

+32
-18
lines changed

apps/daas/src/auto-imports.d.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ export {}
88
declare global {
99
const ElIcon: typeof import('element-plus/es')['ElIcon']
1010
const ElIconCopyDocument: typeof import('@element-plus/icons-vue')['CopyDocument']
11-
const ElIconRefresh: typeof import('@element-plus/icons-vue')['Refresh']
1211
const ElIconSearch: typeof import('@element-plus/icons-vue')['Search']
1312
const ElInput: typeof import('element-plus/es')['ElInput']
13+
const ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
1414
const ElLoading: typeof import('element-plus/es')['ElLoading']
1515
const ElMessage: typeof import('element-plus/es')['ElMessage']
1616
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
@@ -24,9 +24,6 @@ declare global {
2424
const IconLucideTriangleAlert: typeof import('~icons/lucide/triangle-alert')['default']
2525
const IconMingcuteCheckCircleFill: typeof import('~icons/mingcute/check-circle-fill')['default']
2626
const IconMingcuteCloseCircleFill: typeof import('~icons/mingcute/close-circle-fill')['default']
27-
const IconMingcuteErrorFill: typeof import('~icons/mingcute/error-fill')['default']
2827
const IconMingcuteInformationFill: typeof import('~icons/mingcute/information-fill')['default']
29-
const IconMingcuteWarning: typeof import('~icons/mingcute/warning')['default']
3028
const IconMingcuteWarningFill: typeof import('~icons/mingcute/warning-fill')['default']
31-
const IconMingcuteWarningFilled: typeof import('~icons/mingcute/warning-filled')['default']
3229
}

apps/daas/src/components.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ declare module 'vue' {
104104
RouterView: typeof import('vue-router')['RouterView']
105105
VDivider: typeof import('./components/VDivider.vue')['default']
106106
}
107-
export interface ComponentCustomProperties {
107+
export interface GlobalDirectives {
108108
vInfiniteScroll: typeof import('element-plus/es')['ElInfiniteScroll']
109109
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
110110
}

apps/daas/src/components/LockedDialog.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ export default {
1010
},
1111
goOP() {
1212
this.handleClose()
13-
window.open('https://tapdata.mike-x.com/lV5o0?m=3VXe4lCHe9LjBsda')
13+
window.open(
14+
'https://tapdata.feishu.cn/share/base/form/shrcnoYXtxkXe7L4wu3vKDYzUUc',
15+
)
1416
},
1517
goCloud() {
1618
this.handleClose()

apps/daas/src/layouts/Header.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ defineExpose({
243243
height="64px"
244244
>
245245
<a
246-
v-if="isOP"
246+
v-if="isOP || isCommunity"
247247
class="logo w-auto text-white flex align-center gap-2"
248248
href="/"
249249
>
@@ -268,7 +268,10 @@ defineExpose({
268268
</template>
269269
</el-alert>
270270
<ElButton v-if="isCommunity" id="add-jira-issue-btn" type="primary"
271-
><VIcon>bug-outlined</VIcon> New Issue
271+
><template #icon>
272+
<VIcon>bug-outlined</VIcon>
273+
</template>
274+
New Issue
272275
</ElButton>
273276
<NotificationPopover v-if="showNotification" class="ml-4" />
274277
<ElDropdown

apps/daas/src/layouts/Sidebar.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ onMounted(() => {
171171
<VIcon size="16" class="menu-icon">{{ menu.icon }}</VIcon>
172172
<template #title>
173173
<span class="ml-4 title">{{ menu.label }}</span>
174+
<VIcon v-if="lockedFeature[menu.name]" class="ml-2" size="24"
175+
>lock-circle</VIcon
176+
>
174177
</template>
175178
</ElMenuItem>
176179
</template>

apps/daas/src/main.js

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,23 @@ document.addEventListener('visibilitychange', () => {
159159

160160
// community add jira issue collector
161161
if (import.meta.env.VUE_APP_MODE === 'community') {
162-
window.ATL_JQ_PAGE_PROPS = {
163-
triggerFunction(showCollectorDialog) {
164-
document.addEventListener('click', function (event) {
165-
const target = document.querySelector('#add-jira-issue-btn')
166-
if (event.target === target || target.contains(event.target)) {
167-
showCollectorDialog()
168-
}
169-
})
170-
},
171-
}
162+
const script = document.createElement('script')
163+
script.type = 'text/javascript'
164+
script.src =
165+
'https://tapdata.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-vg1gsr/b/9/c95134bc67d3a521bb3f4331beb9b804/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?collectorId=11deaaeb'
166+
167+
script.addEventListener('load', () => {
168+
window.ATL_JQ_PAGE_PROPS = {
169+
triggerFunction(showCollectorDialog) {
170+
document.addEventListener('click', function (event) {
171+
const target = document.querySelector('#add-jira-issue-btn')
172+
if (event.target === target || target.contains(event.target)) {
173+
showCollectorDialog()
174+
}
175+
})
176+
},
177+
}
178+
})
179+
180+
document.head.append(script)
172181
}

0 commit comments

Comments
 (0)