30dfbce426
Per the design rule "italic is for emphasis, not for design", removed
every chrome `font-style: italic` declaration across the frontend.
42 declarations gone across 24 files: empty-state placeholder copy,
loading messages, "no results" hints, ghost text, voice/role labels,
field placeholder text, brand wordmark, et al.
Markdown content emphasis is unaffected — `<em>` and `<i>` tags from
`*emphasis*` markup still render italic via browser default styling
(prose.css doesn't override em behavior). User-typed emphasis in
notes, journal entries, and chat messages keeps its italic.
Specific spots that lost the decorative italic:
- KnowledgeView .filter-label, .empty-narrator
- NoteEditorView .ef-label, link-suggest related
- ChatPanel .empty-msg, .empty-greeting, .role-label
- ChatMessage .role-assistant .role-label (the "Fable" voice tag —
was italic per the doc's Illuminated Transcript spec, but per the
new typography rule the speaker tag stays regular and lets the
border-left + glow do the bubble framing on their own)
- AppHeader .brand-text ("Fabled" wordmark)
- editor-shared.css .title-input::placeholder
- ProjectView .project-title-input::placeholder
- HomeView .urgency-loading
- WorkspaceTaskPanel .empty-group
- WeatherCard .weather-unavailable
- SharedWithMeView .empty-msg
- DiffView empty-state spans
- ToolCallCard .tool-event-more
- SettingsView 7 spots (.you-label, .geo-pending, hint text, etc.)
- + several other empty-state / hint text spots
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
157 lines
4.0 KiB
Vue
157 lines
4.0 KiB
Vue
<script setup lang="ts">
|
|
import { X } from "lucide-vue-next";
|
|
import { onMounted } from 'vue'
|
|
import { useRouter } from 'vue-router'
|
|
import { useNotificationsStore } from '@/stores/notifications'
|
|
import { relativeTime } from '@/composables/useRelativeTime'
|
|
|
|
const emit = defineEmits<{ close: [] }>()
|
|
const store = useNotificationsStore()
|
|
const router = useRouter()
|
|
|
|
const typeIcon: Record<string, string> = {
|
|
project_shared: '📁',
|
|
note_shared: '📝',
|
|
group_added: '👥',
|
|
}
|
|
|
|
async function handleClick(notif: { id: number; payload: Record<string, unknown> }) {
|
|
await store.markRead(notif.id)
|
|
const url = notif.payload.url as string | undefined
|
|
if (url) {
|
|
emit('close')
|
|
router.push(url)
|
|
}
|
|
}
|
|
|
|
onMounted(() => store.fetchAll())
|
|
</script>
|
|
|
|
<template>
|
|
<div class="notif-panel" role="dialog" aria-label="Notifications">
|
|
<header class="notif-panel-header">
|
|
<span class="notif-panel-title">Notifications</span>
|
|
<button
|
|
v-if="store.count > 0"
|
|
class="btn-mark-all"
|
|
@click="store.markAll()"
|
|
>Mark all read</button>
|
|
</header>
|
|
|
|
<ul class="notif-list" v-if="store.items.length">
|
|
<li
|
|
v-for="n in store.items"
|
|
:key="n.id"
|
|
class="notif-item"
|
|
@click="handleClick(n)"
|
|
>
|
|
<span class="notif-icon">{{ typeIcon[n.type] ?? '🔔' }}</span>
|
|
<div class="notif-body">
|
|
<p class="notif-msg">
|
|
<strong v-if="n.payload.invited_by">{{ n.payload.invited_by }}</strong>
|
|
{{ n.type === 'project_shared'
|
|
? ` shared "${n.payload.project_title}" with you as ${n.payload.permission}`
|
|
: n.type === 'note_shared'
|
|
? ` shared "${n.payload.note_title}" with you as ${n.payload.permission}`
|
|
: ` added you to "${n.payload.group_name}" as ${n.payload.role}` }}
|
|
</p>
|
|
<span class="notif-time">{{ relativeTime(n.created_at) }}</span>
|
|
</div>
|
|
<button class="btn-notif-close" @click.stop="store.markRead(n.id)" aria-label="Dismiss"><X :size="16" /></button>
|
|
</li>
|
|
</ul>
|
|
<div v-else class="notif-empty">No unread notifications</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.notif-panel {
|
|
position: absolute;
|
|
top: calc(100% + 8px);
|
|
right: 0;
|
|
width: 340px;
|
|
max-height: 400px;
|
|
overflow-y: auto;
|
|
background: var(--color-surface);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
|
|
z-index: 500;
|
|
}
|
|
|
|
.notif-panel-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0.75rem 1rem;
|
|
border-bottom: 1px solid var(--color-border);
|
|
position: sticky;
|
|
top: 0;
|
|
background: var(--color-surface);
|
|
}
|
|
|
|
.notif-panel-title {
|
|
font-weight: 700;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.btn-mark-all {
|
|
background: none;
|
|
border: none;
|
|
color: var(--color-primary);
|
|
font-size: 0.78rem;
|
|
cursor: pointer;
|
|
padding: 0;
|
|
}
|
|
.btn-mark-all:hover { text-decoration: underline; }
|
|
|
|
.notif-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.notif-item {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 0.6rem;
|
|
padding: 0.75rem 1rem;
|
|
border-bottom: 1px solid var(--color-border);
|
|
cursor: pointer;
|
|
transition: background 0.1s;
|
|
}
|
|
.notif-item:last-child { border-bottom: none; }
|
|
.notif-item:hover { background: var(--color-hover); }
|
|
|
|
.notif-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 0.1rem; }
|
|
|
|
.notif-body { flex: 1; min-width: 0; }
|
|
.notif-msg {
|
|
margin: 0 0 0.2rem;
|
|
font-size: 0.85rem;
|
|
color: var(--color-text);
|
|
line-height: 1.4;
|
|
word-break: break-word;
|
|
}
|
|
.notif-time { font-size: 0.75rem; color: var(--color-muted); }
|
|
|
|
.btn-notif-close {
|
|
background: none;
|
|
border: none;
|
|
color: var(--color-muted);
|
|
cursor: pointer;
|
|
font-size: 0.8rem;
|
|
padding: 0.1rem 0.25rem;
|
|
flex-shrink: 0;
|
|
transition: color 0.1s;
|
|
}
|
|
.btn-notif-close:hover { color: var(--color-text); }
|
|
|
|
.notif-empty {
|
|
padding: 1.5rem;
|
|
text-align: center;
|
|
color: var(--color-muted);
|
|
font-size: 0.88rem;
|
|
}
|
|
</style>
|