Added tip for error message

This commit is contained in:
GhostID-ops 2026-03-11 23:05:53 -04:00
parent 7d60a0c43f
commit 703d9b09d2
9 changed files with 1547 additions and 3 deletions

3
.idea/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

9
.idea/NuvioMobile.iml Normal file
View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

File diff suppressed because it is too large Load diff

6
.idea/misc.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/NuvioMobile.iml" filepath="$PROJECT_DIR$/.idea/NuvioMobile.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View file

@ -21,6 +21,7 @@ interface CustomAlertProps {
visible: boolean;
title: string;
message: string;
subtitle?: string;
onClose: () => void;
actions?: Array<{
label: string;
@ -33,6 +34,7 @@ export const CustomAlert = ({
visible,
title,
message,
subtitle,
onClose,
actions = [
{ label: 'OK', onPress: onClose }
@ -110,6 +112,13 @@ export const CustomAlert = ({
{message}
</Text>
{/* Subtitle / tooltip */}
{subtitle ? (
<Text style={styles.subtitle}>
{subtitle}
</Text>
) : null}
{/* Actions */}
<View style={[
styles.actionsRow,
@ -200,11 +209,19 @@ const styles = StyleSheet.create({
message: {
color: '#AAAAAA',
fontSize: 15,
marginBottom: 24,
marginBottom: 8,
textAlign: 'center',
lineHeight: 22,
letterSpacing: 0.1,
},
subtitle: {
color: '#666666',
fontSize: 12,
marginBottom: 24,
textAlign: 'center',
lineHeight: 18,
letterSpacing: 0.1,
},
actionsRow: {
flexDirection: 'row',
justifyContent: 'flex-end',

View file

@ -35,6 +35,7 @@ export const StreamsScreen = () => {
alertVisible,
alertTitle,
alertMessage,
alertSubtitle,
alertActions,
openAlert,
closeAlert,
@ -206,6 +207,7 @@ export const StreamsScreen = () => {
visible={alertVisible}
title={alertTitle}
message={alertMessage}
subtitle={alertSubtitle}
actions={alertActions}
onClose={closeAlert}
/>

View file

@ -68,6 +68,7 @@ export const useStreamsScreen = () => {
const [alertVisible, setAlertVisible] = useState(false);
const [alertTitle, setAlertTitle] = useState('');
const [alertMessage, setAlertMessage] = useState('');
const [alertSubtitle, setAlertSubtitle] = useState('');
const [alertActions, setAlertActions] = useState<AlertAction[]>([]);
// Loading and provider state
@ -174,12 +175,13 @@ export const useStreamsScreen = () => {
// Open alert helper
const openAlert = useCallback(
(title: string, message: string, actions?: AlertAction[]) => {
(title: string, message: string, actions?: AlertAction[], subtitle?: string) => {
if (!isMounted.current) return;
try {
setAlertTitle(title);
setAlertMessage(message);
setAlertSubtitle(subtitle ?? '');
setAlertActions(actions && actions.length > 0 ? actions : [{ label: 'OK', onPress: () => { } }]);
setAlertVisible(true);
} catch (error) {
@ -463,7 +465,7 @@ export const useStreamsScreen = () => {
// Block magnet links
if (typeof stream.url === 'string' && stream.url.startsWith('magnet:')) {
openAlert('Not supported', 'Torrent streaming is not supported yet.');
openAlert('Not supported', 'Torrent streaming is not supported yet.', undefined, 'You need a Debrid provider.');
return;
}
@ -1144,6 +1146,7 @@ export const useStreamsScreen = () => {
alertVisible,
alertTitle,
alertMessage,
alertSubtitle,
alertActions,
openAlert,
closeAlert,