mirror of
https://github.com/liriliri/eruda.git
synced 2026-10-04 21:15:01 +08:00
chore: update luna setting
This commit is contained in:
@@ -40,6 +40,7 @@ module.exports = {
|
||||
resolve: {
|
||||
alias: {
|
||||
axios: path.resolve(__dirname, '../src/lib/empty.js'),
|
||||
micromark: path.resolve(__dirname, '../src/lib/micromark.js'),
|
||||
},
|
||||
},
|
||||
devServer: {
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
"luna-modal": "^1.0.0",
|
||||
"luna-notification": "^0.1.4",
|
||||
"luna-object-viewer": "^0.2.4",
|
||||
"luna-setting": "^0.3.0",
|
||||
"luna-setting": "^0.4.1",
|
||||
"luna-tab": "^0.1.2",
|
||||
"luna-text-viewer": "^0.2.1",
|
||||
"node-sass": "^7.0.1",
|
||||
|
||||
@@ -28,14 +28,17 @@ export default class Settings extends Tool {
|
||||
}
|
||||
remove(config, key) {
|
||||
if (isStr(config)) {
|
||||
const self = this
|
||||
this._$el.find('.luna-setting-item-title').each(function () {
|
||||
const $this = $(this)
|
||||
if ($this.text() === config) $this.remove()
|
||||
if ($this.text() === config) {
|
||||
self._setting.remove(this.settingItem)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this._settings = filter(this._settings, (setting) => {
|
||||
if (setting.config === config && setting.key === key) {
|
||||
setting.item.detach()
|
||||
this._setting.remove(setting.item)
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
3
src/lib/micromark.js
Normal file
3
src/lib/micromark.js
Normal file
@@ -0,0 +1,3 @@
|
||||
export function micromark(str) {
|
||||
return str
|
||||
}
|
||||
@@ -363,9 +363,13 @@
|
||||
}
|
||||
|
||||
.luna-setting-item {
|
||||
&:hover {
|
||||
&:hover,
|
||||
&.luna-setting-selected {
|
||||
background: var(--darker-background);
|
||||
}
|
||||
&.luna-setting-selected:focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
.luna-setting-item-title {
|
||||
|
||||
Reference in New Issue
Block a user