mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 16:25:51 +01:00
Merge remote-tracking branch 'origin/develop' into kleutzinger-forks/develop
This commit is contained in:
@@ -194,7 +194,7 @@ class BasicWidget extends Component {
|
||||
|
||||
/**
|
||||
* Indicates if the widget is enabled. Widgets are enabled by default. Generally setting this to `false` will cause the widget not to be displayed, however it will still be available on the DOM but hidden.
|
||||
* @returns
|
||||
* @returns whether the widget is enabled.
|
||||
*/
|
||||
isEnabled() {
|
||||
return true;
|
||||
|
||||
@@ -48,7 +48,7 @@ class NoteContextAwareWidget extends BasicWidget {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* Indicates if the widget is enabled. Widgets are enabled by default. Generally setting this to `false` will cause the widget not to be displayed, however it will still be available on the DOM but hidden.
|
||||
*
|
||||
* <p>
|
||||
* If the widget is not enabled, it will not receive `refreshWithNote` updates.
|
||||
|
||||
@@ -7,7 +7,7 @@ import sanitize_attribute_name from "../../services/sanitize_attribute_name.js";
|
||||
import specialNotesService from "../../services/special_notes.js";
|
||||
import { Request } from 'express';
|
||||
|
||||
function uploadImage(req: Request) {
|
||||
async function uploadImage(req: Request) {
|
||||
const file = req.file;
|
||||
|
||||
if (!file) {
|
||||
@@ -24,7 +24,7 @@ function uploadImage(req: Request) {
|
||||
return [400, "Invalid image content type."];
|
||||
}
|
||||
|
||||
const uploadedImageType = imageType(file.buffer);
|
||||
const uploadedImageType = await imageType(file.buffer);
|
||||
if (!uploadedImageType) {
|
||||
return [400, "Unable to determine image type."];
|
||||
}
|
||||
|
||||
@@ -347,7 +347,6 @@ export default {
|
||||
/**
|
||||
* Get single value from the given query - first column from first returned row.
|
||||
*
|
||||
* @method
|
||||
* @param query - SQL query with ? used as parameter placeholder
|
||||
* @param params - array of params if needed
|
||||
* @returns single value
|
||||
@@ -357,7 +356,6 @@ export default {
|
||||
/**
|
||||
* Get first returned row.
|
||||
*
|
||||
* @method
|
||||
* @param query - SQL query with ? used as parameter placeholder
|
||||
* @param params - array of params if needed
|
||||
* @returns - map of column name to column value
|
||||
@@ -368,7 +366,6 @@ export default {
|
||||
/**
|
||||
* Get all returned rows.
|
||||
*
|
||||
* @method
|
||||
* @param query - SQL query with ? used as parameter placeholder
|
||||
* @param params - array of params if needed
|
||||
* @returns - array of all rows, each row is a map of column name to column value
|
||||
@@ -381,7 +378,6 @@ export default {
|
||||
/**
|
||||
* Get a map of first column mapping to second column.
|
||||
*
|
||||
* @method
|
||||
* @param query - SQL query with ? used as parameter placeholder
|
||||
* @param params - array of params if needed
|
||||
* @returns - map of first column to second column
|
||||
@@ -391,7 +387,6 @@ export default {
|
||||
/**
|
||||
* Get a first column in an array.
|
||||
*
|
||||
* @method
|
||||
* @param query - SQL query with ? used as parameter placeholder
|
||||
* @param params - array of params if needed
|
||||
* @returns array of first column of all returned rows
|
||||
@@ -401,7 +396,6 @@ export default {
|
||||
/**
|
||||
* Execute SQL
|
||||
*
|
||||
* @method
|
||||
* @param query - SQL query with ? used as parameter placeholder
|
||||
* @param params - array of params if needed
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user