This commit is contained in:
Freddie
2020-05-30 20:46:00 +01:00
parent 7ae4c236c9
commit 7cdb9f4f4a
8 changed files with 14 additions and 14 deletions

View File

@@ -1,6 +1,12 @@
## v1.16 beta
- **API**: Now `$()` throws error if a non-plain-object is passed in as data
- **API**: `$.ELEMENTS` and `$().elements` now always return valid arrays
- **API**: DB queries now ignore `__refid` fields instead of throwing errors
## v1.15 beta
- **PluginLoader**: Lodash (\_) is now exposed as API.
- **PluginLoader**: Lodash (`\_`) is now exposed as API.
- **WebUI**: Added a query shell for plugins. You need to enable developer mode to use it
- **WebUI**: Added a dark mode which follows system's color preference

View File

@@ -81,7 +81,7 @@
background-color: #282c33;
}
}
@media screen and (max-width: 1023px) {
@media screen and (max-width: 1023px) and (prefers-color-scheme: dark) {
nav.navbar .navbar-menu .navbar-item.has-dropdown > .navbar-link {
background-color: #343434;
}

View File

@@ -44,7 +44,7 @@
let __auto_starts = 0;
$('#shell-command').on('keydown', async e => {
if (e.code == 'Enter') {
if (e.code == 'Enter' || e.keyCode == 13) {
e.preventDefault();
__history_cur = 0;
const command = $('#shell-command').val();
@@ -181,9 +181,6 @@
'(': ')',
'{': '}',
'[': ']',
'"': '"',
"'": "'",
'`': '`',
};
if (input[end - 1] in fillRight) {

View File

@@ -30,7 +30,7 @@ html.has-aside-left.has-aside-mobile-transition.has-navbar-fixed-top.has-aside-e
head
meta(charset="utf-8")
meta(http-equiv="X-UA-Compatible", content="ie=edge")
meta(name="viewport", content="width=device-width, initial-scale=1.0")
meta(name="viewport", content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0")
title Asphyxia CORE - #{title}
if subtitle
|

View File

@@ -8,7 +8,7 @@ block head
block content
.shell
.control.has-icons-left.shell-input
input.input#shell-command(type="text" spellcheck="false" data-plugin=subtitle)
input.input#shell-command(type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" data-plugin=subtitle)
span.icon.is-left
i.mdi.mdi-chevron-right
pre.has-padding-7.is-marginless#shell-content

View File

@@ -1,4 +1,4 @@
export const VERSION = 'v1.15 beta';
export const VERSION = 'v1.16 beta';
export const NAMES = [
'Akehiro',
'Akihiro',

View File

@@ -1102,10 +1102,7 @@ export const getElement = (data: any, path: string): any => {
export const getElements = (data: any, path: string): any[] => {
const item: any = get(data, `${path}`);
if (isNil(item)) return item;
if (isEmpty(item)) {
return [];
}
if (isNil(item)) return [];
if (isArray(item)) {
return item;
} else {

View File

@@ -51,7 +51,7 @@ export class KDataReader {
elements(path: string): KDataReader[] {
const ele = getElements(this.obj, path);
if (isNil(ele)) return null;
if (isNil(ele)) return [];
return ele.map(e => new KDataReader(e));
}