mirror of
https://github.com/go-gitea/gitea
synced 2025-07-04 09:37:19 +00:00
support the open-icon of folder (#34168)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@ -22,13 +22,6 @@ function getIconForDiffStatus(pType: DiffStatus) {
|
||||
};
|
||||
return diffTypes[pType] ?? diffTypes[''];
|
||||
}
|
||||
|
||||
function entryIcon(entry: DiffTreeEntry) {
|
||||
if (entry.EntryMode === 'commit') {
|
||||
return 'octicon-file-submodule';
|
||||
}
|
||||
return 'octicon-file';
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -36,10 +29,8 @@ function entryIcon(entry: DiffTreeEntry) {
|
||||
<div class="item-directory" :class="{ 'viewed': item.IsViewed }" :title="item.DisplayName" @click.stop="collapsed = !collapsed">
|
||||
<!-- directory -->
|
||||
<SvgIcon :name="collapsed ? 'octicon-chevron-right' : 'octicon-chevron-down'"/>
|
||||
<SvgIcon
|
||||
class="text primary"
|
||||
:name="collapsed ? 'octicon-file-directory-fill' : 'octicon-file-directory-open-fill'"
|
||||
/>
|
||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||
<span class="tw-contents" v-html="collapsed ? store.folderIcon : store.folderOpenIcon"/>
|
||||
<span class="gt-ellipsis">{{ item.DisplayName }}</span>
|
||||
</div>
|
||||
|
||||
@ -53,7 +44,8 @@ function entryIcon(entry: DiffTreeEntry) {
|
||||
:title="item.DisplayName" :href="'#diff-' + item.NameHash"
|
||||
>
|
||||
<!-- file -->
|
||||
<SvgIcon :name="entryIcon(item)"/>
|
||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||
<span class="tw-contents" v-html="item.FileIcon"/>
|
||||
<span class="gt-ellipsis tw-flex-1">{{ item.DisplayName }}</span>
|
||||
<SvgIcon
|
||||
:name="getIconForDiffStatus(item.DiffStatus).name"
|
||||
|
Reference in New Issue
Block a user