Skip to content

Commit

Permalink
#699 - Change border color
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed Oct 27, 2023
1 parent a196c41 commit fe9fbe8
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 36 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- [#691](https://github.com/estruyf/vscode-front-matter/issues/691): Silent authentication retrieval for GitHub sponsors
- [#694](https://github.com/estruyf/vscode-front-matter/issues/694): Start terminal session from the folder where the `frontmatter.json` file is located
- [#696](https://github.com/estruyf/vscode-front-matter/issues/696): Close the local server terminal on restart
- [#699](https://github.com/estruyf/vscode-front-matter/issues/699): Changing border theme variable for the dashboard header

## [9.3.1] - 2023-10-27

Expand Down
2 changes: 1 addition & 1 deletion src/dashboardWebView/components/Header/FilterInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const FilterInput: React.FunctionComponent<IFilterInputProps> = ({
name="search"
className={`block w-full py-2 pl-10 pr-3 sm:text-sm appearance-none disabled:opacity-50 rounded ${getColors(
'bg-white dark:bg-vulcan-300 border border-gray-300 dark:border-vulcan-100 text-vulcan-500 dark:text-whisper-500 placeholder-gray-400 dark:placeholder-whisper-800 focus:outline-none',
'bg-[var(--vscode-input-background)] text-[var(--vscode-input-foreground)] border-[var(--vscode-editorWidget-border)] placeholder-[var(--vscode-input-placeholderForeground)] focus:outline-[var(--vscode-focusBorder)] focus:outline-1 focus:outline-offset-0 focus:shadow-none focus:border-transparent'
'bg-[var(--vscode-input-background)] text-[var(--vscode-input-foreground)] border-[var(--vscode-input-border)] placeholder-[var(--vscode-input-placeholderForeground)] focus:outline-[var(--vscode-focusBorder)] focus:outline-1 focus:outline-offset-0 focus:shadow-none focus:border-transparent'
)
}`}
placeholder={placeholder || l10n.t(LocalizationKey.commonSearch)}
Expand Down
23 changes: 5 additions & 18 deletions src/dashboardWebView/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { Pagination } from './Pagination';
import { GroupOption } from '../../constants/GroupOption';
import usePagination from '../../hooks/usePagination';
import { PaginationStatus } from './PaginationStatus';
import useThemeColors from '../../hooks/useThemeColors';
import { Navigation } from './Navigation';
import { ProjectSwitcher } from './ProjectSwitcher';
import * as l10n from '@vscode/l10n';
Expand Down Expand Up @@ -55,7 +54,6 @@ export const Header: React.FunctionComponent<IHeaderProps> = ({
const location = useLocation();
const navigate = useNavigate();
const { pageSetNr } = usePagination(settings?.dashboardState.contents.pagination);
const { getColors } = useThemeColors();

const createContent = () => {
Messenger.send(DashboardMessage.createContent);
Expand Down Expand Up @@ -144,16 +142,8 @@ export const Header: React.FunctionComponent<IHeaderProps> = ({
}, [location.search]);

return (
<div className={`w-full sticky top-0 z-20 ${getColors(
`bg-gray-100 dark:bg-vulcan-500`,
`bg-[var(--vscode-editor-background)] text-[var(--vscode-editor-foreground)]`
)
}`}>
<div className={`mb-0 border-b flex justify-between ${getColors(
`bg-gray-100 dark:bg-vulcan-500 border-gray-200 dark:border-vulcan-300`,
`bg-[var(--vscode-editor-background)] text-[var(--vscode-editor-foreground)] border-[var(--vscode-editorWidget-border)]`
)
}`}>
<div className={`w-full sticky top-0 z-20 bg-[var(--vscode-editor-background)] text-[var(--vscode-editor-foreground)]`}>
<div className={`mb-0 border-b flex justify-between bg-[var(--vscode-editor-background)] text-[var(--vscode-editor-foreground)] border-[var(--frontmatter-border)]`}>
<Tabs onNavigate={updateView} />

<div className='flex'>
Expand All @@ -180,8 +170,7 @@ export const Header: React.FunctionComponent<IHeaderProps> = ({
</div>
</div>

<div className={`px-4 flex flex-row items-center border-b justify-between ${getColors(`border-gray-200 dark:border-vulcan-100`, `border-[var(--vscode-editorWidget-border)]`)
}`}>
<div className={`px-4 flex flex-row items-center border-b justify-between border-[var(--frontmatter-border)]`}>
<div>
<Navigation totalPages={totalPages || 0} />
</div>
Expand All @@ -192,8 +181,7 @@ export const Header: React.FunctionComponent<IHeaderProps> = ({
</div>

<div
className={`py-4 px-5 w-full flex items-center justify-between lg:justify-end border-b space-x-4 lg:space-x-6 xl:space-x-8 ${getColors(`bg-gray-200 border-gray-300 dark:bg-vulcan-400 dark:border-vulcan-100`, `bg-[var(--vscode-panel-background)] border-[var(--vscode-editorWidget-border)]`)
}`}
className={`py-4 px-5 w-full flex items-center justify-between lg:justify-end border-b space-x-4 lg:space-x-6 xl:space-x-8 bg-[var(--vscode-panel-background)] border-[var(--frontmatter-border)]`}
>
<ClearFilters />

Expand Down Expand Up @@ -222,8 +210,7 @@ export const Header: React.FunctionComponent<IHeaderProps> = ({
(totalPages || 0) > pageSetNr &&
(!grouping || grouping === GroupOption.none) && (
<div
className={`px-4 flex justify-between py-2 border-b ${getColors(`border-gray-300 dark:border-vulcan-100`, `border-[var(--vscode-editorWidget-border)]`)
}`}
className={`px-4 flex justify-between py-2 border-b border-[var(--frontmatter-border)]`}
>
<PaginationStatus totalPages={totalPages || 0} />

Expand Down
2 changes: 1 addition & 1 deletion src/dashboardWebView/components/Header/Searchbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const Searchbox: React.FunctionComponent<ISearchboxProps> = ({
name="search"
className={`block w-full py-2 pl-10 pr-3 sm:text-sm appearance-none disabled:opacity-50 rounded ${getColors(
'bg-white dark:bg-vulcan-300 border border-gray-300 dark:border-vulcan-100 text-vulcan-500 dark:text-whisper-500 placeholder-gray-400 dark:placeholder-whisper-800 focus:outline-none',
'bg-[var(--vscode-input-background)] text-[var(--vscode-input-foreground)] border-[var(--vscode-editorWidget-border)] placeholder-[var(--vscode-input-placeholderForeground)] focus:outline-[var(--vscode-focusBorder)] focus:outline-1 focus:outline-offset-0 focus:shadow-none focus:border-transparent'
'bg-[var(--vscode-input-background)] text-[var(--vscode-input-foreground)] border-[var(--vscode-input-border)] placeholder-[var(--vscode-input-placeholderForeground)] focus:outline-[var(--vscode-focusBorder)] focus:outline-1 focus:outline-offset-0 focus:shadow-none focus:border-transparent'
)
}`}
placeholder={placeholder || l10n.t(LocalizationKey.commonSearch)}
Expand Down
22 changes: 10 additions & 12 deletions src/dashboardWebView/components/Media/DetailsInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ export const DetailsInput: React.FunctionComponent<IDetailsInputProps> = ({ valu
return (
<textarea
rows={3}
className={`py-1 px-2 sm:text-sm border w-full ${
getColors(
'bg-white dark:bg-vulcan-300 border-gray-300 dark:border-vulcan-100 text-vulcan-500 dark:text-whisper-500 placeholder-gray-400 dark:placeholder-whisper-800 focus:outline-none',
'bg-[var(--vscode-input-background)] text-[var(--vscode-input-foreground)] border-[var(--vscode-editorWidget-border)] placeholder-[var(--vscode-input-placeholderForeground)] focus:outline-[var(--vscode-focusBorder)] focus:outline-1 focus:outline-offset-0 focus:shadow-none focus:border-transparent'
)
}`}
className={`py-1 px-2 sm:text-sm border w-full ${getColors(
'bg-white dark:bg-vulcan-300 border-gray-300 dark:border-vulcan-100 text-vulcan-500 dark:text-whisper-500 placeholder-gray-400 dark:placeholder-whisper-800 focus:outline-none',
'bg-[var(--vscode-input-background)] text-[var(--vscode-input-foreground)] border-[var(--vscode-input-border)] placeholder-[var(--vscode-input-placeholderForeground)] focus:outline-[var(--vscode-focusBorder)] focus:outline-1 focus:outline-offset-0 focus:shadow-none focus:border-transparent'
)
}`}
value={value}
onChange={onChange}
/>
Expand All @@ -28,12 +27,11 @@ export const DetailsInput: React.FunctionComponent<IDetailsInputProps> = ({ valu

return (
<input
className={`py-1 px-2 sm:text-sm border w-full ${
getColors(
'bg-white dark:bg-vulcan-300 border-gray-300 dark:border-vulcan-100 text-vulcan-500 dark:text-whisper-500 placeholder-gray-400 dark:placeholder-whisper-800 focus:outline-none',
'bg-[var(--vscode-input-background)] text-[var(--vscode-input-foreground)] border-[var(--vscode-editorWidget-border)] placeholder-[var(--vscode-input-placeholderForeground)] focus:outline-[var(--vscode-focusBorder)] focus:outline-1 focus:outline-offset-0 focus:shadow-none focus:border-transparent'
)
}`}
className={`py-1 px-2 sm:text-sm border w-full ${getColors(
'bg-white dark:bg-vulcan-300 border-gray-300 dark:border-vulcan-100 text-vulcan-500 dark:text-whisper-500 placeholder-gray-400 dark:placeholder-whisper-800 focus:outline-none',
'bg-[var(--vscode-input-background)] text-[var(--vscode-input-foreground)] border-[var(--vscode-input-border)] placeholder-[var(--vscode-input-placeholderForeground)] focus:outline-[var(--vscode-focusBorder)] focus:outline-1 focus:outline-offset-0 focus:shadow-none focus:border-transparent'
)
}`}
value={value}
onChange={onChange}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/dashboardWebView/components/SnippetsView/NewForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const NewForm: React.FunctionComponent<INewFormProps> = ({
onChange={(e) => onMediaSnippetUpdate(e.currentTarget.checked)}
className={`h-4 w-4 rounded ${getColors(
`focus:ring-teal-500 text-teal-600 border-gray-300 dark:border-vulcan-50`,
`focus:ring-[var(--frontmatter-button-background)] text-[var(--frontmatter-button-background)] border-[var(--vscode-editorWidget-border)]`
`focus:ring-[var(--frontmatter-button-background)] text-[var(--frontmatter-button-background)] border-[var(--frontmatter-border)]`
)
}`}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const FilterInput: React.FunctionComponent<IFilterInputProps> = ({
<input
type="text"
name="filter"
className={`block w-full py-2 pl-10 pr-3 sm:text-sm appearance-none disabled:opacity-50 rounded bg-[var(--vscode-input-background)] text-[var(--vscode-input-foreground)] border-[var(--vscode-editorWidget-border)] placeholder-[var(--vscode-input-placeholderForeground)] focus:outline-[var(--vscode-focusBorder)] focus:outline-1 focus:outline-offset-0 focus:shadow-none focus:border-transparent`}
className={`block w-full py-2 pl-10 pr-3 sm:text-sm appearance-none disabled:opacity-50 rounded bg-[var(--vscode-input-background)] text-[var(--vscode-input-foreground)] border-[var(--vscode-input-border)] placeholder-[var(--vscode-input-placeholderForeground)] focus:outline-[var(--vscode-focusBorder)] focus:outline-1 focus:outline-offset-0 focus:shadow-none focus:border-transparent`}
placeholder={placeholder || ""}
value={value}
onChange={(e) => onChange && onChange(e.target.value)}
Expand Down
2 changes: 1 addition & 1 deletion src/dashboardWebView/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
select {
color: var(--vscode-input-foreground);
background-color: var(--vscode-input-background);
border: 1px solid var(--vscode-editorWidget-border);
border: 1px solid var(--vscode-panel-border);
font-size: var(--vscode-font-size);
@apply rounded;

Expand Down
2 changes: 1 addition & 1 deletion src/panelWebView/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ vscode-divider {

/* Divider */
.divider {
background: var(--divider-background);
background: var(--vscode-panel-border);
}

/* Git actions */
Expand Down

0 comments on commit fe9fbe8

Please sign in to comment.