完善空间功能;完善MyModal组件;部分统一卡片填充色
This commit is contained in:
parent
a9fe9be78e
commit
c386fa0158
8
app.json
8
app.json
|
@ -21,8 +21,8 @@
|
|||
"supportsTablet": true,
|
||||
"bundleIdentifier": "com.jueweijue.ironfans",
|
||||
"infoPlist": {
|
||||
"NSPhotoLibraryUsageDescription": "允许铁粉空间访问您的相册",
|
||||
"NSPhotoLibraryAddUsageDescription": "允许铁粉空间保存图片到相册"
|
||||
"NSPhotoLibraryUsageDescription": "当您授权允许访问相册后,您能够在APP中浏览相册中的图片,以便您选择合适的图片进行上传,用于头像或其他位置",
|
||||
"NSPhotoLibraryAddUsageDescription": "当您授权允许保存图片到相册后,您能够将APP内容保存到本地,以便您稍后在相册中继续查看"
|
||||
}
|
||||
},
|
||||
"android": {
|
||||
|
@ -52,8 +52,8 @@
|
|||
[
|
||||
"expo-media-library",
|
||||
{
|
||||
"photosPermission": "允许铁粉空间访问您的相册,以便您选择合适的图片进行上传",
|
||||
"savePhotosPermission": "允许铁粉空间保存图片到相册,以便您稍后在相册中继续查看",
|
||||
"photosPermission": "当您授权允许访问相册后,您能够在APP中浏览相册中的图片,以便您选择合适的图片进行上传,用于头像或其他位置",
|
||||
"savePhotosPermission": "当您授权允许保存图片到相册后,您能够将APP内容保存到本地,以便您稍后在相册中继续查看",
|
||||
"isAccessMediaLocationEnabled": true
|
||||
}
|
||||
],
|
||||
|
|
|
@ -73,7 +73,7 @@ export default function CreatePostModal({ visible, setVisible }) {
|
|||
<TouchableOpacity
|
||||
activeOpacity={1}
|
||||
style={tailwind(
|
||||
"flex flex-col mt-auto mb-2 h-48 bg-[#17171A] rounded-3xl"
|
||||
"flex flex-col mt-auto mb-2 h-48 bg-[#17161A] rounded-3xl"
|
||||
)}
|
||||
>
|
||||
<View
|
||||
|
|
|
@ -10,9 +10,6 @@ import baseRequest from "../../utils/baseRequest";
|
|||
import Toast from "react-native-toast-message";
|
||||
import { generateSignature } from "../../utils/crypto";
|
||||
|
||||
//todo:每次回来重新获取数据刷新余额、如果是本人则直接展示微信
|
||||
//todo:等待接口上线,完善样式,测试
|
||||
|
||||
export default function GetWechatModal({ visible, setVisible, streamerMid }) {
|
||||
const tailwind = useTailwind();
|
||||
const blurhash = "LcKUTa%gOYWBYRt6xuoJo~s8V@fk";
|
||||
|
|
|
@ -54,7 +54,13 @@ export default function MediaPickerModal({
|
|||
setPermissionStatus("granted");
|
||||
return;
|
||||
}
|
||||
setRequestModalVisible(true);
|
||||
if (status === "undetermined") {
|
||||
setRequestModalVisible(true);
|
||||
return;
|
||||
}
|
||||
if (status === "denied") {
|
||||
requestMediaLibraryPermissions();
|
||||
}
|
||||
}
|
||||
checkMediaLibraryPermissions();
|
||||
}
|
||||
|
@ -276,9 +282,9 @@ export default function MediaPickerModal({
|
|||
video: ImagePickerVideo,
|
||||
}}
|
||||
onSave={async (assets) => {
|
||||
setVisible(false);
|
||||
const editedAssets = await changeToLocalUri(assets);
|
||||
setAssets(editedAssets);
|
||||
setVisible(false);
|
||||
}}
|
||||
onCancel={() => {
|
||||
setVisible(false);
|
||||
|
@ -300,20 +306,18 @@ export default function MediaPickerModal({
|
|||
title="权限申请"
|
||||
content="该功能需要开启存储权限,用于选择上传媒体文件"
|
||||
confirmText="继续"
|
||||
cancel={() => {
|
||||
setRequestModalVisible(false);
|
||||
}}
|
||||
confirm={() => {
|
||||
custom={() => {
|
||||
setRequestModalVisible(false);
|
||||
requestMediaLibraryPermissions();
|
||||
}}
|
||||
customText="继续"
|
||||
/>
|
||||
<MyModal
|
||||
visible={overlayVisible}
|
||||
setVisible={setOverlayVisible}
|
||||
title="您还未打开媒体权限"
|
||||
content="是否前往设置开启权限?"
|
||||
confirmText="继续"
|
||||
title="未获得相册权限"
|
||||
content="请先前往设置打开相关权限后重试"
|
||||
confirmText="去设置"
|
||||
cancel={() => {
|
||||
setOverlayVisible(false);
|
||||
}}
|
||||
|
|
|
@ -8,8 +8,11 @@ export default function MyModal({
|
|||
title,
|
||||
content,
|
||||
confirm,
|
||||
custom,
|
||||
customText,
|
||||
confirmText,
|
||||
cancelText,
|
||||
confirmLeft = false,
|
||||
}) {
|
||||
const tailwind = useTailwind();
|
||||
return (
|
||||
|
@ -41,32 +44,77 @@ export default function MyModal({
|
|||
{content}
|
||||
</Text>
|
||||
<View style={tailwind("flex-row justify-around")}>
|
||||
<TouchableOpacity
|
||||
onPress={() => setVisible(false)}
|
||||
style={tailwind(
|
||||
"border-r-2 border-t-2 border-[#2c2b2f] basis-1/2 pt-1 justify-center items-center"
|
||||
)}
|
||||
>
|
||||
<Text
|
||||
{custom ? (
|
||||
<TouchableOpacity
|
||||
onPress={custom}
|
||||
style={tailwind(
|
||||
"text-[#FFFFFF80] text-base font-medium text-center"
|
||||
"border-t-2 border-[#2c2b2f] w-full pt-1 justify-center items-center"
|
||||
)}
|
||||
>
|
||||
{cancelText ? cancelText : "取消"}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
<TouchableOpacity
|
||||
onPress={confirm}
|
||||
style={tailwind(
|
||||
"border-t-2 border-[#2c2b2f] basis-1/2 pt-1 justify-center items-center"
|
||||
)}
|
||||
>
|
||||
<Text
|
||||
style={tailwind("text-white text-base font-medium text-center")}
|
||||
>
|
||||
{confirmText ? confirmText : "确认"}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
<Text
|
||||
style={tailwind(
|
||||
"text-white text-base font-medium text-center"
|
||||
)}
|
||||
>
|
||||
{customText ? customText : "确认"}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
) : (
|
||||
<>
|
||||
{confirmLeft && (
|
||||
<TouchableOpacity
|
||||
onPress={confirm}
|
||||
style={tailwind(
|
||||
"border-r-2 border-t-2 border-[#2c2b2f] basis-1/2 pt-1 justify-center items-center"
|
||||
)}
|
||||
>
|
||||
<Text
|
||||
style={tailwind(
|
||||
"text-white text-base font-medium text-center"
|
||||
)}
|
||||
>
|
||||
{confirmText ? confirmText : "确认"}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
<TouchableOpacity
|
||||
onPress={() => setVisible(false)}
|
||||
style={
|
||||
confirmLeft
|
||||
? tailwind(
|
||||
"border-t-2 border-[#2c2b2f] basis-1/2 pt-1 justify-center items-center"
|
||||
)
|
||||
: tailwind(
|
||||
"border-r-2 border-t-2 border-[#2c2b2f] basis-1/2 pt-1 justify-center items-center"
|
||||
)
|
||||
}
|
||||
>
|
||||
<Text
|
||||
style={tailwind(
|
||||
"text-[#FFFFFF80] text-base font-medium text-center"
|
||||
)}
|
||||
>
|
||||
{cancelText ? cancelText : "取消"}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
{!confirmLeft && (
|
||||
<TouchableOpacity
|
||||
onPress={confirm}
|
||||
style={tailwind(
|
||||
"border-t-2 border-[#2c2b2f] basis-1/2 pt-1 justify-center items-center"
|
||||
)}
|
||||
>
|
||||
<Text
|
||||
style={tailwind(
|
||||
"text-white text-base font-medium text-center"
|
||||
)}
|
||||
>
|
||||
{confirmText ? confirmText : "确认"}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
|
|
@ -285,7 +285,11 @@ export default function SpacePost({ data }) {
|
|||
...tailwind("text-sm font-medium"),
|
||||
}}
|
||||
>
|
||||
{data.is_ironfan_visible === 1 ? "铁粉" : "超粉"}免费查看
|
||||
{data.is_ironfan_visible === 1
|
||||
? "铁粉免费查看"
|
||||
: data.is_superfanship_enabled === 1
|
||||
? "超粉免费查看"
|
||||
: "付费解锁"}
|
||||
</Text>
|
||||
<Icon
|
||||
type="ionicon"
|
||||
|
|
|
@ -19,7 +19,6 @@ import baseRequest from "../../utils/baseRequest";
|
|||
import { generateSignature } from "../../utils/crypto";
|
||||
import MyModal from "../../components/MyModal";
|
||||
|
||||
//todo:使用更新后的MyModal组件,禁止关闭弹窗
|
||||
export default function CreateImagePost({ navigation, route }) {
|
||||
const tailwind = useTailwind();
|
||||
const insets = useSafeAreaInsets();
|
||||
|
@ -250,16 +249,14 @@ export default function CreateImagePost({ navigation, route }) {
|
|||
setVisible={setIsBlockModalVisible}
|
||||
title="当前无法发帖"
|
||||
content="您当前审核未通过动态过多,请修改后再试"
|
||||
cancel={() => {
|
||||
setIsBlockModalVisible(false);
|
||||
}}
|
||||
confirm={() => {
|
||||
custom={() => {
|
||||
setIsBlockModalVisible(false);
|
||||
setTimeout(
|
||||
() => navigation.replace("VisibleToOneselfSpacePosts"),
|
||||
500
|
||||
);
|
||||
}}
|
||||
customText="去修改"
|
||||
/>
|
||||
<View style={tailwind("p-4")}>
|
||||
<View style={tailwind("mb-4")}>
|
||||
|
@ -335,7 +332,7 @@ export default function CreateImagePost({ navigation, route }) {
|
|||
style={{
|
||||
gap: 8,
|
||||
...tailwind(
|
||||
"flex flex-col mt-auto mb-2 bg-[#17171A] rounded-3xl"
|
||||
"flex flex-col mt-auto mb-2 bg-[#17161A] rounded-3xl"
|
||||
),
|
||||
}}
|
||||
>
|
||||
|
|
|
@ -19,7 +19,6 @@ import baseRequest from "../../utils/baseRequest";
|
|||
import { generateSignature } from "../../utils/crypto";
|
||||
import MyModal from "../../components/MyModal";
|
||||
|
||||
//todo:使用更新后的MyModal组件,禁止关闭弹窗
|
||||
export default function CreateVideoPost({ navigation, route }) {
|
||||
const tailwind = useTailwind();
|
||||
const insets = useSafeAreaInsets();
|
||||
|
@ -226,16 +225,14 @@ export default function CreateVideoPost({ navigation, route }) {
|
|||
setVisible={setIsBlockModalVisible}
|
||||
title="当前无法发帖"
|
||||
content="您当前审核未通过动态过多,请修改后再试"
|
||||
cancel={() => {
|
||||
setIsBlockModalVisible(false);
|
||||
}}
|
||||
confirm={() => {
|
||||
custom={() => {
|
||||
setIsBlockModalVisible(false);
|
||||
setTimeout(
|
||||
() => navigation.replace("VisibleToOneselfSpacePosts"),
|
||||
500
|
||||
);
|
||||
}}
|
||||
customText="去修改"
|
||||
/>
|
||||
<View style={tailwind("p-4")}>
|
||||
<View style={tailwind("mb-4")}>
|
||||
|
@ -311,7 +308,7 @@ export default function CreateVideoPost({ navigation, route }) {
|
|||
style={{
|
||||
gap: 8,
|
||||
...tailwind(
|
||||
"flex flex-col mt-auto mb-2 bg-[#17171A] rounded-3xl"
|
||||
"flex flex-col mt-auto mb-2 bg-[#17161A] rounded-3xl"
|
||||
),
|
||||
}}
|
||||
>
|
||||
|
|
|
@ -367,7 +367,7 @@ export default function AgencySetting({ navigation, route }) {
|
|||
style={{
|
||||
gap: 12,
|
||||
...tailwind(
|
||||
"flex flex-col w-full bg-[#17171A] rounded-3xl px-4 py-6"
|
||||
"flex flex-col w-full bg-[#17161A] rounded-3xl px-4 py-6"
|
||||
),
|
||||
}}
|
||||
>
|
||||
|
|
|
@ -350,24 +350,49 @@ export default function CollaboratorSetting({ navigation, route }) {
|
|||
(item) => item.collaborator_mid === selfMid
|
||||
);
|
||||
return (
|
||||
<View
|
||||
<ScrollView
|
||||
style={{
|
||||
gap: 8,
|
||||
...tailwind(
|
||||
"flex flex-col border border-2 border-[#2c2b2f] rounded-2xl p-4 w-full mt-6"
|
||||
),
|
||||
paddingBottom: insets.bottom,
|
||||
paddingLeft: insets.left,
|
||||
paddingRight: insets.right,
|
||||
...tailwind("flex-1"),
|
||||
}}
|
||||
>
|
||||
<Text style={tailwind("text-white text-base font-medium")}>
|
||||
合伙人昵称:{selfData.collaborator_account.name}
|
||||
</Text>
|
||||
<Text style={tailwind("text-white text-base font-medium")}>
|
||||
ID:{selfData.collaborator_account.user_id}
|
||||
</Text>
|
||||
<Text style={tailwind("text-white text-base font-medium")}>
|
||||
分成比例:{data.sharing_ratio * 100}%
|
||||
</Text>
|
||||
</View>
|
||||
<View style={tailwind("px-4")}>
|
||||
<View
|
||||
style={{
|
||||
gap: 8,
|
||||
...tailwind(
|
||||
"flex flex-col border border-2 border-[#2c2b2f] rounded-2xl p-4 w-full mt-6"
|
||||
),
|
||||
}}
|
||||
>
|
||||
<Text style={tailwind("text-white text-base font-medium")}>
|
||||
合伙人昵称:{selfData[0]?.collaborator_account?.name}
|
||||
</Text>
|
||||
<Text style={tailwind("text-white text-base font-medium")}>
|
||||
ID:{selfData[0]?.collaborator_account?.user_id}
|
||||
</Text>
|
||||
<Text style={tailwind("text-white text-base font-medium")}>
|
||||
分成比例:{selfData[0]?.sharing_ratio * 100}%
|
||||
</Text>
|
||||
</View>
|
||||
<View style={tailwind("mt-8")}>
|
||||
<Text style={tailwind("text-[#FFFFFF80] text-base font-medium")}>
|
||||
注意事项:
|
||||
</Text>
|
||||
<Text style={tailwind("text-[#FFFFFF80] text-sm")}>
|
||||
1、总分成比例由当前空间主人设置,您的个人分成比例由代运营进行设置;
|
||||
</Text>
|
||||
<Text style={tailwind("text-[#FFFFFF80] text-sm")}>
|
||||
2、您的个人收益计算公式为:空间收益x个人分成比例=个人收益,收益将以钻石形式发放至您的钱包;
|
||||
</Text>
|
||||
<Text style={tailwind("text-[#FFFFFF80] text-sm")}>
|
||||
3、若您对收益情况存在任何疑问,请联系人工客服。
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -451,7 +476,7 @@ export default function CollaboratorSetting({ navigation, route }) {
|
|||
style={{
|
||||
gap: 12,
|
||||
...tailwind(
|
||||
"flex flex-col w-full bg-[#17171A] rounded-3xl px-4 py-6"
|
||||
"flex flex-col w-full bg-[#17161A] rounded-3xl px-4 py-6"
|
||||
),
|
||||
}}
|
||||
>
|
||||
|
|
|
@ -16,7 +16,6 @@ import baseRequest from "../../../utils/baseRequest";
|
|||
import { generateSignature } from "../../../utils/crypto";
|
||||
import Toast from "react-native-toast-message";
|
||||
|
||||
//todo:修改MyModal组件,让确认按钮摆在左边
|
||||
export default function SelectSpaceSettingItem({ navigation, route, data }) {
|
||||
const blurhash = "LcKUTa%gOYWBYRt6xuoJo~s8V@fk";
|
||||
|
||||
|
@ -211,6 +210,7 @@ export default function SelectSpaceSettingItem({ navigation, route, data }) {
|
|||
setIsExitSpaceModalVisible(false);
|
||||
handleExitSpace();
|
||||
}}
|
||||
confirmLeft
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue