mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 02:51:20 -08:00
Refactor styles in ArtPlayer components for improved readability and consistency
- Consolidated loading styles in loading.less for better structure. - Updated mask styles in mask.less to enhance clarity. - Refined mini popup styles in mini.less, adding transition effects. - Improved mixins in mixins.less for consistent styling across components. - Adjusted mobile styles in mobile.less for better responsiveness. - Enhanced notice styles in notice.less for improved visibility. - Streamlined plugin styles in plugins.less for better organization. - Simplified poster styles in poster.less for clarity. - Refined progress styles in progress.less, enhancing hover effects. - Updated selector styles in selector.less for better interaction. - Improved settings styles in setting.less for better usability. - Enhanced subtitle styles in subtitle.less for better visibility. - Updated variable definitions in variables.less for consistency. - Refined video styles in video.less for improved layout. - Enhanced volume control styles in volume.less for better user experience. - Optimized rate limiting logic in build-llm.js and trans-docs.js for better performance.
This commit is contained in:
1 parent
b11f0eb99a
commit
740ac4cb24
9 files changed
+33
-20
No files matched your search
+12
-4
@@ -1,7 +1,15 @@
|
|||||||
import antfu from '@antfu/eslint-config'
|
import antfu from "@antfu/eslint-config";
|
||||||
|
|
||||||
export default antfu({
|
export default antfu({
|
||||||
rules: {
|
ignores: [
|
||||||
'eslint-comments/no-unlimited-disable': 'off',
|
"**/hint.less",
|
||||||
|
],
|
||||||
|
formatters: {
|
||||||
|
css: true,
|
||||||
|
html: true,
|
||||||
|
markdown: 'prettier',
|
||||||
},
|
},
|
||||||
})
|
rules: {
|
||||||
|
"eslint-comments/no-unlimited-disable": "off",
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -48,6 +48,7 @@
|
|||||||
"dotenv": "^17.2.1",
|
"dotenv": "^17.2.1",
|
||||||
"esbuild": "^0.27.3",
|
"esbuild": "^0.27.3",
|
||||||
"eslint": "^9.32.0",
|
"eslint": "^9.32.0",
|
||||||
|
"eslint-plugin-format": "^2.0.1",
|
||||||
"glob": "^13.0.6",
|
"glob": "^13.0.6",
|
||||||
"lerna": "^8.2.3",
|
"lerna": "^8.2.3",
|
||||||
"less": "^4.5.1",
|
"less": "^4.5.1",
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
height: 100% !important;
|
height: 100% !important;
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
|
|
||||||
&>.art-progress-hover,
|
& > .art-progress-hover,
|
||||||
&>.art-progress-loaded,
|
& > .art-progress-loaded,
|
||||||
&>.art-progress-played {
|
& > .art-progress-played {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,9 @@
|
|||||||
border-radius: var(--art-border-radius);
|
border-radius: var(--art-border-radius);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
background-color: var(--art-tip-background);
|
background-color: var(--art-tip-background);
|
||||||
transition: transform var(--art-transition-duration) ease, opacity var(--art-transition-duration) ease;
|
transition:
|
||||||
|
transform var(--art-transition-duration) ease,
|
||||||
|
opacity var(--art-transition-duration) ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.art-progress-hover {
|
&.art-progress-hover {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.artplayer-document-pip.art-video-player{
|
.artplayer-document-pip.art-video-player {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
height: 100% !important;
|
height: 100% !important;
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
.art-video-player {
|
.art-video-player {
|
||||||
.art-controls {
|
.art-controls {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
@@ -52,4 +52,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,9 +55,7 @@
|
|||||||
|
|
||||||
.art-controls,
|
.art-controls,
|
||||||
.art-progress {
|
.art-progress {
|
||||||
transform: translateY(
|
transform: translateY(calc(var(--art-control-height) + var(--art-bottom-gap) + var(--art-progress-height) / 4));
|
||||||
calc(var(--art-control-height) + var(--art-bottom-gap) + var(--art-progress-height) / 4)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.art-progress-indicator {
|
.art-progress-indicator {
|
||||||
|
|||||||
@@ -94,7 +94,9 @@
|
|||||||
border-radius: var(--art-border-radius);
|
border-radius: var(--art-border-radius);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
background-color: var(--art-tip-background);
|
background-color: var(--art-tip-background);
|
||||||
transition: transform var(--art-transition-duration) ease, opacity var(--art-transition-duration) ease;
|
transition:
|
||||||
|
transform var(--art-transition-duration) ease,
|
||||||
|
opacity var(--art-transition-duration) ease;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,7 +111,9 @@
|
|||||||
border-radius: var(--art-border-radius);
|
border-radius: var(--art-border-radius);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
background-color: var(--art-widget-background);
|
background-color: var(--art-widget-background);
|
||||||
transition: transform var(--art-transition-duration) ease, opacity var(--art-transition-duration) ease;
|
transition:
|
||||||
|
transform var(--art-transition-duration) ease,
|
||||||
|
opacity var(--art-transition-duration) ease;
|
||||||
box-shadow:
|
box-shadow:
|
||||||
0 1px 3px 0 rgb(0 0 0 / 0.2),
|
0 1px 3px 0 rgb(0 0 0 / 0.2),
|
||||||
0 1px 2px -1px rgb(0 0 0 / 0.2);
|
0 1px 2px -1px rgb(0 0 0 / 0.2);
|
||||||
@@ -131,7 +135,8 @@
|
|||||||
|
|
||||||
.art-progress-hover {
|
.art-progress-hover {
|
||||||
.art-bottom .art-progress {
|
.art-bottom .art-progress {
|
||||||
.art-control-progress .art-control-progress-inner .art-progress-tip, .art-control-thumbnails {
|
.art-control-progress .art-control-progress-inner .art-progress-tip,
|
||||||
|
.art-control-thumbnails {
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ async function askDeepSeek(prompt, text, tag, id) {
|
|||||||
|
|
||||||
// 处理限流情况
|
// 处理限流情况
|
||||||
if (res.status === 429) {
|
if (res.status === 429) {
|
||||||
const delay = Math.pow(2, attempt) * 1000
|
const delay = 2 ** attempt * 1000
|
||||||
console.log(`⏳ [${tag}] Rate limited, waiting ${delay}ms...`)
|
console.log(`⏳ [${tag}] Rate limited, waiting ${delay}ms...`)
|
||||||
await new Promise(r => setTimeout(r, delay))
|
await new Promise(r => setTimeout(r, delay))
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ function cleanTranslation(text) {
|
|||||||
return text
|
return text
|
||||||
.replace(/^```(markdown|md)?/gi, '')
|
.replace(/^```(markdown|md)?/gi, '')
|
||||||
.replace(/```$/g, '')
|
.replace(/```$/g, '')
|
||||||
.replace(/^(Here('|')s|Below is|Translation|The English version|Here is)[::]?\s*/gi, '')
|
.replace(/^(Here(')s|Below is|Translation|The English version|Here is)[::]?\s*/gi, '')
|
||||||
.replace(/(Translation completed\.?|End of translation\.?)$/gi, '')
|
.replace(/(Translation completed\.?|End of translation\.?)$/gi, '')
|
||||||
.trim()
|
.trim()
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ async function callDeepSeekAPI(prompt, tag, chunkId) {
|
|||||||
|
|
||||||
// 处理限流情况
|
// 处理限流情况
|
||||||
if (res.status === 429) {
|
if (res.status === 429) {
|
||||||
const delay = Math.pow(2, attempt) * 1000
|
const delay = 2 ** attempt * 1000
|
||||||
console.log(`⏳ [${tag}] Rate limited, waiting ${delay}ms...`)
|
console.log(`⏳ [${tag}] Rate limited, waiting ${delay}ms...`)
|
||||||
await new Promise(r => setTimeout(r, delay))
|
await new Promise(r => setTimeout(r, delay))
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in new issue
Block a user