Skip to content

Commit

Permalink
Fix spacing of cleanup-repo-filelist-actions (#3646)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocarreterom committed Oct 15, 2020
1 parent 149cddf commit b501d71
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions source/features/cleanup-repo-filelist-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import SearchIcon from 'octicon/search.svg';
import * as pageDetect from 'github-url-detection';

import features from '.';
import {groupButtons} from '../github-helpers/group-buttons';

function init(): void {
const searchButton = select('.btn[data-hotkey="t"]')!;
Expand All @@ -14,16 +13,13 @@ function init(): void {
searchButton.firstChild!.replaceWith(<SearchIcon/>);

const addButtonWrapper = searchButton.nextElementSibling!;
const addButton = select('.btn', addButtonWrapper);
if (addButton) {
addButton.classList.add('d-md-block', 'tooltipped', 'tooltipped-ne');
addButton.classList.remove('d-md-flex', 'ml-2');
addButton.setAttribute('aria-label', 'Add file');
addButton.textContent = '';
addButton.append(<PlusIcon/>);
if (addButtonWrapper.nodeName === 'DETAILS') {
addButtonWrapper.classList.add('tooltipped', 'tooltipped-ne');
addButtonWrapper.setAttribute('aria-label', 'Add file');

searchButton.classList.remove('mr-2');
groupButtons([searchButton, addButtonWrapper]);
const addIcon = select('.btn span', addButtonWrapper)!;
addIcon.classList.replace('d-md-flex', 'd-md-block');
addIcon.firstChild!.replaceWith(<PlusIcon/>);
}

const downloadButton = select('get-repo details');
Expand Down

0 comments on commit b501d71

Please sign in to comment.