Skip to content

Commit

Permalink
feat: remove className prefix: vite
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatAuk committed Aug 8, 2022
1 parent 31aa396 commit 248a146
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
12 changes: 6 additions & 6 deletions packages/core/public/webUpdateNoticeInjectStyle.css
@@ -1,13 +1,13 @@
.plugin-web-update-notice-anchor {
cursor: pointer;
}
.vite-plugin-web-update-notice {
.plugin-web-update-notice {
position: fixed;
right: 24px;
bottom: 24px;
user-select: none;
}
.vite-plugin-web-update-notice-content {
.plugin-web-update-notice-content {
background-color: #fff;
border-radius: 4px;
color: #000000d9;
Expand All @@ -16,17 +16,17 @@
line-height: 1.5715;
width: 280px;
}
.vite-plugin-web-update-notice-content-title {
.plugin-web-update-notice-content-title {
font-weight: 500;
margin-bottom: 8px;
font-size: 15px;
line-height: 24px;
}
.vite-plugin-web-update-notice-content-desc {
.plugin-web-update-notice-content-desc {
font-size: 13px;
line-height: 24px;
}
.vite-plugin-web-update-notice-refresh-btn {
.plugin-web-update-notice-refresh-btn {
position: absolute;
top: 8px;
right: 8px;
Expand All @@ -37,6 +37,6 @@
color: #1890ff;
}

.vite-plugin-web-update-notice-refresh-btn:hover {
.plugin-web-update-notice-refresh-btn:hover {
background-color: rgba(64,87,109,.1);
}
11 changes: 5 additions & 6 deletions packages/core/src/script.ts
Expand Up @@ -49,7 +49,6 @@ function webUpdateCheck_checkAndNotice(options: Options) {
if (document.visibilityState === 'visible')
checkSystemUpdate()
})

// listener script resource loading error
window.addEventListener(
'error',
Expand Down Expand Up @@ -81,16 +80,16 @@ function webUpdateCheck_showNotification(options: Options) {
const title = notificationProps?.title || '📢  系统升级通知'
const description = notificationProps?.description || '检测到当前系统版本已更新,请刷新页面后使用。'
const buttonText = notificationProps?.buttonText || '刷新'
notification.classList.add('vite-plugin-web-update-notice')
notification.classList.add('plugin-web-update-notice')
notificationInnerHTML = `
<div class="vite-plugin-web-update-notice-content" data-cy="notification-content">
<div class="vite-plugin-web-update-notice-content-title">
<div class="plugin-web-update-notice-content" data-cy="notification-content">
<div class="plugin-web-update-notice-content-title">
${title}
</div>
<div class="vite-plugin-web-update-notice-content-desc">
<div class="plugin-web-update-notice-content-desc">
${description}
</div>
<a class="vite-plugin-web-update-notice-refresh-btn">
<a class="plugin-web-update-notice-refresh-btn">
${buttonText}
</a>
</div>`
Expand Down

0 comments on commit 248a146

Please sign in to comment.