123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- import { WebView } from 'react-native-webview';
- import React, { PureComponent,Component } from 'react';
- // Button as R_Button
- import { Button, useTheme } from 'react-native-paper';
- import {
- Animated,
- Keyboard,
- SafeAreaView,
- TextInput,
- TouchableHighlight,
- TouchableOpacity,
- View,
- // Text,
- } from 'react-native';
- import * as rn from 'react-native';
-
- var Text2 = rn.Text
-
- import {AbstractButton} from '../react/features/base/toolbox/components';
- import { Header, LoadingIndicator, Text } from '../react/features/base/react';
-
-
-
-
-
-
-
-
- function onMsg(event ){
- clog("OBMSG>>>>")
- var onMsg = window.glob_vhook.fns.glob_dev_fncb ? window.glob_vhook.fns.glob_dev_fncb("onMsg",{that:this,event},{}) : {}
- }
-
-
- type Props = {}
- // class Wview_ui extends AbstractButton<Props> {
- class Wview_ui extends PureComponent<Props> {
- // class Wview_ui extends AbstractButton<Props, any> {
- // icon = "IconMessage";
- constructor(props) {
- super(props);
- this.v1="a"
- clog("Wview_v1 init")
- }
-
- render() {
- // return
- }
-
- }
- class Wview_v1 extends PureComponent<Props> {
- constructor(props) {
- super(props);
- this.v1="a"
- clog("Wview_v1 init")
- }
-
- componentDidMount() {
- setInterval(() => {
- this.setState(() => {
- // console.log('setting state');
- var wv0_dev = window.glob_vhook.fns.glob_dev_fncb ? window.glob_vhook.fns.glob_dev_fncb("wv0_dev",{that:this},{}) : {}
- // return { unseen: "does not display" }
- return { unseen: wv0_dev.ret }
- });
- }, 1000);
- }
-
- render() {
-
-
- var wb_url
-
- clog("Wview_v1 render")
- // console.log("wview_v1 render.")
-
- if (glob_vhook?.fns?.gen_xcal_room3) {
- wb_url = glob_vhook.fns.gen_xcal_room3().room_url
- } else {
- // wb_url = "https://excalidraw.videocorners.com/#room=4zmaf7d5jtcx4pqgruba,4zmaf7BMXbI6tCEiW7rbgy"
- wb_url = "https://excalidraw.videocorners.com/#room=4zxcald5jtcx4pqgruba,4zxcalBMXbI6tCEiW7rbgy"
- }
-
-
-
-
-
- var webview_style = window.glob_vhook.fns.glob_dev_fncb ? window.glob_vhook.fns.glob_dev_fncb("webview_style",{that:this},{}) : {}
- var wv0_styles = window.glob_vhook.fns.glob_dev_fncb ? window.glob_vhook.fns.glob_dev_fncb("wv0_styles",{that:this},{}) : {}
- // <View
- // style = {wv0_styles.v1 || {}}
- // >
- var wv0_styles_dev = this.wv0_styles_dev || {}
-
-
- // window.postMessage("Your message");
- console.log(">>>>>>>..?")
- var injectedJs = `(function(){
- console.log(">>>>>>>..")
- this.webView.postMessage("ZZ")
- return "Send me back!"}());
- `;
- injectedJs =`
- setTimeout(function () {
- window.ReactNativeWebView.postMessage("Hello!")
- console.log("QWETUI\n")
- window.top.postMessage('hello2', '*')
- }, 2000)
- `
-
- // <View style = { wv0_styles.v1 || {} }>
- // style = {webview_style}
-
- // <WebView source = {{uri:"https://excalidraw.videocorners.com/#room=4zxcald5jtcx4pqgruba,4zxcalBMXbI6tCEiW7rbgy"}}
- // <WebView source = {{uri:"https://excalidraw.videocorners.com/#room=4zxcald5jtcx4pqgruba,4zxcalBMXbI6tCEiW7rbgy"}}
- // {t('polls.create.create')}
- // <Wview_ui style = { wv0_styles_dev.vb1 || {}} />
- return (
- <View style = { wv0_styles_dev.v1 || {} }>
- <Button style = { wv0_styles_dev.vb1 || {}} >
- {'polls.create.create'}
- </Button>
- <Text style = { wv0_styles_dev.txt || {} }
- >
- Z??
- </Text>
-
-
- <WebView source = {{uri:wb_url}}
- style = {wv0_styles_dev.webview_style || {}}
- injectedJavaScript={injectedJs}
-
- startInLoadingState
- javaScriptEnabledAndroid={true}
- javaScriptEnabled={true}
-
- onMessage={onMsg}
- ></WebView>
- <Text2 style = { wv0_styles_dev.txt2 || {} }
- >
- Z2
- </Text2>
- </View>
- )
- }
- }
-
-
-
- export {Wview_v1}
|