add MangaDex to Batch-Add example
This commit is contained in:
parent
76f43ec9ab
commit
fc84f2ad13
11 changed files with 24 additions and 1 deletions
|
|
@ -73,7 +73,15 @@ class BatchAddScreen : Screen() {
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
placeholder = {
|
placeholder = {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(SYMR.strings.eh_batch_add_description),
|
text =
|
||||||
|
// KMK -->
|
||||||
|
stringResource(SYMR.strings.md_batch_add_description) +
|
||||||
|
if (screenModel.isHentaiEnabled) {
|
||||||
|
// KMK <--
|
||||||
|
stringResource(SYMR.strings.eh_batch_add_description)
|
||||||
|
} else {
|
||||||
|
""
|
||||||
|
},
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
keyboardOptions = KeyboardOptions(autoCorrectEnabled = false),
|
keyboardOptions = KeyboardOptions(autoCorrectEnabled = false),
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
package exh.ui.batchadd
|
package exh.ui.batchadd
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import androidx.compose.runtime.getValue
|
||||||
import cafe.adriel.voyager.core.model.StateScreenModel
|
import cafe.adriel.voyager.core.model.StateScreenModel
|
||||||
import cafe.adriel.voyager.core.model.screenModelScope
|
import cafe.adriel.voyager.core.model.screenModelScope
|
||||||
|
import eu.kanade.core.preference.asState
|
||||||
import exh.GalleryAddEvent
|
import exh.GalleryAddEvent
|
||||||
import exh.GalleryAdder
|
import exh.GalleryAdder
|
||||||
import exh.log.xLogE
|
import exh.log.xLogE
|
||||||
|
|
@ -24,6 +26,10 @@ class BatchAddScreenModel(
|
||||||
) : StateScreenModel<BatchAddState>(BatchAddState()) {
|
) : StateScreenModel<BatchAddState>(BatchAddState()) {
|
||||||
private val galleryAdder by lazy { GalleryAdder() }
|
private val galleryAdder by lazy { GalleryAdder() }
|
||||||
|
|
||||||
|
// KMK -->
|
||||||
|
val isHentaiEnabled by Injekt.get<UnsortedPreferences>().isHentaiEnabled().asState(screenModelScope)
|
||||||
|
// KMK <--
|
||||||
|
|
||||||
fun addGalleries(context: Context) {
|
fun addGalleries(context: Context) {
|
||||||
val galleries = state.value.galleries
|
val galleries = state.value.galleries
|
||||||
// Check text box has content
|
// Check text box has content
|
||||||
|
|
|
||||||
|
|
@ -533,6 +533,7 @@
|
||||||
<!-- Gallery Adder -->
|
<!-- Gallery Adder -->
|
||||||
<!-- Batch Add -->
|
<!-- Batch Add -->
|
||||||
<string name="eh_batch_add">Batch Add</string>
|
<string name="eh_batch_add">Batch Add</string>
|
||||||
|
<string name="md_batch_add_description">Example:\n\nhttps://mangadex.org/title/32d76d19-8a05-4db0-9fc2-e0b0648fe9d0/solo-leveling\nhttps://mangadex.org/title/77bee52c-d2d6-44ad-a33a-1734c1fe696a\n\n</string>
|
||||||
<string name="eh_batch_add_description">Example:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\nIt also supports E-H Visited exported data\n</string>
|
<string name="eh_batch_add_description">Example:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\nIt also supports E-H Visited exported data\n</string>
|
||||||
<string name="eh_batch_add_title">Enter the galleries to add (separated by a new line):</string>
|
<string name="eh_batch_add_title">Enter the galleries to add (separated by a new line):</string>
|
||||||
<string name="eh_batch_add_button">Add Galleries</string>
|
<string name="eh_batch_add_button">Add Galleries</string>
|
||||||
|
|
|
||||||
|
|
@ -425,6 +425,7 @@
|
||||||
<string name="favorites_sync_reset">Sigurado ka ba?</string>
|
<string name="favorites_sync_reset">Sigurado ka ba?</string>
|
||||||
<string name="favorites_sync_reset_message">Ang pag-reset ng estado ng sync ay maaaring magdulot ng napakabagal na pag-sync sa susunod na pagkakataon.</string>
|
<string name="favorites_sync_reset_message">Ang pag-reset ng estado ng sync ay maaaring magdulot ng napakabagal na pag-sync sa susunod na pagkakataon.</string>
|
||||||
<string name="favorites_sync_conformation_message">Sigurado ka bang gusto mong i-sync ang iyong mga paborito sa E-Hentai?</string>
|
<string name="favorites_sync_conformation_message">Sigurado ka bang gusto mong i-sync ang iyong mga paborito sa E-Hentai?</string>
|
||||||
|
<string name="md_batch_add_description">Halimbawa:\n\nhttps://mangadex.org/title/32d76d19-8a05-4db0-9fc2-e0b0648fe9d0/solo-leveling\nhttps://mangadex.org/title/77bee52c-d2d6-44ad-a33a-1734c1fe696a\n\n</string>
|
||||||
<string name="eh_batch_add_description">Halimbawa:
|
<string name="eh_batch_add_description">Halimbawa:
|
||||||
\n
|
\n
|
||||||
\nhttp://e-hentai.org/g/12345/1a2b3c4e
|
\nhttp://e-hentai.org/g/12345/1a2b3c4e
|
||||||
|
|
|
||||||
|
|
@ -323,6 +323,7 @@
|
||||||
<!-- Gallery Adder -->
|
<!-- Gallery Adder -->
|
||||||
<!-- Batch Add -->
|
<!-- Batch Add -->
|
||||||
<string name="eh_batch_add">Ajouter par lots</string>
|
<string name="eh_batch_add">Ajouter par lots</string>
|
||||||
|
<string name="md_batch_add_description">Exemple:\n\nhttps://mangadex.org/title/32d76d19-8a05-4db0-9fc2-e0b0648fe9d0/solo-leveling\nhttps://mangadex.org/title/77bee52c-d2d6-44ad-a33a-1734c1fe696a\n\n</string>
|
||||||
<string name="eh_batch_add_description">Exemple:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\nIl prend également en charge les données exportées des visites E-H\n</string>
|
<string name="eh_batch_add_description">Exemple:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\nIl prend également en charge les données exportées des visites E-H\n</string>
|
||||||
<string name="eh_batch_add_title">Entrez les galeries à ajouter (séparées par une nouvelle ligne):</string>
|
<string name="eh_batch_add_title">Entrez les galeries à ajouter (séparées par une nouvelle ligne):</string>
|
||||||
<string name="eh_batch_add_button">Ajouter des galeries</string>
|
<string name="eh_batch_add_button">Ajouter des galeries</string>
|
||||||
|
|
|
||||||
|
|
@ -381,6 +381,7 @@
|
||||||
<!-- Gallery Adder -->
|
<!-- Gallery Adder -->
|
||||||
<!-- Batch Add -->
|
<!-- Batch Add -->
|
||||||
<string name="eh_batch_add">Batch Add</string>
|
<string name="eh_batch_add">Batch Add</string>
|
||||||
|
<string name="md_batch_add_description">Example:\n\nhttps://mangadex.org/title/32d76d19-8a05-4db0-9fc2-e0b0648fe9d0/solo-leveling\nhttps://mangadex.org/title/77bee52c-d2d6-44ad-a33a-1734c1fe696a\n\n</string>
|
||||||
<string name="eh_batch_add_description">Example:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\nIt also supports E-H Visited exported data\n</string>
|
<string name="eh_batch_add_description">Example:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\nIt also supports E-H Visited exported data\n</string>
|
||||||
<string name="eh_batch_add_title">Enter the galleries to add (separated by a new line):</string>
|
<string name="eh_batch_add_title">Enter the galleries to add (separated by a new line):</string>
|
||||||
<string name="eh_batch_add_button">Add Galleries</string>
|
<string name="eh_batch_add_button">Add Galleries</string>
|
||||||
|
|
|
||||||
|
|
@ -487,6 +487,7 @@
|
||||||
<!-- Gallery Adder -->
|
<!-- Gallery Adder -->
|
||||||
<!-- Batch Add -->
|
<!-- Batch Add -->
|
||||||
<string name="eh_batch_add">一括追加</string>
|
<string name="eh_batch_add">一括追加</string>
|
||||||
|
<string name="md_batch_add_description">例:\n\nhttps://mangadex.org/title/32d76d19-8a05-4db0-9fc2-e0b0648fe9d0/solo-leveling\nhttps://mangadex.org/title/77bee52c-d2d6-44ad-a33a-1734c1fe696a\n\n</string>
|
||||||
<string name="eh_batch_add_description">例:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\nE-H Visitedデータ\n もサポートしています。</string>
|
<string name="eh_batch_add_description">例:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\nE-H Visitedデータ\n もサポートしています。</string>
|
||||||
<string name="eh_batch_add_title">追加するギャラリーを入力してください (改行区切り):</string>
|
<string name="eh_batch_add_title">追加するギャラリーを入力してください (改行区切り):</string>
|
||||||
<string name="eh_batch_add_button">ギャラリーを追加</string>
|
<string name="eh_batch_add_button">ギャラリーを追加</string>
|
||||||
|
|
|
||||||
|
|
@ -389,6 +389,7 @@
|
||||||
<!-- Gallery Adder -->
|
<!-- Gallery Adder -->
|
||||||
<!-- Batch Add -->
|
<!-- Batch Add -->
|
||||||
<string name="eh_batch_add">Adicionar em lote</string>
|
<string name="eh_batch_add">Adicionar em lote</string>
|
||||||
|
<string name="md_batch_add_description">Exemplo:\n\nhttps://mangadex.org/title/32d76d19-8a05-4db0-9fc2-e0b0648fe9d0/solo-leveling\nhttps://mangadex.org/title/77bee52c-d2d6-44ad-a33a-1734c1fe696a\n\n</string>
|
||||||
<string name="eh_batch_add_description">Exemplo:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\nTambém suporta dados exportados visitados no E-H\n</string>
|
<string name="eh_batch_add_description">Exemplo:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\nTambém suporta dados exportados visitados no E-H\n</string>
|
||||||
<string name="eh_batch_add_title">Insira as galerias a adicionar (separadas por linha):</string>
|
<string name="eh_batch_add_title">Insira as galerias a adicionar (separadas por linha):</string>
|
||||||
<string name="eh_batch_add_button">Adicionar Galerias</string>
|
<string name="eh_batch_add_button">Adicionar Galerias</string>
|
||||||
|
|
|
||||||
|
|
@ -487,6 +487,7 @@
|
||||||
<!-- Gallery Adder -->
|
<!-- Gallery Adder -->
|
||||||
<!-- Batch Add -->
|
<!-- Batch Add -->
|
||||||
<string name="eh_batch_add">Добавить галереи</string>
|
<string name="eh_batch_add">Добавить галереи</string>
|
||||||
|
<string name="md_batch_add_description">Пример:\n\nhttps://mangadex.org/title/32d76d19-8a05-4db0-9fc2-e0b0648fe9d0/solo-leveling\nhttps://mangadex.org/title/77bee52c-d2d6-44ad-a33a-1734c1fe696a\n\n</string>
|
||||||
<string name="eh_batch_add_description">Пример:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\nТакже поддерживаются экспортированные данные на E-Hentai\n</string>
|
<string name="eh_batch_add_description">Пример:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\nТакже поддерживаются экспортированные данные на E-Hentai\n</string>
|
||||||
<string name="eh_batch_add_title">Ввести в этой области URL-адрес галерей для добавления (Разделённые новой строкой):</string>
|
<string name="eh_batch_add_title">Ввести в этой области URL-адрес галерей для добавления (Разделённые новой строкой):</string>
|
||||||
<string name="eh_batch_add_button">Добавить</string>
|
<string name="eh_batch_add_button">Добавить</string>
|
||||||
|
|
|
||||||
|
|
@ -432,6 +432,7 @@
|
||||||
<!-- Gallery Adder -->
|
<!-- Gallery Adder -->
|
||||||
<!-- Batch Add -->
|
<!-- Batch Add -->
|
||||||
<string name="eh_batch_add">批量导入</string>
|
<string name="eh_batch_add">批量导入</string>
|
||||||
|
<string name="md_batch_add_description">示例:\n\nhttps://mangadex.org/title/32d76d19-8a05-4db0-9fc2-e0b0648fe9d0/solo-leveling\nhttps://mangadex.org/title/77bee52c-d2d6-44ad-a33a-1734c1fe696a\n\n</string>
|
||||||
<string name="eh_batch_add_description">示例:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\n它还支持 E-H 访问过的导出数据\n</string>
|
<string name="eh_batch_add_description">示例:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\n它还支持 E-H 访问过的导出数据\n</string>
|
||||||
<string name="eh_batch_add_title">输入要添加的画廊(每行一个):</string>
|
<string name="eh_batch_add_title">输入要添加的画廊(每行一个):</string>
|
||||||
<string name="eh_batch_add_button">添加画廊</string>
|
<string name="eh_batch_add_button">添加画廊</string>
|
||||||
|
|
|
||||||
|
|
@ -478,6 +478,7 @@
|
||||||
<!-- Gallery Adder -->
|
<!-- Gallery Adder -->
|
||||||
<!-- Batch Add -->
|
<!-- Batch Add -->
|
||||||
<string name="eh_batch_add">批次匯入</string>
|
<string name="eh_batch_add">批次匯入</string>
|
||||||
|
<string name="md_batch_add_description">範例:\n\nhttps://mangadex.org/title/32d76d19-8a05-4db0-9fc2-e0b0648fe9d0/solo-leveling\nhttps://mangadex.org/title/77bee52c-d2d6-44ad-a33a-1734c1fe696a\n\n</string>
|
||||||
<string name="eh_batch_add_description">範例:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\n它還支援 E-H 存取過的匯出資料\n</string>
|
<string name="eh_batch_add_description">範例:\n\nhttp://e-hentai.org/g/12345/1a2b3c4e\nhttp://g.e-hentai.org/g/67890/6f7g8h9i\nhttp://exhentai.org/g/13579/1a3b5c7e\nhttps://exhentai.org/g/24680/2f4g6h8i\n\n它還支援 E-H 存取過的匯出資料\n</string>
|
||||||
<string name="eh_batch_add_title">輸入要新增的畫廊(每行一個):</string>
|
<string name="eh_batch_add_title">輸入要新增的畫廊(每行一個):</string>
|
||||||
<string name="eh_batch_add_button">新增畫廊</string>
|
<string name="eh_batch_add_button">新增畫廊</string>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue