feat(mobile): bouton assistant AI central dans la barre du bas
CI / lint (push) Successful in 57s
CI / security (push) Successful in 39s
CI / test (push) Successful in 1m16s
CI / build (push) Successful in 43s
CI / e2e (push) Successful in 19m16s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
CI / lint (push) Successful in 57s
CI / security (push) Successful in 39s
CI / test (push) Successful in 1m16s
CI / build (push) Successful in 43s
CI / e2e (push) Successful in 19m16s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
Sur mobile, la pastille flottante etait masquee par la barre d'outils. - Masque .ai-fab sur mobile - Ajoute un bouton rond sureleve #mt-ai au centre de la barre (5 items) - Extrait openAssistant() dans ai-fab.js (reutilise par la FAB et le bouton mobile) - mobile-toolbar.js : branche le bouton sur openAssistant()
This commit is contained in:
@@ -23,7 +23,10 @@ function syncVisibility() {
|
||||
_fab.setAttribute('aria-label', label);
|
||||
}
|
||||
|
||||
async function onClick() {
|
||||
// Shared entry point used by the floating FAB and the mobile toolbar button.
|
||||
// Reopens a collapsed panel, otherwise opens (or re-focuses) the assistant
|
||||
// for the current application context.
|
||||
export async function openAssistant() {
|
||||
const panel = document.querySelector('.bookslm-panel');
|
||||
// Collapsed panel: reveal it instead of reopening.
|
||||
if (panel && panel.classList.contains('open') && panel.classList.contains('hidden')) {
|
||||
@@ -34,6 +37,10 @@ async function onClick() {
|
||||
await booksLM.openForCurrentContext();
|
||||
}
|
||||
|
||||
async function onClick() {
|
||||
await openAssistant();
|
||||
}
|
||||
|
||||
export function initAIFab() {
|
||||
if (_fab) return;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Phases 1-5: fixed bar, vault home, file palette, commands, tab switcher */
|
||||
import { state } from './state.js';
|
||||
import { TabManager } from './ui.js';
|
||||
import { openAssistant } from './ai-fab.js';
|
||||
|
||||
// ── Open file palette (search files) ──
|
||||
function openFilePalette() {
|
||||
@@ -109,6 +110,7 @@ function toggleExplorer() {
|
||||
export function initMobileToolbar() {
|
||||
const explorerBtn = document.getElementById('mt-explorer');
|
||||
const searchBtn = document.getElementById('mt-search');
|
||||
const aiBtn = document.getElementById('mt-ai');
|
||||
const paletteBtn = document.getElementById('mt-palette');
|
||||
const tabsBtn = document.getElementById('mt-tabs');
|
||||
const sheetClose = document.getElementById('mt-sheet-close');
|
||||
@@ -117,6 +119,7 @@ export function initMobileToolbar() {
|
||||
|
||||
if (explorerBtn) explorerBtn.addEventListener('click', toggleExplorer);
|
||||
if (searchBtn) searchBtn.addEventListener('click', openFilePalette);
|
||||
if (aiBtn) aiBtn.addEventListener('click', () => { openAssistant(); });
|
||||
if (paletteBtn) paletteBtn.addEventListener('click', openCommandPalette);
|
||||
if (tabsBtn) tabsBtn.addEventListener('click', openTabSwitcher);
|
||||
if (sheetClose) sheetClose.addEventListener('click', closeTabSwitcher);
|
||||
|
||||
Reference in New Issue
Block a user