Skip to content

Commit afc49c5

Browse files
committed
distinguish between the dev version of the extension and the one pushed to the store
1 parent 6941534 commit afc49c5

File tree

5 files changed

+19
-6
lines changed

5 files changed

+19
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
55

66
## [Unreleased]
77

8+
### Added
9+
10+
- Distinguish the extension installed in dev mode from the one installed from the Chrome Web Store.
11+
812
## [1.0.1] - 2025-11-28
913

1014
### Fixed

manifest.config.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ import { defineManifest } from "@crxjs/vite-plugin";
22

33
import pkg from "./package.json";
44

5-
export default defineManifest({
5+
export default defineManifest(async (env) => ({
66
manifest_version: 3,
7-
name: "IndexedDB Browser",
7+
name:
8+
env.mode === "development"
9+
? "IndexedDB Browser (DEV)"
10+
: "IndexedDB Browser",
811
version: pkg.version,
912
description:
1013
"Chrome extension that adds a DevTools panel to add, edit, delete and view IndexedDB data in a table.",
@@ -18,8 +21,11 @@ export default defineManifest({
1821
},
1922
devtools_page: "src/devtools/index.html",
2023
action: {
21-
default_icon: "public/idb-browser-48x48.png",
24+
default_icon:
25+
env.mode === "development"
26+
? "public/idb-browser-dev.png"
27+
: "public/idb-browser-48x48.png",
2228
default_popup: "src/popup.html",
2329
default_title: "IndexedDB Browser",
2430
},
25-
});
31+
}));

public/idb-browser-dev.png

2.25 KB
Loading

src/devtools/components/sidebar/AboutExtension.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ import pkg from "../../../../package.json";
22
import styles from "./AboutExtension.module.css";
33

44
export default function AboutExtension() {
5+
const version = () => (import.meta.env.DEV ? "DEV" : `v${pkg.version}`);
6+
57
return (
68
<div class={styles.about}>
79
<a
810
href="https://github.com/ghazi-git/indexeddb-browser/releases"
911
title="https://github.com/ghazi-git/indexeddb-browser/releases"
1012
target="_blank"
1113
>
12-
v{pkg.version}
14+
{version()}
1315
</a>
1416
<a
1517
href="https://github.com/ghazi-git/indexeddb-browser/issues"

src/devtools/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
chrome.devtools.panels.create("IndexedDB", "", "/src/devtools/panel.html");
1+
const panelName = import.meta.env.DEV ? "IndexedDB (DEV)" : "IndexedDB";
2+
chrome.devtools.panels.create(panelName, "", "/src/devtools/panel.html");

0 commit comments

Comments
 (0)