Skip to content

Commit fb33f90

Browse files
authored
Merge pull request #5630 from nextcloud/enh/interactive-widget
2 parents 044706f + 213c8c5 commit fb33f90

24 files changed

Lines changed: 1341 additions & 1615 deletions

package-lock.json

Lines changed: 1174 additions & 1527 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@babel/runtime": "^7.24.0",
3535
"@nextcloud/auth": "^2.2.1",
3636
"@nextcloud/axios": "^2.4.0",
37+
"@nextcloud/capabilities": "^1.1.0",
3738
"@nextcloud/dialogs": "^4.2.6",
3839
"@nextcloud/event-bus": "^3.1.0",
3940
"@nextcloud/files": "^3.1.0",

src/components/Controls.vue

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -78,32 +78,32 @@
7878
required
7979
@focus="$store.dispatch('toggleShortcutLock', true)"
8080
@blur="$store.dispatch('toggleShortcutLock', false)">
81-
<input v-tooltip="t('deck', 'Add list')"
81+
<input :title="t('deck', 'Add list')"
8282
class="icon-confirm"
8383
type="submit"
8484
value="">
8585
</form>
8686
</div>
8787
<div v-if="board" class="board-action-buttons">
8888
<div class="board-action-buttons__filter">
89-
<NcPopover container=".board-action-buttons__filter"
90-
:placement="'bottom-end'"
89+
<NcPopover :placement="'bottom-end'"
9190
:aria-label="t('deck', 'Active filters')"
9291
:name="t('deck', 'Active filters')"
93-
:tooltip="t('deck', 'Active filters')"
9492
@show="filterVisible=true"
9593
@hide="filterVisible=false">
9694
<!-- We cannot use NcActions here are the popover trigger does not update on reactive icons -->
97-
<NcButton slot="trigger"
98-
ref="filterPopover"
99-
:name="t('deck', 'Apply filter')"
100-
class="filter-button"
101-
:type="isFilterActive ? 'primary' : 'tertiary'">
102-
<template #icon>
103-
<FilterIcon v-if="isFilterActive" :size="20" decorative />
104-
<FilterOffIcon v-else :size="20" decorative />
105-
</template>
106-
</NcButton>
95+
<template #trigger>
96+
<NcButton ref="filterPopover"
97+
:title="t('deck', 'Apply filter')"
98+
:aria-label="t('deck', 'Apply filter')"
99+
class="filter-button"
100+
:type="isFilterActive ? 'primary' : 'tertiary'">
101+
<template #icon>
102+
<FilterIcon v-if="isFilterActive" :size="20" decorative />
103+
<FilterOffIcon v-else :size="20" decorative />
104+
</template>
105+
</NcButton>
106+
</template>
107107

108108
<div v-if="filterVisible" class="filter">
109109
<h3>{{ t('deck', 'Filter by tag') }}</h3>
@@ -228,7 +228,7 @@
228228
</NcActionButton>
229229
</NcActions>
230230
<!-- FIXME: NcActionRouter currently doesn't work as an inline action -->
231-
<NcActions>
231+
<NcActions v-if="isFullApp">
232232
<NcActionButton icon="icon-menu-sidebar"
233233
:aria-label="t('deck', 'Open details')"
234234
:name="t('deck', 'Details')"
@@ -306,6 +306,7 @@ export default {
306306
'canManage',
307307
]),
308308
...mapState({
309+
isFullApp: state => state.isFullApp,
309310
compactMode: state => state.compactMode,
310311
showCardCover: state => state.showCardCover,
311312
searchQuery: state => state.searchQuery,
@@ -412,6 +413,9 @@ export default {
412413
this.showAddCardModal = false
413414
},
414415
setPageTitle(title) {
416+
if (!this.isFullApp) {
417+
return
418+
}
415419
if (this.defaultPageTitle === false) {
416420
this.defaultPageTitle = window.document.title
417421
if (this.defaultPageTitle.indexOf(' - Deck - ') !== -1) {
@@ -559,8 +563,4 @@ export default {
559563
.popover:focus {
560564
outline: 2px solid var(--color-main-text);
561565
}
562-
563-
.tooltip-inner.popover-inner {
564-
text-align: left;
565-
}
566566
</style>

src/components/SessionList.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* -->
2121

2222
<template>
23-
<div v-tooltip.bottom="t('text', 'Currently present people')"
23+
<div :title="t('text', 'Currently present people')"
2424
class="avatar-list">
2525
<div v-for="session in sessionsVisible"
2626
:key="session.uid"
@@ -37,16 +37,13 @@
3737
</template>
3838

3939
<script>
40-
import { NcAvatar, Tooltip } from '@nextcloud/vue'
40+
import { NcAvatar } from '@nextcloud/vue'
4141
4242
export default {
4343
name: 'SessionList',
4444
components: {
4545
NcAvatar,
4646
},
47-
directives: {
48-
tooltip: Tooltip,
49-
},
5047
props: {
5148
sessions: {
5249
type: Array,

src/components/board/Board.vue

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
class="no-close"
5353
:placeholder="t('deck', 'List name')"
5454
required>
55-
<input v-tooltip="t('deck', 'Add list')"
55+
<input title="t('deck', 'Add list')"
5656
class="icon-confirm"
5757
type="submit"
5858
value="">
@@ -81,7 +81,16 @@
8181
</Container>
8282
</div>
8383
</transition>
84-
<GlobalSearchResults />
84+
<GlobalSearchResults v-if="isFullApp" />
85+
<NcModal v-if="localModal"
86+
:clear-view-delay="0"
87+
:close-button-contained="true"
88+
size="large"
89+
@close="localModal = null">
90+
<div class="modal__content modal__card">
91+
<CardSidebar :id="localModal" @close="localModal = null" />
92+
</div>
93+
</NcModal>
8594
</div>
8695
</template>
8796

@@ -91,11 +100,11 @@ import { mapState, mapGetters } from 'vuex'
91100
import Controls from '../Controls.vue'
92101
import DeckIcon from '../icons/DeckIcon.vue'
93102
import Stack from './Stack.vue'
94-
import { NcEmptyContent } from '@nextcloud/vue'
103+
import { NcEmptyContent, NcModal } from '@nextcloud/vue'
95104
import GlobalSearchResults from '../search/GlobalSearchResults.vue'
96105
import { showError } from '../../helpers/errors.js'
97106
import { createSession } from '../../sessions.js'
98-
107+
import CardSidebar from '../card/CardSidebar.vue'
99108
export default {
100109
name: 'Board',
101110
components: {
@@ -106,6 +115,8 @@ export default {
106115
Draggable,
107116
Stack,
108117
NcEmptyContent,
118+
NcModal,
119+
CardSidebar,
109120
},
110121
inject: [
111122
'boardApi',
@@ -123,10 +134,12 @@ export default {
123134
newStackTitle: '',
124135
currentScrollPosX: null,
125136
currentMousePosX: null,
137+
localModal: null,
126138
}
127139
},
128140
computed: {
129141
...mapState({
142+
isFullApp: state => state.isFullApp,
130143
board: state => state.currentBoard,
131144
showArchived: state => state.showArchived,
132145
}),
@@ -155,6 +168,9 @@ export default {
155168
created() {
156169
this.session = createSession(this.id)
157170
this.fetchData()
171+
this.$root.$on('open-card', (cardId) => {
172+
this.localModal = cardId
173+
})
158174
},
159175
beforeDestroy() {
160176
this.session.close()

src/components/board/SharingTabSidebar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
class="shareWithList">
2525
<li>
2626
<NcAvatar :user="board.owner.uid" />
27-
<span class="has-tooltip username">
27+
<span class="username">
2828
{{ board.owner.displayname }}
2929
<span v-if="!isCurrentUser(board.owner.uid)" class="board-owner-label">
3030
{{ t('deck', 'Board owner') }}
@@ -35,7 +35,7 @@
3535
<NcAvatar v-if="acl.type===0" :user="acl.participant.uid" />
3636
<div v-if="acl.type===1" class="avatardiv icon icon-group" />
3737
<div v-if="acl.type===7" class="avatardiv icon icon-circles" />
38-
<span class="has-tooltip username">
38+
<span class="username">
3939
{{ acl.participant.displayname }}
4040
<span v-if="acl.type===1">{{ t('deck', '(Group)') }}</span>
4141
<span v-if="acl.type===7">{{ t('deck', '(Team)') }}</span>

src/components/board/Stack.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
{{ stack.title }}
3333
</h3>
3434
<h3 v-else-if="!editing"
35-
v-tooltip="stack.title"
35+
title="stack.title"
3636
dir="auto"
3737
tabindex="0"
3838
:aria-label="stack.title"
@@ -51,7 +51,7 @@
5151
dir="auto"
5252
type="text"
5353
required="required">
54-
<input v-tooltip="t('deck', 'Edit list title')"
54+
<input title="t('deck', 'Edit list title')"
5555
class="icon-confirm"
5656
type="submit"
5757
value="">

src/components/board/TagsTabSidebar.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,21 @@
1212
<div :style="{ backgroundColor: '#' + editingLabel.color }" class="color0 icon-colorpicker" />
1313
</NcColorPicker>
1414
<input v-model="editingLabel.title" type="text">
15-
<input v-tooltip="{content: missingDataLabel, show: !editLabelObjValidated, trigger: 'manual' }"
16-
:disabled="!editLabelObjValidated"
15+
<input :disabled="!editLabelObjValidated"
1716
type="submit"
1817
value=""
1918
class="icon-confirm">
2019
<NcActions>
21-
<NcActionButton v-tooltip="{content: missingDataLabel, show: !editLabelObjValidated, trigger: 'manual' }"
22-
:disabled="!editLabelObjValidated"
20+
<NcActionButton :disabled="!editLabelObjValidated"
2321
icon="icon-close"
2422
@click="editingLabelId = null">
2523
{{ t('deck', 'Cancel') }}
2624
</NcActionButton>
2725
</NcActions>
2826
</form>
27+
<p v-if="!editLabelObjValidated">
28+
{{ missingDataLabel }}
29+
</p>
2930
</template>
3031
<template v-else>
3132
<div v-if="canManage && !isArchived" class="label-title" @click="clickEdit(label)">
@@ -58,8 +59,7 @@
5859
<div :style="{ backgroundColor: '#' + addLabelObj.color }" class="color0 icon-colorpicker" />
5960
</NcColorPicker>
6061
<input v-model="addLabelObj.title" type="text">
61-
<input v-tooltip="{content: missingDataLabel, show: !addLabelObjValidated, trigger: 'manual' }"
62-
:disabled="!addLabelObjValidated"
62+
<input :disabled="!addLabelObjValidated"
6363
type="submit"
6464
value=""
6565
class="icon-confirm">
@@ -69,6 +69,9 @@
6969
</NcActionButton>
7070
</NcActions>
7171
</form>
72+
<p v-if="!addLabelObjValidated">
73+
{{ missingDataLabel }}
74+
</p>
7275
</li>
7376
<button v-if="canManage && !isArchived" @click="clickShowAddLabel()">
7477
<span class="icon-add" />{{ t('deck', 'Add a new tag') }}

src/components/boards/BoardItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
:user="user.participant.uid"
4040
:display-name="user.participant.displayname"
4141
class="board-list-avatar" />
42-
<div v-if="board.acl.length > 5" v-tooltip="otherAcl" class="avatardiv popovermenu-wrapper board-list-avatar icon-more" />
42+
<div v-if="board.acl.length > 5" :title="otherAcl" class="avatardiv popovermenu-wrapper board-list-avatar icon-more" />
4343
</div>
4444
<div class="board-list-actions-cell" />
4545
</router-link>

src/components/card/CardSidebar.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
@submit-title="handleSubmitTitle"
3333
@close="closeSidebar">
3434
<template #secondary-actions>
35-
<NcActionButton v-if="cardDetailsInModal" icon="icon-menu-sidebar" @click.stop="closeModal()">
35+
<NcActionButton v-if="cardDetailsInModal && isFullApp" icon="icon-menu-sidebar" @click.stop="closeModal()">
3636
{{ t('deck', 'Open in sidebar view') }}
3737
</NcActionButton>
38-
<NcActionButton v-else icon="icon-external" @click.stop="showModal()">
38+
<NcActionButton v-else-if="isFullApp" icon="icon-external" @click.stop="showModal()">
3939
{{ t('deck', 'Open in bigger view') }}
4040
</NcActionButton>
4141

@@ -83,6 +83,7 @@
8383

8484
<script>
8585
import { NcActionButton, NcAppSidebar, NcAppSidebarTab } from '@nextcloud/vue'
86+
import { getCapabilities } from '@nextcloud/capabilities'
8687
import { mapState, mapGetters } from 'vuex'
8788
import CardSidebarTabDetails from './CardSidebarTabDetails.vue'
8889
import CardSidebarTabAttachments from './CardSidebarTabAttachments.vue'
@@ -99,7 +100,7 @@ import { showError } from '@nextcloud/dialogs'
99100
import { getLocale } from '@nextcloud/l10n'
100101
import CardMenuEntries from '../cards/CardMenuEntries.vue'
101102
102-
const capabilities = window.OC.getCapabilities()
103+
const capabilities = getCapabilities()
103104
104105
export default {
105106
name: 'CardSidebar',
@@ -144,6 +145,7 @@ export default {
144145
},
145146
computed: {
146147
...mapState({
148+
isFullApp: state => state.isFullApp,
147149
currentBoard: state => state.currentBoard,
148150
}),
149151
...mapGetters(['canEdit', 'assignables', 'cardActions', 'stackById']),
@@ -188,7 +190,8 @@ export default {
188190
},
189191
190192
closeSidebar() {
191-
this.$router.push({ name: 'board' })
193+
this.$router?.push({ name: 'board' })
194+
this.$emit('close')
192195
},
193196
194197
showModal() {

0 commit comments

Comments
 (0)