[bugfix/Refactor]

Fix plugin compatibility list that was showed incorrectly.
Change init function.
This commit is contained in:
Sakamoto Shiina
2025-04-19 16:15:47 +09:00
parent 7bcbefaf06
commit cd63e2e3ca
9 changed files with 85 additions and 41 deletions

View File

@@ -1,3 +1,4 @@
import { useEffect } from "react";
import styles from "./PluginCompatibilityList.module.scss";
import { usePlugins } from "@logics_configs";
import CheckMarkSvg from "@images/check_mark.svg?react";
@@ -5,7 +6,14 @@ import XSvg from "@images/x_mark.svg?react";
import WarningSvg from "@images/warning.svg?react";
export const PluginCompatibilityList = () => {
const { enabledPluginsList } = usePlugins();
const {
enabledPluginsList,
asyncFetchPluginsInfo,
} = usePlugins();
useEffect(() => {
asyncFetchPluginsInfo();
}, []);
// ダウンロード済みのもの
const downloaded_plugin = enabledPluginsList().filter(p => p.is_downloaded);
@@ -13,7 +21,7 @@ export const PluginCompatibilityList = () => {
const compatible_plugins_list = [];
const incompatible_plugins_list = [];
for (const p of downloaded_plugin) {
if (!p.downloaded_plugin_info?.is_plugin_supported_latest_vrct || !p.latest_plugin_info?.is_plugin_supported_latest_vrct) {
if (!p.downloaded_plugin_info?.is_plugin_supported_latest_vrct && !p.latest_plugin_info?.is_plugin_supported_latest_vrct) {
// プラグイン最新版でも、VRCT最新版VRCTアプデ後に非対応のもの
incompatible_plugins_list.push(p);
} else {