Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/strapi-admin/admin/src/containers/InstalledPluginsPage/ drwxr-xr-x | |
| Viewing file: Select action/file-type: import React from 'react';
import { useGlobalContext, request } from 'strapi-helper-plugin';
import { Header, List } from '@buffetjs/custom';
import PageTitle from '../../components/PageTitle';
import ContainerFluid from '../../components/ContainerFluid';
import ListWrapper from './ListWrapper';
import Row from './Row';
import generateRows from './utils/generateRows';
const InstalledPluginsPage = () => {
const { formatMessage, plugins } = useGlobalContext();
const onConfirm = async id => {
try {
const requestUrl = `/admin/plugins/uninstall/${id}`;
// Force the Overlayblocker to be displayed
const overlayblockerParams = {
enabled: true,
title: 'app.components.ListPluginsPage.deletePlugin.title',
description: 'app.components.ListPluginsPage.deletePlugin.description',
};
// Lock the app
strapi.lockApp(overlayblockerParams);
const response = await request(requestUrl, { method: 'DELETE' }, overlayblockerParams);
if (response.ok) {
// Reload the app
window.location.reload();
}
} catch (err) {
strapi.unlockApp();
strapi.notification.toggle({
type: 'warning',
message: { id: 'app.components.listPluginsPage.deletePlugin.error' },
});
}
};
const rows = generateRows(plugins, onConfirm);
return (
<div>
<PageTitle
title={formatMessage({
id: 'app.components.ListPluginsPage.helmet.title',
})}
/>
<ContainerFluid>
<Header
title={{
label: formatMessage({
id: 'app.components.ListPluginsPage.title',
}),
}}
content={formatMessage({
id: 'app.components.ListPluginsPage.description',
})}
/>
<ListWrapper>
<List
title={formatMessage(
{ id: 'app.components.listPlugins.title.plural' },
{ number: rows.length }
)}
items={rows}
customRowComponent={Row}
/>
</ListWrapper>
</ContainerFluid>
</div>
);
};
export default InstalledPluginsPage;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.02 ]-- |