Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rtl-spec/components/commands-publish-button.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ describe('Action button component', () => {
expect(state.editorMosaic.isEdited).toBe(true);
});

it('can publish private gists', async () => {
it('can publish secret gists', async () => {
state.showInputDialog = vi.fn().mockResolvedValueOnce(description);
instance.setPrivate();
instance.setSecret();
await instance.performGistAction();
const { create } = mocktokit.gists;
expect(create).toHaveBeenCalledWith({
Expand Down Expand Up @@ -374,7 +374,7 @@ describe('Action button component', () => {
instance.setPublic();
expect(state.gitHubPublishAsPublic).toBe(true);

instance.setPrivate();
instance.setSecret();
expect(state.gitHubPublishAsPublic).toBe(false);
});
});
Expand Down
10 changes: 5 additions & 5 deletions src/renderer/components/commands-action-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const GistActionButton = observer(
super(props);
this.handleClick = this.handleClick.bind(this);
this.performGistAction = this.performGistAction.bind(this);
this.setPrivate = this.setPrivate.bind(this);
this.setSecret = this.setSecret.bind(this);
this.setPublic = this.setPublic.bind(this);

this.state = {
Expand Down Expand Up @@ -298,9 +298,9 @@ export const GistActionButton = observer(
}

/**
* Publish fiddles as private.
* Publish fiddles as secret.
*/
public setPrivate() {
public setSecret() {
this.setPrivacy(false);
}

Expand Down Expand Up @@ -414,10 +414,10 @@ export const GistActionButton = observer(
const privacyMenu = (
<Menu>
<MenuItem
text="Private"
text="Secret"
icon="lock"
active={!gitHubPublishAsPublic}
onClick={this.setPrivate}
onClick={this.setSecret}
/>
<MenuItem
text="Public"
Expand Down
Loading