mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
Update sorting options in home page and improve i18n translations
This commit is contained in:
@@ -158,6 +158,13 @@ export const i18nData = {
|
||||
"Set the description of the tag.": "Set the description of the tag.",
|
||||
"Use markdown format.": "Use markdown format.",
|
||||
"Tag: ": "Tag: ",
|
||||
"Select a Order": "Select a Order",
|
||||
"Time Ascending": "Time Ascending",
|
||||
"Time Descending": "Time Descending",
|
||||
"Views Ascending": "Views Ascending",
|
||||
"Views Descending": "Views Descending",
|
||||
"Downloads Ascending": "Downloads Ascending",
|
||||
"Downloads Descending": "Downloads Descending",
|
||||
}
|
||||
},
|
||||
"zh-CN": {
|
||||
@@ -319,15 +326,13 @@ export const i18nData = {
|
||||
"Set the description of the tag.": "设置标签的描述。",
|
||||
"Use markdown format.": "使用Markdown格式。",
|
||||
"Tag: ": "标签: ",
|
||||
|
||||
// 添加排序选项翻译
|
||||
"Select a Order": "选择排序方式",
|
||||
"Latest": "最新",
|
||||
"Oldest": "最早",
|
||||
"Most Viewed": "浏览最多",
|
||||
"Least Viewed": "浏览最少",
|
||||
"Most Downloaded": "下载最多",
|
||||
"Least Downloaded": "下载最少",
|
||||
"Time Ascending": "时间升序",
|
||||
"Time Descending": "时间降序",
|
||||
"Views Ascending": "浏览量升序",
|
||||
"Views Descending": "浏览量降序",
|
||||
"Downloads Ascending": "下载量升序",
|
||||
"Downloads Descending": "下载量降序",
|
||||
}
|
||||
},
|
||||
"zh-TW": {
|
||||
@@ -489,15 +494,13 @@ export const i18nData = {
|
||||
"Set the description of the tag.": "設置標籤的描述。",
|
||||
"Use markdown format.": "使用Markdown格式。",
|
||||
"Tag: ": "標籤: ",
|
||||
|
||||
// 添加排序选项翻译
|
||||
"Select a Order": "選擇排序方式",
|
||||
"Latest": "最新",
|
||||
"Oldest": "最早",
|
||||
"Most Viewed": "瀏覽最多",
|
||||
"Least Viewed": "瀏覽最少",
|
||||
"Most Downloaded": "下載最多",
|
||||
"Least Downloaded": "下載最少",
|
||||
"Time Ascending": "時間升序",
|
||||
"Time Descending": "時間降序",
|
||||
"Views Ascending": "瀏覽量升序",
|
||||
"Views Descending": "瀏覽量降序",
|
||||
"Downloads Ascending": "下載量升序",
|
||||
"Downloads Descending": "下載量降序",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -24,26 +24,26 @@ export default function HomePage() {
|
||||
<select value={order} className="select w-52 select-info" onInput={(e) => {
|
||||
const value = e.currentTarget.value;
|
||||
if (value === "0") {
|
||||
setOrder(RSort.TimeDesc);
|
||||
} else if (value === "1") {
|
||||
setOrder(RSort.TimeAsc);
|
||||
} else if (value === "1") {
|
||||
setOrder(RSort.TimeDesc);
|
||||
} else if (value === "2") {
|
||||
setOrder(RSort.ViewsDesc);
|
||||
} else if (value === "3") {
|
||||
setOrder(RSort.ViewsAsc);
|
||||
} else if (value === "3") {
|
||||
setOrder(RSort.ViewsDesc);
|
||||
} else if (value === "4") {
|
||||
setOrder(RSort.DownloadsDesc);
|
||||
} else if (value === "5") {
|
||||
setOrder(RSort.DownloadsAsc);
|
||||
} else if (value === "5") {
|
||||
setOrder(RSort.DownloadsDesc);
|
||||
}
|
||||
}}>
|
||||
<option disabled>{t("Select a Order")}</option>
|
||||
<option value={0}>{t("Latest")}</option>
|
||||
<option value={1}>{t("Oldest")}</option>
|
||||
<option value={2}>{t("Most Viewed")}</option>
|
||||
<option value={3}>{t("Least Viewed")}</option>
|
||||
<option value={4}>{t("Most Downloaded")}</option>
|
||||
<option value={5}>{t("Least Downloaded")}</option>
|
||||
<option value="0">{t("Time Ascending")}</option>
|
||||
<option value="1">{t("Time Descending")}</option>
|
||||
<option value="2">{t("Views Ascending")}</option>
|
||||
<option value="3">{t("Views Descending")}</option>
|
||||
<option value="4">{t("Downloads Ascending")}</option>
|
||||
<option value="5">{t("Downloads Descending")}</option>
|
||||
</select>
|
||||
<span className={"flex-1"}/>
|
||||
<Button onClick={() => {
|
||||
|
Reference in New Issue
Block a user