Added an app opacity slider

Added a slider to change individual app opacity on the AppShelf
This commit is contained in:
Aimsucks
2022-06-08 16:03:06 +00:00
parent e6eedefec4
commit 7519b4a6b2
4 changed files with 51 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ import { CSS } from '@dnd-kit/utilities';
import { serviceItem } from '../../tools/types';
import PingComponent from '../modules/ping/PingModule';
import AppShelfMenu from './AppShelfMenu';
import { useConfig } from '../../tools/state';
const useStyles = createStyles((theme) => ({
item: {
@@ -25,8 +26,10 @@ export function SortableAppShelfItem(props: any) {
const { attributes, listeners, setNodeRef, transform, transition } = useSortable({
id: props.id,
});
const { config } = useConfig();
const style = {
opacity: `${config.settings.appOpacity || 100}%`,
transform: CSS.Transform.toString(transform),
transition,
};