[Utopian Dev] Enable Moderator to Repository Inline Edit

in #utopian-io7 years ago (edited)

image.png

This is another installment for the implementation of the feature of adding inline edit functionalities for moderators. This contribution is to enable inline editing of a contribution's repository.

New Features

  • Enabled Inline Edit of Repository

moderator-inline-edit-repo-2.gif

  export const moderatorAction = (
      author,
      permlink,
      moderator,
      status,
      questions = [],
      score = 0,
      type,
      repository,
    ) => dispatch => dispatch(
        moderatorActionRequest(
            author,
            permlink,
            moderator,
            status,
            questions,
            score,
            type,
      repository,
        )
    );

Added the repository parameter to moderatorActionRequest(). This will pass the newly inputted repository to the backend API.

        {' '} <b>&middot;</b> {'  '} <a href={`https://github.com/${repository.full_name}`}><Icon type='github' /></a>
        { isModerator ?
          <InlineRepoEdit
              value={parsedRepoName(repository.owner.login, repository.name)}
              post={post}
              moderatorAction={moderatorAction}
              user={user}
          /> :
          <Link to={`/project/${repository.full_name}/${platform}/${id}/all`}>{parsedRepoName(repository.owner.login, repository.name)}</Link>
        }

Added condition to display repository inline editor when user is a moderator.

Component to display the repository inline editor.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.

[utopian-moderator]

interesting work you are a professional in this field working hard daily :)

Thank you @blazing. My mentor said, do something you love and you will never have to work a day in your life. Thank God i found something i love doing. :)

Wow golden words these are you just said i will remember this forever in my life :)

Hey @eastmael I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Sure seems a great work buddy !Nicely done good work !

Thank you. It took me a few hours a day to get it to work.

interesting....
received_541684006162923.gif

Coin Marketplace

STEEM 0.19
TRX 0.18
JST 0.034
BTC 89118.52
ETH 3131.33
USDT 1.00
SBD 2.76