diff --git a/README.md b/README.md index a7024da..a7c8151 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ This extension supports GNOME Shell `45` -> `49`. - **Avatar Support**: Circular avatars with persistent local caching. - **QR Code Sharing**: Integrated QR generator for room IDs. -## Configuration +### Configuration Open the extension settings to configure: - **Homeserver URL**: Your Matrix homeserver (e.g., `https://matrix.org`). @@ -59,6 +59,15 @@ Open the extension settings to configure: - **Client Type**: Choose between Web, Element, or Fractal. - **QR Code**: Enable or disable QR code sharing. +#### 🔑 How to get your Access Token (Element Desktop) + +1. Open **All Settings** and go to **Help and about** at the bottom of the left panel. +2. Scroll all the way down to **Advanced** and click the arrow in **Access Token** to expand it. +3. Click the copy button to copy it to the clipboard. + +> [!WARNING] +> **Be careful with your access token. It's sensitive!** Erase from your clipboard and clipboard history after use. + ## 🚀 Roadmap The goal of this project is to provide an ultra-lightweight navigation layer for the Matrix network, prioritizing productivity and quick access over message display. diff --git a/prefs.js b/prefs.js index 724cf36..b33bf66 100644 --- a/prefs.js +++ b/prefs.js @@ -32,8 +32,26 @@ export default class MatrixStatusPreferences extends ExtensionPreferences { settings.bind('homeserver-url', homeserverRow, 'text', Gio.SettingsBindFlags.DEFAULT); apiGroup.add(homeserverRow); - const tokenRow = new Adw.PasswordEntryRow({ title: 'Access Token' }); + // Access Token Row - Itt az EntryRow-t használjuk alapnak + const tokenRow = new Adw.PasswordEntryRow({ + title: 'Access Token', + }); settings.bind('access-token', tokenRow, 'text', Gio.SettingsBindFlags.DEFAULT); + + // Tooltip ikon hozzáadása közvetlenül a sor végére (suffix) + // Így nem kell külön sor, és vizuálisan az inputhoz tartozik + const tokenHelpIcon = new Gtk.Image({ + icon_name: 'help-about-symbolic', + tooltip_text: 'For Element Desktop users:\n' + + '1. Settings > Help & About (bottom left)\n' + + '2. Scroll down to Advanced > Access Token\n' + + '3. Copy the token\n\n' + + '⚠️ Sensitive data!', + valign: Gtk.Align.CENTER, + css_classes: ['dim-label'] // Diszkrétebb megjelenés + }); + + tokenRow.add_suffix(tokenHelpIcon); apiGroup.add(tokenRow); // Separator Group for visually dividing sections