diff --git a/frontend/src/views/Apps2.jsx b/frontend/src/views/Apps2.jsx
index 7011be79..0f395471 100644
--- a/frontend/src/views/Apps2.jsx
+++ b/frontend/src/views/Apps2.jsx
@@ -15,6 +15,7 @@ import {
} from "@mui/material";
import { Context } from "../context/ContextApi.jsx";
import Add from '@mui/icons-material/Add';
+import EditIcon from '@mui/icons-material/Edit';
import InputAdornment from '@mui/material/InputAdornment';
import Search from '@mui/icons-material/Search';
import ClearIcon from '@mui/icons-material/Clear';
@@ -34,20 +35,23 @@ const searchClient = algoliasearch(
);
// AppCard Component
-const AppCard = ({ data, index, mouseHoverIndex, setMouseHoverIndex, globalUrl, deactivatedIndexes, currTab, handleAppClick }) => {
+const AppCard = ({ data, index, mouseHoverIndex, setMouseHoverIndex, globalUrl, deactivatedIndexes, currTab, handleAppClick, leftSideBarOpenByClick, userdata }) => {
const isCloud = window.location.host === "localhost:3002" || window.location.host === "shuffler.io" || window.location.host === "localhost:3000";
const appUrl = isCloud ? `/apps/${data.id}` : `https://shuffler.io/apps/${data.id}`;
+ var canEditApp = userdata.admin === "true" || userdata.id === data?.owner || data?.owner === "" || (userdata.admin === "true" && userdata.active_org.id === data?.reference_org) || !data?.generated
const paperStyle = {
- backgroundColor: mouseHoverIndex === index ? "rgba(26, 26, 26, 1)" : "#1A1A1A",
+ backgroundColor: mouseHoverIndex === index ? "rgba(26, 26, 26, 1)" : "#212121",
color: "rgba(241, 241, 241, 1)",
cursor: "pointer",
- position: "relative",
- width: 365,
+ fontFamily: "Inter",
+ // position: "relative",
+ width: "100%",
height: 96,
borderRadius: 8,
boxShadow: "0px 0px 10px 0px rgba(0, 0, 0, 0.1)",
marginBottom: 20,
+ transition: "width 0.3s ease",
};
return (
@@ -63,7 +67,7 @@ const AppCard = ({ data, index, mouseHoverIndex, setMouseHoverIndex, globalUrl,
fontSize: 16,
overflow: "hidden",
display: "flex",
- alignItems: "flex-start",
+ fontFamily: "Inter",
width: '100%',
backgroundColor: mouseHoverIndex === index ? "#2F2F2F" : "#212121"
}}
@@ -92,13 +96,14 @@ const AppCard = ({ data, index, mouseHoverIndex, setMouseHoverIndex, globalUrl,
fontWeight: '400',
overflow: "hidden",
margin: "12px 0",
- fontFamily: "var(--zds-typography-base,Inter,Helvetica,arial,sans-serif)"
+ fontFamily: "Inter"
}}>
-
+
{data.generated !== true && data.tags && data.tags.slice(0, 2).map((tag, tagIndex) => (
{tag}
@@ -134,44 +140,57 @@ const AppCard = ({ data, index, mouseHoverIndex, setMouseHoverIndex, globalUrl,
{/* Deactivate button */}
{currTab === 0 && !deactivatedIndexes.includes(index) && mouseHoverIndex === index && data.generated === true && (
-
@@ -192,6 +211,7 @@ const Hits = ({
globalUrl,
isLoading,
isLoggedIn,
+ leftSideBarOpenByClick
}) => {
const [hoverEffect, setHoverEffect] = useState(-1);
const [allActivatedAppIds, setAllActivatedAppIds] = useState(userdata?.active_apps);
@@ -330,7 +350,7 @@ const Hits = ({
color: "rgba(241, 241, 241, 1)",
cursor: "pointer",
position: "relative",
- width: 365,
+ width: leftSideBarOpenByClick ? 325 : 365,
height: 96,
borderRadius: 8,
boxShadow: "0px 0px 10px 0px rgba(0, 0, 0, 0.1)",
@@ -374,7 +394,6 @@ const Hits = ({
fontWeight: '400',
overflow: "hidden",
margin: "12px 0",
- fontFamily: "var(--zds-typography-base,Inter,Helvetica,arial,sans-serif)"
}}
>
{data.categories !== null
@@ -514,46 +533,7 @@ const Hits = ({
);
}
-// Custom Category Dropdown Component
-const CategoryDropdown = ({ items, currentRefinement, refine }) => {
- const handleChange = (event) => {
- const value = event.target.value;
- refine(value);
- };
- return (
-
- );
-};
-
-const CustomCategoryDropdown = connectRefinementList(CategoryDropdown);
// Custom SearchBox Component
const SearchBox = ({ refine, searchQuery, setSearchQuery }) => {
@@ -608,10 +588,11 @@ const SearchBox = ({ refine, searchQuery, setSearchQuery }) => {
event.preventDefault();
}
}}
- style={{ width: '100%', borderRadius: '7px', fontFamily: "var(--zds-typography-base,Inter,Helvetica,arial,sans-serif)" }}
+ style={{ borderRadius: 8, height: 45, fontFamily: "Inter", flex: 1 }}
InputProps={{
style: {
borderRadius: 8,
+ height: 45
},
endAdornment: (
@@ -637,6 +618,38 @@ const SearchBox = ({ refine, searchQuery, setSearchQuery }) => {
const CustomSearchBox = connectSearchBox(SearchBox);
const CustomHits = connectHits(Hits);
+// Custom Category Dropdown Component
+const CategoryDropdown = ({ items, currentRefinement, refine }) => {
+ const handleChange = (event) => {
+ const value = event.target.value;
+ refine(value);
+ };
+
+ return (
+
+ );
+};
+const CustomCategoryDropdown = connectRefinementList(CategoryDropdown);
+
// Custom Label Dropdown Component
const LabelDropdown = ({ items, currentRefinement, refine }) => {
const handleChange = (event) => {
@@ -652,15 +665,7 @@ const LabelDropdown = ({ items, currentRefinement, refine }) => {
onChange={handleChange}
displayEmpty
multiple
- style={{
- width: '100%',
- maxWidth: '300px',
- borderRadius: '7px',
- fontFamily: "var(--zds-typography-base,Inter,Helvetica,arial,sans-serif)",
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- whiteSpace: 'nowrap',
- }}
+ style={{ borderRadius: 8, height: 45, fontFamily: "Inter", flex: 1 }}
renderValue={(selected) => selected.length ? selected.join(', ') : 'All Labels'}
>