mirror of
https://github.com/NoCrypt/migu.git
synced 2026-01-11 20:10:22 +00:00
fix: HACK: capacitor http
This commit is contained in:
parent
575aedf453
commit
c07ca0f56f
11 changed files with 559 additions and 287 deletions
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
|
@ -1,3 +1,4 @@
|
|||
{
|
||||
"npm.exclude": "**/git_modules/**"
|
||||
"npm.exclude": "**/git_modules/**",
|
||||
"java.configuration.updateBuildConfiguration": "interactive"
|
||||
}
|
||||
1
capacitor/.gitignore
vendored
1
capacitor/.gitignore
vendored
|
|
@ -9,6 +9,7 @@ android/app/src/*
|
|||
!android/app/src/main
|
||||
android/app/src/main/*
|
||||
!android/app/src/main/AndroidManifest.xml
|
||||
!android/app/src/main/java
|
||||
ios/
|
||||
*.jks
|
||||
*.pepk
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ versions.each (code) -> {
|
|||
|
||||
android {
|
||||
namespace "watch.miru"
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
compileSdk rootProject.ext.compileSdkVersion
|
||||
defaultConfig {
|
||||
applicationId "watch.miru"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@
|
|||
<!-- Permissions -->
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
||||
<uses-feature android:name="android.software.leanback" android:required="false" />
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
|
||||
</manifest>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
package watch.miru;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.webkit.ServiceWorkerClient;
|
||||
import android.webkit.ServiceWorkerController;
|
||||
import android.webkit.WebResourceRequest;
|
||||
import android.webkit.WebResourceResponse;
|
||||
import com.getcapacitor.BridgeActivity;
|
||||
|
||||
public class MainActivity extends BridgeActivity {
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
|
||||
ServiceWorkerController swController = null;
|
||||
swController = ServiceWorkerController.getInstance();
|
||||
|
||||
swController.setServiceWorkerClient(new ServiceWorkerClient() {
|
||||
@Override
|
||||
public WebResourceResponse shouldInterceptRequest(WebResourceRequest request) {
|
||||
if (request.getUrl().toString().contains("index.html")) {
|
||||
request.getRequestHeaders().put("Accept", "text/html");
|
||||
}
|
||||
return bridge.getLocalServer().shouldInterceptRequest(request);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,13 +2,13 @@ ext {
|
|||
minSdkVersion = 22
|
||||
compileSdkVersion = 34
|
||||
targetSdkVersion = 34
|
||||
androidxActivityVersion = '1.7.0'
|
||||
androidxActivityVersion = '1.8.0'
|
||||
androidxAppCompatVersion = '1.6.1'
|
||||
androidxCoordinatorLayoutVersion = '1.2.0'
|
||||
androidxCoreVersion = '1.10.0'
|
||||
androidxFragmentVersion = '1.5.6'
|
||||
coreSplashScreenVersion = '1.0.0'
|
||||
androidxWebkitVersion = '1.6.1'
|
||||
androidxCoreVersion = '1.12.0'
|
||||
androidxFragmentVersion = '1.6.2'
|
||||
coreSplashScreenVersion = '1.0.1'
|
||||
androidxWebkitVersion = '1.9.0'
|
||||
junitVersion = '4.13.2'
|
||||
androidxJunitVersion = '1.1.5'
|
||||
androidxEspressoCoreVersion = '3.5.1'
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@ const config = {
|
|||
keystorePath: './watch.miru',
|
||||
keystorePassword: '',
|
||||
keystoreAlias: 'watch.miru'
|
||||
}
|
||||
},
|
||||
webContentsDebuggingEnabled: true
|
||||
},
|
||||
plugins: {
|
||||
SplashScreen: { launchShowDuration: 0 },
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@capacitor/assets": "github:thaunknown/capacitor-assets",
|
||||
"@capacitor/cli": "^6.1.1",
|
||||
"cordova-res": "^0.15.4",
|
||||
"nodejs-mobile-gyp": "^0.3.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
|
|
@ -25,16 +26,15 @@
|
|||
"webpack-merge": "^5.10.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@capacitor/android": "^5.5.1",
|
||||
"@capacitor/app": "^5.0.6",
|
||||
"@capacitor/browser": "^5.1.0",
|
||||
"@capacitor/cli": "^5.5.1",
|
||||
"@capacitor/core": "^5.5.1",
|
||||
"@capacitor/ios": "^5.5.1",
|
||||
"@capacitor/local-notifications": "5.0.8",
|
||||
"@capacitor/status-bar": "^5.0.6",
|
||||
"@capacitor/android": "^6.1.1",
|
||||
"@capacitor/app": "^6.0.0",
|
||||
"@capacitor/browser": "^6.0.1",
|
||||
"@capacitor/core": "^6.1.1",
|
||||
"@capacitor/ios": "^6.1.1",
|
||||
"@capacitor/local-notifications": "^6.0.0",
|
||||
"@capacitor/status-bar": "^6.0.0",
|
||||
"capacitor-nodejs": "https://github.com/funniray/Capacitor-NodeJS/releases/download/nodejs-18/capacitor-nodejs-1.0.0-beta.6.tgz",
|
||||
"capacitor-plugin-safe-area": "^2.0.5",
|
||||
"capacitor-plugin-safe-area": "^2.0.6",
|
||||
"common": "workspace:*",
|
||||
"cordova-plugin-navigationbar": "^1.0.31",
|
||||
"cordova-plugin-pip": "^0.0.2",
|
||||
|
|
|
|||
|
|
@ -1523,6 +1523,12 @@
|
|||
.seekbar {
|
||||
font-size: 2rem !important;
|
||||
}
|
||||
.miniplayer .mobile-focus-target {
|
||||
display: block !important;
|
||||
}
|
||||
.miniplayer .mobile-focus-target:focus-visible {
|
||||
background: hsla(209, 100%, 55%, 0.3);
|
||||
}
|
||||
|
||||
@media (pointer: none), (pointer: coarse) {
|
||||
.bottom .ctrl[data-name='playPause'],
|
||||
|
|
@ -1547,12 +1553,6 @@
|
|||
.toggle-fullscreen {
|
||||
display: none !important;
|
||||
}
|
||||
.miniplayer .mobile-focus-target {
|
||||
display: block !important;
|
||||
}
|
||||
.miniplayer .mobile-focus-target:focus-visible {
|
||||
background: hsla(209, 100%, 55%, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Miru",
|
||||
"version": "5.2.7",
|
||||
"version": "5.2.10",
|
||||
"private": true,
|
||||
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
|
||||
"description": "Stream anime torrents, real-time with no waiting for downloads.",
|
||||
|
|
|
|||
763
pnpm-lock.yaml
763
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue