Settings-Item-Add the display path function. After it is turned on, the path will be displayed when the mouse is hovering over the project.

This commit is contained in:
fanchenio 2023-11-23 11:06:52 +08:00
parent e6289d0344
commit 87ab4e3060
6 changed files with 43 additions and 1 deletions

View File

@ -205,12 +205,14 @@ let simplifiedChinese = {
parameters: "参数", parameters: "参数",
password: "密码", password: "密码",
pasteIcon: "粘贴图标", pasteIcon: "粘贴图标",
path: "路径",
powerOptions: "电源选项", powerOptions: "电源选项",
powerShell: "PowerShell", powerShell: "PowerShell",
programsFeatures: "程序和功能", programsFeatures: "程序和功能",
proxy: "代理", proxy: "代理",
proxyPrompt: proxyPrompt:
"仅支持HTTP代理填写“地址”时需要带通信协议和端口例如http://127.0.0.1:7890如果没有用户名和密码为空即可。", "仅支持HTTP代理填写“地址”时需要带通信协议和端口例如http://127.0.0.1:7890如果没有用户名和密码为空即可。",
prompt: "提示",
quickSearch: "快速搜索", quickSearch: "快速搜索",
recordOpenNumber: "记录打开次数", recordOpenNumber: "记录打开次数",
recycleBin: "回收站", recycleBin: "回收站",
@ -258,6 +260,7 @@ let simplifiedChinese = {
showHide: "显示/隐藏", showHide: "显示/隐藏",
showOnlyFiles: "只显示文件", showOnlyFiles: "只显示文件",
showOnlyFolders: "只显示文件夹", showOnlyFolders: "只显示文件夹",
showPath: "显示路径",
shutdown: "关机", shutdown: "关机",
simplifiedChinese: "简体中文", simplifiedChinese: "简体中文",
size: "尺寸", size: "尺寸",
@ -509,12 +512,14 @@ let traditionalChinese = {
parameters: "參數", parameters: "參數",
password: "密碼", password: "密碼",
pasteIcon: "粘貼圖標", pasteIcon: "粘貼圖標",
path: "路徑",
powerOptions: "電源選項", powerOptions: "電源選項",
powerShell: "PowerShell", powerShell: "PowerShell",
programsFeatures: "程序和功能", programsFeatures: "程序和功能",
proxy: "代理", proxy: "代理",
proxyPrompt: proxyPrompt:
"僅支持HTTP代理填寫「地址」時需要帶通信協議和端口例如http://127.0.0.1:7890如果沒有用戶名和密碼為空即可。", "僅支持HTTP代理填寫「地址」時需要帶通信協議和端口例如http://127.0.0.1:7890如果沒有用戶名和密碼為空即可。",
prompt: "提示",
quickSearch: "快速搜索", quickSearch: "快速搜索",
recordOpenNumber: "記錄打開次數", recordOpenNumber: "記錄打開次數",
recycleBin: "回收站", recycleBin: "回收站",
@ -562,6 +567,7 @@ let traditionalChinese = {
showHide: "顯示/隱藏", showHide: "顯示/隱藏",
showOnlyFiles: "只顯示文件", showOnlyFiles: "只顯示文件",
showOnlyFolders: "只顯示文件夾", showOnlyFolders: "只顯示文件夾",
showPath: "顯示路徑",
shutdown: "關機", shutdown: "關機",
simplifiedChinese: "簡體中文", simplifiedChinese: "簡體中文",
size: "尺寸", size: "尺寸",
@ -821,12 +827,14 @@ let english = {
parameters: "Parameters", parameters: "Parameters",
password: "Password", password: "Password",
pasteIcon: "Paste Icon", pasteIcon: "Paste Icon",
path: "Path",
powerOptions: "Power Options", powerOptions: "Power Options",
powerShell: "PowerShell", powerShell: "PowerShell",
programsFeatures: "Programs Features", programsFeatures: "Programs Features",
proxy: "Proxy", proxy: "Proxy",
proxyPrompt: proxyPrompt:
'Only HTTP proxy is supported. When filling in the "address", you need to include the communication protocol and port, for example: http://127.0.0.1:7890. If there is no username and password, just leave it blank.', 'Only HTTP proxy is supported. When filling in the "address", you need to include the communication protocol and port, for example: http://127.0.0.1:7890. If there is no username and password, just leave it blank.',
prompt: "Prompt",
quickSearch: "Quick Search", quickSearch: "Quick Search",
recordOpenNumber: "Record Open Count", recordOpenNumber: "Record Open Count",
recycleBin: "Recycle Bin", recycleBin: "Recycle Bin",
@ -884,6 +892,7 @@ let english = {
showHide: "Show/Hide", showHide: "Show/Hide",
showOnlyFiles: "Show Only Files", showOnlyFiles: "Show Only Files",
showOnlyFolders: "Show Only Folders", showOnlyFolders: "Show Only Folders",
showPath: "Show Path",
shutdown: "Shutdown", shutdown: "Shutdown",
simplifiedChinese: "Simplified Chinese", simplifiedChinese: "Simplified Chinese",
size: "Size", size: "Size",

View File

@ -224,6 +224,7 @@ function getItem({
fontSize = 14, fontSize = 14,
fontWeight = 400, fontWeight = 400,
fontLineHeight = 1.25, fontLineHeight = 1.25,
promptShowPath = false,
}: { }: {
layout?: string | null; layout?: string | null;
iconSize?: number | null; iconSize?: number | null;
@ -240,6 +241,7 @@ function getItem({
fontSize?: number | null; fontSize?: number | null;
fontWeight?: number | null; fontWeight?: number | null;
fontLineHeight?: number | null; fontLineHeight?: number | null;
promptShowPath?: boolean | null;
}): Item { }): Item {
return { return {
layout: layout ?? "tile", layout: layout ?? "tile",
@ -257,6 +259,7 @@ function getItem({
fontSize: fontSize ?? 14, fontSize: fontSize ?? 14,
fontWeight: fontWeight ?? 400, fontWeight: fontWeight ?? 400,
fontLineHeight: fontLineHeight ?? 1.25, fontLineHeight: fontLineHeight ?? 1.25,
promptShowPath: promptShowPath ?? false,
}; };
} }

View File

@ -247,7 +247,9 @@
(selectedMenuId === 4 && id) (selectedMenuId === 4 && id)
" "
> >
<span class="block">{{ store.language.target }}</span> <span class="block">{{
selectedMenuId === 2 ? store.language.url : store.language.path
}}</span>
<NInput <NInput
class="mt-1.5" class="mt-1.5"
type="textarea" type="textarea"

View File

@ -762,6 +762,15 @@ function getItemTitle(item: Item) {
store.language.colon + store.language.colon +
(item.data.openNumber ?? 0); (item.data.openNumber ?? 0);
} }
if (store.setting.item.promptShowPath) {
name += "\n";
if (item.type === 2) {
name += store.language.url;
} else {
name += store.language.path;
}
name += store.language.colon + item.data.target;
}
if (item.data.remark) { if (item.data.remark) {
name += name +=
"\n" + store.language.remark + store.language.colon + item.data.remark; "\n" + store.language.remark + store.language.colon + item.data.remark;

View File

@ -987,6 +987,23 @@
> >
</NFormItem> </NFormItem>
</NForm> </NForm>
<NForm
label-placement="left"
:show-feedback="false"
size="small"
class="mt-3"
>
<span class="block font-semibold">{{
store.language.prompt
}}</span>
<NFormItem class="mt-1">
<NCheckbox
v-model:checked="setting.item.promptShowPath"
:focusable="false"
>{{ store.language.showPath }}</NCheckbox
>
</NFormItem>
</NForm>
<NForm <NForm
label-placement="left" label-placement="left"
:show-feedback="false" :show-feedback="false"

2
types/setting.d.ts vendored
View File

@ -156,6 +156,8 @@ export interface Item {
fontWeight: number; fontWeight: number;
// 字体行高 // 字体行高
fontLineHeight: number; fontLineHeight: number;
// 提示:显示路径
promptShowPath: boolean;
} }
// 快速搜索 // 快速搜索