cleanup project
This commit is contained in:
17
assets/toolbar.ts
Normal file
17
assets/toolbar.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { defineToolbarApp } from "astro/toolbar";
|
||||
|
||||
export default defineToolbarApp({
|
||||
init(_canvas, app, server) {
|
||||
let pending = false;
|
||||
|
||||
// const button = document.querySelector("astro-dev-toolbar")?.shadowRoot.querySelector("button[data-app-id='astro-pocketbase-continue']");
|
||||
|
||||
app.onToggled(({ state }) => {
|
||||
if (!state) return;
|
||||
app.toggleNotification({ level: "error", state: true });
|
||||
if (pending) return;
|
||||
pending = true;
|
||||
server.send("astro-pocketbase-continue:refresh", undefined);
|
||||
});
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user