Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update search-joplin-notes extension #14591

Merged
merged 3 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion extensions/search-joplin-notes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# search joplin notes Changelog
# Search joplin notes Changelog

## [FIX Codes] - 2024-09-22

Modify it so that the search results can be changed in the settings

## [FIX Codes] - 2024-7-29

Expand Down
26 changes: 26 additions & 0 deletions extensions/search-joplin-notes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,32 @@
"required": true,
"description": "You can get this token from the Joplin desktop application, on the Web Clipper Options screen.",
"placeholder": "Joplin Token"
},
{
"name": "search_limit",
"type": "dropdown",
"title": "Search Display Limit",
"required": false,
"description": "The number of notes to display in the search results. Default is 9.",
"data": [
{
"title": "6",
"value": "6"
},
{
"title": "default 9",
"value": "9"
},
{
"title": "12",
"value": "12"
},
{
"title": "18",
"value": "18"
}
],
"default": "9"
}
],
"dependencies": {
Expand Down
4 changes: 3 additions & 1 deletion extensions/search-joplin-notes/src/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getPreferenceValues } from "@raycast/api";

export const SEARCH_API_URL = (keyword: string, port: number): string => {
return `http://127.0.0.1:${port}/search?query=${keyword}*&fields=id,title&token=${API_Token}&type=note&limit=10`;
return `http://127.0.0.1:${port}/search?query=${keyword}*&fields=id,title&token=${API_Token}&type=note&limit=${SearchLimit}`;
};

export const DETAIL_API_URL = (id: string, port: number): string => {
Expand All @@ -10,6 +10,8 @@ export const DETAIL_API_URL = (id: string, port: number): string => {

export const API_Token = getPreferenceValues().joplin_token;

export const SearchLimit = getPreferenceValues().search_limit || 9;

export const RaycastBundleId = "com.raycast.macos";

export const JoplinBundleId = "net.cozic.joplin-desktop";