mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Some tweaks to request pinning
This commit is contained in:
parent
c48daaea44
commit
9cde9a765c
@ -62,23 +62,28 @@ class RequestActionsDropdown extends PureComponent {
|
|||||||
<DropdownButton>
|
<DropdownButton>
|
||||||
<i className="fa fa-caret-down" />
|
<i className="fa fa-caret-down" />
|
||||||
</DropdownButton>
|
</DropdownButton>
|
||||||
<DropdownItem onClick={this._handleSetRequestPinned}>
|
|
||||||
<i className="fa fa-thumb-tack" /> {this.props.isPinned ? 'Unpin' : 'Pin'}
|
|
||||||
<DropdownHint keyBindings={hotKeyRegistry[hotKeyRefs.REQUEST_TOGGLE_PIN.id]} />
|
|
||||||
</DropdownItem>
|
|
||||||
<DropdownItem onClick={this._handleDuplicate}>
|
<DropdownItem onClick={this._handleDuplicate}>
|
||||||
<i className="fa fa-copy" /> Duplicate
|
<i className="fa fa-copy" /> Duplicate
|
||||||
<DropdownHint keyBindings={hotKeyRegistry[hotKeyRefs.REQUEST_SHOW_DUPLICATE.id]} />
|
<DropdownHint keyBindings={hotKeyRegistry[hotKeyRefs.REQUEST_SHOW_DUPLICATE.id]} />
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
|
|
||||||
<DropdownItem onClick={this._handleGenerateCode}>
|
<DropdownItem onClick={this._handleGenerateCode}>
|
||||||
<i className="fa fa-code" /> Generate Code
|
<i className="fa fa-code" /> Generate Code
|
||||||
<DropdownHint
|
<DropdownHint
|
||||||
keyBindings={hotKeyRegistry[hotKeyRefs.REQUEST_SHOW_GENERATE_CODE_EDITOR.id]}
|
keyBindings={hotKeyRegistry[hotKeyRefs.REQUEST_SHOW_GENERATE_CODE_EDITOR.id]}
|
||||||
/>
|
/>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
|
|
||||||
|
<DropdownItem onClick={this._handleSetRequestPinned}>
|
||||||
|
<i className="fa fa-thumb-tack" /> {this.props.isPinned ? 'Unpin' : 'Pin'}
|
||||||
|
<DropdownHint keyBindings={hotKeyRegistry[hotKeyRefs.REQUEST_TOGGLE_PIN.id]} />
|
||||||
|
</DropdownItem>
|
||||||
|
|
||||||
<DropdownItem onClick={this._handleCopyAsCurl}>
|
<DropdownItem onClick={this._handleCopyAsCurl}>
|
||||||
<i className="fa fa-copy" /> Copy as Curl
|
<i className="fa fa-copy" /> Copy as Curl
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
|
|
||||||
<DropdownItem buttonClass={PromptButton} onClick={this._handleRemove} addIcon>
|
<DropdownItem buttonClass={PromptButton} onClick={this._handleRemove} addIcon>
|
||||||
<i className="fa fa-trash-o" /> Delete
|
<i className="fa fa-trash-o" /> Delete
|
||||||
<DropdownHint keyBindings={hotKeyRegistry[hotKeyRefs.REQUEST_SHOW_DELETE.id]} />
|
<DropdownHint keyBindings={hotKeyRegistry[hotKeyRefs.REQUEST_SHOW_DELETE.id]} />
|
||||||
|
@ -64,7 +64,7 @@ class RequestGroupRow extends React.PureComponent<Props> {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<button onClick={this.handleCollapse}>
|
<button onClick={this.handleCollapse}>
|
||||||
<i className={'tree__item__icon fa ' + folderIconClass} />
|
<i className={classnames('tree__item__icon', 'fa', folderIconClass)} />
|
||||||
{requestGroup.name}
|
{requestGroup.name}
|
||||||
<span className="total-requests">{totalRequests} requests</span>
|
<span className="total-requests">{totalRequests} requests</span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -85,7 +85,14 @@ class SidebarRequestGroupRow extends PureComponent {
|
|||||||
connectDropTarget(
|
connectDropTarget(
|
||||||
<button onClick={this._handleCollapse} onContextMenu={this._handleShowActions}>
|
<button onClick={this._handleCollapse} onContextMenu={this._handleShowActions}>
|
||||||
<div className="sidebar__clickable">
|
<div className="sidebar__clickable">
|
||||||
<i className={'sidebar__item__icon-right fa ' + folderIconClass} />
|
<i
|
||||||
|
className={classnames(
|
||||||
|
'sidebar__item__icon-right',
|
||||||
|
'fa',
|
||||||
|
'space-right',
|
||||||
|
folderIconClass,
|
||||||
|
)}
|
||||||
|
/>
|
||||||
<Highlight search={filter} text={requestGroup.name} />
|
<Highlight search={filter} text={requestGroup.name} />
|
||||||
<div
|
<div
|
||||||
ref={this._setExpandTagRef}
|
ref={this._setExpandTagRef}
|
||||||
|
@ -126,7 +126,6 @@ class SidebarRequestRow extends PureComponent {
|
|||||||
<Highlight search={filter} text={value} {...props} />
|
<Highlight search={filter} text={value} {...props} />
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
{isPinned && <i className="sidebar__item__icon-pin fa fa-thumb-tack" />}
|
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<div className="sidebar__actions">
|
<div className="sidebar__actions">
|
||||||
@ -144,6 +143,11 @@ class SidebarRequestRow extends PureComponent {
|
|||||||
hotKeyRegistry={hotKeyRegistry}
|
hotKeyRegistry={hotKeyRegistry}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
{isPinned && (
|
||||||
|
<div className="sidebar__item__icon-pin">
|
||||||
|
<i className="fa fa-thumb-tack" />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
h1 {
|
h1 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
h1 * {
|
h1 * {
|
||||||
font-size: @font-size-xl;
|
font-size: @font-size-xl;
|
||||||
@ -97,6 +98,7 @@
|
|||||||
|
|
||||||
// Make it scroll when too skinny
|
// Make it scroll when too skinny
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -235,7 +237,7 @@
|
|||||||
|
|
||||||
.sidebar__item {
|
.sidebar__item {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: minmax(0, 1fr) auto;
|
grid-template-columns: minmax(0, 1fr) auto auto;
|
||||||
grid-template-rows: @line-height-xs;
|
grid-template-rows: @line-height-xs;
|
||||||
|
|
||||||
& > button {
|
& > button {
|
||||||
@ -280,17 +282,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar__item__icon {
|
|
||||||
&-right {
|
|
||||||
padding-right: @padding-sm;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-pin {
|
|
||||||
padding: 0 @padding-sm;
|
|
||||||
display: initial;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ~~~~~~~~~~~~~~~~~ //
|
// ~~~~~~~~~~~~~~~~~ //
|
||||||
// Sidebar Clickable //
|
// Sidebar Clickable //
|
||||||
// ~~~~~~~~~~~~~~~~~ //
|
// ~~~~~~~~~~~~~~~~~ //
|
||||||
@ -394,6 +385,14 @@
|
|||||||
display: initial;
|
display: initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sidebar__item__icon-pin {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: @hl-xl;
|
||||||
|
height: 100%;
|
||||||
|
padding: 0 @padding-sm;
|
||||||
|
}
|
||||||
|
|
||||||
.sidebar__item:hover .sidebar__item__icon-pin {
|
.sidebar__item:hover .sidebar__item__icon-pin {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user