From e2cc2e7adf0f625f890b7fd9c6e32795b5e34653 Mon Sep 17 00:00:00 2001 From: itenl Date: 2021年2月26日 03:05:24 +0800 Subject: [PATCH 1/2] Added long press to copy --- package.json | 2 +- src/log.js | 35 ++++++++++++++++++++++------------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index ab1316b..cf9382c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-vdebug", - "version": "1.2.1", + "version": "1.2.2", "description": "React-Native 调试工具", "main": "index.js", "scripts": { diff --git a/src/log.js b/src/log.js index e4aac4d..8e57266 100644 --- a/src/log.js +++ b/src/log.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { TextInput, FlatList, Text, StyleSheet, View, TouchableOpacity } from 'react-native'; +import { TextInput, FlatList, Text, StyleSheet, View, TouchableOpacity, Clipboard, TouchableWithoutFeedback, Alert } from 'react-native'; import event from './event'; import { debounce } from './tool'; @@ -169,20 +169,29 @@ class Log extends Component { if (this.state.filterLevel && this.state.filterLevel != item.method) return null; if (this.state.filterValue && this.regInstance && !this.regInstance.test(item.data)) return null; return ( - - - - {item.index} - - - {item.method} - - - {item.time} + { + try { + Clipboard.setString(`${item.data}\r\n\r\nLight up the little star and support me.\r\nhttps://github.com/itenl/react-native-vdebug`); + Alert.alert('Info', 'Copy successfully', [{ text: 'OK' }]); + } catch (error) {} + }} +> + + + + {item.index} + + + {item.method} + + + {item.time} + + {item.data} - {item.data} - + ); } From 6568894b439aead2f7274514bed51f395d86bb49 Mon Sep 17 00:00:00 2001 From: itenl Date: 2021年8月28日 19:29:12 +0800 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c6fdc90..c18643e 100644 --- a/README.md +++ b/README.md @@ -58,4 +58,4 @@ return

AltStyle によって変換されたページ (->オリジナル) /