feat: Add multiple scan paths support & file check function. Refactor imports in cloudScanner.ts. Add location check in Header
This commit is contained in:
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,5 +1,16 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## v1.6.30 (2025-12-22)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- feat: Add support for multiple scan paths in cloud storage (31b2d05)
|
||||||
|
- feat: Add function to check if file exists before upload (2816ea1)
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- refactor: Reorganize imports in cloudScanner.ts (d96c785)
|
||||||
|
|
||||||
## v1.6.29 (2025-12-21)
|
## v1.6.29 (2025-12-21)
|
||||||
|
|
||||||
### Style
|
### Style
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
useTheme
|
useTheme
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
import { FormEvent, useEffect, useState } from 'react';
|
import { FormEvent, useEffect, useState } from 'react';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useLocation, useNavigate } from 'react-router-dom';
|
||||||
import { useLanguage } from '../../contexts/LanguageContext';
|
import { useLanguage } from '../../contexts/LanguageContext';
|
||||||
import { useThemeContext } from '../../contexts/ThemeContext';
|
import { useThemeContext } from '../../contexts/ThemeContext';
|
||||||
import { useVideo } from '../../contexts/VideoContext';
|
import { useVideo } from '../../contexts/VideoContext';
|
||||||
@@ -42,6 +42,7 @@ const Header: React.FC<HeaderProps> = ({
|
|||||||
const [websiteName, setWebsiteName] = useState('MyTube');
|
const [websiteName, setWebsiteName] = useState('MyTube');
|
||||||
const [isScrolled, setIsScrolled] = useState<boolean>(false);
|
const [isScrolled, setIsScrolled] = useState<boolean>(false);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
const location = useLocation();
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { mode: themeMode } = useThemeContext();
|
const { mode: themeMode } = useThemeContext();
|
||||||
const isMobile = useMediaQuery(theme.breakpoints.down('md'));
|
const isMobile = useMediaQuery(theme.breakpoints.down('md'));
|
||||||
@@ -49,6 +50,8 @@ const Header: React.FC<HeaderProps> = ({
|
|||||||
const { visitorMode } = useVisitorMode();
|
const { visitorMode } = useVisitorMode();
|
||||||
const { availableTags, selectedTags, handleTagToggle } = useVideo();
|
const { availableTags, selectedTags, handleTagToggle } = useVideo();
|
||||||
|
|
||||||
|
const isSettingsPage = location.pathname.startsWith('/settings');
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('Header props:', { activeDownloads, queuedDownloads });
|
console.log('Header props:', { activeDownloads, queuedDownloads });
|
||||||
}, [activeDownloads, queuedDownloads]);
|
}, [activeDownloads, queuedDownloads]);
|
||||||
@@ -156,7 +159,7 @@ const Header: React.FC<HeaderProps> = ({
|
|||||||
const gradientBackground = `linear-gradient(to bottom, ${backgroundColor} 0%, ${alpha(backgroundColor, 0)} 100%)`;
|
const gradientBackground = `linear-gradient(to bottom, ${backgroundColor} 0%, ${alpha(backgroundColor, 0)} 100%)`;
|
||||||
|
|
||||||
// Desktop background: 30% transparent (70% opacity)
|
// Desktop background: 30% transparent (70% opacity)
|
||||||
const desktopBackgroundColor = !isMobile
|
const desktopBackgroundColor = !isMobile
|
||||||
? alpha(theme.palette.background.paper, 0.7)
|
? alpha(theme.palette.background.paper, 0.7)
|
||||||
: 'background.paper';
|
: 'background.paper';
|
||||||
|
|
||||||
@@ -188,7 +191,7 @@ const Header: React.FC<HeaderProps> = ({
|
|||||||
flexDirection: isMobile ? 'column' : 'row',
|
flexDirection: isMobile ? 'column' : 'row',
|
||||||
alignItems: isMobile ? 'stretch' : 'center',
|
alignItems: isMobile ? 'stretch' : 'center',
|
||||||
py: isMobile ? (isScrolled ? 0.5 : 1) : 0,
|
py: isMobile ? (isScrolled ? 0.5 : 1) : 0,
|
||||||
minHeight: isMobile
|
minHeight: isMobile
|
||||||
? (isScrolled ? '40px !important' : undefined)
|
? (isScrolled ? '40px !important' : undefined)
|
||||||
: undefined,
|
: undefined,
|
||||||
transition: 'min-height 0.3s ease-in-out, padding 0.3s ease-in-out',
|
transition: 'min-height 0.3s ease-in-out, padding 0.3s ease-in-out',
|
||||||
@@ -222,12 +225,12 @@ const Header: React.FC<HeaderProps> = ({
|
|||||||
// Full header when at top
|
// Full header when at top
|
||||||
<>
|
<>
|
||||||
{/* Top Bar for Mobile / Main Bar for Desktop */}
|
{/* Top Bar for Mobile / Main Bar for Desktop */}
|
||||||
<Box sx={{
|
<Box sx={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
width: isMobile ? '100%' : 'auto',
|
width: isMobile ? '100%' : 'auto',
|
||||||
flexGrow: isMobile ? 0 : 0,
|
flexGrow: isMobile ? 0 : 0,
|
||||||
mr: isMobile ? 0 : 2,
|
mr: isMobile ? 0 : 2,
|
||||||
transition: 'all 0.3s ease-in-out',
|
transition: 'all 0.3s ease-in-out',
|
||||||
'& img': {
|
'& img': {
|
||||||
@@ -331,9 +334,9 @@ const Header: React.FC<HeaderProps> = ({
|
|||||||
transition: 'height 0.3s ease-in-out',
|
transition: 'height 0.3s ease-in-out',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Scroll to top button - mobile only */}
|
{/* Scroll to top button - mobile only */}
|
||||||
<Slide direction="up" in={isMobile && isScrolled} mountOnEnter unmountOnExit>
|
<Slide direction="up" in={isMobile && isScrolled && !isSettingsPage} mountOnEnter unmountOnExit>
|
||||||
<Fab
|
<Fab
|
||||||
color="primary"
|
color="primary"
|
||||||
size="medium"
|
size="medium"
|
||||||
|
|||||||
Reference in New Issue
Block a user