Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
JackGruber committed Apr 19, 2024
2 parents a69445c + fb5d3e0 commit b570442
Show file tree
Hide file tree
Showing 7 changed files with 4,115 additions and 4,774 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## not released

## v0.4.2 (2024-04-19)

- Fix: Display HTML entities in preview #21
- Fix: Images with mime type `image/jpg` are not displayed #22
- Fix: `homepage_url` for Joplin manage plugins

## v0.4.1 (2024-02-17)

- Fix: Increase thumbnail size for better previews, the Joplin zoom level is also taken into account #18
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The new note list view can be activated under `View > Note list style > Preview`

## Plugin options

Settings for the plugin, accessible at `Tools > Options > Note overview`.
Settings for the plugin, accessible at `Tools > Options > Note list (Preview)`.
Joplin must be restarted after changing settings!

## Layouts
Expand Down
8,860 changes: 4,095 additions & 4,765 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "joplin-plugin-notelistpreview",
"version": "0.4.1",
"version": "0.4.2",
"scripts": {
"dist": "webpack --env joplin-plugin-config=buildMain && webpack --env joplin-plugin-config=buildExtraScripts && webpack --env joplin-plugin-config=createArchive",
"prepare": "npm run dist && husky install",
Expand All @@ -20,7 +20,7 @@
"publish"
],
"devDependencies": {
"@joplin/lib": "~2.9",
"@joplin/lib": "^2.14.1",
"@types/jest": "^29.5.11",
"@types/node": "^18.7.13",
"chalk": "^4.1.0",
Expand All @@ -43,7 +43,7 @@
},
"dependencies": {
"electron-log": "^5.0.3",
"html-to-image": "^1.11.11",
"html-entities": "^2.5.2",
"i18n": "^0.15.1",
"moment": "^2.29.4",
"remove-markdown": "^0.5.0",
Expand Down
6 changes: 3 additions & 3 deletions src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"manifest_version": 1,
"id": "io.github.jackgruber.notelistpreview",
"app_min_version": "2.13",
"version": "0.4.1",
"app_min_version": "2.13.2",
"version": "0.4.2",
"name": "Note list (Preview)",
"description": "Displays a note preview in the note list",
"author": "JackGruber",
"homepage_url": "https://github.com/JackGruber/joplin-plugin-hotfolder/blob/master/README.md",
"homepage_url": "https://github.com/JackGruber/joplin-plugin-notelistpreview/blob/master/README.md",
"repository_url": "https://github.com/JackGruber/joplin-plugin-notelistpreview",
"keywords": ["preview", "vorschau", "notiz", "note", "notelist"],
"categories": ["themes", "viewer", "appearance"],
Expand Down
7 changes: 6 additions & 1 deletion src/notelist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import * as fs from "fs-extra";
import notelistLogging from "electron-log/main";
import { MenuItemLocation } from "api/types";
import { ModelType } from "api/types";
import { decode } from "html-entities";

let i18n: any;

Expand Down Expand Up @@ -454,6 +455,8 @@ class Notelist {
noteBody = noteBody.replace(/(\s\\?==|==\s)/g, " ");
noteBody = noteBody.replace(/(\s\\?\+\+|\+\+\s)/g, " ");

noteBody = decode(noteBody); // Decode HTML entities

let bodyExcerpt = "";
noteBody = noteBody.replace(/(\r\n|\n)/g, " ");
noteBody = noteBody.replace(/\s+/g, " ");
Expand Down Expand Up @@ -914,7 +917,9 @@ class Notelist {

if (
resourceItem.mime.includes("image/png") ||
resourceItem.mime.includes("image/jpeg")
resourceItem.mime.includes("image/jpeg") ||
resourceItem.mime.includes("image/jpg")
//// || resourceItem.mime.includes("application/pdf")
) {
thumbnailPath = await this.genResourcePreviewImage(
resourceItem,
Expand Down
2 changes: 1 addition & 1 deletion src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export namespace settings {
description: i18n.__("settings.bodyExcerpt.description"),
},
thumbnailSize: {
value: 75,
value: 70,
minimum: 1,
maximum: 200,
type: SettingItemType.Int,
Expand Down

0 comments on commit b570442

Please sign in to comment.