fix: Plugins (#578)

* test

* test

* fix

* any

* update

* update

* fix LightNovelReader

* Why did I do that

* typo

* fix

* type

* unused icons have been removed

* madara...

* ops

* fix

* close #563

* update

* LitSpace

* fix jaomix

* fix renovels

* fix ficbook

* update ficbook
This commit is contained in:
Rider21
2023-10-30 09:45:33 +03:00
committed by GitHub
parent 5258464743
commit ac96c62066
244 changed files with 45894 additions and 18184 deletions
+2 -1
View File
@@ -25,13 +25,14 @@ export const all_plugins = (): PluginList => {
plugin.split(".")[0]
}`;
const instance = require(requirePath);
const { id, name, version } = instance;
const { id, name, version, icon } = instance;
const info: Plugin.Info = {
id,
name,
lang: languageNative,
version,
requirePath,
icon,
}; // lang: language with native name
res[info.lang].push(info);
});
+1
View File
@@ -16,6 +16,7 @@
padding: 0.375rem 0;
border-radius: 5px;
background-color: white;
z-index: 3;
}
.btn.disabled, .btn:disabled{
+5 -2
View File
@@ -20,8 +20,11 @@ const display_search = (arr) => {
search_results.html('');
arr.slice(0, 15).forEach(plugin => {
search_results.append(`
<div>
<button data-require="${plugin.requirePath}" onclick="test_plugin(this)" type="button" class="search-item btn btn-light btn-outline-primary btn-md btn-block">${plugin.lang}/${plugin.name}</button>
<div style="display: flex; align-items: center;">
<button style="display: flex; align-items: center; height: 30px; flex-shrink: 0;" data-require="${plugin.requirePath}" onclick="test_plugin(this)" type="button" class="search-item btn btn-light btn-outline-primary btn-md btn-block">
<img src="./icons/${plugin.icon}" style="height: 100%; object-fit: contain; margin-right: 10px;">
${plugin.lang}/${plugin.name}
</button>
</div>
`)
});