diff --git a/frontend/app/components/Session_/EventsBlock/EventGroupWrapper.js b/frontend/app/components/Session_/EventsBlock/EventGroupWrapper.js
index 6624e28d1..72ab7ea7d 100644
--- a/frontend/app/components/Session_/EventsBlock/EventGroupWrapper.js
+++ b/frontend/app/components/Session_/EventsBlock/EventGroupWrapper.js
@@ -11,7 +11,7 @@ import { setEditNoteTooltip } from 'Duck/sessions';
// TODO: incapsulate toggler in LocationEvent
@withToggle("showLoadInfo", "toggleLoadInfo")
-@connect(state => ({members: state.getIn(['members', 'list']), currentUserId: state.getIn(['account', 'id']) }), { setEditNoteTooltip })
+@connect(state => ({members: state.getIn(['members', 'list']), currentUserId: state.getIn(['user', 'account', 'id']) }), { setEditNoteTooltip })
class EventGroupWrapper extends React.Component {
toggleLoadInfo = (e) => {
@@ -52,6 +52,8 @@ class EventGroupWrapper extends React.Component {
const whiteBg = isLastInGroup && event.type !== TYPES.LOCATION || (!isLastEvent && event.type !== TYPES.LOCATION)
const safeRef = String(event.referrer || '');
+
+ console.log(this.props.currentUserId, event.userId)
return (
{
props.onEdit({
isVisible: true,
@@ -40,14 +41,14 @@ function NoteEvent(props: Props) {
isPublic: props.isPublic,
message: props.message,
sessionId: props.sessionId,
- noteId: props.noteId
+ noteId: props.noteId,
},
});
};
const onCopy = () => {
copy(
- `${window.location.origin}${session(props.sessionId)}${
+ `${window.location.origin}/${window.location.pathname.split('/')[1]}${session(props.sessionId)}${
props.timestamp > 0 ? '?jumpto=' + props.timestamp : ''
}`
);
@@ -70,7 +71,7 @@ function NoteEvent(props: Props) {
}
};
const menuItems = [
- { icon: 'pencil', text: 'Edit', onClick: onEdit, disabled: props.onEdit },
+ { icon: 'pencil', text: 'Edit', onClick: onEdit, disabled: props.noEdit },
{ icon: 'link-45deg', text: 'Copy URL', onClick: onCopy },
{ icon: 'trash', text: 'Delete', onClick: onDelete },
];
@@ -101,8 +102,13 @@ function NoteEvent(props: Props) {
{props.tags.map((tag) => (
{tag}
diff --git a/frontend/app/components/Session_/Player/Controls/Timeline.js b/frontend/app/components/Session_/Player/Controls/Timeline.js
index 8059629fd..c63324fac 100644
--- a/frontend/app/components/Session_/Player/Controls/Timeline.js
+++ b/frontend/app/components/Session_/Player/Controls/Timeline.js
@@ -227,10 +227,12 @@ export default class Timeline extends React.PureComponent {
background: 'white',
zIndex: 3,
pointerEvents: 'none',
+ height: 10,
+ width: 16,
left: `${getTimelinePosition(note.timestamp, scale)}%`,
}}
>
-
+
) : null)}
diff --git a/frontend/app/components/Session_/Player/Controls/components/CreateNote.tsx b/frontend/app/components/Session_/Player/Controls/components/CreateNote.tsx
index 7ae2b702d..38df4dc34 100644
--- a/frontend/app/components/Session_/Player/Controls/components/CreateNote.tsx
+++ b/frontend/app/components/Session_/Player/Controls/components/CreateNote.tsx
@@ -33,7 +33,7 @@ function CreateNote({
const [text, setText] = React.useState('');
const [isPublic, setPublic] = React.useState(false);
const [tags, setTags] = React.useState([]);
- const [useTimestamp, setUseTs] = React.useState(false);
+ const [useTimestamp, setUseTs] = React.useState(true);
const { notesStore } = useStore();
@@ -105,11 +105,9 @@ function CreateNote({
};
const tagActive = (tag: iTag) => tags.includes(tag);
- const removeTag = (tag: iTag) => {
- setTags(tags.filter((t) => t !== tag));
- };
+
const addTag = (tag: iTag) => {
- setTags([...tags, tag]);
+ setTags([tag]);
};
return (
@@ -145,6 +143,7 @@ function CreateNote({
placeholder="Note..."
rows={3}
value={text}
+ autoFocus
onChange={(e) => setText(e.target.value)}
style={{
border: 'solid thin #ddd',
@@ -162,9 +161,11 @@ function CreateNote({
style={{
background: tagActive(tag) ? tagProps[tag] : 'rgba(0,0,0, 0.38)',
userSelect: 'none',
+ minWidth: 60,
+ textAlign: 'center'
}}
- className="cursor-pointer rounded-xl px-2 py-1 mr-2 text-white"
- onClick={() => (tagActive(tag) ? removeTag(tag) : addTag(tag))}
+ className="cursor-pointer rounded-full px-2 py-1 mr-2 text-white"
+ onClick={() => addTag(tag)}
>
{tag}
diff --git a/frontend/app/components/Session_/Player/Controls/components/ReadNote.tsx b/frontend/app/components/Session_/Player/Controls/components/ReadNote.tsx
index 3a7e5ce6a..db497e866 100644
--- a/frontend/app/components/Session_/Player/Controls/components/ReadNote.tsx
+++ b/frontend/app/components/Session_/Player/Controls/components/ReadNote.tsx
@@ -26,7 +26,7 @@ function ReadNote(props: Props) {
return (