feat: Preferences (General Tab)

This commit is contained in:
Anoop M D 2023-08-18 01:09:00 +05:30
parent 417b50b0ad
commit 94baee8e25
6 changed files with 27 additions and 3 deletions

View File

@ -0,0 +1,7 @@
import styled from 'styled-components';
const StyledWrapper = styled.div`
color: ${(props) => props.theme.text};
`;
export default StyledWrapper;

View File

@ -0,0 +1,15 @@
import React from 'react';
import StyledWrapper from './StyledWrapper';
const General = () => {
return (
<StyledWrapper>
<div className="flex items-center mt-2">
<input type="checkbox" checked={true} className="mr-3 mousetrap" />
SSL Certificate Verification
</div>
</StyledWrapper>
);
};
export default General;

View File

@ -6,7 +6,7 @@ const Support = () => {
return ( return (
<StyledWrapper> <StyledWrapper>
<div className="rows"> <div className="rows">
<div> <div className="mt-2">
<a href="https://docs.usebruno.com" target="_blank" className="flex items-end"> <a href="https://docs.usebruno.com" target="_blank" className="flex items-end">
<IconBook size={18} strokeWidth={2} /> <IconBook size={18} strokeWidth={2} />
<span className="label ml-2">Documentation</span> <span className="label ml-2">Documentation</span>

View File

@ -2,6 +2,7 @@ import Modal from 'components/Modal/index';
import classnames from 'classnames'; import classnames from 'classnames';
import React, { useState } from 'react'; import React, { useState } from 'react';
import Support from './Support'; import Support from './Support';
import General from './General';
import Theme from './Theme'; import Theme from './Theme';
import StyledWrapper from './StyledWrapper'; import StyledWrapper from './StyledWrapper';
@ -17,7 +18,7 @@ const Preferences = ({ onClose }) => {
const getTabPanel = (tab) => { const getTabPanel = (tab) => {
switch (tab) { switch (tab) {
case 'general': { case 'general': {
return <div>General</div>; return <General />;
} }
case 'theme': { case 'theme': {

View File

@ -1,5 +1,5 @@
import themes from 'themes/index'; import themes from 'themes/index';
import useLocalStorage from 'src/hooks/useLocalStorage/index'; import useLocalStorage from 'hooks/useLocalStorage/index';
import { createContext, useContext } from 'react'; import { createContext, useContext } from 'react';
import { ThemeProvider as SCThemeProvider } from 'styled-components'; import { ThemeProvider as SCThemeProvider } from 'styled-components';

View File

@ -8,6 +8,7 @@ class LastOpenedCollections {
name: 'preferences', name: 'preferences',
clearInvalidConfig: true clearInvalidConfig: true
}); });
console.log(`Preferences file is located at: ${this.store.path}`);
} }
getAll() { getAll() {