From ceb6023208f94334425e80b80a6c8eea4a9a855a Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 27 Dec 2025 18:43:17 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=9F=20Adds=20Quantum=20file=20browser?= =?UTF-8?q?=20widget=20(#1966)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/widgets.md | 72 +++++ src/components/Widgets/Filebrowser.vue | 406 +++++++++++++++++++++++++ src/components/Widgets/WidgetBase.vue | 1 + 3 files changed, 479 insertions(+) create mode 100644 src/components/Widgets/Filebrowser.vue diff --git a/docs/widgets.md b/docs/widgets.md index 7b495546..0ff74199 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -70,6 +70,7 @@ Dashy has support for displaying dynamic content in the form of widgets. There a - [Sabnzbd](#sabnzbd) - [Gluetun VPN Info](#gluetun-vpn-info) - [Drone CI Build](#drone-ci-builds) + - [Filebrowser](#filebrowser) - [Linkding](#linkding) - [Uptime Kuma](#uptime-kuma) - [Uptime Kuma Status Page](#uptime-kuma-status-page) @@ -2606,6 +2607,77 @@ Display the last builds from a [Drone CI](https://www.drone.ci) instance. A self --- +### Filebrowser + +Displays storage statistics and file listings from a [Filebrowser Quantum](https://github.com/gtsteffaniak/filebrowser) instance. Shows directory size, file/folder counts, favorite files, and recently modified files with quick-access links. + +#### Options + +**Field** | **Type** | **Required** | **Description** +--- | --- | --- | --- +**`hostname`** | `string` | Required | The URL of your Filebrowser instance +**`apiKey`** | `string` | Required | A long-lived API key (create in Settings → API Keys) +**`source`** | `string` | _Optional_ | The source/scope name to browse. Defaults to the first available source +**`path`** | `string` | _Optional_ | The directory path to display. Defaults to `/` +**`favorites`** | `array` | _Optional_ | List of filenames to show as quick-access favorites +**`showRecent`** | `number` | _Optional_ | Number of recently modified files to display. Defaults to `5`, set to `0` to disable +**`limit`** | `number` | _Optional_ | Maximum number of files to display per section. Defaults to `10` +**`hideStats`** | `boolean` | _Optional_ | If `true`, hides the storage statistics section +**`hideFavorites`** | `boolean` | _Optional_ | If `true`, hides the favorites section +**`hideRecent`** | `boolean` | _Optional_ | If `true`, hides the recent files section +**`showDetailedStats`** | `boolean` | _Optional_ | If `true`, shows additional statistics including last modified date, largest file, hidden file count, total items, and file type breakdown. Defaults to `false` + +#### Example + +**Basic usage:** + +```yaml +- type: filebrowser + useProxy: true + options: + hostname: http://filebrowser.local:8080 + apiKey: VUE_APP_FILEBROWSER_KEY + source: Documents + path: / + showRecent: 5 + favorites: + - important-notes.txt + - config.yaml +``` + +**With detailed statistics:** + +```yaml +- type: filebrowser + useProxy: true + options: + hostname: http://filebrowser.local:8080 + apiKey: VUE_APP_FILEBROWSER_KEY + source: Downloads + showDetailedStats: true + showRecent: 10 + limit: 15 +``` + +#### Widget Sections + +The widget displays up to four sections: + +1. **Storage Stats** - Directory name, total size, file and folder counts +2. **Detailed Stats** (optional) - Last modified date, largest file, hidden file count, total items, and file type breakdown with badges +3. **Favorites** - Quick-access links to user-specified files +4. **Recent Files** - Most recently modified files sorted by date + +#### Info + +- **CORS**: 🟠 Proxied +- **Auth**: 🟢 Required +- **Price**: 🟢 Free +- **Host**: Self-Hosted (see [Filebrowser Quantum](https://github.com/gtsteffaniak/filebrowser)) +- **Privacy**: _Self-Hosted_ + +--- + ### Linkding Linkding is a self-hosted bookmarking service, which has a clean interface and is simple to set up. This lists the links, filterable by tags. diff --git a/src/components/Widgets/Filebrowser.vue b/src/components/Widgets/Filebrowser.vue new file mode 100644 index 00000000..b0e54ca9 --- /dev/null +++ b/src/components/Widgets/Filebrowser.vue @@ -0,0 +1,406 @@ + + + + + diff --git a/src/components/Widgets/WidgetBase.vue b/src/components/Widgets/WidgetBase.vue index b6ccf9b3..891f3313 100644 --- a/src/components/Widgets/WidgetBase.vue +++ b/src/components/Widgets/WidgetBase.vue @@ -63,6 +63,7 @@ const COMPAT = { embed: 'EmbedWidget', 'eth-gas-prices': 'EthGasPrices', 'exchange-rates': 'ExchangeRates', + filebrowser: 'Filebrowser', 'flight-data': 'Flights', 'github-profile-stats': 'GitHubProfile', 'github-trending-repos': 'GitHubTrending',