mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-21 22:19:41 +01:00
remove console.logs
This commit is contained in:
1
apps/mobile/.gitignore
vendored
1
apps/mobile/.gitignore
vendored
@@ -61,3 +61,4 @@ buck-out/
|
||||
|
||||
# Other
|
||||
react-native-mmkv-storage/
|
||||
react-native-eventsource/
|
||||
|
||||
@@ -1848,7 +1848,7 @@
|
||||
}
|
||||
document.getElementById(dropdown).style.top = dropDownTop;
|
||||
document.getElementById(dropdown).style.left = left;
|
||||
console.log(dropDownTop, left);
|
||||
|
||||
//dropdown.css('top', dropDownTop + 'px');
|
||||
//dropdown.css('left', left + 'px');
|
||||
|
||||
@@ -1860,11 +1860,10 @@
|
||||
let downTop =
|
||||
currentTop - b.offsetHeight - height;
|
||||
|
||||
console.log(downTop, 'nat')
|
||||
|
||||
document.getElementById(dropdown).style.top = downTop + 20;
|
||||
document.getElementById(dropdown).style.left = left;
|
||||
//console.log('called',downTop + 20,left);
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -154,7 +154,6 @@ export class AddNotebookDialog extends React.Component {
|
||||
let nextTopics = toEdit.topics.map((topic, index) => {
|
||||
if (index === 0) return topic;
|
||||
let copy = {...topic};
|
||||
console.log(copy, 'here');
|
||||
copy.title = prevTopics[index - 1];
|
||||
return copy;
|
||||
});
|
||||
@@ -164,7 +163,6 @@ export class AddNotebookDialog extends React.Component {
|
||||
nextTopics.push(title);
|
||||
}
|
||||
});
|
||||
console.log(nextTopics, prevTopics, toEdit.topics, 'HERE');
|
||||
await db.notebooks.notebook(id).topics.add(...nextTopics);
|
||||
} else {
|
||||
await db.notebooks.add({
|
||||
|
||||
@@ -31,7 +31,7 @@ export class AddTopicDialog extends React.Component {
|
||||
} else {
|
||||
let topic = this.props.toEdit;
|
||||
topic.title = this.title;
|
||||
console.log(topic);
|
||||
|
||||
await db.notebooks.notebook(topic.notebookId).topics.add(topic);
|
||||
}
|
||||
this.close();
|
||||
|
||||
@@ -87,7 +87,6 @@ export class Dialog extends Component {
|
||||
'global',
|
||||
6000,
|
||||
async () => {
|
||||
console.log('COPY');
|
||||
let trash = db.trash;
|
||||
|
||||
for (var i = 0; i < itemsCopy.length; i++) {
|
||||
|
||||
@@ -15,7 +15,7 @@ export const ColorSection = ({noTextMode}) => {
|
||||
const {colors, colorNotes, currentScreen} = state;
|
||||
|
||||
useEffect(() => {
|
||||
console.log(colorNotes[0]);
|
||||
|
||||
dispatch({type: ACTIONS.TAGS});
|
||||
}, []);
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ const MoveNoteDialog = () => {
|
||||
}
|
||||
|
||||
let res = await db.notebooks.notebook(expanded).topics.add(newTopicTitle);
|
||||
console.log(newTopicTitle, res);
|
||||
|
||||
dispatch({type: ACTIONS.NOTEBOOKS});
|
||||
dispatch({type: ACTIONS.PINNED});
|
||||
topicInput.current?.clear();
|
||||
@@ -358,8 +358,7 @@ const MoveNoteDialog = () => {
|
||||
onPress={async () => {
|
||||
let noteIds = [];
|
||||
selectedItemsList.forEach((i) => noteIds.push(i.id));
|
||||
console.log(selectedItemsList[0]);
|
||||
console.log(noteIds, 'NOTE IDS');
|
||||
|
||||
let res = await db.notes.move(
|
||||
{
|
||||
topic: item.title,
|
||||
@@ -367,7 +366,6 @@ const MoveNoteDialog = () => {
|
||||
},
|
||||
...noteIds,
|
||||
);
|
||||
console.log(res);
|
||||
dispatch({type: ACTIONS.CLEAR_SELECTION});
|
||||
dispatch({type: ACTIONS.NOTEBOOKS});
|
||||
dispatch({type: ACTIONS.PINNED});
|
||||
|
||||
@@ -31,7 +31,6 @@ export const Search = (props) => {
|
||||
const animation = (margin, opacity, border) => {
|
||||
if (animating) return;
|
||||
animating = true;
|
||||
console.log('animating');
|
||||
timing(_marginAnim, {
|
||||
toValue: margin,
|
||||
duration: 230,
|
||||
@@ -68,7 +67,7 @@ export const Search = (props) => {
|
||||
timeoutAnimate = null;
|
||||
timeoutAnimate = setTimeout(() => {
|
||||
animation(-65, 0, 0);
|
||||
console.log('up');
|
||||
|
||||
}, 500);
|
||||
offsetY = y;
|
||||
} else {
|
||||
@@ -76,7 +75,7 @@ export const Search = (props) => {
|
||||
clearTimeout(timeoutAnimate);
|
||||
timeoutAnimate = null;
|
||||
timeoutAnimate = setTimeout(() => {
|
||||
console.log('down');
|
||||
|
||||
animation(0, 1, 1.5);
|
||||
}, 500);
|
||||
offsetY = y;
|
||||
|
||||
@@ -17,7 +17,6 @@ async function read(key, isArray = false) {
|
||||
if (!data) return null;
|
||||
try {
|
||||
data = JSON.parse(data);
|
||||
console.log(isArray? data: null, "ARRAY");
|
||||
|
||||
data = isArray? [...data] : data;
|
||||
} catch (e) {
|
||||
@@ -28,7 +27,6 @@ async function read(key, isArray = false) {
|
||||
}
|
||||
|
||||
async function write(key, data) {
|
||||
console.log(key,data,"DATA_WRITE");
|
||||
return await MMKV.setItem(
|
||||
key,
|
||||
typeof data === 'string' ? data : JSON.stringify(data),
|
||||
@@ -36,7 +34,6 @@ async function write(key, data) {
|
||||
}
|
||||
|
||||
async function readMulti(keys) {
|
||||
console.log(keys,"KEYS");
|
||||
if (keys.length <= 0) {
|
||||
return [];
|
||||
} else {
|
||||
@@ -53,7 +50,7 @@ async function readMulti(keys) {
|
||||
|
||||
return [key, obj];
|
||||
})
|
||||
console.log(map,"DATA");
|
||||
|
||||
return map;
|
||||
|
||||
}
|
||||
|
||||
@@ -305,86 +305,7 @@ export const Login = ({route, navigation}) => {
|
||||
placeholderTextColor={colors.icon}
|
||||
/>
|
||||
|
||||
{/* <Text
|
||||
style={{
|
||||
textAlign: 'right',
|
||||
marginHorizontal: 12,
|
||||
fontFamily: WEIGHT.regular,
|
||||
textAlignVertical: 'bottom',
|
||||
|
||||
position: 'absolute',
|
||||
right: 5,
|
||||
top: 2.5,
|
||||
}}>
|
||||
{invalidEmail ? (
|
||||
<Icon name="alert-circle" size={SIZE.xs} color={colors.errorText} />
|
||||
) : null}
|
||||
</Text>
|
||||
|
||||
<TextInput
|
||||
ref={_email}
|
||||
onFocus={() => {
|
||||
if (!invalidEmail) {
|
||||
_email.current.setNativeProps({
|
||||
style: {
|
||||
borderColor: colors.accent,
|
||||
},
|
||||
});
|
||||
}
|
||||
}}
|
||||
defaultValue={email}
|
||||
onBlur={() => {
|
||||
if (!validateEmail(email)) {
|
||||
setInvalidEmail(true);
|
||||
_email.current.setNativeProps({
|
||||
style: {
|
||||
color: colors.errorText,
|
||||
borderColor: colors.errorText,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
_email.current.setNativeProps({
|
||||
style: {
|
||||
borderColor: colors.nav,
|
||||
},
|
||||
});
|
||||
}
|
||||
}}
|
||||
textContentType="emailAddress"
|
||||
onChangeText={value => {
|
||||
setEmail(value);
|
||||
if (invalidEmail && validateEmail(email)) {
|
||||
setInvalidEmail(false);
|
||||
_email.current.setNativeProps({
|
||||
style: {
|
||||
color: colors.pri,
|
||||
borderColor: colors.accent,
|
||||
},
|
||||
});
|
||||
}
|
||||
}}
|
||||
onSubmitEditing={() => {
|
||||
if (!validateEmail(email)) {
|
||||
setInvalidEmail(true);
|
||||
_email.current.setNativeProps({
|
||||
style: {
|
||||
color: colors.errorText,
|
||||
},
|
||||
});
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
padding: pv,
|
||||
borderWidth: 1.5,
|
||||
borderColor: colors.nav,
|
||||
marginHorizontal: 12,
|
||||
borderRadius: 5,
|
||||
fontSize: SIZE.sm,
|
||||
fontFamily: WEIGHT.regular,
|
||||
}}
|
||||
placeholder="Email"
|
||||
placeholderTextColor={colors.icon}
|
||||
/> */}
|
||||
{invalidUsername ? (
|
||||
<Text
|
||||
style={{
|
||||
@@ -404,6 +325,7 @@ export const Login = ({route, navigation}) => {
|
||||
) : null}
|
||||
|
||||
<Seperator />
|
||||
|
||||
<View
|
||||
ref={_passContainer}
|
||||
style={{
|
||||
@@ -446,7 +368,6 @@ export const Login = ({route, navigation}) => {
|
||||
}}
|
||||
onChangeText={(value) => {
|
||||
setPassword(value);
|
||||
console.log(value, 'VALUE');
|
||||
if (invalidPassword && validatePass(password)) {
|
||||
setInvalidPassword(false);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import {ACTIONS} from '../../provider/actions';
|
||||
import {eSendEvent} from '../../services/eventManager';
|
||||
import {eOpenLoginDialog, eResetApp} from '../../services/events';
|
||||
import NavigationService from '../../services/NavigationService';
|
||||
import {MMKV} from '../../utils/storage';
|
||||
import storage, {MMKV} from '../../utils/storage';
|
||||
import {
|
||||
db,
|
||||
DDS,
|
||||
@@ -316,18 +316,10 @@ export const Settings = ({route, navigation}) => {
|
||||
}}>
|
||||
{user ? (
|
||||
<>
|
||||
<SectionHeader title="Account Settings" />
|
||||
<Text
|
||||
<View
|
||||
style={{
|
||||
fontSize: SIZE.sm,
|
||||
fontFamily: WEIGHT.regular,
|
||||
textAlignVertical: 'center',
|
||||
color: colors.pri,
|
||||
marginTop: pv + 5,
|
||||
paddingHorizontal: 12,
|
||||
}}>
|
||||
Logged in as:
|
||||
</Text>
|
||||
|
||||
<View
|
||||
style={{
|
||||
justifyContent: 'space-between',
|
||||
@@ -336,7 +328,7 @@ export const Settings = ({route, navigation}) => {
|
||||
flexDirection: 'row',
|
||||
width: '100%',
|
||||
paddingVertical: pv,
|
||||
marginBottom: pv + 5,
|
||||
marginBottom: pv,
|
||||
marginTop: pv,
|
||||
backgroundColor: colors.accent,
|
||||
borderRadius: 5,
|
||||
@@ -378,7 +370,7 @@ export const Settings = ({route, navigation}) => {
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
{[
|
||||
{
|
||||
name: 'Data recovery key',
|
||||
@@ -387,10 +379,13 @@ export const Settings = ({route, navigation}) => {
|
||||
setKey(k.key);
|
||||
setModalVisible(true);
|
||||
},
|
||||
desc:
|
||||
'Generate a data recovery key to recovery your data if you lose it',
|
||||
},
|
||||
{
|
||||
name: 'Subscription status',
|
||||
func: () => {},
|
||||
desc: 'Current status of your subscription',
|
||||
},
|
||||
{
|
||||
name: 'Logout',
|
||||
@@ -398,11 +393,19 @@ export const Settings = ({route, navigation}) => {
|
||||
await db.user.logout();
|
||||
dispatch({type: ACTIONS.USER, user: null});
|
||||
dispatch({type: ACTIONS.CLEAR_ALL});
|
||||
ToastEvent.show('Logged out, syncing disabled', 'success');
|
||||
//ToastEvent.show('Logged out, syncing disabled', 'success');
|
||||
eSendEvent(eResetApp);
|
||||
},
|
||||
desc:
|
||||
'Logout of your account, this will clear everything and reset the app.',
|
||||
},
|
||||
].map((item) => (
|
||||
<Button key={item.name} title={item.name} onPress={item.func} />
|
||||
<Button
|
||||
key={item.name}
|
||||
title={item.name}
|
||||
onPress={item.func}
|
||||
tagline={item.desc}
|
||||
/>
|
||||
))}
|
||||
</>
|
||||
) : (
|
||||
@@ -435,7 +438,7 @@ export const Settings = ({route, navigation}) => {
|
||||
width: 40,
|
||||
backgroundColor: colors.accent,
|
||||
height: 40,
|
||||
marginLeft:10,
|
||||
marginLeft: 10,
|
||||
borderRadius: 100,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
|
||||
Reference in New Issue
Block a user