@ -0,0 +1,5 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
|||
<plist version="1.0"> |
|||
<dict/> |
|||
</plist> |
@ -0,0 +1,5 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
|||
<plist version="1.0"> |
|||
<dict/> |
|||
</plist> |
@ -0,0 +1,56 @@ |
|||
// |
|||
// ComplicationController.swift |
|||
// T WatchKit Extension |
|||
// |
|||
// Created by Marcos Rodriguez on 8/24/19. |
|||
// Copyright © 2019 Marcos Rodriguez. All rights reserved. |
|||
// |
|||
|
|||
import ClockKit |
|||
|
|||
|
|||
class ComplicationController: NSObject, CLKComplicationDataSource { |
|||
|
|||
// MARK: - Timeline Configuration |
|||
|
|||
func getSupportedTimeTravelDirections(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTimeTravelDirections) -> Void) { |
|||
handler([.forward, .backward]) |
|||
} |
|||
|
|||
func getTimelineStartDate(for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void) { |
|||
handler(nil) |
|||
} |
|||
|
|||
func getTimelineEndDate(for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void) { |
|||
handler(nil) |
|||
} |
|||
|
|||
func getPrivacyBehavior(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationPrivacyBehavior) -> Void) { |
|||
handler(.showOnLockScreen) |
|||
} |
|||
|
|||
// MARK: - Timeline Population |
|||
|
|||
func getCurrentTimelineEntry(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTimelineEntry?) -> Void) { |
|||
// Call the handler with the current timeline entry |
|||
handler(nil) |
|||
} |
|||
|
|||
func getTimelineEntries(for complication: CLKComplication, before date: Date, limit: Int, withHandler handler: @escaping ([CLKComplicationTimelineEntry]?) -> Void) { |
|||
// Call the handler with the timeline entries prior to the given date |
|||
handler(nil) |
|||
} |
|||
|
|||
func getTimelineEntries(for complication: CLKComplication, after date: Date, limit: Int, withHandler handler: @escaping ([CLKComplicationTimelineEntry]?) -> Void) { |
|||
// Call the handler with the timeline entries after to the given date |
|||
handler(nil) |
|||
} |
|||
|
|||
// MARK: - Placeholder Templates |
|||
|
|||
func getLocalizableSampleTemplate(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTemplate?) -> Void) { |
|||
// This method will be called once per supported complication, and the results will be cached |
|||
handler(nil) |
|||
} |
|||
|
|||
} |
@ -0,0 +1,32 @@ |
|||
{ |
|||
"images" : [ |
|||
{ |
|||
"idiom" : "watch", |
|||
"screen-width" : "<=145", |
|||
"filename" : "circular38mm@2x.png", |
|||
"scale" : "2x" |
|||
}, |
|||
{ |
|||
"screen-width" : ">161", |
|||
"scale" : "2x", |
|||
"idiom" : "watch", |
|||
"filename" : "circular40mm@2x.png" |
|||
}, |
|||
{ |
|||
"scale" : "2x", |
|||
"idiom" : "watch", |
|||
"filename" : "circular42mm@2x.png", |
|||
"screen-width" : ">145" |
|||
}, |
|||
{ |
|||
"filename" : "circular44mm@2x.png", |
|||
"scale" : "2x", |
|||
"idiom" : "watch", |
|||
"screen-width" : ">183" |
|||
} |
|||
], |
|||
"info" : { |
|||
"version" : 1, |
|||
"author" : "xcode" |
|||
} |
|||
} |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
@ -0,0 +1,48 @@ |
|||
{ |
|||
"info" : { |
|||
"version" : 1, |
|||
"author" : "xcode" |
|||
}, |
|||
"assets" : [ |
|||
{ |
|||
"idiom" : "watch", |
|||
"role" : "circular", |
|||
"filename" : "Circular.imageset" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"filename" : "Modular.imageset", |
|||
"role" : "modular" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"filename" : "Utilitarian.imageset", |
|||
"role" : "utilitarian" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"role" : "extra-large", |
|||
"filename" : "Extra Large.imageset" |
|||
}, |
|||
{ |
|||
"role" : "graphic-corner", |
|||
"idiom" : "watch", |
|||
"filename" : "Graphic Corner.imageset" |
|||
}, |
|||
{ |
|||
"filename" : "Graphic Circular.imageset", |
|||
"role" : "graphic-circular", |
|||
"idiom" : "watch" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"filename" : "Graphic Bezel.imageset", |
|||
"role" : "graphic-bezel" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"role" : "graphic-large-rectangular", |
|||
"filename" : "Graphic Large Rectangular.imageset" |
|||
} |
|||
] |
|||
} |
@ -0,0 +1,32 @@ |
|||
{ |
|||
"images" : [ |
|||
{ |
|||
"filename" : "extra-large38mm@2x.png", |
|||
"screen-width" : "<=145", |
|||
"idiom" : "watch", |
|||
"scale" : "2x" |
|||
}, |
|||
{ |
|||
"screen-width" : ">161", |
|||
"filename" : "extra-large40mm@2x.png", |
|||
"idiom" : "watch", |
|||
"scale" : "2x" |
|||
}, |
|||
{ |
|||
"screen-width" : ">145", |
|||
"idiom" : "watch", |
|||
"filename" : "extra-large42mm@2x.png", |
|||
"scale" : "2x" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"scale" : "2x", |
|||
"screen-width" : ">183", |
|||
"filename" : "extra-large44mm@2x.png" |
|||
} |
|||
], |
|||
"info" : { |
|||
"version" : 1, |
|||
"author" : "xcode" |
|||
} |
|||
} |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,30 @@ |
|||
{ |
|||
"images" : [ |
|||
{ |
|||
"idiom" : "watch", |
|||
"scale" : "2x", |
|||
"screen-width" : "<=145" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"filename" : "graphic-bezel40mm@2x.png", |
|||
"screen-width" : ">161", |
|||
"scale" : "2x" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"scale" : "2x", |
|||
"screen-width" : ">145" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"filename" : "graphic-bezel44mm@2x.png", |
|||
"screen-width" : ">183", |
|||
"scale" : "2x" |
|||
} |
|||
], |
|||
"info" : { |
|||
"version" : 1, |
|||
"author" : "xcode" |
|||
} |
|||
} |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.9 KiB |
@ -0,0 +1,30 @@ |
|||
{ |
|||
"images" : [ |
|||
{ |
|||
"idiom" : "watch", |
|||
"scale" : "2x", |
|||
"screen-width" : "<=145" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"filename" : "graphic-circular40mm@2x.png", |
|||
"screen-width" : ">161", |
|||
"scale" : "2x" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"scale" : "2x", |
|||
"screen-width" : ">145" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"filename" : "graphic-circular44mm@2x.png", |
|||
"screen-width" : ">183", |
|||
"scale" : "2x" |
|||
} |
|||
], |
|||
"info" : { |
|||
"version" : 1, |
|||
"author" : "xcode" |
|||
} |
|||
} |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.9 KiB |
@ -0,0 +1,30 @@ |
|||
{ |
|||
"images" : [ |
|||
{ |
|||
"idiom" : "watch", |
|||
"scale" : "2x", |
|||
"screen-width" : "<=145" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"filename" : "graphic-corner40mm@2x.png", |
|||
"screen-width" : ">161", |
|||
"scale" : "2x" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"scale" : "2x", |
|||
"screen-width" : ">145" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"filename" : "graphic-corner44mm@2x.png", |
|||
"screen-width" : ">183", |
|||
"scale" : "2x" |
|||
} |
|||
], |
|||
"info" : { |
|||
"version" : 1, |
|||
"author" : "xcode" |
|||
} |
|||
} |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.6 KiB |
@ -0,0 +1,28 @@ |
|||
{ |
|||
"images" : [ |
|||
{ |
|||
"idiom" : "watch", |
|||
"scale" : "2x", |
|||
"screen-width" : "<=145" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"scale" : "2x", |
|||
"screen-width" : ">161" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"scale" : "2x", |
|||
"screen-width" : ">145" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"scale" : "2x", |
|||
"screen-width" : ">183" |
|||
} |
|||
], |
|||
"info" : { |
|||
"version" : 1, |
|||
"author" : "xcode" |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
{ |
|||
"info" : { |
|||
"version" : 1, |
|||
"author" : "xcode" |
|||
}, |
|||
"images" : [ |
|||
{ |
|||
"screen-width" : "<=145", |
|||
"scale" : "2x", |
|||
"idiom" : "watch", |
|||
"filename" : "modular38mm@2x.png" |
|||
}, |
|||
{ |
|||
"screen-width" : ">161", |
|||
"scale" : "2x", |
|||
"filename" : "modular40mm@2x.png", |
|||
"idiom" : "watch" |
|||
}, |
|||
{ |
|||
"scale" : "2x", |
|||
"idiom" : "watch", |
|||
"filename" : "modular42mm@2x.png", |
|||
"screen-width" : ">145" |
|||
}, |
|||
{ |
|||
"filename" : "modular44mm@2x.png", |
|||
"screen-width" : ">183", |
|||
"idiom" : "watch", |
|||
"scale" : "2x" |
|||
} |
|||
] |
|||
} |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.4 KiB |
@ -0,0 +1,32 @@ |
|||
{ |
|||
"info" : { |
|||
"version" : 1, |
|||
"author" : "xcode" |
|||
}, |
|||
"images" : [ |
|||
{ |
|||
"scale" : "2x", |
|||
"filename" : "utility38mm@2x.png", |
|||
"screen-width" : "<=145", |
|||
"idiom" : "watch" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"scale" : "2x", |
|||
"screen-width" : ">161", |
|||
"filename" : "utility40mm@2x.png" |
|||
}, |
|||
{ |
|||
"scale" : "2x", |
|||
"idiom" : "watch", |
|||
"filename" : "utility42mm@2x.png", |
|||
"screen-width" : ">145" |
|||
}, |
|||
{ |
|||
"idiom" : "watch", |
|||
"screen-width" : ">183", |
|||
"filename" : "utility44mm@2x.png", |
|||
"scale" : "2x" |
|||
} |
|||
] |
|||
} |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
@ -0,0 +1,78 @@ |
|||
import React, { Component } from 'react'; |
|||
import { BackHandler } from 'react-native'; |
|||
import { WebView } from 'react-native-webview'; |
|||
import { BlueLoading, BlueNavigationStyle } from '../../BlueComponents'; |
|||
import PropTypes from 'prop-types'; |
|||
|
|||
export default class Marketplace extends Component { |
|||
static navigationOptions = ({ navigation }) => ({ |
|||
...BlueNavigationStyle(navigation, true), |
|||
title: 'Marketplace', |
|||
headerLeft: null, |
|||
}); |
|||
|
|||
constructor(props) { |
|||
super(props); |
|||
if (!props.navigation.getParam('fromWallet')) throw new Error('Invalid param'); |
|||
let fromWallet = props.navigation.getParam('fromWallet'); |
|||
|
|||
this.state = { |
|||
url: '', |
|||
fromWallet, |
|||
canGoBack: false, |
|||
}; |
|||
BackHandler.addEventListener('hardwareBackPress', this.handleBackButton.bind(this)); |
|||
} |
|||
|
|||
async componentDidMount() { |
|||
let address; |
|||
if (this.state.fromWallet && this.state.fromWallet.getAddressAsync) { |
|||
address = await this.state.fromWallet.getAddressAsync(); |
|||
} else if (this.state.fromWallet && this.state.fromWallet.getAddress) { |
|||
address = this.state.fromWallet.getAddress(); |
|||
} |
|||
|
|||
let url = 'https://bluewallet.io/marketplace-btc/?address=' + address; // default
|
|||
|
|||
this.setState({ |
|||
url, |
|||
}); |
|||
} |
|||
|
|||
componentWillUnmount = () => { |
|||
BackHandler.removeEventListener('hardwareBackPress', this.handleBackButton.bind(this)); |
|||
}; |
|||
|
|||
handleBackButton() { |
|||
this.state.canGoBack ? this.webview.goBack() : this.props.navigation.goBack(null); |
|||
return true; |
|||
} |
|||
|
|||
_onNavigationStateChange = webViewState => { |
|||
this.setState({ canGoBack: webViewState.canGoBack }); |
|||
}; |
|||
|
|||
render() { |
|||
if (this.state.isLoading) { |
|||
return <BlueLoading />; |
|||
} |
|||
|
|||
return ( |
|||
<WebView |
|||
ref={ref => (this.webview = ref)} |
|||
onNavigationStateChange={this._onNavigationStateChange} |
|||
source={{ |
|||
uri: this.state.url, |
|||
}} |
|||
/> |
|||
); |
|||
} |
|||
} |
|||
|
|||
Marketplace.propTypes = { |
|||
navigation: PropTypes.shape({ |
|||
getParam: PropTypes.func, |
|||
navigate: PropTypes.func, |
|||
goBack: PropTypes.func, |
|||
}), |
|||
}; |