From 99ee9e680c9b68dab7cb355db097b48de4af2ff9 Mon Sep 17 00:00:00 2001 From: Korbs Date: Sat, 7 Dec 2024 19:49:40 -0500 Subject: [PATCH] update --- .eslintrc.json | 2 +- README.md | 37 +---------------- demo/app.js | 9 ++++ demo/electron-tabs.html | 18 +++++--- dist/electron-tabs.d.ts | 14 ------- dist/electron-tabs.d.ts.map | 2 +- dist/electron-tabs.js | 55 +------------------------ dist/electron-tabs.js.map | 2 +- image.jpg | Bin 159061 -> 0 bytes image.png | Bin 0 -> 141429 bytes package.json | 2 +- src/index.ts | 80 +++--------------------------------- src/style.css | 54 +++++++----------------- 13 files changed, 49 insertions(+), 226 deletions(-) delete mode 100644 image.jpg create mode 100644 image.png diff --git a/.eslintrc.json b/.eslintrc.json index 2193baf..a9a9a22 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,7 +2,7 @@ "root": true, "env": { "browser": true, - "es2021": true + "es2023": true }, "extends": "eslint:recommended", "parserOptions": { diff --git a/README.md b/README.md index 633cb67..4772574 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # Electron Tabs -![Electron Tab Demo](image.jpg) +![Electron Tab Demo](image.png) ## Features @@ -93,9 +93,6 @@ Add a new tab and returns the related `Tab` instance. * `title`: tab title. * `src`: URL to the page which will be loaded into the view. This is actually the same than `options.webview.src`. -* `badge`: optional text to put into a badge, badge will be hidden if false. -* `iconURL`: optional URL to the tab icon. -* `icon`: optional code for a tab icon. Can be used with symbol libraries (example with Font Awesome: `icon: 'fa fa-icon-name'`). This attribute is ignored if an `iconURL` was given. * `closable` (default: `true`): if set to `true` the close button won't be displayed and the user won't be able to close the tab. See also `tab.close()`. * `visible` (default: `true`): set this to `false` if you don't want to display the tab once it is loaded. If set to `false` then you will need to call `tab.show()` to display the tab. * `active` (default: `false`): set this to `true` if you want to activate the tab once it is loaded. Otherwise you will need to call `tab.activate()`. @@ -172,22 +169,6 @@ Set tab title. Get current tab title. -#### `tab.setBadge(badge)` - -Set tab badge. - -#### `tab.getBadge()` - -Get current tab badge. - -#### `tab.setIcon (iconURL, icon)` - -Set tab icon (a iconURL or an icon must be given). - -#### `tab.getIcon()` - -Get current tab icon URL / icon. - #### `tab.setPosition(newPosition)` Move tab to the specified position. See [`tabGroup.getTabByPosition`](#tabgroupgettabbypositionposition) for information about positions. @@ -222,8 +203,6 @@ The following events are emitted: * `tab.on("webview-ready", (tab) => { ... });` * `tab.on("webview-dom-ready", (tab) => { ... });` * `tab.on("title-changed", (title, tab) => { ... });` -* `tab.on("badge-changed", (badge, tab) => { ... });` -* `tab.on("icon-changed", (icon, tab) => { ... });` * `tab.on("active", (tab) => { ... });` * `tab.on("inactive", (tab) => { ... });` * `tab.on("visible", (tab) => { ... });` @@ -259,15 +238,12 @@ Since `TabGroup` is a Web Component you won't be able to change its styles direc ``` -This method is particularly useful when you need to define custom badges or tab styles: +This method is particularly useful when you need to define tab styles: ```html