feat: add compact Toolbox tiles and details overlay
This commit is contained in:
27
src/toolPresentation.ts
Normal file
27
src/toolPresentation.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { ResolvedApp } from './types';
|
||||
|
||||
const PRESENTATION: Record<string, { title: string; description: string }> = {
|
||||
'de.add-ideas.pdf-tools': {
|
||||
title: 'PDF',
|
||||
description: 'Arrange PDF pages locally.',
|
||||
},
|
||||
'de.add-ideas.xslt-tools': {
|
||||
title: 'XSLT',
|
||||
description: 'Transform XML locally.',
|
||||
},
|
||||
'de.add-ideas.onenote-tools': {
|
||||
title: 'OneNote',
|
||||
description: 'Open OneNote files locally.',
|
||||
},
|
||||
};
|
||||
|
||||
export function shortToolTitle(app: ResolvedApp): string {
|
||||
return (
|
||||
PRESENTATION[app.id]?.title ??
|
||||
app.name.replace(/\s+(?:reader|tools?|workbench)$/iu, '')
|
||||
);
|
||||
}
|
||||
|
||||
export function shortToolDescription(app: ResolvedApp): string {
|
||||
return PRESENTATION[app.id]?.description ?? app.description;
|
||||
}
|
||||
Reference in New Issue
Block a user