Skip to content

Commit

Permalink
Почистил логи
Browse files Browse the repository at this point in the history
  • Loading branch information
YarikMix committed May 31, 2024
1 parent 7fbcf89 commit 6b23456
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion public/src/components/Editor/Editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class Editor {
: selection.anchorNode.parentElement;

scanTree(this.editable);
console.log(`cursor${AppUserStore.state.username}${AppNotesStore.socket_id?.toString().replaceAll('-','').toLowerCase()}`)


elem.dataset[`cursor${AppUserStore.state.username}${AppNotesStore.socket_id?.toString().replaceAll('-','').toLowerCase()}`] = `${getCaretPosition(elem)}`;
// elem.scrollIntoView();
Expand Down
8 changes: 4 additions & 4 deletions public/src/components/Editor/Plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ export const defaultPlugins: EditorPlugin[] = [
img.src = url;
AppDispatcher.dispatch(NoteStoreActions.PUT_TO_CACHE, {key: id, value: url})
}).catch(error => {
console.log(error)

})
}

Expand All @@ -524,7 +524,7 @@ export const defaultPlugins: EditorPlugin[] = [
img.src = url;
AppDispatcher.dispatch(NoteStoreActions.PUT_TO_CACHE, {key: id, value: url})
}).catch(error => {
console.log(error)

})

return img
Expand Down Expand Up @@ -911,7 +911,7 @@ export const insertBlockPlugin = (pluginName: string, ...args: any) => {
});
}
const newNode = plugin.insertNode([], args);
console.log(newNode)

if (newNode) {
(nodeToReplace as HTMLElement).replaceWith(newNode);
document.getSelection().setPosition(newNode, 0);
Expand Down Expand Up @@ -1050,7 +1050,7 @@ const RenderAttach = (attach_filename:string, attach_id:string) => {
}

const RenderSubNote = (subNoteId:string) => {
console.log("RenderSubNote")


const subNoteWrapper = document.createElement("button")
subNoteWrapper.className = "subnote-wrapper"
Expand Down
6 changes: 3 additions & 3 deletions public/src/components/NoteEditor/NoteEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ export class NoteEditor extends ScReact.Component<NoteEditorProps, NoteEditorTyp
const isEditable = this.state.selectedNote?.collaborators.includes(AppUserStore.state.user_id) || isOwner

// TODO: скелетон для эдитора
// console.log("render")
// console.log(this.state.selectedNote)
//
//
//
// if (!this.state.selectedNote) {
// return (
Expand All @@ -276,7 +276,7 @@ export class NoteEditor extends ScReact.Component<NoteEditorProps, NoteEditorTyp
// )
// }
//
// console.log("123")
//

return (
<div className={'note-editor-wrapper ' + (this.props.open ? ' active ' : '') + (this.state.fullScreen ? ' fullscreen ' : '') } ref={ref => this.editorWrapperRef = ref}>
Expand Down
4 changes: 2 additions & 2 deletions public/src/components/SharePanel/SharePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class SharePanel extends ScReact.Component<any, any> {
}

shareToVK = () => {
console.log("shareToVK")

const url = "https://vk.com/share.php?url=" + this.getNoteURL()+ "&title=" + parseNoteTitle(this.props.note.data.title)
this.openShareWindow(url)
}
Expand Down Expand Up @@ -48,7 +48,7 @@ export class SharePanel extends ScReact.Component<any, any> {

sendInvite = (e) => {
e.preventDefault()
console.log("sendInvite")


const value = this.inviteInputRef.value

Expand Down
8 changes: 4 additions & 4 deletions public/src/components/TagsFilter/TagsFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ export class TagsFilter extends ScReact.Component<TagsFilterProps, TagsFilterSta
private presstimer = null;

click = (tag) => {
console.log("click")
console.log(this.longpress)



if (this.presstimer !== null) {
clearTimeout(this.presstimer);
Expand All @@ -177,15 +177,15 @@ export class TagsFilter extends ScReact.Component<TagsFilterProps, TagsFilterSta
}

start = (e, tag)=> {
console.log("start")

if (e.type === "click" && e.button !== 0) {
return;
}

this.longpress = false;

this.presstimer = setTimeout(() => {
console.log("long click");

this.onTagRightClick(e, tag)
this.longpress = true;
}, 1000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {AppDispatcher} from '../../modules/dispatcher';
import {UserActions} from '../../modules/stores/UserStore';
import {Img} from "../Image/Image";
import {uiKit} from '@veglem/ui-kit/dist/ui';
import {Input} from '../Input/Input';

export class UpdatePasswordForm extends ScReact.Component<any, any> {
state = {
Expand Down Expand Up @@ -120,7 +119,7 @@ export class UpdatePasswordForm extends ScReact.Component<any, any> {
};

render() {
const {Button} = uiKit
const {Button, Input} = uiKit

return (
<div className="change-password-form">
Expand Down
6 changes: 3 additions & 3 deletions public/src/components/ViewerWrapper/ViewerWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class ViewerWrapper extends ScReact.Component<ViewerWrapperProps, any> {
private viewerRef

componentDidMount() {
console.log("componentDidMount")

this.noteContentRef.innerHTML = ""
new Viewer(
this.props.note.data.content,
Expand All @@ -32,7 +32,7 @@ export class ViewerWrapper extends ScReact.Component<ViewerWrapperProps, any> {
}

componentDidUpdate() {
console.log("componentDidUpdate")

this.noteContentRef.innerHTML = ""
new Viewer(
this.props.note.data.content,
Expand All @@ -41,7 +41,7 @@ export class ViewerWrapper extends ScReact.Component<ViewerWrapperProps, any> {
}

closeViewer = () => {
console.log("closeViewer")

AppRouter.go("/")

history.pushState(null, null, "/"); // TODO
Expand Down
4 changes: 2 additions & 2 deletions public/src/modules/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ export class Router extends ScReact.Component<any, routerState> {
}

public openSharedNotePage (note:NoteType) {
console.log("openSharedNotePage")
console.log(note)



history.pushState(null, null, "/notes/" + note.id);

Expand Down
2 changes: 1 addition & 1 deletion public/src/modules/stores/NotesStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ class NotesStore extends BaseStore<NotesStoreState> {
this.selectNote(note);

} catch (e) {
console.log(e.message)

AppToasts.error('Заметка не найдена');
}
}
Expand Down
2 changes: 1 addition & 1 deletion public/src/pages/Notes/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const NotesLoader = async (path:string) => {
// resolve({notes: store.notes});

AppSharedNoteRequests.Get(noteId).then(note => {
console.log(note)

resolve({notes: store.notes, note: note, tags: store.tags});
}).catch(() => {
AppRouter.go("/404")
Expand Down

0 comments on commit 6b23456

Please sign in to comment.