Initial commit
This commit is contained in:
20
multisrc/overrides/monochrome/default/AndroidManifest.xml
Normal file
20
multisrc/overrides/monochrome/default/AndroidManifest.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application>
|
||||
<activity android:name="eu.kanade.tachiyomi.multisrc.monochrome.MonochromeActivity"
|
||||
android:theme="@android:style/Theme.NoDisplay"
|
||||
android:exported="true"
|
||||
android:excludeFromRecents="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
|
||||
<data android:host="${SOURCEHOST}"/>
|
||||
<data android:host="*.${SOURCEHOST}"/>
|
||||
<data android:pathPattern="/manga/..*"
|
||||
android:scheme="${SOURCESCHEME}" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.7 KiB |
BIN
multisrc/overrides/monochrome/default/res/web_hi_res_512.png
Normal file
BIN
multisrc/overrides/monochrome/default/res/web_hi_res_512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest />
|
||||
@@ -0,0 +1,54 @@
|
||||
package eu.kanade.tachiyomi.extension.en.monochromecustom
|
||||
|
||||
import android.app.Application
|
||||
import androidx.preference.EditTextPreference
|
||||
import androidx.preference.PreferenceScreen
|
||||
import eu.kanade.tachiyomi.multisrc.monochrome.MonochromeCMS
|
||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
|
||||
class MonochromeCustom : ConfigurableSource,
|
||||
MonochromeCMS("Monochrome Custom", "", "en") {
|
||||
override val baseUrl by lazy {
|
||||
preferences.getString("baseUrl", DEMO_BASE_URL)!!
|
||||
}
|
||||
|
||||
override val apiUrl by lazy {
|
||||
preferences.getString("apiUrl", DEMO_API_URL)!!
|
||||
}
|
||||
|
||||
private val preferences by lazy {
|
||||
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)!!
|
||||
}
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) {
|
||||
EditTextPreference(screen.context).apply {
|
||||
key = "baseUrl"
|
||||
title = "Frontend URL"
|
||||
summary = "The base URL of your Monochrome installation"
|
||||
setDefaultValue(DEMO_BASE_URL)
|
||||
|
||||
setOnPreferenceChangeListener { _, newValue ->
|
||||
preferences.edit().putString("baseUrl", newValue as String).commit()
|
||||
}
|
||||
}.let(screen::addPreference)
|
||||
|
||||
EditTextPreference(screen.context).apply {
|
||||
key = "apiUrl"
|
||||
title = "API URL"
|
||||
summary = "The API URL of your Monochrome installation"
|
||||
setDefaultValue(DEMO_API_URL)
|
||||
|
||||
setOnPreferenceChangeListener { _, newValue ->
|
||||
preferences.edit().putString("apiUrl", newValue as String).commit()
|
||||
}
|
||||
}.let(screen::addPreference)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val DEMO_BASE_URL = "https://monochromecms.netlify.app"
|
||||
|
||||
private const val DEMO_API_URL = "https://api-3qnqyl7llq-lz.a.run.app"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user