Clicking an icon on the left strip now opens the service inside a dedicated 380-px mini-view (quickPanel) next to the strip, Opera-style, instead of a new full-sized tab. Click the active icon again to close the panel; click a different one to switch. If the panel is already pointed at the same host, we skip the loadURL so scroll position, open chat and login state survive a close+reopen round-trip. Icons now paint as real brand SVGs (Messenger, WhatsApp, Telegram, X, YouTube, Spotify) with their official colours, bundled inside quicklinks.html so no external favicon fetch leaks the fact that the strip is loaded. Unknown ids fall back to a letter chip. The strip vertically centres the icons between two flex spacers to match Opera's layout. Defaults ship Messenger, WhatsApp, Telegram, X, YouTube and Spotify. The Settings › General › Quick links section still lists / adds / removes entries and toggles the strip.
8 lines
439 B
JavaScript
8 lines
439 B
JavaScript
const { contextBridge, ipcRenderer } = require("electron");
|
|
contextBridge.exposeInMainWorld("quicklinks", {
|
|
getState: () => ipcRenderer.invoke("quicklinks-get-state"),
|
|
open: (id) => ipcRenderer.invoke("quicklinks-open", String(id || "")),
|
|
close: () => ipcRenderer.invoke("quicklinks-close"),
|
|
add: () => ipcRenderer.invoke("quicklinks-add"),
|
|
onState: (cb) => ipcRenderer.on("quicklinks-state", (_e, d) => cb(d)),
|
|
});
|