Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
gab
social
gab-social
Commits
e5a05a92
Commit
e5a05a92
authored
Aug 23, 2019
by
2458773093
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit integration
parent
2fdeccd1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
6 deletions
+10
-6
app/javascript/gabsocial/actions/importer/normalizer.js
app/javascript/gabsocial/actions/importer/normalizer.js
+1
-1
app/javascript/gabsocial/components/modal_root.js
app/javascript/gabsocial/components/modal_root.js
+4
-2
app/javascript/gabsocial/features/compose/components/compose_form.js
...ipt/gabsocial/features/compose/components/compose_form.js
+4
-3
app/javascript/gabsocial/features/compose/containers/compose_form_container.js
...ial/features/compose/containers/compose_form_container.js
+1
-0
No files found.
app/javascript/gabsocial/actions/importer/normalizer.js
View file @
e5a05a92
...
...
@@ -53,7 +53,7 @@ export function normalizeStatus(status, normalOldStatus) {
// Only calculate these values when status first encountered
// Otherwise keep the ones already in the reducer
if
(
normalOldStatus
)
{
if
(
normalOldStatus
&&
normalOldStatus
.
get
(
'
content
'
)
===
normalStatus
.
content
&&
normalOldStatus
.
get
(
'
spoiler_text
'
)
===
normalStatus
.
spoiler_text
)
{
normalStatus
.
search_index
=
normalOldStatus
.
get
(
'
search_index
'
);
normalStatus
.
contentHtml
=
normalOldStatus
.
get
(
'
contentHtml
'
);
normalStatus
.
spoilerHtml
=
normalOldStatus
.
get
(
'
spoilerHtml
'
);
...
...
app/javascript/gabsocial/components/modal_root.js
View file @
e5a05a92
...
...
@@ -10,6 +10,7 @@ const messages = defineMessages({
});
const
mapStateToProps
=
state
=>
({
composeId
:
state
.
getIn
([
'
compose
'
,
'
id
'
]),
composeText
:
state
.
getIn
([
'
compose
'
,
'
text
'
]),
});
...
...
@@ -30,6 +31,7 @@ class ModalRoot extends React.PureComponent {
onOpenModal
:
PropTypes
.
func
.
isRequired
,
onCancelReplyCompose
:
PropTypes
.
func
.
isRequired
,
intl
:
PropTypes
.
object
.
isRequired
,
composeId
:
PropTypes
.
string
,
composeText
:
PropTypes
.
string
,
type
:
PropTypes
.
string
,
};
...
...
@@ -48,9 +50,9 @@ class ModalRoot extends React.PureComponent {
}
handleOnClose
=
()
=>
{
const
{
onOpenModal
,
composeText
,
onClose
,
intl
,
type
,
onCancelReplyCompose
}
=
this
.
props
;
const
{
onOpenModal
,
composeText
,
composeId
,
onClose
,
intl
,
type
,
onCancelReplyCompose
}
=
this
.
props
;
if
(
composeText
&&
type
==
'
COMPOSE
'
)
{
if
(
!
composeId
&&
composeText
&&
type
==
'
COMPOSE
'
)
{
onOpenModal
(
'
CONFIRM
'
,
{
message
:
<
FormattedMessage
id
=
'
confirmations.delete.message
'
defaultMessage
=
'
Are you sure you want to delete this status?
'
/>
,
confirm
:
intl
.
formatMessage
(
messages
.
confirm
),
...
...
app/javascript/gabsocial/features/compose/components/compose_form.js
View file @
e5a05a92
...
...
@@ -46,6 +46,7 @@ class ComposeForm extends ImmutablePureComponent {
static
propTypes
=
{
intl
:
PropTypes
.
object
.
isRequired
,
edit
:
PropTypes
.
bool
.
isRequired
,
text
:
PropTypes
.
string
.
isRequired
,
suggestions
:
ImmutablePropTypes
.
list
,
spoiler
:
PropTypes
.
bool
,
...
...
@@ -200,7 +201,7 @@ class ComposeForm extends ImmutablePureComponent {
}
render
()
{
const
{
intl
,
onPaste
,
showSearch
,
anyMedia
,
shouldCondense
,
autoFocus
,
isModalOpen
,
quoteOfId
}
=
this
.
props
;
const
{
intl
,
onPaste
,
showSearch
,
anyMedia
,
shouldCondense
,
autoFocus
,
isModalOpen
,
quoteOfId
,
edit
}
=
this
.
props
;
const
condensed
=
shouldCondense
&&
!
this
.
props
.
text
&&
!
this
.
state
.
composeFocused
;
const
disabled
=
this
.
props
.
isSubmitting
;
const
text
=
[
this
.
props
.
spoilerText
,
countableText
(
this
.
props
.
text
)].
join
(
''
);
...
...
@@ -267,7 +268,7 @@ class ComposeForm extends ImmutablePureComponent {
!
condensed
&&
<
div
className
=
'
compose-form__modifiers
'
>
<
UploadFormContainer
/>
<
PollFormContainer
/>
{
!
edit
&&
<
PollFormContainer
/>
}
<
/div
>
}
<
/AutosuggestTextarea
>
...
...
@@ -279,7 +280,7 @@ class ComposeForm extends ImmutablePureComponent {
<
div
className
=
'
compose-form__buttons-wrapper
'
>
<
div
className
=
'
compose-form__buttons
'
>
<
UploadButtonContainer
/>
<
PollButtonContainer
/>
{
!
edit
&&
<
PollButtonContainer
/>
}
<
PrivacyDropdownContainer
/>
<
SpoilerButtonContainer
/>
<
/div
>
...
...
app/javascript/gabsocial/features/compose/containers/compose_form_container.js
View file @
e5a05a92
...
...
@@ -12,6 +12,7 @@ import {
}
from
'
../../../actions/compose
'
;
const
mapStateToProps
=
state
=>
({
edit
:
state
.
getIn
([
'
compose
'
,
'
id
'
])
!==
null
,
text
:
state
.
getIn
([
'
compose
'
,
'
text
'
]),
suggestions
:
state
.
getIn
([
'
compose
'
,
'
suggestions
'
]),
spoiler
:
state
.
getIn
([
'
compose
'
,
'
spoiler
'
]),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment