Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
JackGruber committed Jan 11, 2024
2 parents b6f9b22 + add2715 commit de468ab
Show file tree
Hide file tree
Showing 15 changed files with 74 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## not released

## v1.7.1 (2024-01-11)

- Add: Translation of humanized dates
- Add: Screenshots / icon for [https://joplinapp.org/plugins/](https://joplinapp.org/plugins/)

## v1.7.0 (2023-12-24)

- Add: Translation
Expand Down
2 changes: 1 addition & 1 deletion GENERATOR_DOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This documentation describes how to create a plugin, and how to work with the pl
First, install [Yeoman](http://yeoman.io) and generator-joplin using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).

```bash
npm install -g yo
npm install -g yo@4.3.1
npm install -g generator-joplin
```

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<!-- markdownlint-disable MD007 -->
<!-- markdownlint-disable MD045 -->

# Joplin note overview
# Joplin note overview <img src=img/icon_32.png>

A note overview is created based on the defined search and the specified fields.

<img src=img/main.jpg>
<img src=img/main.png>

<!-- prettier-ignore-start -->

Expand Down
33 changes: 33 additions & 0 deletions img/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icon_256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icon_32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/main.jpg
Binary file not shown.
Binary file added img/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/showcase1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/showcase2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "joplin-plugin-note-overview",
"version": "1.7.0",
"version": "1.7.1",
"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 Down
22 changes: 20 additions & 2 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,29 @@
"manifest_version": 1,
"id": "io.github.jackgruber.note-overview",
"app_min_version": "1.8.1",
"version": "1.7.0",
"version": "1.7.1",
"name": "Note overview",
"description": "A note overview is created based on the defined search and the specified fields.",
"author": "JackGruber",
"homepage_url": "https://github.com/JackGruber/joplin-plugin-note-overview/blob/master/README.md",
"repository_url": "https://github.com/JackGruber/joplin-plugin-note-overview",
"keywords": ["search", "overview", "savedsearch", "saved", "query"]
"keywords": ["search", "overview", "savedsearch", "saved", "query"],
"categories": ["productivity"],
"screenshots": [
{
"src": "img/main.png",
"label": "Screenshot: Main Screenshot"
},
{
"src": "img/showcase1.png",
"label": "Screenshot: Showcase 1"
},
{
"src": "img/showcase2.png",
"label": "Screenshot: Showcase 2"
}
],
"icons": {
"256": "img/icon_256.png"
}
}
1 change: 1 addition & 0 deletions src/noteoverview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1554,6 +1554,7 @@ export namespace noteoverview {
objectNotation: true,
});
i18n.setLocale(joplinLocale);
moment.locale(joplinLocale);
}
}

Expand Down
13 changes: 9 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,24 @@ function validateCategories(categories) {

function validateScreenshots(screenshots) {
if (!screenshots) return null;
// eslint-disable-next-line github/array-foreach -- Old code before rule was applied
screenshots.forEach(screenshot => {
for (const screenshot of screenshots) {
if (!screenshot.src) throw new Error('You must specify a src for each screenshot');

// Avoid attempting to download and verify URL screenshots.
if (screenshot.src.startsWith('https://') || screenshot.src.startsWith('http://')) {
continue;
}

const screenshotType = screenshot.src.split('.').pop();
if (!allPossibleScreenshotsType.includes(screenshotType)) throw new Error(`${screenshotType} is not a valid screenshot type. Valid types are: \n${allPossibleScreenshotsType}\n`);

const screenshotPath = path.resolve(srcDir, screenshot.src);
const screenshotPath = path.resolve(rootDir, screenshot.src);

// Max file size is 1MB
const fileMaxSize = 1024;
const fileSize = fs.statSync(screenshotPath).size / 1024;
if (fileSize > fileMaxSize) throw new Error(`Max screenshot file size is ${fileMaxSize}KB. ${screenshotPath} is ${fileSize}KB`);
});
}
}

function readManifest(manifestPath) {
Expand Down

0 comments on commit de468ab

Please sign in to comment.