Foundry and discord bot
All checks were successful
Build and Deploy Nuxt / build (push) Successful in 1m51s
All checks were successful
Build and Deploy Nuxt / build (push) Successful in 1m51s
This commit is contained in:
@@ -1,28 +1,43 @@
|
||||
<script setup>
|
||||
import { computed, onMounted, ref, watch } from 'vue';
|
||||
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { useCampaignService } from '~/services/Campaign.js';
|
||||
import { emitter } from '~/services/Emitter';
|
||||
import Server from '~/services/Server';
|
||||
import { CreateWindow } from '~/services/Windows';
|
||||
import { ClearWindow, CreateWindow, GetFirstWindowId } from '~/services/Windows';
|
||||
import { HideContextMenu, ShowContextMenu } from '~/services/ContextMenu';
|
||||
import NestedNoteList from './NestedNoteList.vue';
|
||||
|
||||
const { Campaign } = useCampaignService();
|
||||
const { t } = useI18n();
|
||||
const notes = ref([]);
|
||||
const folders = ref([]);
|
||||
const actors = ref([]);
|
||||
const items = ref([]);
|
||||
const loadingNotes = ref(false);
|
||||
const loadingEntries = ref(false);
|
||||
const notesError = ref('');
|
||||
const entriesError = ref('');
|
||||
const sidebarCollapsed = ref(false);
|
||||
const activeSection = ref('notes');
|
||||
const isDragOverSidebar = ref(false);
|
||||
const expandedFolderIds = ref([]);
|
||||
const expandedEntryIds = ref([]);
|
||||
const nestedNoteListRef = ref(null);
|
||||
let actorRefreshInterval;
|
||||
|
||||
async function handleSidebarDrop(event) {
|
||||
if (activeSection.value !== 'notes') return;
|
||||
const noteKey = event.dataTransfer.getData('text/plain');
|
||||
if (!noteKey) return;
|
||||
try {
|
||||
await Server().post('/note/update', { id: noteKey, folder: null });
|
||||
fetchCampaignNotes();
|
||||
if (nestedNoteListRef.value) {
|
||||
nestedNoteListRef.value.clearCacheAndReloadExpanded();
|
||||
} else {
|
||||
fetchCampaignNotes();
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
@@ -58,7 +73,13 @@ function handleNoteCreated(note) {
|
||||
};
|
||||
|
||||
notes.value = notes.value.filter((currentNote) => currentNote.key !== createdNote.key);
|
||||
notes.value.unshift(createdNote);
|
||||
|
||||
// Notes created inside a folder are added by NestedNoteList's own cache handler
|
||||
const noteFolderId = note.folder?._id ?? note.folder ?? null;
|
||||
if (!noteFolderId) {
|
||||
notes.value.unshift(createdNote);
|
||||
}
|
||||
|
||||
openNote(createdNote);
|
||||
}
|
||||
|
||||
@@ -70,6 +91,32 @@ function handleNoteRenamed(data) {
|
||||
emitter.emit('title-updated', { key: data.key, title: data.title });
|
||||
}
|
||||
|
||||
function handleNoteDeleted(noteKey) {
|
||||
notes.value = notes.value.filter(n => n.key !== noteKey);
|
||||
}
|
||||
|
||||
function handleFolderSaved() {
|
||||
fetchCampaignNotes();
|
||||
}
|
||||
|
||||
function handleFolderDeleted(folderId) {
|
||||
expandedFolderIds.value = expandedFolderIds.value.filter((id) => id !== folderId);
|
||||
}
|
||||
|
||||
function handleCampaignEntryCreated({ entityType, entry }) {
|
||||
if (!entry || (entry.campaign && String(entry.campaign) !== String(campaignId.value))) return;
|
||||
const list = entityType === 'actor' ? actors : items;
|
||||
list.value = [...list.value.filter((current) => current._id !== entry._id), entry]
|
||||
.sort((a, b) => a.name.localeCompare(b.name));
|
||||
}
|
||||
|
||||
function handleCampaignEntryUpdated({ entityType, entry }) {
|
||||
if (!entry) return;
|
||||
const list = entityType === 'actor' ? actors : items;
|
||||
list.value = list.value.map((current) => current._id === entry._id ? entry : current)
|
||||
.sort((a, b) => a.name.localeCompare(b.name));
|
||||
}
|
||||
|
||||
const campaignId = computed(() => {
|
||||
return Campaign.value?._id ?? Campaign.value?.id ?? null;
|
||||
});
|
||||
@@ -111,24 +158,97 @@ async function fetchCampaignNotes() {
|
||||
}
|
||||
}
|
||||
|
||||
async function createNote() {
|
||||
async function fetchCampaignEntries(entityType = activeSection.value, silent = false) {
|
||||
if (!campaignId.value || !['actors', 'items'].includes(entityType)) return;
|
||||
if (!silent) {
|
||||
loadingEntries.value = true;
|
||||
entriesError.value = '';
|
||||
}
|
||||
try {
|
||||
const collection = entityType === 'actors' ? 'actor' : 'item';
|
||||
const response = await Server().get(`/${collection}/list`, { params: { campaign: campaignId.value } });
|
||||
if (response.data.status !== 'ok') {
|
||||
if (!silent) entriesError.value = response.data.msg ?? t('campaigns.errors.load');
|
||||
return;
|
||||
}
|
||||
if (entityType === 'actors') {
|
||||
const previousById = new Map(actors.value.map((actor) => [actor._id, actor]));
|
||||
actors.value = response.data.actors;
|
||||
for (const actor of actors.value) {
|
||||
const previous = previousById.get(actor._id);
|
||||
if (previous && JSON.stringify(previous) !== JSON.stringify(actor)) {
|
||||
emitter.emit('campaign-entry-updated', { entityType: 'actor', entry: actor });
|
||||
}
|
||||
}
|
||||
} else {
|
||||
items.value = response.data.items;
|
||||
}
|
||||
} catch (error) {
|
||||
if (!silent) entriesError.value = t('campaigns.errors.load');
|
||||
} finally {
|
||||
if (!silent) loadingEntries.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
function selectSection(section) {
|
||||
activeSection.value = section;
|
||||
if (section === 'actors' || section === 'items') fetchCampaignEntries(section);
|
||||
}
|
||||
|
||||
function createEntry(entityType) {
|
||||
if (!campaignId.value) return;
|
||||
CreateWindow('create_campaign_entry', { entityType, campaign: campaignId.value });
|
||||
}
|
||||
|
||||
function entrySummary(actor) {
|
||||
const bits = [t(`campaigns.actor.types.${actor.type}`)];
|
||||
if (actor.species) bits.push(actor.species);
|
||||
if (actor.className) bits.push(actor.className);
|
||||
if (actor.level) bits.push(`${t('campaigns.actor.level-short')} ${actor.level}`);
|
||||
if (actor.challengeRating) bits.push(`${t('campaigns.actor.cr-short')} ${actor.challengeRating}`);
|
||||
return bits.join(' · ');
|
||||
}
|
||||
|
||||
function itemSummary(item) {
|
||||
return `${t(`campaigns.item.categories.${item.category}`)} · ${t(`campaigns.item.rarities.${item.rarity}`)} · ${t('campaigns.item.quantity-short')} ${item.quantity}`;
|
||||
}
|
||||
|
||||
function showEntryMenu(entry, entityType) {
|
||||
const collection = entityType === 'actor' ? 'actor' : 'item';
|
||||
ShowContextMenu([{
|
||||
name: t('campaigns.actions.delete'),
|
||||
icon: '/icons/iconoir/regular/trash.svg',
|
||||
action: async () => {
|
||||
try {
|
||||
const response = await Server().post(`/${collection}/delete`, { id: entry._id });
|
||||
if (response.data.status === 'ok') {
|
||||
if (entityType === 'actor') actors.value = actors.value.filter((actor) => actor._id !== entry._id);
|
||||
else items.value = items.value.filter((item) => item._id !== entry._id);
|
||||
}
|
||||
} catch (error) {} finally { HideContextMenu(); }
|
||||
}
|
||||
}]);
|
||||
}
|
||||
|
||||
function toggleEntryDetails(entryId) {
|
||||
expandedEntryIds.value = expandedEntryIds.value.includes(entryId)
|
||||
? expandedEntryIds.value.filter((id) => id !== entryId)
|
||||
: [...expandedEntryIds.value, entryId];
|
||||
}
|
||||
|
||||
async function openCharacterSheet(actor) {
|
||||
const existingWindowId = GetFirstWindowId('character_sheet');
|
||||
if (existingWindowId !== undefined) {
|
||||
ClearWindow({ id: existingWindowId });
|
||||
await nextTick();
|
||||
}
|
||||
CreateWindow('character_sheet', { actor });
|
||||
}
|
||||
|
||||
function createNote() {
|
||||
if (!Campaign.value) return;
|
||||
|
||||
const cid = Campaign.value?._id;
|
||||
|
||||
try {
|
||||
const response = await Server().post('/note/create', {
|
||||
title: 'New note',
|
||||
content: '',
|
||||
campaign: cid
|
||||
});
|
||||
|
||||
if (response.data.status !== 'ok') return;
|
||||
|
||||
emitter.emit('note-created', response.data.note);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
CreateWindow('new_note', { campaign: campaignId.value });
|
||||
}
|
||||
|
||||
function createFolder() {
|
||||
@@ -143,18 +263,46 @@ const rootNotes = computed(() => notes.value.filter(n => !n._folder));
|
||||
|
||||
watch(campaignId, (newVal) => {
|
||||
if (newVal) {
|
||||
actors.value = [];
|
||||
items.value = [];
|
||||
fetchCampaignNotes();
|
||||
if (activeSection.value === 'actors' || activeSection.value === 'items') fetchCampaignEntries(activeSection.value);
|
||||
} else {
|
||||
notes.value = [];
|
||||
folders.value = [];
|
||||
actors.value = [];
|
||||
items.value = [];
|
||||
notesError.value = '';
|
||||
entriesError.value = '';
|
||||
}
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
emitter.on('note-created', handleNoteCreated);
|
||||
emitter.on('note-renamed', handleNoteRenamed);
|
||||
emitter.on('delete-note', handleNoteDeleted);
|
||||
emitter.on('folder-saved', handleFolderSaved);
|
||||
emitter.on('folder-deleted', handleFolderDeleted);
|
||||
emitter.on('campaign-entry-created', handleCampaignEntryCreated);
|
||||
emitter.on('campaign-entry-updated', handleCampaignEntryUpdated);
|
||||
|
||||
if (campaignId.value) {
|
||||
fetchCampaignNotes();
|
||||
}
|
||||
actorRefreshInterval = setInterval(() => {
|
||||
if (activeSection.value === 'actors' && campaignId.value) fetchCampaignEntries('actors', true);
|
||||
}, 5000);
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
clearInterval(actorRefreshInterval);
|
||||
emitter.off('note-created', handleNoteCreated);
|
||||
emitter.off('note-renamed', handleNoteRenamed);
|
||||
emitter.off('delete-note', handleNoteDeleted);
|
||||
emitter.off('folder-saved', handleFolderSaved);
|
||||
emitter.off('folder-deleted', handleFolderDeleted);
|
||||
emitter.off('campaign-entry-created', handleCampaignEntryCreated);
|
||||
emitter.off('campaign-entry-updated', handleCampaignEntryUpdated);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -166,9 +314,9 @@ onMounted(() => {
|
||||
type="button"
|
||||
@click="toggleSidebar"
|
||||
:aria-expanded="(!sidebarCollapsed).toString()"
|
||||
aria-controls="campaign-notes-list"
|
||||
:title="sidebarCollapsed ? 'Expand notes' : 'Collapse notes'"
|
||||
:aria-label="sidebarCollapsed ? 'Expand notes' : 'Collapse notes'"
|
||||
aria-controls="campaign-section-list"
|
||||
:title="sidebarCollapsed ? t('campaigns.actions.expand-sidebar') : t('campaigns.actions.collapse-sidebar')"
|
||||
:aria-label="sidebarCollapsed ? t('campaigns.actions.expand-sidebar') : t('campaigns.actions.collapse-sidebar')"
|
||||
>
|
||||
<img
|
||||
class="sidebar-action-icon"
|
||||
@@ -180,72 +328,100 @@ onMounted(() => {
|
||||
|
||||
<button
|
||||
class="sidebar-action"
|
||||
type="button"
|
||||
@click="createNote"
|
||||
:disabled="!Campaign"
|
||||
title="New note"
|
||||
aria-label="New note"
|
||||
:class="{ selected: activeSection === 'notes' }"
|
||||
type="button" @click="selectSection('notes')"
|
||||
:title="t('campaigns.sections.notes')" :aria-label="t('campaigns.sections.notes')"
|
||||
:aria-pressed="(activeSection === 'notes').toString()"
|
||||
>
|
||||
<img class="sidebar-action-icon" src="/icons/iconoir/regular/plus.svg" alt="" aria-hidden="true">
|
||||
<img class="sidebar-action-icon" src="/icons/iconoir/regular/book.svg" alt="" aria-hidden="true">
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="sidebar-action"
|
||||
type="button"
|
||||
@click="createFolder"
|
||||
:disabled="!Campaign"
|
||||
title="New folder"
|
||||
aria-label="New folder"
|
||||
:class="{ selected: activeSection === 'actors' }"
|
||||
type="button" @click="selectSection('actors')"
|
||||
:title="t('campaigns.sections.actors')" :aria-label="t('campaigns.sections.actors')"
|
||||
:aria-pressed="(activeSection === 'actors').toString()"
|
||||
>
|
||||
<img class="sidebar-action-icon" src="/icons/iconoir/regular/folder.svg" alt="" aria-hidden="true">
|
||||
<img class="sidebar-action-icon" src="/icons/iconoir/regular/user.svg" alt="" aria-hidden="true">
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="sidebar-action"
|
||||
type="button"
|
||||
@click="fetchCampaignNotes"
|
||||
:disabled="!Campaign || loadingNotes"
|
||||
title="Refresh notes"
|
||||
aria-label="Refresh notes"
|
||||
:class="{ selected: activeSection === 'items' }"
|
||||
type="button" @click="selectSection('items')"
|
||||
:title="t('campaigns.sections.items')" :aria-label="t('campaigns.sections.items')"
|
||||
:aria-pressed="(activeSection === 'items').toString()"
|
||||
>
|
||||
<img class="sidebar-action-icon" src="/icons/iconoir/regular/refresh.svg" alt="" aria-hidden="true">
|
||||
<img class="sidebar-action-icon" src="/icons/iconoir/regular/box.svg" alt="" aria-hidden="true">
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<aside class="notes-sidebar" :class="{ collapsed: sidebarCollapsed }">
|
||||
<div class="sidebar-header">
|
||||
<div class="sidebar-copy">
|
||||
<span class="sidebar-eyebrow">Campaign</span>
|
||||
<strong class="sidebar-title">Notes</strong>
|
||||
<span class="sidebar-eyebrow">{{ t('campaigns.sidebar-label') }}</span>
|
||||
<strong class="sidebar-title">{{ t(`campaigns.sections.${activeSection}`) }}</strong>
|
||||
</div>
|
||||
<div class="sidebar-header-actions">
|
||||
<template v-if="activeSection === 'notes'">
|
||||
<button class="sidebar-action" type="button" @click="createNote" :disabled="!Campaign" :title="t('campaigns.actions.new-note')" :aria-label="t('campaigns.actions.new-note')">
|
||||
<img class="sidebar-action-icon" src="/icons/iconoir/regular/plus.svg" alt="" aria-hidden="true">
|
||||
</button>
|
||||
<button class="sidebar-action" type="button" @click="createFolder" :disabled="!Campaign" :title="t('campaigns.actions.new-folder')" :aria-label="t('campaigns.actions.new-folder')">
|
||||
<img class="sidebar-action-icon" src="/icons/iconoir/regular/folder.svg" alt="" aria-hidden="true">
|
||||
</button>
|
||||
<button class="sidebar-action" type="button" @click="fetchCampaignNotes" :disabled="!Campaign || loadingNotes" :title="t('campaigns.actions.refresh')" :aria-label="t('campaigns.actions.refresh')">
|
||||
<img class="sidebar-action-icon" src="/icons/iconoir/regular/refresh.svg" alt="" aria-hidden="true">
|
||||
</button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<button class="sidebar-action" type="button" @click="createEntry(activeSection === 'actors' ? 'actor' : 'item')" :disabled="!Campaign" :title="t('campaigns.actions.create', { section: t(`campaigns.sections.${activeSection}`).toLowerCase() })" :aria-label="t('campaigns.actions.create', { section: t(`campaigns.sections.${activeSection}`).toLowerCase() })">
|
||||
<img class="sidebar-action-icon" src="/icons/iconoir/regular/plus.svg" alt="" aria-hidden="true">
|
||||
</button>
|
||||
<button class="sidebar-action" type="button" @click="fetchCampaignEntries(activeSection)" :disabled="!Campaign || loadingEntries" :title="t('campaigns.actions.refresh')" :aria-label="t('campaigns.actions.refresh')">
|
||||
<img class="sidebar-action-icon" src="/icons/iconoir/regular/refresh.svg" alt="" aria-hidden="true">
|
||||
</button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-list-drop-wrap" :class="{ 'drag-over': isDragOverSidebar }" id="campaign-notes-list" @dragenter.self="isDragOverSidebar = true" @dragleave.self="isDragOverSidebar = false" @dragover.prevent @drop.stop="handleSidebarDrop">
|
||||
<div v-if="loadingNotes" class="sidebar-state">
|
||||
Loading notes...
|
||||
</div>
|
||||
<div class="sidebar-list-drop-wrap" :class="{ 'drag-over': activeSection === 'notes' && isDragOverSidebar }" id="campaign-section-list" @dragenter.self="isDragOverSidebar = true" @dragleave.self="isDragOverSidebar = false" @dragover.prevent @drop.stop="handleSidebarDrop">
|
||||
<template v-if="activeSection === 'notes'">
|
||||
<div v-if="loadingNotes" class="sidebar-state">{{ t('campaigns.states.loading-notes') }}</div>
|
||||
<div v-else-if="notesError" class="sidebar-state error">{{ notesError }}</div>
|
||||
<div v-else-if="folders.length === 0 && notes.length === 0" class="sidebar-state">{{ t('campaigns.states.empty-notes') }}</div>
|
||||
<NestedNoteList v-else ref="nestedNoteListRef"
|
||||
:parent-folder-id="null" :folders="folders" :notes="rootNotes" :campaign-id="campaignId"
|
||||
:expanded-folder-ids="expandedFolderIds" @open-note="openNote"
|
||||
@reload-notes="fetchCampaignNotes" @toggle-expanded-folder="toggleExpandedFolder" />
|
||||
</template>
|
||||
|
||||
<div v-else-if="notesError" class="sidebar-state error">
|
||||
{{ notesError }}
|
||||
</div>
|
||||
<template v-else-if="activeSection === 'actors'">
|
||||
<div v-if="loadingEntries" class="sidebar-state">{{ t('campaigns.states.loading') }}</div>
|
||||
<div v-else-if="entriesError" class="sidebar-state error">{{ entriesError }}</div>
|
||||
<div v-else-if="actors.length === 0" class="sidebar-state">{{ t('campaigns.states.empty-actors') }}</div>
|
||||
<div v-for="actor in actors" :key="actor._id" class="entity-entry" role="button" tabindex="0" @click="openCharacterSheet(actor)" @keydown.enter="openCharacterSheet(actor)" @keydown.space.prevent="openCharacterSheet(actor)" @contextmenu.prevent="showEntryMenu(actor, 'actor')">
|
||||
<span class="entity-entry-name">{{ actor.name }}</span>
|
||||
<span class="entity-entry-meta">{{ entrySummary(actor) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div v-else-if="folders.length === 0 && notes.length === 0" class="sidebar-state">
|
||||
No notes in this campaign yet.
|
||||
</div>
|
||||
|
||||
<template v-else>
|
||||
<NestedNoteList ref="nestedNoteListRef"
|
||||
:parent-folder-id="null"
|
||||
:folders="folders"
|
||||
:notes="rootNotes"
|
||||
:campaign-id="campaignId"
|
||||
:expanded-folder-ids="expandedFolderIds"
|
||||
@open-note="openNote"
|
||||
@reload-notes="fetchCampaignNotes"
|
||||
@toggle-expanded-folder="toggleExpandedFolder"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
<template v-else>
|
||||
<div v-if="loadingEntries" class="sidebar-state">{{ t('campaigns.states.loading') }}</div>
|
||||
<div v-else-if="entriesError" class="sidebar-state error">{{ entriesError }}</div>
|
||||
<div v-else-if="items.length === 0" class="sidebar-state">{{ t('campaigns.states.empty-items') }}</div>
|
||||
<div v-for="item in items" :key="item._id" class="entity-entry" role="button" tabindex="0" :aria-expanded="expandedEntryIds.includes(item._id)" @click="toggleEntryDetails(item._id)" @keydown.enter="toggleEntryDetails(item._id)" @keydown.space.prevent="toggleEntryDetails(item._id)" @contextmenu.prevent="showEntryMenu(item, 'item')">
|
||||
<span class="entity-entry-name">{{ item.name }}</span>
|
||||
<span class="entity-entry-meta">{{ itemSummary(item) }}</span>
|
||||
<template v-if="expandedEntryIds.includes(item._id)">
|
||||
<span v-if="item.weight !== undefined" class="entity-entry-description">{{ item.weight }} lb</span>
|
||||
<span v-if="item.properties" class="entity-entry-description">{{ item.properties }}</span>
|
||||
<span v-if="item.description" class="entity-entry-description">{{ item.description }}</span>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</template>
|
||||
@@ -258,8 +434,8 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
.sidebar-actions {
|
||||
width: 32px;
|
||||
min-width: 32px;
|
||||
width: 46px;
|
||||
min-width: 46px;
|
||||
padding: 8px 6px;
|
||||
border-right: 1px solid var(--color-border);
|
||||
background-color: var(--color-background-light);
|
||||
@@ -284,6 +460,11 @@ onMounted(() => {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sidebar-action.selected {
|
||||
background: var(--color-button-hover);
|
||||
border-color: var(--color-link);
|
||||
}
|
||||
|
||||
.sidebar-action:hover {
|
||||
background: var(--color-button-hover);
|
||||
}
|
||||
@@ -322,11 +503,16 @@ onMounted(() => {
|
||||
box-sizing: border-box;
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.sidebar-header-actions { display: flex; align-items: center; gap: 4px; }
|
||||
.sidebar-header-actions .sidebar-action { width: 30px; height: 30px; }
|
||||
.sidebar-header-actions .sidebar-action-icon { width: 16px; height: 16px; }
|
||||
|
||||
.sidebar-copy {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -374,6 +560,17 @@ onMounted(() => {
|
||||
color: #9e2a2b;
|
||||
}
|
||||
|
||||
.entity-entry {
|
||||
width: 100%; padding: 9px 10px; border: 1px solid transparent; border-radius: 8px;
|
||||
background: transparent; color: var(--color-text); text-align: left; display: flex; flex-direction: column;
|
||||
gap: 3px; cursor: pointer;
|
||||
}
|
||||
.entity-entry:hover { border-color: var(--color-border); background: var(--color-background-soft); }
|
||||
.entity-entry:focus-visible { outline: 1px solid var(--color-link); }
|
||||
.entity-entry-name { font-weight: bold; }
|
||||
.entity-entry-meta, .entity-entry-description { font-size: 12px; opacity: 0.72; }
|
||||
.entity-entry-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.notes-sidebar {
|
||||
width: 220px;
|
||||
|
||||
Reference in New Issue
Block a user