-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Torified webview in react-native #247
Merged
Reckless-Satoshi
merged 17 commits into
RoboSats:android-webview-app-ts-2
from
KoalaSat:android-tor-requests
Sep 28, 2022
Merged
Changes from 8 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
340bcf8
Add android build workflow
Reckless-Satoshi 49f5c69
Android Tor Requests
KoalaSat 7ab6cc2
Fetching internal files (i18n)
KoalaSat 433871a
react-native-tor does not implement PUT
KoalaSat fc782f0
Get Files from Tor
KoalaSat 55358d8
Revert "Add android build workflow"
KoalaSat b6bcd75
Fix Rebase Removals
KoalaSat 2d2c55a
External sources
KoalaSat e54132a
react-native-tor crashes
KoalaSat 85b0882
Last Refactor
KoalaSat 3e17ec6
Fix/revert setup guide
Reckless-Satoshi d356fa2
Add /mobile as volume to npm-dev container
Reckless-Satoshi 0df6ab2
Fix UsafeAlert
KoalaSat 1e70c7d
Run prettier
Reckless-Satoshi 9a180c7
Run lint:fix
Reckless-Satoshi 0fa911d
Main Profile Image fix
KoalaSat 5e51c99
Remove Tor Requests limitation
KoalaSat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import i18n from 'i18next'; | ||
import LanguageDetector from 'i18next-browser-languagedetector'; | ||
import { initReactI18next } from 'react-i18next'; | ||
import HttpApi from 'i18next-http-backend'; | ||
|
||
import translationEN from "../../static/locales/en.json"; | ||
import translationES from "../../static/locales/es.json"; | ||
import translationDE from "../../static/locales/de.json"; | ||
import translationRU from "../../static/locales/ru.json"; | ||
import translationPL from "../../static/locales/pl.json"; | ||
import translationFR from "../../static/locales/fr.json"; | ||
import translationCA from "../../static/locales/ca.json"; | ||
import translationIT from "../../static/locales/it.json"; | ||
import translationPT from "../../static/locales/pt.json"; | ||
import translationEU from "../../static/locales/th.json"; | ||
|
||
const config = { | ||
resources: { | ||
en: {translations: translationEN}, | ||
es: {translations: translationES}, | ||
ru: {translations: translationRU}, | ||
de: {translations: translationDE}, | ||
pl: {translations: translationPL}, | ||
fr: {translations: translationFR}, | ||
ca: {translations: translationCA}, | ||
it: {translations: translationIT}, | ||
pt: {translations: translationPT}, | ||
eu: {translations: translationEU}, | ||
}, | ||
fallbackLng: 'en', | ||
debug: false, | ||
// have a common namespace used around the full app | ||
ns: ['translations'], | ||
defaultNS: 'translations', | ||
keySeparator: false, // we use content as keys | ||
interpolation: { | ||
escapeValue: false, | ||
formatSeparator: ',', | ||
}, | ||
react: { | ||
useSuspense: false, | ||
}, | ||
} | ||
|
||
|
||
i18n | ||
.use(HttpApi) | ||
.use(LanguageDetector) | ||
.use(initReactI18next) | ||
.init(config); | ||
|
||
export default i18n; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import NativeRobosats from './index' | ||
|
||
declare global { | ||
interface Window { | ||
ReactNativeWebView?: ReactNativeWebView | ||
NativeRobosats?: NativeRobosats | ||
} | ||
} | ||
|
||
export interface ReactNativeWebView { | ||
postMessage(message: string): void | ||
} | ||
|
||
export interface NativeWebViewMessageHttp { | ||
id?: number | ||
category: 'http' | ||
type: 'post' | 'get' | 'put' | 'delete' | 'xhr' | ||
path: string | ||
headers?: object | ||
body?: object | ||
} | ||
|
||
export declare type NativeWebViewMessage = NativeWebViewMessageHttp | ||
|
||
export interface NativeRobosatsPromise { | ||
resolve: (value: object | PromiseLike<object>) => void, | ||
reject: (reason?: any) => void | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this one on the Refactor, should be checked on frontend