Search texts and states, help tooltip, wider field (F4)
materio_sapi: result messages with real plurals; without any exact match the results are called close (the neighbour search always finds some). Former help sentence of the base page kept, French corrected. Messages in SearchMessage, unit tested; French added by update 11002. materiotheme: placeholder "Describe the material you are looking for", wider search field, "?" button with a help tooltip and clickable examples, "Loading…", "End of results"; texts in vuejs/i18n/search.js. Page title "Base" restored without a search (keys is an array, test its length). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div id="Base">
|
||||
<div class="loading" v-if="!searchinfos">
|
||||
<span>{{ $t('default.Loading…') }}</span>
|
||||
<span>{{ text.loading }}</span>
|
||||
</div>
|
||||
<div class="cards-list" v-else>
|
||||
<!-- aria-live: screen readers announce the result message of each search (F1). -->
|
||||
@@ -9,7 +9,7 @@
|
||||
{{ searchinfos }}
|
||||
</aside>
|
||||
<div class="loading" v-if="!items.length & !noresults">
|
||||
<span>{{ $t('default.Loading…') }}</span>
|
||||
<span>{{ text.loading }}</span>
|
||||
</div>
|
||||
<ul v-else>
|
||||
<li v-for="item in displayedItems" v-bind:key="item.id">
|
||||
@@ -22,7 +22,7 @@
|
||||
:identifier="searchId"
|
||||
@infinite="nextPage"
|
||||
>
|
||||
<div slot="no-more">No more results</div>
|
||||
<div slot="no-more">{{ text.end }}</div>
|
||||
</infinite-loading>
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,6 +35,7 @@ import Card from 'vuejs/components/Content/Card'
|
||||
import CardThematique from 'vuejs/components/Content/CardThematique'
|
||||
|
||||
import { mapState, mapActions } from 'vuex'
|
||||
import { searchTexts } from 'vuejs/i18n/search'
|
||||
|
||||
export default {
|
||||
name: "Base",
|
||||
@@ -54,6 +55,7 @@ export default {
|
||||
searchId: state => state.Search.searchId,
|
||||
keys: state => state.Search.keys
|
||||
}),
|
||||
text: searchTexts,
|
||||
// items is a sparse array (pages placed by offset); drop the holes left by
|
||||
// pages that returned fewer results than the limit before rendering.
|
||||
displayedItems () {
|
||||
|
||||
Reference in New Issue
Block a user