Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Inline and prune

Manav Rathib3016dffcad2
diff --git a/web/apps/photos/src/components/SearchBar.tsx b/web/apps/photos/src/components/SearchBar.tsx
index f09d3e44a3..7ab71c76af 100644
--- a/web/apps/photos/src/components/SearchBar.tsx
+++ b/web/apps/photos/src/components/SearchBar.tsx
@@ -57,7 +57,7 @@ import {
getDefaultOptions,
} from "services/searchService";
import { Collection } from "types/collection";
-import { SelectStyles } from "../styles/search";
+
const { Option, ValueContainer, Menu } = components;
@@ -291,6 +291,72 @@ const SearchInputWrapper = styled(CenteredFlex, {
`}
`;
+export const SelectStyles = {
+ container: (style) => ({
+ ...style,
+ flex: 1,
+ }),
+ control: (style, { isFocused }) => ({
+ ...style,
+ backgroundColor: "rgba(255, 255, 255, 0.1)",
+
+ borderColor: isFocused ? "#1dba54" : "transparent",
+ boxShadow: "none",
+ ":hover": {
+ borderColor: "#1dba54",
+ cursor: "text",
+ },
+ }),
+ input: (style) => ({
+ ...style,
+ color: "#fff",
+ }),
+ menu: (style) => ({
+ ...style,
+ marginTop: "1px",
+ backgroundColor: "#1b1b1b",
+ }),
+ option: (style, { isFocused }) => ({
+ ...style,
+ padding: 0,
+ backgroundColor: "transparent !important",
+ "& :hover": {
+ cursor: "pointer",
+ },
+ "& .main": {
+ backgroundColor: isFocused && "#202020",
+ },
+ "&:last-child .MuiDivider-root": {
+ display: "none",
+ },
+ }),
+ dropdownIndicator: (style) => ({
+ ...style,
+ display: "none",
+ }),
+ indicatorSeparator: (style) => ({
+ ...style,
+ display: "none",
+ }),
+ clearIndicator: (style) => ({
+ ...style,
+ display: "none",
+ }),
+ singleValue: (style) => ({
+ ...style,
+ backgroundColor: "transparent",
+ color: "#d1d1d1",
+ marginLeft: "36px",
+ }),
+ placeholder: (style) => ({
+ ...style,
+ color: "rgba(255, 255, 255, 0.7)",
+ wordSpacing: "2px",
+ whiteSpace: "nowrap",
+ marginLeft: "40px",
+ }),
+};
+
const OptionWithInfo = (props) => (
<Option {...props}>
<LabelWithInfo data={props.data} />
diff --git a/web/apps/photos/src/styles/dropdown.ts b/web/apps/photos/src/styles/dropdown.ts
deleted file mode 100644
index 9feb9f94bc..0000000000
--- a/web/apps/photos/src/styles/dropdown.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { SelectStyles } from "./search";
-
-export const DropdownStyle = {
- ...SelectStyles,
- dropdownIndicator: (style) => ({
- ...style,
- margin: "0px",
- }),
- singleValue: (style) => ({
- ...style,
- color: "#d1d1d1",
- width: "240px",
- }),
- control: (style, { isFocused }) => ({
- ...style,
- ...SelectStyles.control(style, { isFocused }),
- minWidth: "240px",
- paddingLeft: "8px",
- }),
-};
diff --git a/web/apps/photos/src/styles/linkExpiry.tsx b/web/apps/photos/src/styles/linkExpiry.tsx
deleted file mode 100644
index 852569ae1e..0000000000
--- a/web/apps/photos/src/styles/linkExpiry.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import { DropdownStyle } from "./dropdown";
-
-export const linkExpiryStyle = {
- ...DropdownStyle,
- placeholder: (style) => ({
- ...style,
- color: "#d1d1d1",
- width: "100%",
- textAlign: "center",
- }),
-};
diff --git a/web/apps/photos/src/styles/search.ts b/web/apps/photos/src/styles/search.ts
deleted file mode 100644
index 1127595fb7..0000000000
--- a/web/apps/photos/src/styles/search.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-export const SelectStyles = {
- container: (style) => ({
- ...style,
- flex: 1,
- }),
- control: (style, { isFocused }) => ({
- ...style,
- backgroundColor: "rgba(255, 255, 255, 0.1)",
-
- borderColor: isFocused ? "#1dba54" : "transparent",
- boxShadow: "none",
- ":hover": {
- borderColor: "#1dba54",
- cursor: "text",
- },
- }),
- input: (style) => ({
- ...style,
- color: "#fff",
- }),
- menu: (style) => ({
- ...style,
- marginTop: "1px",
- backgroundColor: "#1b1b1b",
- }),
- option: (style, { isFocused }) => ({
- ...style,
- padding: 0,
- backgroundColor: "transparent !important",
- "& :hover": {
- cursor: "pointer",
- },
- "& .main": {
- backgroundColor: isFocused && "#202020",
- },
- "&:last-child .MuiDivider-root": {
- display: "none",
- },
- }),
- dropdownIndicator: (style) => ({
- ...style,
- display: "none",
- }),
- indicatorSeparator: (style) => ({
- ...style,
- display: "none",
- }),
- clearIndicator: (style) => ({
- ...style,
- display: "none",
- }),
- singleValue: (style) => ({
- ...style,
- backgroundColor: "transparent",
- color: "#d1d1d1",
- marginLeft: "36px",
- }),
- placeholder: (style) => ({
- ...style,
- color: "rgba(255, 255, 255, 0.7)",
- wordSpacing: "2px",
- whiteSpace: "nowrap",
- marginLeft: "40px",
- }),
-};