diff --git a/app/controllers/api/v1/gifs_controller.rb b/app/controllers/api/v1/gifs_controller.rb index 2a723dbf..e4c797a0 100644 --- a/app/controllers/api/v1/gifs_controller.rb +++ b/app/controllers/api/v1/gifs_controller.rb @@ -9,7 +9,7 @@ class Api::V1::GifsController < Api::BaseController def categories uri = URI('https://api.tenor.com/v1/categories') - theOptions = { :key => "QHFJ0C5EWGBH" } + theOptions = { :key => "TENOR_KEY" } uri.query = URI.encode_www_form(theOptions) res = Net::HTTP.get_response(uri) @@ -19,7 +19,7 @@ class Api::V1::GifsController < Api::BaseController def search uri = URI('https://api.tenor.com/v1/search') theOptions = { - :key => "QHFJ0C5EWGBH", + :key => "TENOR_KEY", :media_filter => "minimal", :limit => 30, :q => params[:search], diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index 43059ebf..62d39615 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -22,8 +22,10 @@ class Api::V1::StatusesController < Api::BaseController render json: @status, serializer: REST::StatusSerializer end + # direct descendants only def comments - descendants_results = @status.descendants(CONTEXT_LIMIT, current_account) + descendants_results = @status.descendants(CONTEXT_LIMIT, current_account, nil, nil, 1) + puts "descendants_results: " + descendants_results.inspect loaded_descendants = cache_collection(descendants_results, Status) @context = Context.new(descendants: loaded_descendants) diff --git a/app/javascript/gabsocial/actions/compose.js b/app/javascript/gabsocial/actions/compose.js index 352e538b..fe9ae66b 100644 --- a/app/javascript/gabsocial/actions/compose.js +++ b/app/javascript/gabsocial/actions/compose.js @@ -1,6 +1,7 @@ import api from '../api'; import { CancelToken, isCancel } from 'axios'; import throttle from 'lodash.throttle' +import moment from 'moment-mini' import { search as emojiSearch } from '../components/emoji/emoji_mart_search_light'; import { urlRegex } from '../features/ui/util/url_regex' import { tagHistory } from '../settings'; @@ -77,23 +78,26 @@ export const ensureComposeIsVisible = (getState, routerHistory) => { } }; -export function changeCompose(text, markdown) { - console.log("changeCompose:", markdown) +export function changeCompose(text, markdown, replyId) { + console.log("changeCompose:", text) return { type: COMPOSE_CHANGE, text: text, markdown: markdown, + replyId: replyId, }; }; -export function replyCompose(status) { +export function replyCompose(status, router, showModal) { return (dispatch) => { dispatch({ type: COMPOSE_REPLY, status: status, }); - dispatch(openModal('COMPOSE')); + if (showModal) { + dispatch(openModal('COMPOSE')); + } }; }; @@ -169,7 +173,7 @@ export function handleComposeSubmit(dispatch, getState, response, status) { } } -export function submitCompose(group, replyToId=null) { +export function submitCompose(group, replyToId = null) { return function (dispatch, getState) { if (!me) return; @@ -202,8 +206,7 @@ export function submitCompose(group, replyToId=null) { const method = id === null ? 'post' : 'put'; const scheduled_at = getState().getIn(['compose', 'scheduled_at'], null); - // : todo : - // if (scheduled_at !== null) scheduled_at = moment.utc(scheduled_at).toDate(); + if (scheduled_at !== null) scheduled_at = moment.utc(scheduled_at).toDate(); api(getState)[method](endpoint, { status, diff --git a/app/javascript/gabsocial/actions/tenor.js b/app/javascript/gabsocial/actions/tenor.js index 3f0653b1..cab02a2c 100644 --- a/app/javascript/gabsocial/actions/tenor.js +++ b/app/javascript/gabsocial/actions/tenor.js @@ -52,9 +52,14 @@ export const clearGifResults = () => ({ type: GIFS_CLEAR_RESULTS, }) -export const setSelectedGif = (url) => ({ +export const clearSelectedGif = () => ({ + type: GIF_CLEAR_SELECTED, + result, +}) + +export const setSelectedGif = (result) => ({ type: GIF_SET_SELECTED, - url, + result, }) export function changeGifSearchText(text) { diff --git a/app/javascript/gabsocial/assets/globe_icon.js b/app/javascript/gabsocial/assets/globe_icon.js index f517d46b..189d6cde 100644 --- a/app/javascript/gabsocial/assets/globe_icon.js +++ b/app/javascript/gabsocial/assets/globe_icon.js @@ -16,8 +16,8 @@ const GlobeIcon = ({ aria-label={title} > - - + + ) diff --git a/app/javascript/gabsocial/assets/verified_icon.js b/app/javascript/gabsocial/assets/verified_icon.js index a107ebd4..04671d09 100644 --- a/app/javascript/gabsocial/assets/verified_icon.js +++ b/app/javascript/gabsocial/assets/verified_icon.js @@ -11,12 +11,12 @@ const VerifiedIcon = ({ y='0px' width={size} height={size} - viewBox='0 0 24 24' + viewBox='0 0 32 32' xmlSpace='preserve' aria-label={title} > - + ) diff --git a/app/javascript/gabsocial/components/autosuggest_textbox.js b/app/javascript/gabsocial/components/autosuggest_textbox.js index 04ed5dd9..9d237596 100644 --- a/app/javascript/gabsocial/components/autosuggest_textbox.js +++ b/app/javascript/gabsocial/components/autosuggest_textbox.js @@ -3,6 +3,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes' import isObject from 'lodash.isobject' import classNames from 'classnames/bind' import ImmutablePureComponent from 'react-immutable-pure-component' +import Textarea from 'react-textarea-autosize' import { isRtl } from '../utils/rtl' import { textAtCursorMatchesToken } from '../utils/cursor_token_match' import AutosuggestAccount from './autosuggest_account' @@ -226,27 +227,56 @@ export default class AutosuggestTextbox extends ImmutablePureComponent { direction: isRtl(value) ? 'rtl' : 'ltr', } - const textClasses = cx({ + const textareaClasses = cx({ default: 1, - lineHeight125: 1, + font: 1, + wrap: 1, resizeNone: 1, - text: 1, - displayBlock: 1, + bgTransparent: 1, outlineNone: 1, - bgPrimary: !small, - bgSubtle: small, - py15: !small, - py10: small, + lineHeight125: 1, + height100PC: small, + width100PC: !small, + pt15: !small, + px15: !small, + px10: small, + pb10: !small, fs16PX: !small, fs14PX: small, - mr5: small, + heightMax200PX: small, + heightMax80VH: !small, + heightMin100PX: !small, + }) + + const textareaContainerClasses = cx({ + default: 1, + maxWidth100PC: 1, + flexGrow1: small, + height100PC: small, + justifyContentCenter: small, }) if (textarea) { return ( -
- +