refactor: 更新 eslint 和 prettier 配置 格式化代码

This commit is contained in:
alger
2025-07-23 23:54:35 +08:00
parent d1f5c8af84
commit c08c2cbf19
134 changed files with 3887 additions and 3301 deletions
@@ -27,18 +27,10 @@
<div class="warning-message">
<h3>获取完整体验</h3>
<p class="platform-support">
<span>
<i class="ri-window-line mr-1"></i>Windows 10+
</span>
<span>
<i class="ri-apple-line mr-1"></i>macOS
</span>
<span>
<i class="ri-ubuntu-line mr-1"></i>Linux
</span>
<span>
<i class="ri-android-line mr-1"></i>Android
</span>
<span> <i class="ri-window-line mr-1"></i>Windows 10+ </span>
<span> <i class="ri-apple-line mr-1"></i>macOS </span>
<span> <i class="ri-ubuntu-line mr-1"></i>Linux </span>
<span> <i class="ri-android-line mr-1"></i>Android </span>
</p>
<p class="description">
下载桌面应用以获得最佳音乐体验包含完整功能与更高音质
@@ -47,7 +39,11 @@
</div>
<div class="action-links">
<a href="https://mp.weixin.qq.com/s/9pr1XQB36gShM_-TG2LBdg" target="_blank" class="doc-link">
<a
href="https://mp.weixin.qq.com/s/9pr1XQB36gShM_-TG2LBdg"
target="_blank"
class="doc-link"
>
<i class="ri-file-text-line mr-1"></i> 查看使用文档
</a>
<a href="http://donate.alger.fun/download" target="_blank" class="download-link">
@@ -59,7 +55,7 @@
<img class="qrcode" src="@/assets/gzh.png" alt="公众号" />
<p>关注公众号获取最新版本与更新信息</p>
</div>
<div class="support-section">
<h4>支持项目</h4>
<p class="support-desc">您的支持是我们持续改进的动力</p>
@@ -78,10 +74,12 @@
</div>
</div>
</div>
<div class="drawer-actions">
<n-button secondary class="action-button" @click="markAsDonated">已支持</n-button>
<n-button type="primary" class="action-button primary" @click="remindLater">稍后提醒</n-button>
<n-button type="primary" class="action-button primary" @click="remindLater"
>稍后提醒</n-button
>
</div>
</div>
</div>
@@ -90,7 +88,8 @@
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { onMounted, ref } from 'vue';
import { isMobile } from '@/utils';
// 控制抽屉显示状态
@@ -117,7 +116,7 @@ const markAsDonated = () => {
onMounted(() => {
// 优先判断是否永久不再提示
if (localStorage.getItem('trafficDonated4Never')) return;
// 判断一天后提醒
const remindLaterTime = localStorage.getItem('trafficDonated4RemindLater');
if (remindLaterTime) {
@@ -126,7 +125,7 @@ onMounted(() => {
const hoursDiff = (now.getTime() - lastRemind.getTime()) / (1000 * 60 * 60);
if (hoursDiff < 24) return;
}
// 延迟20秒显示
setTimeout(() => {
showDrawer.value = true;
@@ -137,12 +136,12 @@ onMounted(() => {
<style scoped lang="scss">
.traffic-warning-trigger {
display: inline-block;
.mac-style-button {
background-color: rgba(0, 0, 0, 0.05);
color: #333;
transition: all 0.2s ease;
&:hover {
background-color: rgba(0, 0, 0, 0.1);
}
@@ -173,7 +172,7 @@ onMounted(() => {
width: 100px;
height: 100px;
margin-bottom: 12px;
img {
width: 100%;
height: 100%;
@@ -185,21 +184,21 @@ onMounted(() => {
.warning-message {
text-align: center;
max-width: 520px;
h3 {
font-size: 28px;
font-weight: 600;
margin-bottom: 18px;
color: #333;
}
.platform-support {
display: flex;
justify-content: center;
gap: 20px;
flex-wrap: wrap;
margin-bottom: 16px;
span {
display: flex;
align-items: center;
@@ -207,7 +206,7 @@ onMounted(() => {
color: #444;
}
}
.description {
font-size: 16px;
line-height: 1.6;
@@ -222,7 +221,7 @@ onMounted(() => {
justify-content: center;
flex-wrap: wrap;
margin: 6px 0;
a {
display: inline-flex;
align-items: center;
@@ -231,20 +230,20 @@ onMounted(() => {
font-size: 16px;
text-decoration: none;
transition: all 0.2s ease;
&.doc-link {
color: #555;
background-color: rgba(0, 0, 0, 0.05);
&:hover {
background-color: rgba(0, 0, 0, 0.1);
}
}
&.download-link {
color: #fff;
background-color: #007aff;
&:hover {
background-color: #0062cc;
}
@@ -259,7 +258,7 @@ onMounted(() => {
align-items: center;
justify-content: center;
gap: 10px;
.qrcode {
width: 180px;
height: 180px;
@@ -268,7 +267,7 @@ onMounted(() => {
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
background: white;
}
p {
margin-top: 14px;
font-size: 15px;
@@ -279,14 +278,14 @@ onMounted(() => {
.support-section {
width: 100%;
text-align: center;
h4 {
font-size: 22px;
font-weight: 600;
color: #333;
margin-bottom: 8px;
}
.support-desc {
font-size: 15px;
color: #555;
@@ -307,21 +306,21 @@ onMounted(() => {
flex-direction: column;
align-items: center;
gap: 10px;
.payment-icon {
width: 220px;
height: 220px;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
span {
font-size: 15px;
color: #444;
@@ -341,17 +340,17 @@ onMounted(() => {
padding: 10px;
background-color: #fff;
z-index: 999999999;
.action-button {
min-width: 110px;
border-radius: 8px;
font-size: 16px;
padding: 8px 16px;
&.primary {
background-color: #007aff;
color: white;
&:hover {
background-color: #0062cc;
}
@@ -364,48 +363,48 @@ onMounted(() => {
h3 {
font-size: 20px;
}
.platform-support {
gap: 12px;
}
.description {
font-size: 13px;
}
}
.app-icon {
width: 64px;
height: 64px;
}
.qrcode-section {
.qrcode {
width: 140px;
height: 140px;
}
}
.payment-option {
.payment-icon {
width: 190px;
height: 190px;
}
}
.drawer-actions {
flex-wrap: wrap;
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 10px;
background-color: #fff;
z-index: 999999999;
bottom: 0;
left: 0;
right: 0;
padding: 10px;
background-color: #fff;
z-index: 999999999;
.action-button {
flex: 1 0 auto;
}
}
}
</style>
</style>