Skip to content

Commit c190906

Browse files
committed
feat: remove edit space description inline button
1 parent bbf766a commit c190906

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

packages/web-app-files/src/components/Spaces/SpaceHeader.vue

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,10 @@
8484
}"
8585
>
8686
<text-editor
87-
class="markdown-container-content w-full [&_#text-editor-preview-component]:!bg-transparent"
87+
class="markdown-container-content w-full"
8888
is-read-only
8989
:current-content="markdownContent"
9090
/>
91-
<div v-if="isEditReadmeVisible" class="markdown-container-edit ml-2">
92-
<oc-button
93-
type="router-link"
94-
size="small"
95-
:aria-label="$gettext('Edit description')"
96-
appearance="raw"
97-
class="p-1"
98-
:to="editReadMeContentLink"
99-
>
100-
<oc-icon name="pencil" size="small" fill-type="line" />
101-
</oc-button>
102-
</div>
10391
</div>
10492
<div
10593
v-if="showMarkdownCollapse && markdownContent"
@@ -123,11 +111,9 @@ import {
123111
SideBarEventTopics,
124112
TextEditor,
125113
useClientService,
126-
useFileActions,
127114
useLoadPreview,
128115
useResourcesStore,
129116
useSharesStore,
130-
useSpaceActionsEditReadmeContent,
131117
useSpacesStore
132118
} from '@opencloud-eu/web-pkg'
133119
import SpaceContextActions from './SpaceContextActions.vue'
@@ -147,16 +133,10 @@ const { $gettext, $ngettext } = language
147133
const clientService = useClientService()
148134
const { getFileContents, getFileInfo } = clientService.webdav
149135
const resourcesStore = useResourcesStore()
150-
const { getDefaultAction } = useFileActions()
151136
const { loadPreview } = useLoadPreview()
152137
const spacesStore = useSpacesStore()
153138
const sharesStore = useSharesStore()
154139
const { imagesLoading, readmesLoading } = storeToRefs(spacesStore)
155-
const { actions: editReadmeContentActions } = useSpaceActionsEditReadmeContent()
156-
157-
const isEditReadmeVisible = computed(() =>
158-
unref(editReadmeContentActions)[0].isVisible({ resources: [space] })
159-
)
160140
161141
const isMobileWidth = inject<Ref<boolean>>('isMobileWidth')
162142
@@ -280,15 +260,6 @@ watch(
280260
const imageContent = ref<string>(null)
281261
const imageExpanded = ref(false)
282262
283-
const editReadMeContentLink = computed(() => {
284-
const action = getDefaultAction({ resources: [unref(markdownResource)], space })
285-
286-
if (!action.route) {
287-
return null
288-
}
289-
290-
return action.route({ space, resources: [unref(markdownResource)] })
291-
})
292263
const toggleImageExpanded = () => {
293264
imageExpanded.value = !unref(imageExpanded)
294265
}

0 commit comments

Comments
 (0)