Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish v0.4.4 #343

Merged
merged 5 commits into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
`2024.11.10 v0.4.4`
【修复】修复了部分系统上弹窗、浮层等无法出现,或动画表现异常的问题

`2024.10.27 v0.4.3`
【修复】修复了部分系统上文字显示不全的问题

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "MusicFree",
"version": "0.4.3",
"version": "0.4.4",
"private": true,
"license": "AGPL",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion release/version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"0.4.3","changeLog":["安装包上传到了飞书云文档,浏览器打开链接后有个下载说明,可以根据这个指引安装apk", "【修复】修复了部分系统上文字显示不全的问题", "以下是更早版本的修复", "1. 【修复】修复本地音乐无法播放的问题", "2. 【修复】修复桌面歌词无法开启的问题","3. 【修复】修复了修改桌面歌词颜色会导致闪退的问题","4. 【修复】回滚了本地音乐部分读取文件的逻辑","5. 【修复】修复了点击【编辑歌单信息】按钮无效的问题"],"download":["https://r0rvr854dd1.feishu.cn/drive/folder/KLqKfWOA3lx8MKdo8xNcYpR8n7t"]}
{"version":"0.4.4","changeLog":["安装包上传到了飞书云文档,浏览器打开链接后有个下载说明,可以根据这个指引安装apk", "【修复】修复了部分系统上弹窗、浮层等无法出现,或动画表现异常的问题", "以下是更早版本的修复", "- 【修复】修复了部分系统上文字显示不全的问题", "- 【修复】修复本地音乐无法播放的问题", "- 【修复】修复桌面歌词无法开启的问题","- 【修复】修复了修改桌面歌词颜色会导致闪退的问题","- 【修复】回滚了本地音乐部分读取文件的逻辑","- 【修复】修复了点击【编辑歌单信息】按钮无效的问题"],"download":["https://r0rvr854dd1.feishu.cn/drive/folder/KLqKfWOA3lx8MKdo8xNcYpR8n7t"]}
6 changes: 3 additions & 3 deletions src/components/base/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {StyleSheet, TextInput, TextInputProps} from 'react-native';

interface IInputProps extends TextInputProps {
fontColor?: string;
hasHorizonalPadding?: boolean;
hasHorizontalPadding?: boolean;
}

export default function Input(props: IInputProps) {
const {fontColor, hasHorizonalPadding = true} = props;
const {fontColor, hasHorizontalPadding = true} = props;
const colors = useColors();

const currentColor = fontColor ?? colors.text;
Expand All @@ -24,7 +24,7 @@ export default function Input(props: IInputProps) {
placeholderTextColor={Color(currentColor).alpha(0.7).toString()}
{...props}
style={[
hasHorizonalPadding
hasHorizontalPadding
? styles.container
: styles.containerWithoutPadding,
defaultStyle,
Expand Down
10 changes: 5 additions & 5 deletions src/components/dialogs/components/downloadDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import openUrl from '@/utils/openUrl';
import Clipboard from '@react-native-clipboard/clipboard';
import {ScrollView, TouchableOpacity} from 'react-native-gesture-handler';
import {hideDialog} from '../useDialog';
import Config from '@/core/config';
import Checkbox from '@/components/base/checkbox';
import Button from '@/components/base/textButton.tsx';
import Dialog from './base';
import PersistStatus from '@/core/persistStatus';

interface IDownloadDialogProps {
version: string;
Expand All @@ -25,7 +25,7 @@ export default function DownloadDialog(props: IDownloadDialogProps) {
<Dialog
onDismiss={() => {
if (skipState) {
Config.set('status.app.skipVersion', version);
PersistStatus.set('app.skipVersion', version);
}
hideDialog();
}}>
Expand Down Expand Up @@ -55,15 +55,15 @@ export default function DownloadDialog(props: IDownloadDialogProps) {
onPress={() => {
hideDialog();
if (skipState) {
Config.set('status.app.skipVersion', version);
PersistStatus.set('app.skipVersion', version);
}
}}>
取消
</Button>
<Button
style={style.button}
onPress={async () => {
Config.set('status.app.skipVersion', undefined);
PersistStatus.set('app.skipVersion', undefined);
openUrl(fromUrl);
Clipboard.setString(fromUrl);
}}>
Expand All @@ -73,7 +73,7 @@ export default function DownloadDialog(props: IDownloadDialogProps) {
<Button
style={style.button}
onPress={async () => {
Config.set('status.app.skipVersion', undefined);
PersistStatus.set('app.skipVersion', undefined);
openUrl(backUrl);
Clipboard.setString(backUrl);
}}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialogs/components/editSheetDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default function EditSheetDetailDialog(props: IEditSheetDetailProps) {
numberOfLines={1}
textAlign="right"
value={title}
hasHorizonalPadding={false}
hasHorizontalPadding={false}
onChangeText={onTitleChange}
style={{
height: fontSizeConst.content * 2.5,
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialogs/components/radioDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function RadioDialog(props: IRadioDialogProps) {
<FlatList
style={{
maxHeight:
orientation === 'horizonal' ? vmin(60) : vmax(60),
orientation === 'horizontal' ? vmin(60) : vmax(60),
}}
data={content}
renderItem={({item}) => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/dialogs/components/subscribePluginDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function SubscribePluginDialog(
<View style={style.headerWrapper}>
<ThemeText>名称: </ThemeText>
<Input
hasHorizonalPadding={false}
hasHorizontalPadding={false}
style={[style.textInput, textColors]}
value={name}
onChangeText={t => {
Expand All @@ -54,7 +54,7 @@ export default function SubscribePluginDialog(
<View style={style.headerWrapper}>
<ThemeText>URL: </ThemeText>
<Input
hasHorizonalPadding={false}
hasHorizontalPadding={false}
style={[style.textInput, textColors]}
value={url}
onChangeText={t => {
Expand Down
5 changes: 3 additions & 2 deletions src/components/panels/base/panelBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function (props: IPanelBaseProps) {
const safeAreaInsets = useSafeAreaInsets();
const orientation = useOrientation();
const useAnimatedBase = useMemo(
() => (orientation === 'horizonal' ? rpx(750) : height),
() => (orientation === 'horizontal' ? rpx(750) : height),
[orientation],
);

Expand All @@ -64,6 +64,7 @@ export default function (props: IPanelBaseProps) {
const hideCallbackRef = useRef<Function[]>([]);

const [keyboardHeight, setKeyboardHeight] = useState(0);

useEffect(() => {
snapPoint.value = withTiming(1, timingConfig);

Expand Down Expand Up @@ -185,7 +186,7 @@ export default function (props: IPanelBaseProps) {
{
backgroundColor: colors.backdrop,
height:
orientation === 'horizonal'
orientation === 'horizontal'
? vh(100) - safeAreaInsets.top
: height -
(isFinite(keyboardHeight) ? keyboardHeight : 0),
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/types/editMusicSheetInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function EditMusicSheetInfo(props: IEditSheetDetailProps) {
numberOfLines={1}
textAlign="right"
value={title}
hasHorizonalPadding={false}
hasHorizontalPadding={false}
onChangeText={onTitleChange}
style={{
height: fontSizeConst.content * 2.5,
Expand Down
5 changes: 5 additions & 0 deletions src/entry/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ import Theme from '@/core/theme';
import {BootstrapComp} from './useBootstrap';
import {ToastBaseComponent} from '@/components/base/toast';
import {StatusBar} from 'react-native';
import {ReducedMotionConfig, ReduceMotion} from 'react-native-reanimated';
/**
* 字体颜色
*/

/**
* 字体颜色
Expand All @@ -32,6 +36,7 @@ export default function Pages() {
return (
<>
<BootstrapComp />
<ReducedMotionConfig mode={ReduceMotion.Never} />
<GestureHandlerRootView style={globalStyle.flex1}>
<SafeAreaProvider>
<NavigationContainer theme={theme} ref={navigationRef}>
Expand Down
6 changes: 3 additions & 3 deletions src/hooks/useOrientation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {atom, useAtomValue, useSetAtom} from 'jotai';
import {useEffect} from 'react';
import {Dimensions} from 'react-native';

const orientationAtom = atom<'vertical' | 'horizonal'>('vertical');
const orientationAtom = atom<'vertical' | 'horizontal'>('vertical');

export function useListenOrientationChange() {
const setOrientationAtom = useSetAtom(orientationAtom);
Expand All @@ -12,13 +12,13 @@ export function useListenOrientationChange() {
if (width < height) {
setOrientationAtom('vertical');
} else {
setOrientationAtom('horizonal');
setOrientationAtom('horizontal');
}
const subscription = Dimensions.addEventListener('change', e => {
if (e.window.width < e.window.height) {
setOrientationAtom('vertical');
} else {
setOrientationAtom('horizonal');
setOrientationAtom('horizontal');
}
});

Expand Down
8 changes: 4 additions & 4 deletions src/pages/artistDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ export default function ArtistDetail() {
</AppBar>
<View
style={
orientation === 'horizonal'
? style.horizonal
orientation === 'horizontal'
? style.horizontal
: globalStyle.flex1
}>
<Header neverFold={orientation === 'horizonal'} />
<Header neverFold={orientation === 'horizontal'} />
<Body />
</View>

Expand All @@ -61,7 +61,7 @@ export default function ArtistDetail() {
}

const style = StyleSheet.create({
horizonal: {
horizontal: {
flexDirection: 'row',
flex: 1,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Operations from './operations';
import {View} from 'react-native';
import Sheets from '../homeBody/sheets';

export default function HomeBodyHorizonal() {
export default function HomeBodyHorizontal() {
return (
<View style={globalStyle.rowfwflex1}>
<Operations />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,76 +1,76 @@
import React from 'react';
import {StyleSheet} from 'react-native';
import rpx from '@/utils/rpx';
import ActionButton from '../ActionButton';
import {ROUTE_PATH, useNavigate} from '@/entry/router';
import {ScrollView} from 'react-native-gesture-handler';
export default function Operations() {
const navigate = useNavigate();
const actionButtons = [
{
iconName: 'fire',
title: '推荐歌单',
action() {
navigate(ROUTE_PATH.RECOMMEND_SHEETS);
},
},
{
iconName: 'trophy',
title: '榜单',
action() {
navigate(ROUTE_PATH.TOP_LIST);
},
},
{
iconName: 'clock-outline',
title: '播放记录',
action() {
navigate(ROUTE_PATH.HISTORY);
},
},
{
iconName: 'folder-music-outline',
title: '本地音乐',
action() {
navigate(ROUTE_PATH.LOCAL);
},
},
] as const;
return (
<ScrollView style={styles.container}>
{actionButtons.map((action, index) => (
<ActionButton
style={[
styles.actionButtonStyle,
index % 4 ? styles.actionMarginLeft : null,
]}
key={action.title}
{...action}
/>
))}
</ScrollView>
);
}
const styles = StyleSheet.create({
container: {
width: rpx(200),
flexGrow: 0,
flexShrink: 0,
paddingHorizontal: rpx(24),
marginVertical: rpx(32),
flexDirection: 'row',
flexWrap: 'wrap',
},
actionButtonStyle: {
width: rpx(157.5),
height: rpx(160),
borderRadius: rpx(18),
},
actionMarginLeft: {
marginTop: rpx(24),
},
});
import React from 'react';
import {StyleSheet} from 'react-native';
import rpx from '@/utils/rpx';
import ActionButton from '../ActionButton';
import {ROUTE_PATH, useNavigate} from '@/entry/router';
import {ScrollView} from 'react-native-gesture-handler';

export default function Operations() {
const navigate = useNavigate();

const actionButtons = [
{
iconName: 'fire',
title: '推荐歌单',
action() {
navigate(ROUTE_PATH.RECOMMEND_SHEETS);
},
},
{
iconName: 'trophy',
title: '榜单',
action() {
navigate(ROUTE_PATH.TOP_LIST);
},
},
{
iconName: 'clock-outline',
title: '播放记录',
action() {
navigate(ROUTE_PATH.HISTORY);
},
},
{
iconName: 'folder-music-outline',
title: '本地音乐',
action() {
navigate(ROUTE_PATH.LOCAL);
},
},
] as const;

return (
<ScrollView style={styles.container}>
{actionButtons.map((action, index) => (
<ActionButton
style={[
styles.actionButtonStyle,
index % 4 ? styles.actionMarginLeft : null,
]}
key={action.title}
{...action}
/>
))}
</ScrollView>
);
}

const styles = StyleSheet.create({
container: {
width: rpx(200),
flexGrow: 0,
flexShrink: 0,
paddingHorizontal: rpx(24),
marginVertical: rpx(32),
flexDirection: 'row',
flexWrap: 'wrap',
},
actionButtonStyle: {
width: rpx(157.5),
height: rpx(160),
borderRadius: rpx(18),
},
actionMarginLeft: {
marginTop: rpx(24),
},
});
Loading