Files
NebulaBrowser/renderer/icons.js
T
andrew f04968c854 Redesign add bookmark popup and improve icon picker
Updated the add bookmark popup with a more modern Material card style, clearer field labels, and improved layout. The icon picker now fetches the full list of Material Icons asynchronously from Google Fonts, with a fallback to a minimal static set for immediate use. Enhanced the icon grid UI and selection logic for better usability.
2025-07-26 10:51:20 +12:00

21 lines
720 B
JavaScript

// This file is automatically generated from Google's Material Icons.
/**
* Fetches the full list of Material Icon names from Google Fonts.
* Returns an array of strings like ["3d_rotation","access_alarm",…]
*/
export async function fetchAllIcons() {
const res = await fetch("https://fonts.google.com/metadata/icons");
let txt = await res.text();
// strip the weird prefix )]}'\n
txt = txt.replace(/^\)\]\}'\s*/, "");
const json = JSON.parse(txt);
return json.icons.map(icon => icon.name);
}
// Fallback static array for immediate use (e.g. the "+" button and bookmark icons)
export const icons = [
'add',
'bookmark',
'star',
// …add any other icons your components expect synchronously…
];