mirror of
https://github.com/devon22/obsidian-gridexplorer.git
synced 2026-07-22 05:38:16 +00:00
3.1.2
This commit is contained in:
parent
d375971a8d
commit
d56722794a
13 changed files with 42 additions and 10 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "gridexplorer",
|
||||
"name": "GridExplorer",
|
||||
"version": "3.1.1",
|
||||
"version": "3.1.2",
|
||||
"minAppVersion": "1.1.0",
|
||||
"description": "Browse note files in a grid view.",
|
||||
"author": "Devon22",
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "gridexplorer",
|
||||
"version": "3.1.1",
|
||||
"version": "3.1.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "gridexplorer",
|
||||
"version": "3.1.1",
|
||||
"version": "3.1.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@esbuild/linux-x64": "0.17.3",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "gridexplorer",
|
||||
"version": "3.1.1",
|
||||
"version": "3.1.2",
|
||||
"description": "Browse note files in a grid view.",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -649,7 +649,15 @@ export function renderModePath(gridView: GridView) {
|
|||
|
||||
switch (gridView.sourceMode) {
|
||||
case 'bookmarks':
|
||||
const bookmarkGroupName = gridView.bookmarkGroupId === 'all' ? t('all_bookmarks') : gridView.bookmarkGroupId;
|
||||
let bookmarkGroupName = '';
|
||||
if (gridView.bookmarkGroupId === 'all') {
|
||||
bookmarkGroupName = t('all_bookmarks');
|
||||
} else if (gridView.bookmarkGroupId === 'ungrouped') {
|
||||
bookmarkGroupName = t('ungrouped_bookmarks');
|
||||
} else {
|
||||
bookmarkGroupName = gridView.bookmarkGroupId || t('all_bookmarks');
|
||||
}
|
||||
|
||||
const bookmarkGroupSpan = modenameContainer.createEl('a', { text: bookmarkGroupName, cls: 'ge-sub-option' });
|
||||
bookmarkGroupSpan.addEventListener('click', (evt) => {
|
||||
const menu = new Menu();
|
||||
|
|
@ -664,6 +672,16 @@ export function renderModePath(gridView: GridView) {
|
|||
});
|
||||
});
|
||||
|
||||
// "無群組" 選項
|
||||
menu.addItem((item) => {
|
||||
item.setTitle(t('ungrouped_bookmarks'))
|
||||
.setIcon('bookmark')
|
||||
.setChecked(gridView.bookmarkGroupId === 'ungrouped')
|
||||
.onClick(() => {
|
||||
gridView.setSource('bookmarks', '', false, undefined, undefined, undefined, undefined, 'ungrouped');
|
||||
});
|
||||
});
|
||||
|
||||
menu.addSeparator();
|
||||
|
||||
// 取得所有書籤群組
|
||||
|
|
|
|||
|
|
@ -179,6 +179,7 @@ export default {
|
|||
'default': 'Default',
|
||||
'hidden': 'Hidden',
|
||||
'all_bookmarks': 'All Bookmarks',
|
||||
'ungrouped_bookmarks': 'Ungrouped Bookmarks',
|
||||
|
||||
// Hide header elements setting
|
||||
'hide_header_elements': 'Hide header elements',
|
||||
|
|
|
|||
|
|
@ -177,7 +177,8 @@ export default {
|
|||
'all': 'すべて',
|
||||
'default': 'デフォルト',
|
||||
'hidden': '隠す',
|
||||
'bookmark_groups': 'ブックマーク群組',
|
||||
'all_bookmarks': 'すべてのブックマーク',
|
||||
'ungrouped_bookmarks': 'グループなし',
|
||||
|
||||
// 隠すヘッダー要素
|
||||
'hide_header_elements': 'ヘッダー要素を隠す',
|
||||
|
|
|
|||
|
|
@ -178,7 +178,8 @@ export default {
|
|||
'all': '전체',
|
||||
'default': '기본값',
|
||||
'hidden': '숨김',
|
||||
'bookmark_groups': '북마크群組',
|
||||
'all_bookmarks': '모든 북마크',
|
||||
'ungrouped_bookmarks': '그룹 해제됨',
|
||||
|
||||
// Hide header elements setting
|
||||
'hide_header_elements': '헤더 요소 숨기기',
|
||||
|
|
|
|||
|
|
@ -177,7 +177,8 @@ export default {
|
|||
'all': 'Все',
|
||||
'default': 'По умолчанию',
|
||||
'hidden': 'Скрытые',
|
||||
'bookmark_groups': 'Букмарк группы',
|
||||
'all_bookmarks': 'Все закладки',
|
||||
'ungrouped_bookmarks': 'Без группы',
|
||||
|
||||
// Hide header elements setting
|
||||
'hide_header_elements': 'Скрыть элементы заголовка',
|
||||
|
|
|
|||
|
|
@ -177,7 +177,8 @@ export default {
|
|||
'all': 'Усі',
|
||||
'default': 'За замовчуванням',
|
||||
'hidden': 'Приховані',
|
||||
'bookmark_groups': 'Групи закладок',
|
||||
'all_bookmarks': 'Усі закладки',
|
||||
'ungrouped_bookmarks': 'Без групи',
|
||||
|
||||
// Hide header elements setting
|
||||
'hide_header_elements': 'Приховати елементи заголовка',
|
||||
|
|
|
|||
|
|
@ -179,6 +179,7 @@ export default {
|
|||
'default': '預設',
|
||||
'hidden': '隱藏',
|
||||
'all_bookmarks': '全部書籤',
|
||||
'ungrouped_bookmarks': '無群組書籤',
|
||||
|
||||
// 隱藏頂部元素
|
||||
'hide_header_elements': '隱藏頂部元素',
|
||||
|
|
|
|||
|
|
@ -178,6 +178,7 @@ export default {
|
|||
'default': '默认',
|
||||
'hidden': '隐藏',
|
||||
'all_bookmarks': '全部书签',
|
||||
'ungrouped_bookmarks': '无群组书签',
|
||||
|
||||
// 隐藏頂部元素
|
||||
'hide_header_elements': '隱藏頂部元素',
|
||||
|
|
|
|||
|
|
@ -390,6 +390,13 @@ export async function getFiles(gridView: GridView, includeMediaFiles: boolean):
|
|||
const bookmarkGroupId = gridView.bookmarkGroupId;
|
||||
if (!bookmarkGroupId || bookmarkGroupId === 'all') {
|
||||
bookmarks.forEach(processBookmarkItem);
|
||||
} else if (bookmarkGroupId === 'ungrouped') {
|
||||
// 只處理根目錄下的檔案項目
|
||||
bookmarks.forEach((item: any) => {
|
||||
if (item.type === 'file') {
|
||||
processBookmarkItem(item);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 遞迴尋找指定的群組
|
||||
const findAndProcessGroup = (items: any[]) => {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"3.1.1": "1.1.0"
|
||||
"3.1.2": "1.1.0"
|
||||
}
|
||||
Loading…
Reference in a new issue