fix: remove duplicate app name in app view header — show URL link in top header instead

This commit is contained in:
posimai 2026-03-22 22:55:52 +09:00
parent 597d3dc997
commit aa797b966f
1 changed files with 12 additions and 13 deletions

View File

@ -302,7 +302,7 @@
.empty-col { padding: 14px 8px; text-align: center; color: var(--text3); font-size: 12px; opacity: 0.7; } .empty-col { padding: 14px 8px; text-align: center; color: var(--text3); font-size: 12px; opacity: 0.7; }
/* ── App task view ── */ /* ── App task view ── */
#view-app.active { display: flex; flex-direction: column; } #view-app.active { display: block; }
.app-view-header { .app-view-header {
display: flex; display: flex;
@ -713,6 +713,7 @@
</button> </button>
<div class="header-dot" aria-hidden="true"></div> <div class="header-dot" aria-hidden="true"></div>
<span class="header-title" id="headerTitle">Board</span> <span class="header-title" id="headerTitle">Board</span>
<a id="headerAppLink" href="#" target="_blank" rel="noopener" style="display:none;font-size:11px;color:var(--text3);text-decoration:none;margin-left:6px;" onmouseover="this.style.color='var(--accent)'" onmouseout="this.style.color='var(--text3)'"></a>
</div> </div>
<button class="icon-btn" id="addHeaderBtn" aria-label="タスクを追加"> <button class="icon-btn" id="addHeaderBtn" aria-label="タスクを追加">
<i data-lucide="plus" style="width:18px;height:18px;stroke-width:2"></i> <i data-lucide="plus" style="width:18px;height:18px;stroke-width:2"></i>
@ -956,10 +957,18 @@ function switchView(view, appId) {
currentView = view; currentView = view;
currentApp = appId || null; currentApp = appId || null;
// Header title // Header title + app link
const titles = { board: 'Board', ideas: 'Ideas' }; const titles = { board: 'Board', ideas: 'Ideas' };
const title = view === 'app' ? shortName(appId) : (titles[view] || view); const title = view === 'app' ? shortName(appId) : (titles[view] || view);
document.getElementById('headerTitle').textContent = title; document.getElementById('headerTitle').textContent = title;
const appLink = document.getElementById('headerAppLink');
if (view === 'app' && appId !== 'global') {
appLink.href = `https://${appId}.vercel.app`;
appLink.textContent = `${appId}.vercel.app`;
appLink.style.display = '';
} else {
appLink.style.display = 'none';
}
// FAB visibility // FAB visibility
document.getElementById('fabBtn').style.display = view === 'ideas' ? 'none' : 'flex'; document.getElementById('fabBtn').style.display = view === 'ideas' ? 'none' : 'flex';
@ -1050,17 +1059,7 @@ function renderAppView(appId) {
const cutoff = new Date(); cutoff.setDate(cutoff.getDate() - 30); const cutoff = new Date(); cutoff.setDate(cutoff.getDate() - 30);
let html = `<div class="app-view-header"> let html = '<div class="board">';
<div class="app-view-icon">
<i data-lucide="${appId === 'global' ? 'globe' : 'package'}" style="width:15px;height:15px;stroke-width:1.75;color:var(--accent)"></i>
</div>
<span class="app-view-name">${shortName(appId)}</span>`;
if (appId !== 'global') {
html += `<a class="app-view-link" href="https://${appId}.vercel.app" target="_blank" rel="noopener">${appId}.vercel.app</a>`;
}
html += '</div>';
html += '<div class="board">';
for (const st of STATUSES) { for (const st of STATUSES) {
let col = appEntry.tasks.filter(t => t.status === st.id); let col = appEntry.tasks.filter(t => t.status === st.id);
if (st.id === 'done') { if (st.id === 'done') {