Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promote 'Update Gist' button to top bar #56

Merged
merged 8 commits into from Jan 30, 2018
Merged

Promote 'Update Gist' button to top bar #56

merged 8 commits into from Jan 30, 2018

Conversation

jgierer12
Copy link
Contributor

@jgierer12 jgierer12 commented Jan 27, 2018

Fixes #54

To test:

  1. Log in with GitHub
  2. Open a Gist
  3. The 'Update' button should now be visible in the top bar
  4. When clicked, the button should show a loading indicator

This PR also changes the icon to Element UI's upload icon in order to better fit in with the rest of the top bar buttons. upload also matches the function of the button better than the previous icon.

@egoist
Copy link
Owner

egoist commented Jan 28, 2018

That last missing thing is that we should only display update gist when the gist is owned by current user.

@jgierer12
Copy link
Contributor Author

That will be possible with metadata saving in #57

@egoist
Copy link
Owner

egoist commented Jan 30, 2018

So this is how it looks like now:

2018-01-30 12 49 54

Save button is always visible, but depending on user it will have different behavior:

  • not logged in: always save as anonymous gist
  • logged in:
    • in /gist/:id page:
      • own this gist: update the gist
      • doesn't own this gist: create a new gist from editor
    • otherwise create a gist from editor

And there's also Save new button which is for logged in users to create new gist instead of updating gist.

@egoist egoist merged commit 39d2225 into egoist:master Jan 30, 2018
@jgierer12 jgierer12 deleted the promote-update-btn branch January 30, 2018 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants