Skip to content

Commit cd36896

Browse files
committed
more simplifications to tsunami now that we have tsunamidirect
1 parent 5925b66 commit cd36896

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

frontend/app/view/tsunami/tsunami.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ class TsunamiViewModel extends WebViewModel {
113113
}
114114

115115
resyncController() {
116-
const blockData = globalStore.get(this.blockAtom);
117-
if (blockData?.meta?.["tsunami:url"]) return;
118116
this.doControllerResync(false, "resync", false);
119117
}
120118

@@ -180,19 +178,8 @@ class TsunamiViewModel extends WebViewModel {
180178
}
181179
}
182180

183-
// NOTE: label-string matching is brittle — if WebViewModel ever renames these items this will silently break.
184-
// A cleaner fix would be giving menu items stable IDs in WebViewModel, but that's a larger refactor.
185-
getPromotedContextMenuItems(): ContextMenuItem[] {
186-
const items = super.getSettingsMenuItems();
187-
return items.filter((item) => {
188-
const label = item.label || "";
189-
return label === "Copy URL to Clipboard" || label === "Set Zoom Factor" || label.includes("DevTools");
190-
});
191-
}
192-
193181
getSettingsMenuItems(): ContextMenuItem[] {
194182
const items = super.getSettingsMenuItems();
195-
// NOTE: same label-string brittleness as getPromotedContextMenuItems above.
196183
const filteredItems = items.filter((item) => {
197184
const label = item.label?.toLowerCase() || "";
198185
return (
@@ -204,11 +191,6 @@ class TsunamiViewModel extends WebViewModel {
204191
});
205192

206193
const blockData = globalStore.get(this.blockAtom);
207-
if (blockData?.meta?.["tsunami:url"]) {
208-
return filteredItems;
209-
}
210-
211-
// Check if we should show the Remix option
212194
const appId = blockData?.meta?.["tsunami:appid"];
213195
const showRemixOption = appId && appId.startsWith("local/");
214196

0 commit comments

Comments
 (0)