mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 23:45:48 +01:00
Merge pull request #944 from ajnart/docker-usequery
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
import { Button, Group } from '@mantine/core';
|
||||
import { showNotification, updateNotification } from '@mantine/notifications';
|
||||
import { notifications } from '@mantine/notifications';
|
||||
import {
|
||||
IconCheck,
|
||||
IconPlayerPlay,
|
||||
@@ -27,7 +27,7 @@ function sendDockerCommand(
|
||||
reload: () => void,
|
||||
t: (key: string) => string,
|
||||
) {
|
||||
showNotification({
|
||||
notifications.show({
|
||||
id: containerId,
|
||||
loading: true,
|
||||
title: `${t(`actions.${action}.start`)} ${containerName}`,
|
||||
@@ -38,7 +38,7 @@ function sendDockerCommand(
|
||||
axios
|
||||
.get(`/api/docker/container/${containerId}?action=${action}`)
|
||||
.then((res) => {
|
||||
updateNotification({
|
||||
notifications.show({
|
||||
id: containerId,
|
||||
title: containerName,
|
||||
message: `${t(`actions.${action}.end`)} ${containerName}`,
|
||||
@@ -47,7 +47,7 @@ function sendDockerCommand(
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
updateNotification({
|
||||
notifications.update({
|
||||
id: containerId,
|
||||
color: 'red',
|
||||
title: t('errors.unknownError.title'),
|
||||
@@ -71,6 +71,10 @@ export default function ContainerActionBar({ selected, reload }: ContainerAction
|
||||
const { name: configName, config } = useConfigContext();
|
||||
const getLowestWrapper = () => config?.wrappers.sort((a, b) => a.position - b.position)[0];
|
||||
|
||||
if (process.env.DISABLE_EDIT_MODE === 'true') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Group spacing="xs">
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user