added licenses and webview for them

added link to github page
This commit is contained in:
austinried 2021-08-26 12:47:56 +09:00
parent b8f04e5426
commit a3fda31743
11 changed files with 24857 additions and 16 deletions

View File

@ -27,9 +27,11 @@ jobs:
node-version: '14' node-version: '14'
cache: 'yarn' cache: 'yarn'
- run: | - run: |
yarn yarn install
- run: | - run: |
yarn lint --max-warnings 0 yarn lint --max-warnings 0
- run: |
yarn license
- uses: gradle/wrapper-validation-action@v1 - uses: gradle/wrapper-validation-action@v1
- uses: gradle/gradle-build-action@v1 - uses: gradle/gradle-build-action@v1
with: with:

View File

@ -18,7 +18,9 @@ jobs:
run: | run: |
echo "SUBTRACKS_VERSION=$(node -e "console.log(require('./package.json').version);")" >> $GITHUB_ENV echo "SUBTRACKS_VERSION=$(node -e "console.log(require('./package.json').version);")" >> $GITHUB_ENV
- run: | - run: |
yarn yarn install
- run: |
yarn license
- uses: gradle/wrapper-validation-action@v1 - uses: gradle/wrapper-validation-action@v1
- name: Retrieve keystore file - name: Retrieve keystore file
env: env:

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -14,6 +14,9 @@ buildscript {
repositories { repositories {
google() google()
jcenter() jcenter()
maven {
url 'https://plugins.gradle.org/m2/'
}
} }
dependencies { dependencies {
classpath("com.android.tools.build:gradle:4.1.0") classpath("com.android.tools.build:gradle:4.1.0")
@ -22,8 +25,14 @@ buildscript {
// react-native-async-storage next // react-native-async-storage next
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "gradle.plugin.com.cookpad.android.plugin:plugin:1.2.8"
} }
} }
apply plugin: "com.cookpad.android.plugin.license-tools"
licenseTools {
outputHtml = "../../../app/src/main/assets/licenses/android_licenses.html"
}
allprojects { allprojects {
repositories { repositories {

482
android/licenses.yml Normal file
View File

@ -0,0 +1,482 @@
- artifact: androidx.activity:activity:+
name: activity
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/jetpack/androidx
- artifact: androidx.annotation:annotation:+
name: annotation
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.appcompat:appcompat-resources:+
name: appcompat-resources
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/jetpack/androidx
- artifact: androidx.appcompat:appcompat:+
name: appcompat
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/jetpack/androidx
- artifact: androidx.arch.core:core-common:+
name: core-common
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/topic/libraries/architecture/index.html
- artifact: androidx.arch.core:core-runtime:+
name: core-runtime
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/topic/libraries/architecture/index.html
- artifact: androidx.asynclayoutinflater:asynclayoutinflater:+
name: asynclayoutinflater
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.cardview:cardview:+
name: cardview
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.collection:collection:+
name: collection
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.coordinatorlayout:coordinatorlayout:+
name: coordinatorlayout
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/jetpack/androidx
- artifact: androidx.core:core:+
name: core
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/jetpack/androidx
- artifact: androidx.cursoradapter:cursoradapter:+
name: cursoradapter
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.customview:customview:+
name: customview
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.documentfile:documentfile:+
name: documentfile
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.drawerlayout:drawerlayout:+
name: drawerlayout
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.fragment:fragment:+
name: fragment
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/jetpack/androidx
- artifact: androidx.interpolator:interpolator:+
name: interpolator
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.legacy:legacy-support-core-ui:+
name: legacy-support-core-ui
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.legacy:legacy-support-core-utils:+
name: legacy-support-core-utils
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.lifecycle:lifecycle-common:+
name: lifecycle-common
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/topic/libraries/architecture/index.html
- artifact: androidx.lifecycle:lifecycle-livedata-core:+
name: lifecycle-livedata-core
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/topic/libraries/architecture/index.html
- artifact: androidx.lifecycle:lifecycle-livedata:+
name: lifecycle-livedata
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/topic/libraries/architecture/index.html
- artifact: androidx.lifecycle:lifecycle-runtime:+
name: lifecycle-runtime
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/topic/libraries/architecture/index.html
- artifact: androidx.lifecycle:lifecycle-viewmodel-savedstate:+
name: lifecycle-viewmodel-savedstate
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/topic/libraries/architecture/index.html
- artifact: androidx.lifecycle:lifecycle-viewmodel:+
name: lifecycle-viewmodel
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/topic/libraries/architecture/index.html
- artifact: androidx.loader:loader:+
name: loader
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.localbroadcastmanager:localbroadcastmanager:+
name: localbroadcastmanager
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.media:media:+
name: media
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.palette:palette:+
name: palette
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.print:print:+
name: print
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.recyclerview:recyclerview:+
name: recyclerview
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/jetpack/androidx
- artifact: androidx.room:room-common:+
name: room-common
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/topic/libraries/architecture/index.html
- artifact: androidx.room:room-ktx:+
name: room-ktx
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/topic/libraries/architecture/index.html
- artifact: androidx.room:room-runtime:+
name: room-runtime
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/topic/libraries/architecture/index.html
- artifact: androidx.savedstate:savedstate:+
name: savedstate
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/jetpack/androidx
- artifact: androidx.slidingpanelayout:slidingpanelayout:+
name: slidingpanelayout
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.sqlite:sqlite-framework:+
name: sqlite-framework
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/topic/libraries/architecture/index.html
- artifact: androidx.sqlite:sqlite:+
name: sqlite
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/topic/libraries/architecture/index.html
- artifact: androidx.swiperefreshlayout:swiperefreshlayout:+
name: swiperefreshlayout
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.transition:transition:+
name: transition
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/jetpack/androidx
- artifact: androidx.vectordrawable:vectordrawable-animated:+
name: vectordrawable-animated
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/jetpack/androidx
- artifact: androidx.vectordrawable:vectordrawable:+
name: vectordrawable
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/jetpack/androidx
- artifact: androidx.versionedparcelable:versionedparcelable:+
name: versionedparcelable
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.viewpager2:viewpager2:+
name: viewpager2
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/jetpack/androidx
- artifact: androidx.viewpager:viewpager:+
name: viewpager
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: androidx.webkit:webkit:+
name: webkit
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://developer.android.com/jetpack/androidx/releases/webkit#1.4.0
- artifact: com.facebook.fbjni:fbjni-java-only:+
name: fbjni-java-only
copyrightHolder: Original Author
license: APACHE-2
licenseUrl: https://github.com/facebookincubator/fbjni/blob/master/LICENSE
url: https://github.com/facebookincubator/fbjni
- artifact: com.facebook.fresco:drawee:+
name: drawee
copyrightHolder: Original Author
license: MIT License
licenseUrl: https://github.com/facebook/fresco/blob/master/LICENSE
url: https://github.com/facebook/fresco
- artifact: com.facebook.fresco:fbcore:+
name: fbcore
copyrightHolder: Original Author
license: MIT License
licenseUrl: https://github.com/facebook/fresco/blob/master/LICENSE
url: https://github.com/facebook/fresco
- artifact: com.facebook.fresco:fresco:+
name: fresco
copyrightHolder: Original Author
license: MIT License
licenseUrl: https://github.com/facebook/fresco/blob/master/LICENSE
url: https://github.com/facebook/fresco
- artifact: com.facebook.fresco:imagepipeline-base:+
name: imagepipeline-base
copyrightHolder: Original Author
license: MIT License
licenseUrl: https://github.com/facebook/fresco/blob/master/LICENSE
url: https://github.com/facebook/fresco
- artifact: com.facebook.fresco:imagepipeline-okhttp3:+
name: imagepipeline-okhttp3
copyrightHolder: Original Author
license: MIT License
licenseUrl: https://github.com/facebook/fresco/blob/master/LICENSE
url: https://github.com/facebook/fresco
- artifact: com.facebook.fresco:imagepipeline:+
name: imagepipeline
copyrightHolder: Original Author
license: MIT License
licenseUrl: https://github.com/facebook/fresco/blob/master/LICENSE
url: https://github.com/facebook/fresco
- artifact: com.facebook.fresco:nativeimagefilters:+
name: nativeimagefilters
copyrightHolder: Original Author
license: MIT License
licenseUrl: https://github.com/facebook/fresco/blob/master/LICENSE
url: https://github.com/facebook/fresco
- artifact: com.facebook.fresco:nativeimagetranscoder:+
name: nativeimagetranscoder
copyrightHolder: Original Author
license: MIT License
licenseUrl: https://github.com/facebook/fresco/blob/master/LICENSE
url: https://github.com/facebook/fresco
- artifact: com.facebook.infer.annotation:infer-annotation:+
name: infer-annotation
copyrightHolder: Original Author
license: BSD license
licenseUrl: https://github.com/facebook/infer/blob/master/LICENSE
url: http://fbinfer.com/
- artifact: com.facebook.react:react-native:+
name: react-native
copyrightHolder: Original Author
license: MIT License
licenseUrl: https://github.com/facebook/react-native/blob/master/LICENSE
url: https://github.com/facebook/react-native
- artifact: com.facebook.soloader:annotation:+
name: annotation
copyrightHolder: Original Author
license: Apache-2
licenseUrl: https://github.com/facebook/soloader/blob/master/LICENSE
url: https://github.com/facebook/soloader
- artifact: com.facebook.soloader:nativeloader:+
name: nativeloader
copyrightHolder: Original Author
license: Apache-2
licenseUrl: https://github.com/facebook/soloader/blob/master/LICENSE
url: https://github.com/facebook/soloader
- artifact: com.facebook.soloader:soloader:+
name: soloader
copyrightHolder: Original Author
license: Apache-2
licenseUrl: https://github.com/facebook/soloader/blob/master/LICENSE
url: https://github.com/facebook/soloader
- artifact: com.facebook.yoga:proguard-annotations:+
name: proguard-annotations
copyrightHolder: Original Author
license: MIT License
licenseUrl: https://github.com/facebook/yoga/blob/master/LICENSE
url: https://github.com/facebook/yoga
- artifact: com.github.bumptech.glide:annotations:+
name: annotations
copyrightHolder: Original Author
license: Simplified BSD License
licenseUrl: http://www.opensource.org/licenses/bsd-license
url: https://github.com/bumptech/glide
- artifact: com.github.bumptech.glide:disklrucache:+
name: disklrucache
copyrightHolder: Original Author
license: Simplified BSD License
licenseUrl: http://www.opensource.org/licenses/bsd-license
url: https://github.com/bumptech/glide
- artifact: com.github.bumptech.glide:gifdecoder:+
name: gifdecoder
copyrightHolder: Original Author
license: Simplified BSD License
licenseUrl: http://www.opensource.org/licenses/bsd-license
url: https://github.com/bumptech/glide
- artifact: com.github.bumptech.glide:glide:+
name: glide
copyrightHolder: Original Author
license: Simplified BSD License
licenseUrl: http://www.opensource.org/licenses/bsd-license
url: https://github.com/bumptech/glide
- artifact: com.google.android.exoplayer:exoplayer-core:+
name: exoplayer-core
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
- artifact: com.google.android.exoplayer:exoplayer-dash:+
name: exoplayer-dash
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
- artifact: com.google.android.exoplayer:exoplayer-hls:+
name: exoplayer-hls
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
- artifact: com.google.android.exoplayer:exoplayer-smoothstreaming:+
name: exoplayer-smoothstreaming
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
- artifact: com.google.android.material:material:+
name: material
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://developer.android.com/tools/extras/support-library.html
- artifact: com.google.code.findbugs:jsr305:+
name: jsr305
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://findbugs.sourceforge.net/
- artifact: com.parse.bolts:bolts-tasks:+
name: bolts-tasks
copyrightHolder: Original Author
license: BSD License
licenseUrl: https://github.com/BoltsFramework/Bolts-Android/blob/master/LICENSE
url: https://github.com/BoltsFramework/Bolts-Android
- artifact: com.squareup.okhttp3:okhttp-urlconnection:+
name: okhttp-urlconnection
copyrightHolder: Original Author
license: Apache-2.0 License
licenseUrl: https://github.com/square/okhttp/blob/master/LICENSE.txt
url: https://github.com/square/okhttp
- artifact: com.squareup.okhttp3:okhttp:+
name: okhttp
copyrightHolder: Original Author
license: Apache-2.0 License
licenseUrl: https://github.com/square/okhttp/blob/master/LICENSE.txt
url: https://github.com/square/okhttp
- artifact: com.squareup.okio:okio:+
name: okio
copyrightHolder: Original Author
license: Apache-2.0 License
licenseUrl: https://github.com/square/okio/blob/master/LICENSE.txt
url: https://github.com/square/okio
- artifact: javax.inject:javax.inject:+
name: javax.inject
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://code.google.com/p/atinject/
- artifact: org.jetbrains.kotlin:kotlin-stdlib-common:+
name: kotlin-stdlib-common
copyrightHolder: Original Author
license: The Apache License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://kotlinlang.org/
- artifact: org.jetbrains.kotlin:kotlin-stdlib:+
name: kotlin-stdlib
copyrightHolder: Original Author
license: The Apache License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: https://kotlinlang.org/
- artifact: org.jetbrains.kotlinx:kotlinx-coroutines-android:+
name: kotlinx-coroutines-android
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: https://www.apache.org/licenses/LICENSE-2.0.txt
url: https://github.com/Kotlin/kotlinx.coroutines
- artifact: org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:+
name: kotlinx-coroutines-core-jvm
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: https://www.apache.org/licenses/LICENSE-2.0.txt
url: https://github.com/Kotlin/kotlinx.coroutines
- artifact: org.jetbrains:annotations:+
name: annotations
copyrightHolder: Original Author
license: The Apache Software License, Version 2.0
licenseUrl: http://www.apache.org/licenses/LICENSE-2.0.txt
url: http://www.jetbrains.org

View File

@ -7,6 +7,7 @@ import SearchResultsView from '@app/screens/SearchResultsView'
import ServerView from '@app/screens/ServerView' import ServerView from '@app/screens/ServerView'
import SettingsView from '@app/screens/Settings' import SettingsView from '@app/screens/Settings'
import SongListView from '@app/screens/SongListView' import SongListView from '@app/screens/SongListView'
import WebViewScreen from '@app/screens/WebViewScreen'
import { selectSettings } from '@app/state/settings' import { selectSettings } from '@app/state/settings'
import { useStore } from '@app/state/store' import { useStore } from '@app/state/store'
import colors from '@app/styles/colors' import colors from '@app/styles/colors'
@ -122,6 +123,7 @@ const SearchTab = createTabStackNavigator(Search)
type SettingsStackParamList = { type SettingsStackParamList = {
main: undefined main: undefined
server?: { id?: string } server?: { id?: string }
web: { uri: string }
} }
type ServerScreenNavigationProp = NativeStackNavigationProp<SettingsStackParamList, 'server'> type ServerScreenNavigationProp = NativeStackNavigationProp<SettingsStackParamList, 'server'>
@ -130,9 +132,16 @@ type ServerScreenProps = {
route: ServerScreenRouteProp route: ServerScreenRouteProp
navigation: ServerScreenNavigationProp navigation: ServerScreenNavigationProp
} }
const ServerScreen: React.FC<ServerScreenProps> = ({ route }) => <ServerView id={route.params?.id} /> const ServerScreen: React.FC<ServerScreenProps> = ({ route }) => <ServerView id={route.params?.id} />
type WebScreenNavigationProp = NativeStackNavigationProp<SettingsStackParamList, 'web'>
type WebScreenRouteProp = RouteProp<SettingsStackParamList, 'web'>
type WebScreenProps = {
route: WebScreenRouteProp
navigation: WebScreenNavigationProp
}
const WebScreen: React.FC<WebScreenProps> = ({ route }) => <WebViewScreen uri={route.params.uri} />
const SettingsStack = createNativeStackNavigator() const SettingsStack = createNativeStackNavigator()
const SettingsTab = () => { const SettingsTab = () => {
@ -150,6 +159,17 @@ const SettingsTab = () => {
headerTitleStyle: styles.stackheaderTitleStyle, headerTitleStyle: styles.stackheaderTitleStyle,
}} }}
/> />
<SettingsStack.Screen
name="web"
component={WebScreen}
options={{
title: 'Web View',
headerStyle: styles.stackheaderStyle,
headerHideShadow: true,
headerTintColor: 'white',
headerTitleStyle: styles.stackheaderTitleStyle,
}}
/>
</SettingsStack.Navigator> </SettingsStack.Navigator>
) )
} }

View File

@ -14,7 +14,7 @@ import colors from '@app/styles/colors'
import font from '@app/styles/font' import font from '@app/styles/font'
import { useNavigation } from '@react-navigation/core' import { useNavigation } from '@react-navigation/core'
import React, { useCallback, useState } from 'react' import React, { useCallback, useState } from 'react'
import { KeyboardTypeOptions, Modal, Pressable, StatusBar, StyleSheet, Text, View } from 'react-native' import { KeyboardTypeOptions, Linking, Modal, Pressable, StatusBar, StyleSheet, Text, View } from 'react-native'
import { ScrollView } from 'react-native-gesture-handler' import { ScrollView } from 'react-native-gesture-handler'
import Icon from 'react-native-vector-icons/MaterialCommunityIcons' import Icon from 'react-native-vector-icons/MaterialCommunityIcons'
@ -281,10 +281,32 @@ const SettingsContent = React.memo(() => {
<Button <Button
disabled={clearing} disabled={clearing}
style={styles.button} style={styles.button}
title="Clear image cache" title="Clear Image Cache"
onPress={clear} onPress={clear}
buttonStyle="hollow" buttonStyle="hollow"
/> />
<Header style={styles.header}>About</Header>
<Button
disabled={clearing}
style={styles.button}
title="Project Homepage"
onPress={() => Linking.openURL('https://github.com/austinried/subtracks')}
buttonStyle="hollow"
/>
<Button
disabled={clearing}
style={styles.button}
title="Licenses (NPM)"
onPress={() => navigation.navigate('web', { uri: 'file:///android_asset/licenses/npm_licenses.txt' })}
buttonStyle="hollow"
/>
<Button
disabled={clearing}
style={[styles.button, styles.licenseButton]}
title="Licenses (Android)"
onPress={() => navigation.navigate('web', { uri: 'file:///android_asset/licenses/android_licenses.html' })}
buttonStyle="hollow"
/>
</View> </View>
) )
}) })
@ -308,9 +330,6 @@ const styles = StyleSheet.create({
paddingHorizontal: 20, paddingHorizontal: 20,
paddingBottom: 40, paddingBottom: 40,
}, },
text: {
color: 'white',
},
serverActive: { serverActive: {
paddingLeft: 12, paddingLeft: 12,
}, },
@ -320,6 +339,14 @@ const styles = StyleSheet.create({
button: { button: {
marginTop: 16, marginTop: 16,
}, },
licenseButton: {
marginHorizontal: 10,
flex: 1,
},
licenses: {
flexDirection: 'row',
justifyContent: 'space-between',
},
modalBackdrop: { modalBackdrop: {
flex: 1, flex: 1,
}, },
@ -370,6 +397,11 @@ const styles = StyleSheet.create({
marginLeft: 15, marginLeft: 15,
// backgroundColor: 'green', // backgroundColor: 'green',
}, },
text: {
color: 'white',
fontFamily: font.regular,
fontSize: 15,
},
}) })
export default Settings export default Settings

View File

@ -0,0 +1,10 @@
import React from 'react'
import { WebView } from 'react-native-webview'
const WebViewScreen: React.FC<{
uri: string
}> = ({ uri }) => {
return <WebView source={{ uri }} />
}
export default WebViewScreen

View File

@ -5,10 +5,14 @@
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"scripts": { "scripts": {
"android": "react-native run-android", "android": "react-native run-android",
"android-release": "./android/gradlew -p android assembleRelease -PsignReleaseWithDebug=true && adb install -r android/app/build/outputs/apk/release/app-release.apk && adb shell am start -n com.subtracks/.MainActivity", "android:release": "./android/gradlew -p android assembleRelease -PsignReleaseWithDebug=true && adb install -r android/app/build/outputs/apk/release/app-release.apk && adb shell am start -n com.subtracks/.MainActivity",
"start": "react-native start", "start": "react-native start",
"test": "jest", "test": "jest",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx" "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"license:npm": "yarn licenses generate-disclaimer --production | grep -v '^info\\s\"\\?fsevents' > android/app/src/main/assets/licenses/npm_licenses.txt",
"license:android": "./android/gradlew -p android checkLicenses && ./android/gradlew -p android generateLicensePage",
"license:update": "./android/gradlew -p android updateLicenses",
"license": "yarn license:npm && yarn license:android"
}, },
"dependencies": { "dependencies": {
"@react-native-async-storage/async-storage": "^1.15.5", "@react-native-async-storage/async-storage": "^1.15.5",
@ -36,6 +40,7 @@
"react-native-tab-view": "^2.16.0", "react-native-tab-view": "^2.16.0",
"react-native-track-player": "^2.0.3", "react-native-track-player": "^2.0.3",
"react-native-vector-icons": "^8.1.0", "react-native-vector-icons": "^8.1.0",
"react-native-webview": "^11.13.0",
"uuid": "^8.3.2", "uuid": "^8.3.2",
"xmldom": "^0.5.0", "xmldom": "^0.5.0",
"zustand": "^3.5.7" "zustand": "^3.5.7"

View File

@ -2648,16 +2648,16 @@ escape-html@~1.0.3:
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
escape-string-regexp@2.0.0, escape-string-regexp@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344"
integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==
escape-string-regexp@^1.0.5: escape-string-regexp@^1.0.5:
version "1.0.5" version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
escape-string-regexp@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344"
integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==
escape-string-regexp@^4.0.0: escape-string-regexp@^4.0.0:
version "4.0.0" version "4.0.0"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
@ -3470,7 +3470,7 @@ interpret@^1.0.0:
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e"
integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==
invariant@^2.2.4: invariant@2.2.4, invariant@^2.2.4:
version "2.2.4" version "2.2.4"
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
@ -5606,6 +5606,14 @@ react-native-vector-icons@^8.1.0:
prop-types "^15.7.2" prop-types "^15.7.2"
yargs "^16.1.1" yargs "^16.1.1"
react-native-webview@^11.13.0:
version "11.13.0"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-11.13.0.tgz#a2eca0f87b2ae9bba0dd8144594aeff9947cc5d6"
integrity sha512-jjQAKWv8JzRmcn76fMe4lXD84AAeR7kn43kAmUe1GX312BMLaP+RbKlgpYAlNuOBXL0YirItGKDrpaD0bNROOA==
dependencies:
escape-string-regexp "2.0.0"
invariant "2.2.4"
react-native@0.64.1: react-native@0.64.1:
version "0.64.1" version "0.64.1"
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.64.1.tgz#cd38f5b47b085549686f34eb0c9dcd466f307635" resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.64.1.tgz#cd38f5b47b085549686f34eb0c9dcd466f307635"