Merge branch 'master' into mobile-sidebar
Signed-off-by: Philipp Hugenroth <philipph@spotify.com>
This commit is contained in:
@@ -1,5 +1,19 @@
|
||||
# @backstage/plugin-shortcuts
|
||||
|
||||
## 0.1.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b50cbd047b: Properly read saved shortcuts from StorageApi
|
||||
|
||||
## 0.1.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/core-plugin-api@0.4.0
|
||||
- @backstage/core-components@0.8.2
|
||||
|
||||
## 0.1.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/plugin-shortcuts",
|
||||
"description": "A Backstage plugin that provides a shortcuts feature to the sidebar",
|
||||
"version": "0.1.15",
|
||||
"version": "0.1.17",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -21,8 +21,8 @@
|
||||
"clean": "backstage-cli clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/core-components": "^0.8.1",
|
||||
"@backstage/core-plugin-api": "^0.3.1",
|
||||
"@backstage/core-components": "^0.8.2",
|
||||
"@backstage/core-plugin-api": "^0.4.0",
|
||||
"@backstage/theme": "^0.2.14",
|
||||
"@backstage/types": "^0.1.1",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
@@ -39,10 +39,10 @@
|
||||
"react": "^16.13.1 || ^17.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.10.2",
|
||||
"@backstage/core-app-api": "^0.2.1",
|
||||
"@backstage/dev-utils": "^0.2.14",
|
||||
"@backstage/test-utils": "^0.1.24",
|
||||
"@backstage/cli": "^0.10.3",
|
||||
"@backstage/core-app-api": "^0.3.0",
|
||||
"@backstage/dev-utils": "^0.2.15",
|
||||
"@backstage/test-utils": "^0.2.0",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^11.2.5",
|
||||
"@testing-library/user-event": "^13.1.8",
|
||||
|
||||
@@ -82,11 +82,9 @@ export class LocalStoredShortcuts implements ShortcutApi {
|
||||
};
|
||||
|
||||
private get() {
|
||||
return (
|
||||
(this.storageApi.get('items') as Shortcut[])?.sort((a, b) =>
|
||||
a.title >= b.title ? 1 : -1,
|
||||
) ?? []
|
||||
);
|
||||
return Array.from(
|
||||
this.storageApi.snapshot<Shortcut[]>('items').value ?? [],
|
||||
).sort((a, b) => (a.title >= b.title ? 1 : -1));
|
||||
}
|
||||
|
||||
private notify() {
|
||||
|
||||
@@ -20,7 +20,6 @@ import { Observable } from '@backstage/types';
|
||||
|
||||
export const shortcutsApiRef = createApiRef<ShortcutApi>({
|
||||
id: 'plugin.shortcuts.api',
|
||||
description: 'API to handle shortcuts in a Backstage Sidebar',
|
||||
});
|
||||
|
||||
export interface ShortcutApi {
|
||||
|
||||
Reference in New Issue
Block a user