shortcuts for icon panel

test fixes
pull/1/head
LianaHus 6 years ago
parent e59db11d6b
commit 318a8be11f
  1. 13
      src/app.js
  2. 11
      src/app/components/vertical-icons-component.js
  3. 2
      src/app/panels/editor-panel.js
  4. 2
      src/app/tabs/debugger-tab.js
  5. 2
      src/app/tabs/theme-module.js
  6. 4
      src/remixAppManager.js

@ -454,6 +454,19 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
}
}, false)
window.addEventListener('keypress', (e) => {
if (e.shiftKey && e.ctrlKey) {
if (e.code === 'KeyF') { // Ctrl+Shift+F
verticalIconsApi.select('fileExplorers')
} else if (e.code === 'KeyA') { // Ctrl+Shift+A
verticalIconsApi.select('pluginManager')
} else if (e.code === 'KeyS') { // Ctrl+Shift+S
verticalIconsApi.select('settings')
}
e.preventDefault()
}
})
// Replace early callback with instant response
loadFilesCallback = function (files) {
self.loadFiles(files)

@ -59,7 +59,7 @@ class VerticalIconComponent {
*/
addIcon ({kind, name, icon, displayName}) {
this.icons[name] = yo`
<div class="${css.icon}" onclick="${(e) => { this._iconClick(name) }}" plugin="${name}" title="${displayName || name}" >
<div class="${css.icon}" onclick="${(e) => { this._iconClick(name) }}" plugin="${name}" title="${displayName}" >
<img class="image" src="${icon}" alt="${name}" />
</div>`
this.iconKind[kind || 'other'].appendChild(this.icons[name])
@ -84,15 +84,14 @@ class VerticalIconComponent {
el.appendChild(yo`<span title="${title}" class="fa fa-${key} ${css.status} text-${type}" aria-hidden="true"></span>`)
// el.classList = "" doesn't work on all browser use instead
var classList = el.classList;
var classList = el.classList
while (classList.length > 0) {
classList.remove(classList.item(0));
classList.remove(classList.item(0))
}
el.classList.add(`${css.icon}`)
el.classList.add('border')
el.classList.add(`border-${type}`)
}
}
@ -109,7 +108,7 @@ class VerticalIconComponent {
* @param {string} name Name of profile of the module to activate
*/
select (name) {
const themeType = globalRegistry.get("themeModule").api.currentTheme().quality
const themeType = globalRegistry.get('themeModule').api.currentTheme().quality
const invert = themeType === 'dark' ? 1 : 0
// Remove active for the current activated icons
const currentActive = this.view.querySelector(`.${css.active}`)
@ -220,7 +219,7 @@ const css = csjs`
height: 28px;
padding: 4px;
}
.icon[title='settings'] {
.icon[title='Settings'] {
position: absolute;
bottom: 0;
}

@ -198,7 +198,7 @@ class EditorPanel {
self._adjustLayout('top', self.data._layout.top.offset)
document.addEventListener('keydown', (e) => {
if (e.altKey && e.keyCode === 84) self.tabProxy.switchNextTab()
if (e.altKey && e.keyCode === 84) self.tabProxy.switchNextTab() // alt + t
})
return self._view.el

@ -7,7 +7,7 @@ import { BaseApi } from 'remix-plugin'
const profile = { displayName: 'Debugger',
name: 'debugger',
displayName: 'Solidity compiler',
displayName: 'Debuggerr',
methods: [],
events: [],
icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNjk2IDk2MHEwIDI2LTE5IDQ1dC00NSAxOWgtMjI0cTAgMTcxLTY3IDI5MGwyMDggMjA5cTE5IDE5IDE5IDQ1dC0xOSA0NXEtMTggMTktNDUgMTl0LTQ1LTE5bC0xOTgtMTk3cS01IDUtMTUgMTN0LTQyIDI4LjUtNjUgMzYuNS04MiAyOS05NyAxM3YtODk2aC0xMjh2ODk2cS01MSAwLTEwMS41LTEzLjV0LTg3LTMzLTY2LTM5LTQzLjUtMzIuNWwtMTUtMTQtMTgzIDIwN3EtMjAgMjEtNDggMjEtMjQgMC00My0xNi0xOS0xOC0yMC41LTQ0LjV0MTUuNS00Ni41bDIwMi0yMjdxLTU4LTExNC01OC0yNzRoLTIyNHEtMjYgMC00NS0xOXQtMTktNDUgMTktNDUgNDUtMTloMjI0di0yOTRsLTE3My0xNzNxLTE5LTE5LTE5LTQ1dDE5LTQ1IDQ1LTE5IDQ1IDE5bDE3MyAxNzNoODQ0bDE3My0xNzNxMTktMTkgNDUtMTl0NDUgMTkgMTkgNDUtMTkgNDVsLTE3MyAxNzN2Mjk0aDIyNHEyNiAwIDQ1IDE5dDE5IDQ1em0tNDgwLTU3NmgtNjQwcTAtMTMzIDkzLjUtMjI2LjV0MjI2LjUtOTMuNSAyMjYuNSA5My41IDkzLjUgMjI2LjV6Ii8+PC9zdmc+',

@ -56,7 +56,7 @@ export class ThemeModule extends BaseApi {
this.storage.set('theme', next)
document.getElementById('theme-link').setAttribute('href', nextTheme.url)
document.documentElement.style.setProperty('--theme', nextTheme.quality)
this.active = themeName ? themeName : this.active
if (themeName) this.active = themeName
this.events.emit('themeChanged', nextTheme.quality)
}
}

@ -58,8 +58,8 @@ export class RemixAppManager extends AppManagerApi {
plugins () {
let vyper = {
displayName: 'Vyper',
name: 'vyper',
displayName: 'Vyper',
events: ['compilationFinished'],
methods: [],
notifications: {},
@ -70,8 +70,8 @@ export class RemixAppManager extends AppManagerApi {
location: 'swapPanel'
}
var pipeline = {
displayName: 'pipeline',
name: 'pipeline',
displayName: 'Pipeline',
events: [],
methods: [],
notifications: {

Loading…
Cancel
Save