2024-01-06 18:17:51 +02:00
|
|
|
import shim from '@joplin/lib/shim';
|
2020-09-15 15:01:07 +02:00
|
|
|
import Button from '../../Button/Button';
|
2024-01-06 18:17:51 +02:00
|
|
|
import { css } from 'styled-components';
|
2020-09-15 15:01:07 +02:00
|
|
|
const styled = require('styled-components').default;
|
|
|
|
|
|
|
|
export const StyledRoot = styled.div`
|
2020-11-12 21:13:28 +02:00
|
|
|
background-color: ${(props: any) => props.theme.backgroundColor2};
|
2020-09-15 15:01:07 +02:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
overflow-x: hidden;
|
|
|
|
overflow-y: hidden;
|
|
|
|
display: inline-flex;
|
|
|
|
flex-direction: column;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const StyledHeader = styled.div`
|
2020-11-12 21:13:28 +02:00
|
|
|
//height: ${(props: any) => props.theme.topRowHeight}px;
|
2020-09-15 15:01:07 +02:00
|
|
|
//text-decoration: none;
|
|
|
|
flex: 1;
|
|
|
|
box-sizing: border-box;
|
2020-11-12 21:13:28 +02:00
|
|
|
padding: ${(props: any) => props.theme.mainPadding}px;
|
|
|
|
padding-bottom: ${(props: any) => props.theme.mainPadding / 2}px;
|
2020-09-15 15:01:07 +02:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
user-select: none;
|
|
|
|
text-transform: uppercase;
|
|
|
|
//cursor: pointer;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const StyledHeaderIcon = styled.i`
|
2020-11-12 21:13:28 +02:00
|
|
|
font-size: ${(props: any) => props.theme.toolbarIconSize}px;
|
|
|
|
color: ${(props: any) => props.theme.color2};
|
2020-09-15 15:01:07 +02:00
|
|
|
margin-right: 8px;
|
|
|
|
`;
|
|
|
|
|
2020-09-29 12:49:51 +02:00
|
|
|
export const StyledAllNotesIcon = styled(StyledHeaderIcon)`
|
2020-11-12 21:13:28 +02:00
|
|
|
font-size: ${(props: any) => props.theme.toolbarIconSize * 0.8}px;
|
|
|
|
color: ${(props: any) => props.theme.colorFaded2};
|
2020-09-29 12:49:51 +02:00
|
|
|
margin-right: 8px;
|
|
|
|
`;
|
|
|
|
|
2020-09-15 15:01:07 +02:00
|
|
|
export const StyledHeaderLabel = styled.span`
|
|
|
|
flex: 1;
|
2020-11-12 21:13:28 +02:00
|
|
|
color: ${(props: any) => props.theme.color2};
|
|
|
|
font-size: ${(props: any) => Math.round(props.theme.fontSize * 1.1)}px;
|
2020-09-15 15:01:07 +02:00
|
|
|
font-weight: bold;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const StyledListItem = styled.div`
|
|
|
|
box-sizing: border-box;
|
2021-11-15 19:19:51 +02:00
|
|
|
height: 30px;
|
2020-09-15 15:01:07 +02:00
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
2020-09-29 12:49:51 +02:00
|
|
|
align-items: center;
|
2020-11-12 21:13:28 +02:00
|
|
|
padding-left: ${(props: any) => props.theme.mainPadding + ('depth' in props ? props.depth : 0) * 16}px;
|
|
|
|
background: ${(props: any) => props.selected ? props.theme.selectedColor2 : 'none'};
|
|
|
|
/*text-transform: ${(props: any) => props.isSpecialItem ? 'uppercase' : 'none'};*/
|
2020-09-15 15:01:07 +02:00
|
|
|
transition: 0.1s;
|
|
|
|
|
|
|
|
&:hover {
|
2021-01-23 17:51:19 +02:00
|
|
|
background-color: ${(props: any) => props.theme.backgroundColorHover2};
|
2020-09-15 15:01:07 +02:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2020-11-12 21:13:28 +02:00
|
|
|
function listItemTextColor(props: any) {
|
2020-09-15 15:01:07 +02:00
|
|
|
if (props.isConflictFolder) return props.theme.colorError2;
|
|
|
|
if (props.isSpecialItem) return props.theme.colorFaded2;
|
2021-05-13 18:57:37 +02:00
|
|
|
if (props.shareId) return props.theme.colorWarn2;
|
2020-09-15 15:01:07 +02:00
|
|
|
return props.theme.color2;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const StyledListItemAnchor = styled.a`
|
2020-11-12 21:13:28 +02:00
|
|
|
font-size: ${(props: any) => Math.round(props.theme.fontSize * 1.0833333)}px;
|
2020-09-15 15:01:07 +02:00
|
|
|
text-decoration: none;
|
2020-11-12 21:13:28 +02:00
|
|
|
color: ${(props: any) => listItemTextColor(props)};
|
2020-09-15 15:01:07 +02:00
|
|
|
cursor: default;
|
2021-05-13 18:57:37 +02:00
|
|
|
opacity: ${(props: any) => props.selected || props.shareId ? 1 : 0.8};
|
2020-09-15 15:01:07 +02:00
|
|
|
white-space: nowrap;
|
|
|
|
display: flex;
|
|
|
|
flex: 1;
|
|
|
|
align-items: center;
|
|
|
|
user-select: none;
|
2020-10-07 21:58:43 +02:00
|
|
|
height: 100%;
|
2020-09-15 15:01:07 +02:00
|
|
|
`;
|
|
|
|
|
2021-05-13 18:57:37 +02:00
|
|
|
export const StyledShareIcon = styled.i`
|
|
|
|
margin-left: 8px;
|
|
|
|
`;
|
|
|
|
|
2020-09-15 15:01:07 +02:00
|
|
|
export const StyledExpandLink = styled.a`
|
2020-11-12 21:13:28 +02:00
|
|
|
color: ${(props: any) => props.theme.color2};
|
2020-09-15 15:01:07 +02:00
|
|
|
cursor: default;
|
|
|
|
opacity: 0.8;
|
|
|
|
text-decoration: none;
|
|
|
|
padding-right: 8px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
width: 16px;
|
|
|
|
max-width: 16px;
|
|
|
|
min-width: 16px;
|
2020-10-07 22:03:56 +02:00
|
|
|
height: 100%;
|
2020-09-15 15:01:07 +02:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const StyledNoteCount = styled.div`
|
2023-06-10 15:03:26 +02:00
|
|
|
color: ${(props: any) => props.theme.colorFaded2};
|
2020-09-15 15:01:07 +02:00
|
|
|
padding-left: 8px;
|
|
|
|
user-select: none;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const StyledSynchronizeButton = styled(Button)`
|
|
|
|
width: 100%;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const StyledAddButton = styled(Button)`
|
|
|
|
border: none;
|
|
|
|
padding-right: 15px;
|
|
|
|
padding-top: 4px;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const StyledSyncReport = styled.div`
|
2020-11-12 21:13:28 +02:00
|
|
|
font-size: ${(props: any) => Math.round(props.theme.fontSize * 0.9)}px;
|
|
|
|
color: ${(props: any) => props.theme.color2};
|
2020-09-15 15:01:07 +02:00
|
|
|
opacity: 0.5;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
margin-left: 5px;
|
|
|
|
margin-right: 5px;
|
|
|
|
margin-bottom: 10px;
|
|
|
|
word-wrap: break-word;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const StyledSyncReportText = styled.div`
|
2020-11-12 21:13:28 +02:00
|
|
|
color: ${(props: any) => props.theme.color2};
|
2020-09-15 15:01:07 +02:00
|
|
|
word-wrap: break-word;
|
|
|
|
width: 100%;
|
|
|
|
`;
|
2024-01-06 18:17:51 +02:00
|
|
|
|
|
|
|
// Workaround sidebar rendering bug on Linux Intel GPU.
|
|
|
|
// https://github.com/laurent22/joplin/issues/7506
|
|
|
|
export const StyledSpanFix = styled.span`
|
|
|
|
${shim.isLinux() && css`
|
|
|
|
position: relative;
|
|
|
|
`}
|
|
|
|
`;
|