mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
update colors
This commit is contained in:
@@ -8,8 +8,8 @@ export const ActionIcon = ({onPress, name, color,customStyle}) => {
|
|||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
style={[{
|
style={[{
|
||||||
width: 60,
|
width: 50,
|
||||||
height: 50,
|
height: 40,
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'flex-end',
|
alignItems: 'flex-end',
|
||||||
paddingRight: 12,
|
paddingRight: 12,
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export const MenuListItem = ({item, index, noTextMode,ignore}) => {
|
|||||||
style={{
|
style={{
|
||||||
fontFamily: WEIGHT.regular,
|
fontFamily: WEIGHT.regular,
|
||||||
fontSize: SIZE.sm,
|
fontSize: SIZE.sm,
|
||||||
color: colors.pri,
|
color: colors.heading,
|
||||||
}}>
|
}}>
|
||||||
{item.name}
|
{item.name}
|
||||||
</Text>
|
</Text>
|
||||||
@@ -81,9 +81,7 @@ export const MenuListItem = ({item, index, noTextMode,ignore}) => {
|
|||||||
color={item.on ? colors.accent : colors.icon}
|
color={item.on ? colors.accent : colors.icon}
|
||||||
name={item.on ? 'toggle-switch' : 'toggle-switch-off'}
|
name={item.on ? 'toggle-switch' : 'toggle-switch-off'}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : undefined}
|
||||||
undefined
|
|
||||||
)}
|
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ export const Menu = ({
|
|||||||
const [state, dispatch] = useTracked();
|
const [state, dispatch] = useTracked();
|
||||||
const {colors} = state;
|
const {colors} = state;
|
||||||
|
|
||||||
// todo
|
|
||||||
|
|
||||||
function changeColorScheme(colors = COLOR_SCHEME, accent = ACCENT) {
|
function changeColorScheme(colors = COLOR_SCHEME, accent = ACCENT) {
|
||||||
let newColors = setColorScheme(colors, accent);
|
let newColors = setColorScheme(colors, accent);
|
||||||
@@ -50,7 +49,6 @@ export const Menu = ({
|
|||||||
dispatch({type: ACTIONS.THEME, colors: newColors});
|
dispatch({type: ACTIONS.THEME, colors: newColors});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const listItems = [
|
const listItems = [
|
||||||
{
|
{
|
||||||
name: 'Home',
|
name: 'Home',
|
||||||
@@ -196,7 +194,12 @@ export const Menu = ({
|
|||||||
width: '100%',
|
width: '100%',
|
||||||
}}>
|
}}>
|
||||||
{listItems2.map((item, index) => (
|
{listItems2.map((item, index) => (
|
||||||
<MenuListItem item={item} index={index} ignore={true} noTextMode={noTextMode} />
|
<MenuListItem
|
||||||
|
item={item}
|
||||||
|
index={index}
|
||||||
|
ignore={true}
|
||||||
|
noTextMode={noTextMode}
|
||||||
|
/>
|
||||||
))}
|
))}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ export default class NoteItem extends React.Component {
|
|||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
}}>
|
}}>
|
||||||
{item.colors.map(item => (
|
{item.colors.map((item) => (
|
||||||
<View
|
<View
|
||||||
key={item}
|
key={item}
|
||||||
style={{
|
style={{
|
||||||
@@ -253,12 +253,6 @@ export default class NoteItem extends React.Component {
|
|||||||
</>
|
</>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
<View
|
|
||||||
style={{
|
|
||||||
justifyContent: 'center',
|
|
||||||
minHeight: 70,
|
|
||||||
alignItems: 'center',
|
|
||||||
}}>
|
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={{
|
style={{
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
@@ -276,10 +270,9 @@ export default class NoteItem extends React.Component {
|
|||||||
isTrash ? [] : ['Pin', 'Favorite', 'Add to Vault'],
|
isTrash ? [] : ['Pin', 'Favorite', 'Add to Vault'],
|
||||||
);
|
);
|
||||||
}}>
|
}}>
|
||||||
<Icon name="dots-horizontal" size={SIZE.lg} color={colors.icon} />
|
<Icon name="dots-horizontal" size={SIZE.lg} color={colors.heading} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ export const NotebookItem = ({
|
|||||||
style={{
|
style={{
|
||||||
fontFamily: WEIGHT.bold,
|
fontFamily: WEIGHT.bold,
|
||||||
fontSize: SIZE.sm + 1,
|
fontSize: SIZE.sm + 1,
|
||||||
color: colors.pri,
|
color: colors.heading,
|
||||||
maxWidth: '100%',
|
maxWidth: '100%',
|
||||||
}}>
|
}}>
|
||||||
{item.title}
|
{item.title}
|
||||||
@@ -258,7 +258,7 @@ export const NotebookItem = ({
|
|||||||
notebookID: notebookID,
|
notebookID: notebookID,
|
||||||
});
|
});
|
||||||
}}>
|
}}>
|
||||||
<Icon name="dots-horizontal" size={SIZE.lg} color={colors.icon} />
|
<Icon name="dots-horizontal" size={SIZE.lg} color={colors.heading} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class PremiumDialog extends React.Component {
|
|||||||
style={{
|
style={{
|
||||||
fontSize: SIZE.lg,
|
fontSize: SIZE.lg,
|
||||||
fontFamily: WEIGHT.bold,
|
fontFamily: WEIGHT.bold,
|
||||||
color: colors.pri,
|
color: colors.heading,
|
||||||
paddingVertical: 20,
|
paddingVertical: 20,
|
||||||
}}>
|
}}>
|
||||||
Unlock Premium Features
|
Unlock Premium Features
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ const SimpleList = ({
|
|||||||
}}>
|
}}>
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
color: colors.navbg,
|
color: colors.nav,
|
||||||
fontSize: SIZE.sm,
|
fontSize: SIZE.sm,
|
||||||
fontFamily: WEIGHT.regular,
|
fontFamily: WEIGHT.regular,
|
||||||
}}>
|
}}>
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import {moveNoteHideEvent} from '../DialogManager/recievers';
|
|||||||
import {HeaderMenu} from './HeaderMenu';
|
import {HeaderMenu} from './HeaderMenu';
|
||||||
import {HeaderTitle} from './HeaderTitle';
|
import {HeaderTitle} from './HeaderTitle';
|
||||||
import {useHideHeader, useForceUpdate} from '../../utils/hooks';
|
import {useHideHeader, useForceUpdate} from '../../utils/hooks';
|
||||||
|
import RNIconic from 'react-native-iconic';
|
||||||
|
|
||||||
export const Header = ({showSearch, root}) => {
|
export const Header = ({showSearch, root}) => {
|
||||||
const [state, dispatch] = useTracked();
|
const [state, dispatch] = useTracked();
|
||||||
@@ -121,12 +122,13 @@ export const Header = ({showSearch, root}) => {
|
|||||||
</Animatable.View>
|
</Animatable.View>
|
||||||
|
|
||||||
<View style={styles.leftBtnContainer}>
|
<View style={styles.leftBtnContainer}>
|
||||||
{headerState.menu && !DDS.isTab ? (
|
{!DDS.isTab ? (
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
hitSlop={{top: 20, bottom: 20, left: 50, right: 40}}
|
hitSlop={{top: 20, bottom: 20, left: 50, right: 40}}
|
||||||
onPress={onLeftButtonPress}
|
onPress={onLeftButtonPress}
|
||||||
style={styles.leftBtn}>
|
style={styles.leftBtn}>
|
||||||
<Icon
|
<RNIconic
|
||||||
|
shape="BURGER"
|
||||||
style={{
|
style={{
|
||||||
marginLeft: headerState.canGoBack ? -5 : 0,
|
marginLeft: headerState.canGoBack ? -5 : 0,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ export function useHideHeader() {
|
|||||||
eUnSubscribeEvent(eScrollEvent, onScroll);
|
eUnSubscribeEvent(eScrollEvent, onScroll);
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
console.log('used',hide)
|
|
||||||
return hide;
|
return hide;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,14 +172,16 @@ const Editor = ({noMenu}) => {
|
|||||||
width: '100%',
|
width: '100%',
|
||||||
height: 50,
|
height: 50,
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
|
alignItems: 'center',
|
||||||
}}>
|
}}>
|
||||||
{noMenu ? null : (
|
{noMenu ? null : (
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
name="arrow-left"
|
name="arrow-left"
|
||||||
color={colors.icon}
|
color={colors.heading}
|
||||||
onPress={_onBackPress}
|
onPress={_onBackPress}
|
||||||
customStyle={{
|
customStyle={{
|
||||||
marginLeft: -5,
|
marginLeft: -5,
|
||||||
|
paddingLeft: 12,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -191,7 +193,7 @@ const Editor = ({noMenu}) => {
|
|||||||
{DDS.isTab && !fullscreen ? (
|
{DDS.isTab && !fullscreen ? (
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
name="fullscreen"
|
name="fullscreen"
|
||||||
color={colors.icon}
|
color={colors.heading}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
eSendEvent(eOpenFullscreenEditor);
|
eSendEvent(eOpenFullscreenEditor);
|
||||||
setFullscreen(true);
|
setFullscreen(true);
|
||||||
@@ -208,18 +210,18 @@ const Editor = ({noMenu}) => {
|
|||||||
|
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
name="undo-variant"
|
name="undo-variant"
|
||||||
color={colors.icon}
|
color={colors.heading}
|
||||||
onPress={() => {}}
|
onPress={() => {}}
|
||||||
/>
|
/>
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
name="redo-variant"
|
name="redo-variant"
|
||||||
color={colors.icon}
|
color={colors.heading}
|
||||||
onPress={() => {}}
|
onPress={() => {}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
name="dots-horizontal"
|
name="dots-horizontal"
|
||||||
color={colors.icon}
|
color={colors.heading}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
ActionSheetEvent(
|
ActionSheetEvent(
|
||||||
getNote(),
|
getNote(),
|
||||||
|
|||||||
@@ -12,9 +12,7 @@ import {TextInput} from 'react-native-gesture-handler';
|
|||||||
import QRCode from 'react-native-qrcode-generator';
|
import QRCode from 'react-native-qrcode-generator';
|
||||||
import {useIsFocused} from '@react-navigation/native';
|
import {useIsFocused} from '@react-navigation/native';
|
||||||
import {opacity, pv, SIZE, WEIGHT, ph} from '../../common/common';
|
import {opacity, pv, SIZE, WEIGHT, ph} from '../../common/common';
|
||||||
import {Header} from '../../components/header';
|
|
||||||
import {useTracked} from '../../provider';
|
import {useTracked} from '../../provider';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
eSubscribeEvent,
|
eSubscribeEvent,
|
||||||
eUnSubscribeEvent,
|
eUnSubscribeEvent,
|
||||||
@@ -90,8 +88,7 @@ export const Signup = ({route, navigation}) => {
|
|||||||
ToastEvent.show('Signup information is invalid', 'error');
|
ToastEvent.show('Signup information is invalid', 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
}
|
|
||||||
|
|
||||||
const _signUp = async () => {
|
const _signUp = async () => {
|
||||||
if (!validateInfo) return;
|
if (!validateInfo) return;
|
||||||
@@ -100,8 +97,6 @@ export const Signup = ({route, navigation}) => {
|
|||||||
setStatus('Creating your account...');
|
setStatus('Creating your account...');
|
||||||
try {
|
try {
|
||||||
await db.user.signup(username, email, password);
|
await db.user.signup(username, email, password);
|
||||||
|
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
setSigningIn(false);
|
setSigningIn(false);
|
||||||
setFailed(true);
|
setFailed(true);
|
||||||
@@ -111,8 +106,6 @@ export const Signup = ({route, navigation}) => {
|
|||||||
|
|
||||||
let user;
|
let user;
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
user = await db.user.user.get();
|
user = await db.user.user.get();
|
||||||
setStatus('Logging you in...');
|
setStatus('Logging you in...');
|
||||||
let k = await db.user.key();
|
let k = await db.user.key();
|
||||||
@@ -128,7 +121,6 @@ export const Signup = ({route, navigation}) => {
|
|||||||
setFailed(true);
|
setFailed(true);
|
||||||
ToastEvent.show('Login Failed, try again', 'error');
|
ToastEvent.show('Login Failed, try again', 'error');
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -430,7 +422,7 @@ export const Signup = ({route, navigation}) => {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
textContentType="username"
|
textContentType="username"
|
||||||
onChangeText={value => {
|
onChangeText={(value) => {
|
||||||
setUsername(value);
|
setUsername(value);
|
||||||
|
|
||||||
if (invalidUsername && validateUsername(username)) {
|
if (invalidUsername && validateUsername(username)) {
|
||||||
@@ -520,7 +512,7 @@ export const Signup = ({route, navigation}) => {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
textContentType="emailAddress"
|
textContentType="emailAddress"
|
||||||
onChangeText={value => {
|
onChangeText={(value) => {
|
||||||
setEmail(value);
|
setEmail(value);
|
||||||
if (invalidEmail && validateEmail(email)) {
|
if (invalidEmail && validateEmail(email)) {
|
||||||
setInvalidEmail(false);
|
setInvalidEmail(false);
|
||||||
@@ -626,7 +618,7 @@ export const Signup = ({route, navigation}) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onChangeText={value => {
|
onChangeText={(value) => {
|
||||||
setPassword(value);
|
setPassword(value);
|
||||||
if (invalidPassword && validatePass(password)) {
|
if (invalidPassword && validatePass(password)) {
|
||||||
setInvalidPassword(false);
|
setInvalidPassword(false);
|
||||||
@@ -677,7 +669,7 @@ export const Signup = ({route, navigation}) => {
|
|||||||
ref={_passConfirm}
|
ref={_passConfirm}
|
||||||
editable={password && !invalidPassword ? true : false}
|
editable={password && !invalidPassword ? true : false}
|
||||||
defaultValue={passwordReEnter}
|
defaultValue={passwordReEnter}
|
||||||
onChangeText={value => {
|
onChangeText={(value) => {
|
||||||
setPasswordReEnter(value);
|
setPasswordReEnter(value);
|
||||||
if (value !== password) {
|
if (value !== password) {
|
||||||
setConfirmPassword(false);
|
setConfirmPassword(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user