mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-30 21:04:59 +00:00
* feat(project): add recent viewed files section to project folder tree * feat(webui): disable toolbar buttons and context menu in recents page * test(core): optimize recents cap test execution time * feat(webui): show hint text in recents page top toolbar * feat(webui): rename recents section to Recently Viewed * refactor(core): consolidate recents methods into AssetService * fix(api): forward pagination parameters in folder children endpoint (#349) * fix(project-recents): scope views and disable recents mutations * fix(api): allow recent views in demo mode * fix(api): limit demo recent view exception to post
29 lines
1.0 KiB
JavaScript
Generated
29 lines
1.0 KiB
JavaScript
Generated
/* eslint-disable */
|
|
import { getLocale, experimentalStaticLocale } from '../runtime.js';
|
|
|
|
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
|
|
/** @typedef {{}} RecentsInputs */
|
|
|
|
const en_recents = /** @type {(inputs: RecentsInputs) => LocalizedString} */ () => {
|
|
return /** @type {LocalizedString} */ (`Recently Viewed`)
|
|
};
|
|
|
|
const zh_recents = /** @type {(inputs: RecentsInputs) => LocalizedString} */ () => {
|
|
return /** @type {LocalizedString} */ (`最近浏览`)
|
|
};
|
|
|
|
/**
|
|
* | output |
|
|
* | --- |
|
|
* | "Recently Viewed" |
|
|
*
|
|
* @param {RecentsInputs} inputs
|
|
* @param {{ locale?: "en" | "zh" }} options
|
|
* @returns {LocalizedString}
|
|
*/
|
|
export const recents = /** @type {((inputs?: RecentsInputs, options?: { locale?: "en" | "zh" }) => LocalizedString) & import('../runtime.js').MessageMetadata<RecentsInputs, { locale?: "en" | "zh" }, {}>} */ ((inputs = {}, options = {}) => {
|
|
const locale = experimentalStaticLocale ?? options.locale ?? getLocale()
|
|
if (locale === "en") return en_recents(inputs)
|
|
return zh_recents(inputs)
|
|
}); |