File tree Expand file tree Collapse file tree 6 files changed +34
-3
lines changed Expand file tree Collapse file tree 6 files changed +34
-3
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ import GenRandomId from '../../utils/GenRandomId.js'
101101import AlertCircle from ' vue-material-design-icons/AlertCircleOutline.vue'
102102import Check from ' vue-material-design-icons/Check.vue'
103103import { useModelMigration } from ' ../../composables/useModelMigration.ts'
104+ import { isLegacy32 } from ' ../../utils/legacy.ts'
104105
105106export default {
106107 name: ' NcInputField' ,
@@ -297,7 +298,13 @@ export default {
297298 },
298299
299300 computedPlaceholder () {
300- return this .hasPlaceholder ? this .placeholder : this .label
301+ if (this .hasPlaceholder ) {
302+ return this .placeholder
303+ }
304+ if (isLegacy32) {
305+ return this .label
306+ }
307+ return undefined
301308 },
302309
303310 isValidLabel () {
Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ import GenRandomId from '../../utils/GenRandomId.js'
135135import AlertCircle from ' vue-material-design-icons/AlertCircleOutline.vue'
136136import Check from ' vue-material-design-icons/Check.vue'
137137import { useModelMigration } from ' ../../composables/useModelMigration.ts'
138+ import { isLegacy32 } from ' ../../utils/legacy.ts'
138139
139140export default {
140141 name: ' NcTextArea' ,
@@ -288,7 +289,13 @@ export default {
288289 },
289290
290291 computedPlaceholder () {
291- return this .hasPlaceholder ? this .placeholder : this .label
292+ if (this .hasPlaceholder ) {
293+ return this .placeholder
294+ }
295+ if (isLegacy32) {
296+ return this .label
297+ }
298+ return undefined
292299 },
293300
294301 isValidLabel () {
Original file line number Diff line number Diff line change @@ -22,5 +22,10 @@ declare global {
2222 _nc_contacts_menu_hooks : { [ id : string ] : ContactsMenuAction }
2323 // eslint-disable-next-line @typescript-eslint/no-explicit-any
2424 OCP : any
25+ OC : {
26+ config : {
27+ version : string
28+ }
29+ }
2530 }
2631}
Original file line number Diff line number Diff line change 1+ /*
2+ * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
3+ * SPDX-License-Identifier: AGPL-3.0-or-later
4+ */
5+
6+ export const isLegacy32 = Number . parseInt ( window . OC ?. config . version . split ( '.' ) [ 0 ] ?? '0' ) < 32
Original file line number Diff line number Diff line change @@ -100,7 +100,9 @@ window.OC = {
100100 isUserAdmin ( ) {
101101 return true
102102 } ,
103- config : { } ,
103+ config : {
104+ version : '31.0.0' ,
105+ } ,
104106 Util : {
105107 /**
106108 * Compare two strings to provide a natural sort
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ export default {
2323 } ,
2424 } ,
2525
26+ config : {
27+ version : '31.0.0' ,
28+ } ,
29+
2630 coreApps : [
2731 '' ,
2832 'admin' ,
You can’t perform that action at this time.
0 commit comments