Skip to content

Commit

Permalink
v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SeptemberHX committed Aug 26, 2022
1 parent 9ea34ea commit 6596903
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 14 deletions.
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
# Joplin Plugin Bundle

Plugins with panels. Some of the plugins come from other repo, and I modified it to show all the plugin panels in the same panel under different tabs.
Plugins in one panel. Some of the plugins come from other repo, and I modified them to show all the plugin panels in the same panel under different tabs.

> **Why?** : Save my screen space by aggregating those plugins into one panel
> **How?** : Copy & Paste code from existing plugins, and modify them at the code level. I cannot figure out a non-intrusive way to gather them together in one panel.
Current plugins:

* Outline (v1.3.1): https://github.com/cqroot/joplin-outline

![](./screenshot/tab-panels.png)
* Inline Todo (v1.4.0): https://github.com/CalebJohn/joplin-inline-todo
* Daily Note: Idea from https://github.com/liamcain/obsidian-calendar-plugin

Under development:

* Note Link System (v0.8.0): https://github.com/ylc395/joplin-plugin-note-link-system
* Writing Marker [Planned]: Help to mark text with a label and show them in the sidebar ordered by marker categories:
* Recheck: text needs to be rechecked
* Rewrite: text needs to be rewritten
* ... (It depends on what I need to finish my papers)
* Aggregated Search [Planned]: Allow search multiple resources and present the results in one panel.
> I treat Joplin as my top-level knowledge base while there exist many other tools behind Joplin. Joplin is not a good choice for document management, so I need to search other tools.
* Joplin Notes
* ReadCube Papers: https://www.papersapp.com/
* ArchiveBox: https://github.com/ArchiveBox/ArchiveBox
* ... ?

![Imgur](https://i.imgur.com/yfcsNDb.gif)
<img src="https://i.imgur.com/7cMUBOj.gif" width="200px"></img>
![Imgur](https://i.imgur.com/h7fP8iq.gif)

## Building the plugin

Expand Down
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-bundle",
"version": "1.0.0",
"version": "0.3.0",
"scripts": {
"dist": "webpack --joplin-plugin-config buildMain && webpack --joplin-plugin-config buildExtraScripts && webpack --joplin-plugin-config createArchive",
"prepare": "npm run dist",
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ joplin.plugins.register({
outlinePlugin,
todolistPlugin,
dailyNotePlugin,
writingMarkerPlugin,
noteLinkPlugin,
aggregateSearchPlugin
// writingMarkerPlugin,
// noteLinkPlugin,
// aggregateSearchPlugin
];

await sidebar.init(plugins);
Expand Down
3 changes: 1 addition & 2 deletions src/inlineTodo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TodolistPlugin extends SidebarPlugin {
sidebar: Sidebars;
summary_map: Summary;
builder: SummaryBuilder;
todoTypeClicked: number = 0;
todoTypeClicked: number = 3;

refresh = debounce(async () => {
await this.builder.search_in_all();
Expand Down Expand Up @@ -96,7 +96,6 @@ class TodolistPlugin extends SidebarPlugin {

private async update_summary(summary_map: Summary, settings: Settings) {
this.summary_map = summary_map;
console.log(summary_map);
await this.sidebar.updateHtml(this.id, await panelHtml(this.summary_map, this.todoTypeClicked));
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/inlineTodo/panelHtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ export default async function panelHtml(summary: Summary, activedTab: number) {
result += `
<ul class="nav nav-pills mb-3 justify-content-center" id="pills-tab" role="tablist">
<li class="nav-item" role="presentation">
<button class="position-relative nav-link ${activedTab === 0 ? 'active' : ''}" onclick="todoTypeTabItemClicked(0);" id="pills-today-tab" data-bs-toggle="pill" data-bs-target="#pills-today" type="button" role="tab" aria-controls="pills-today" aria-selected="true">
<button class="position-relative nav-link ${activedTab === 3 ? 'active' : ''}" onclick="todoTypeTabItemClicked(3);" id="pills-today-tab" data-bs-toggle="pill" data-bs-target="#pills-today" type="button" role="tab" aria-controls="pills-today" aria-selected="true">
<i class="fas fa-star"></i>
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger ${todayItems.length === 0 ? 'invisible' : ''}">
${todoItems.length}
${todayItems.length}
<span class="visually-hidden">unread messages</span>
</span>
</button>
Expand Down Expand Up @@ -96,7 +96,7 @@ export default async function panelHtml(summary: Summary, activedTab: number) {
result += `<div class="tab-content" id="pills-tabContent">`;

// ====> build today tab div <====
result += `<div class="tab-pane fade show ${activedTab === 0 ? 'active' : ''}" id="pills-today" role="tabpanel" aria-labelledby="pills-today-tab" tabindex="0"><ul class="list-group">`;
result += `<div class="tab-pane fade show ${activedTab === 3 ? 'active' : ''}" id="pills-today" role="tabpanel" aria-labelledby="pills-today-tab" tabindex="0"><ul class="list-group">`;
let scheduledDiv = `<div class="tab-pane fade show ${activedTab === 1 ? 'active' : ''}" id="pills-scheduled" role="tabpanel" aria-labelledby="pills-scheduled-tab" tabindex="0"><ul class="list-group">`;
let inboxDiv = `<div class="tab-pane fade show ${activedTab === 2 ? 'active' : ''}" id="pills-inbox" role="tabpanel" aria-labelledby="pills-inbox-tab" tabindex="0"><ul class="list-group">`;

Expand Down
4 changes: 2 additions & 2 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"manifest_version": 1,
"id": "com.septemberhx.pluginBundle",
"app_min_version": "2.8",
"version": "1.0.0",
"version": "0.3.0",
"name": "Plugin Bundle",
"description": "My daily plugins in a more unified way",
"author": "SeptemberHX",
"homepage_url": "https://github.com/SeptemberHX/joplin-plugin-bundle.git",
"repository_url": "https://github.com/SeptemberHX/joplin-plugin-bundle.git",
"keywords": [],
"categories": []
}
}

0 comments on commit 6596903

Please sign in to comment.