Skip to content

Commit a1fa519

Browse files
Merge commit '8839a8979af4fad6feac39715c8972497d43dd75' of github.com:StoDevX/AAO-React-Native into v2.0.0-RC2
2 parents 4d4d921 + 8839a89 commit a1fa519

File tree

4 files changed

+82
-9
lines changed

4 files changed

+82
-9
lines changed
54.2 KB
Loading

ios/AllAboutOlaf/Info.plist

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>LSApplicationQueriesSchemes</key>
6+
<array>
7+
<string>KSTORadio</string>
8+
</array>
59
<key>CFBundleDevelopmentRegion</key>
610
<string>en</string>
711
<key>CFBundleExecutable</key>
@@ -18,6 +22,19 @@
1822
<string>1.0</string>
1923
<key>CFBundleSignature</key>
2024
<string>????</string>
25+
<key>CFBundleURLTypes</key>
26+
<array>
27+
<dict>
28+
<key>CFBundleTypeRole</key>
29+
<string>Editor</string>
30+
<key>CFBundleURLName</key>
31+
<string>NFMTHAZVS9.com.drewvolz.stolaf</string>
32+
<key>CFBundleURLSchemes</key>
33+
<array>
34+
<string>AllAboutOlaf</string>
35+
</array>
36+
</dict>
37+
</array>
2138
<key>CFBundleVersion</key>
2239
<string>1</string>
2340
<key>LSRequiresIPhoneOS</key>

views/components/colors.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ export const theLatest = '#00BFFF'
3131
export const olevilleGold = '#F7B600'
3232
export const olevilleBackground = '#F0F0E1'
3333

34+
// MARK: KSTO Colors
35+
export const kstoPrimaryLight = '#c5c5e8'
36+
export const kstoSecondaryLight = '#7789bb'
37+
export const kstoPrimaryDark = '#686ea1'
38+
export const kstoSecondaryDark = '#4c4f71'
39+
export const kstoTextLight = '#dcdde5'
40+
export const kstoTextDark = '#bebad4'
41+
3442
// MARK: System Colors
3543
export const infoBlue = 'rgb(47, 112, 225)'
3644
export const success = 'rgb(83, 215, 106)'

views/streaming/radio.js

Lines changed: 57 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,75 @@ import React from 'react'
88
import {
99
StyleSheet,
1010
View,
11-
WebView,
11+
Text,
12+
Linking,
13+
Platform,
14+
Dimensions,
15+
Image,
1216
} from 'react-native'
17+
import Button from 'react-native-button'
18+
import * as c from '../components/colors'
1319

14-
// let kstoDownload = 'itms://itunes.apple.com/us/app/ksto/id953916647'
15-
16-
const url = 'http://pages.stolaf.edu/ksto/listen/'
20+
let kstoApp = 'KSTORadio://'
21+
let kstoDownload = 'itms://itunes.apple.com/us/app/ksto/id953916647'
22+
let kstoWeb = 'https://www.stolaf.edu/multimedia/play/embed/ksto.html'
23+
let image = require('../../data/images/streaming/ksto/ksto-logo.png')
1724

1825
export default function KSTOView() {
1926
return (
2027
<View style={styles.container}>
21-
<WebView
22-
source={{uri: url}}
23-
startInLoadingState={true}
24-
style={styles.container}
25-
/>
28+
<Image source={image} style={styles.logo} />
29+
<Text style={styles.kstoText}>St. Olaf College Radio</Text>
30+
<Text style={styles.kstoText}>KSTO 93.1 FM</Text>
31+
<Button
32+
onPress={() => {
33+
if (Platform.OS === 'android') {
34+
Linking.openURL(kstoWeb).catch(err => console.error('An error occurred opening the Android KSTO url', err))
35+
} else {
36+
Linking.canOpenURL(kstoApp).then(supported => {
37+
if (!supported) {
38+
Linking.openURL(kstoDownload).catch(err => console.error('An error occurred opening the KSTO download url', err))
39+
} else {
40+
return Linking.openURL(kstoApp)
41+
}
42+
}).catch(err => console.error('An error occurred opening the iOS KSTO url', err))
43+
}
44+
}}
45+
style={styles.button}
46+
>Listen to KSTO</Button>
47+
<Text style={styles.kstoSubtext}>Look out for changes here soon!</Text>
2648
</View>
2749
)
2850
}
2951

3052
let styles = StyleSheet.create({
3153
container: {
3254
flex: 1,
55+
alignItems: 'center',
56+
marginTop: 15,
57+
},
58+
kstoText: {
59+
marginTop: 5,
60+
color: c.kstoPrimaryDark,
61+
fontSize: 25,
62+
},
63+
kstoSubtext: {
64+
marginTop: 5,
65+
},
66+
logo: {
67+
maxWidth: Dimensions.get('window').width / 1.2,
68+
maxHeight: Dimensions.get('window').height / 2,
69+
},
70+
button: {
71+
backgroundColor: c.denim,
72+
width: 200,
73+
color: c.white,
74+
alignSelf: 'center',
75+
height: 30,
76+
paddingTop: 3,
77+
marginBottom: 10,
78+
marginTop: 10,
79+
borderRadius: 6,
80+
overflow: 'hidden',
3381
},
3482
})

0 commit comments

Comments
 (0)