Compare commits
No commits in common. "835656bb30af34ed6bd0d24c8b701694fa01ed20" and "6ec87821e8b5da10f9e5d859afd6bab0809613f5" have entirely different histories.
835656bb30
...
6ec87821e8
2 changed files with 13 additions and 16 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import {FlatList, Linking, Platform, Image} from 'react-native';
|
import {FlatList, Linking, Platform} from 'react-native';
|
||||||
import i18n from 'i18n-js';
|
import i18n from 'i18n-js';
|
||||||
import {Avatar, Card, List, Title, withTheme} from 'react-native-paper';
|
import {Avatar, Card, List, Title, withTheme} from 'react-native-paper';
|
||||||
import {StackNavigationProp} from '@react-navigation/stack';
|
import {StackNavigationProp} from '@react-navigation/stack';
|
||||||
|
|
@ -222,10 +222,10 @@ class AboutScreen extends React.Component<PropsType> {
|
||||||
title="Campus"
|
title="Campus"
|
||||||
subtitle={packageJson.version}
|
subtitle={packageJson.version}
|
||||||
left={(iconProps: CardTitleIconPropsType): React.Node => (
|
left={(iconProps: CardTitleIconPropsType): React.Node => (
|
||||||
<Image
|
<Avatar.Image
|
||||||
size={iconProps.size}
|
size={iconProps.size}
|
||||||
source={APP_LOGO}
|
source={APP_LOGO}
|
||||||
style={{width: iconProps.size, height: iconProps.size}}
|
style={{backgroundColor: 'transparent'}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import {Linking, Image} from 'react-native';
|
import {Linking} from 'react-native';
|
||||||
import {Card, Text, withTheme} from 'react-native-paper';
|
import {Avatar, Card, Text, withTheme} from 'react-native-paper';
|
||||||
import Autolink from 'react-native-autolink';
|
import Autolink from 'react-native-autolink';
|
||||||
import {StackNavigationProp} from '@react-navigation/stack';
|
import {StackNavigationProp} from '@react-navigation/stack';
|
||||||
import MaterialHeaderButtons, {
|
import MaterialHeaderButtons, {
|
||||||
|
|
@ -12,14 +12,16 @@ import CustomTabBar from '../../components/Tabbar/CustomTabBar';
|
||||||
import type {FeedItemType} from './HomeScreen';
|
import type {FeedItemType} from './HomeScreen';
|
||||||
import CollapsibleScrollView from '../../components/Collapsible/CollapsibleScrollView';
|
import CollapsibleScrollView from '../../components/Collapsible/CollapsibleScrollView';
|
||||||
import ImageGalleryButton from '../../components/Media/ImageGalleryButton';
|
import ImageGalleryButton from '../../components/Media/ImageGalleryButton';
|
||||||
import NewsSourcesConstants from '../../constants/NewsSourcesConstants';
|
|
||||||
import type {NewsSourceType} from '../../constants/NewsSourcesConstants';
|
|
||||||
|
|
||||||
type PropsType = {
|
type PropsType = {
|
||||||
navigation: StackNavigationProp,
|
navigation: StackNavigationProp,
|
||||||
route: {params: {data: FeedItemType, date: string}},
|
route: {params: {data: FeedItemType, date: string}},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const ICON_AMICALE = require('../../../assets/amicale.png');
|
||||||
|
|
||||||
|
const NAME_AMICALE = 'Amicale INSA Toulouse';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class defining a feed item page.
|
* Class defining a feed item page.
|
||||||
*/
|
*/
|
||||||
|
|
@ -70,21 +72,16 @@ class FeedItemScreen extends React.Component<PropsType> {
|
||||||
const {navigation} = this.props;
|
const {navigation} = this.props;
|
||||||
const hasImage =
|
const hasImage =
|
||||||
this.displayData.image !== '' && this.displayData.image != null;
|
this.displayData.image !== '' && this.displayData.image != null;
|
||||||
const pageSource: NewsSourceType =
|
|
||||||
NewsSourcesConstants[this.displayData.page_id];
|
|
||||||
return (
|
return (
|
||||||
<CollapsibleScrollView style={{margin: 5}} hasTab>
|
<CollapsibleScrollView style={{margin: 5}} hasTab>
|
||||||
<Card.Title
|
<Card.Title
|
||||||
title={pageSource.name}
|
title={NAME_AMICALE}
|
||||||
subtitle={this.date}
|
subtitle={this.date}
|
||||||
left={(): React.Node => (
|
left={(): React.Node => (
|
||||||
<Image
|
<Avatar.Image
|
||||||
size={48}
|
size={48}
|
||||||
source={pageSource.icon}
|
source={ICON_AMICALE}
|
||||||
style={{
|
style={{backgroundColor: 'transparent'}}
|
||||||
width: 48,
|
|
||||||
height: 48,
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue