openvibers/openvibe.search Commits

Search accepts open.shoes' model pages (#194)

OP OpenVibers committed 11 days ago · e75aa39fa3 · 2 files, +4 −0

Changes

ddiff --git a/server/config.js b/server/config.js
iindex 79bf8ca..ef4443d 100644
---- a/server/config.js
++++ b/server/config.js
@@@ -50,6 +50,8 @@ const DEFAULT_EVENT_OWNERS = ['wiki', 'blog', 'news', 'reviews', 'deals', 'coupo
// Record products (openvibe-publishing/search-feed, contracts 0.128.0): job listings, rental listings, help
// articles, item definitions and quests; the hosting catalog's plans and providers (contracts 0.145.0).
'work', 'rent', 'help', 'inventory', 'quest', 'host',
++ // open.shoes' model pages (contracts 0.273.0): every store's price for one shoe.
++ 'shoes',
// Owner-API writers listed so their front-page card and ?owner= filter exist: OpenVibe.Video's uploads (MediaHub,
// service id media-hub; an event type has no hyphen), OpenVibe.Food's checked recipes and OpenVibe.Bot's model pages.
'media-hub', 'food', 'bot'];
ddiff --git a/server/web/page.js b/server/web/page.js
iindex 3c4f497..4f8e087 100644
---- a/server/web/page.js
++++ b/server/web/page.js
@@@ -218,6 +218,7 @@ const SOURCES = {
'media-hub': ['OpenVibe.Video', 'Videos people upload and record, with AI captions.'],
food: ['OpenVibe.Food', 'Budget recipes, costed from the food list.'],
bot: ['OpenVibe.Bot', 'The robots you can drive from a browser, and how to connect each.'],
++ shoes: ['OpenVibe.Shoes', 'Shoe models with every store\'s price, the history and the size curve.'],
};
const ICON_OF = { sources: 'docs', 'media-hub': 'video' };
// What a count of each kind is called on the front page ("10,621 job listings"); a kind not named here is "documents".
@@@ -229,6 +230,7 @@ const KIND_WORDS = {
'coupons/merchant': ['store', 'stores'], 'help/article': ['help article', 'help articles'], 'blog/post': ['blog post', 'blog posts'], 'inventory/definition': ['item', 'items'],
'quest/quest': ['quest', 'quests'], 'bot/model': ['robot model', 'robot models'], 'wiki/page': ['wiki page', 'wiki pages'], 'news/story': ['story', 'stories'],
'deals/offer': ['deal', 'deals'], 'games/world': ['creator world', 'creator worlds'], 'media-hub/video': ['video', 'videos'], 'food/recipe': ['recipe', 'recipes'],
++ 'shoes/shoe': ['shoe model', 'shoe models'],
};
const fmt = (n) => Number(n).toLocaleString('en-US');
const kindWords = (owner, type, n) => { const w = KIND_WORDS[`${owner}/${type}`]; return `${fmt(n)} ${w ? w[n === 1 ? 0 : 1] : n === 1 ? 'document' : 'documents'}`; };