From 7eff4d045b6feacf06ddcbcba916ceb0e7579795 Mon Sep 17 00:00:00 2001 From: Denis Kolesnikov Date: Tue, 2 Apr 2024 15:14:30 +0200 Subject: [PATCH] Copy URL and discovery update (#91) * Copy URL and discovery update * Added release notes to what's new page * Updated package-lock.json --- CHANGELOG.md | 6 ++++++ package-lock.json | 18 +++++++++--------- package.json | 4 ++-- src/discovery/navbar.js | 12 +++++++++--- src/discovery/pages/whatsnew.md | 11 +++++++++++ 5 files changed, 37 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 557da86..6ad1ae6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.14.0 + +* Updated `discovery` to `1.0.0-beta.82` +* Renamed `report` page to `discovery` +* Added "Copy URL" button + ## 1.13.5 * Updated `discovery` to `1.0.0-beta.81` diff --git a/package-lock.json b/package-lock.json index 7aff32a..fa1ebac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "jsondiscovery", - "version": "1.13.5", + "version": "1.14.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "jsondiscovery", - "version": "1.13.5", + "version": "1.14.0", "license": "MIT", "devDependencies": { - "@discoveryjs/discovery": "1.0.0-beta.81", + "@discoveryjs/discovery": "1.0.0-beta.82", "@discoveryjs/json-ext": "^0.5.7", "css-tree": "^2.3.1", "esbuild": "^0.20.1", @@ -28,9 +28,9 @@ } }, "node_modules/@discoveryjs/discovery": { - "version": "1.0.0-beta.81", - "resolved": "https://registry.npmjs.org/@discoveryjs/discovery/-/discovery-1.0.0-beta.81.tgz", - "integrity": "sha512-SZbHJUBYV+kvJn4Nb3bmxnXXqKcCLnzTwW6S0I8y0NX4rTRQlshdfOY2kxo9WYvCwSM7wAE4cswYTHcLqeuDcQ==", + "version": "1.0.0-beta.82", + "resolved": "https://registry.npmjs.org/@discoveryjs/discovery/-/discovery-1.0.0-beta.82.tgz", + "integrity": "sha512-vL5/+uulwKHh8yyCdRDusaejuILZTLVq87UZpqjJ8zqcBh43nPdKh/jYSHIYz2BDXXZgJfE62RAw423MpXU+0Q==", "dev": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.7", @@ -1765,9 +1765,9 @@ "dev": true }, "@discoveryjs/discovery": { - "version": "1.0.0-beta.81", - "resolved": "https://registry.npmjs.org/@discoveryjs/discovery/-/discovery-1.0.0-beta.81.tgz", - "integrity": "sha512-SZbHJUBYV+kvJn4Nb3bmxnXXqKcCLnzTwW6S0I8y0NX4rTRQlshdfOY2kxo9WYvCwSM7wAE4cswYTHcLqeuDcQ==", + "version": "1.0.0-beta.82", + "resolved": "https://registry.npmjs.org/@discoveryjs/discovery/-/discovery-1.0.0-beta.82.tgz", + "integrity": "sha512-vL5/+uulwKHh8yyCdRDusaejuILZTLVq87UZpqjJ8zqcBh43nPdKh/jYSHIYz2BDXXZgJfE62RAw423MpXU+0Q==", "dev": true, "requires": { "@discoveryjs/json-ext": "^0.5.7", diff --git a/package.json b/package.json index af8b218..e2c2835 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jsondiscovery", - "version": "1.13.5", + "version": "1.14.0", "description": "Browser (Chrome, Firefox) extension for JSON discovery", "author": "exsdis@gmail.com", "license": "MIT", @@ -11,7 +11,7 @@ "build": "NODE_ENV=production node ./scripts/build.js && node ./scripts/zip.js" }, "devDependencies": { - "@discoveryjs/discovery": "1.0.0-beta.81", + "@discoveryjs/discovery": "1.0.0-beta.82", "@discoveryjs/json-ext": "^0.5.7", "css-tree": "^2.3.1", "esbuild": "^0.20.1", diff --git a/src/discovery/navbar.js b/src/discovery/navbar.js index 3db479d..4750bc9 100644 --- a/src/discovery/navbar.js +++ b/src/discovery/navbar.js @@ -13,6 +13,12 @@ export default host => { setWhatsnewViewed(host.context); } }); + host.nav.append({ + content: 'text:"Copy URL"', + onClick: () => + copyText(window.location.toString()) & + flashMessage('URL copied to clipboard', 'success') + }); host.nav.append({ when: () => host.pageId !== 'default', content: 'text:"Default view"', @@ -22,9 +28,9 @@ export default host => { } }); host.nav.append({ - when: () => host.pageId !== 'report', - content: 'text:"Make report"', - onClick: () => host.setPage('report') + when: () => host.pageId !== 'discovery', + content: 'text:"Discover"', + onClick: () => host.setPage('discovery') }); host.nav.append({ when: () => host.pageId !== 'raw', diff --git a/src/discovery/pages/whatsnew.md b/src/discovery/pages/whatsnew.md index 0291ed1..877c0e2 100644 --- a/src/discovery/pages/whatsnew.md +++ b/src/discovery/pages/whatsnew.md @@ -1,3 +1,14 @@ +## 1.14.0 + +### Discover + +- Report page renamed to "Discover" + +### Misc + +- Added "Copy URL" button +- Updated `discovery.js` to the `1.0.0-beta.82` version ([release notes](https://github.com/discoveryjs/discovery/releases/tag/v1.0.0-beta.82)) + ## 1.13.5 ### Interface & Views