Skip to content

Commit c6f82c4

Browse files
authored
Merge pull request #1318 from nextcloud/dependabot/npm_and_yarn/nextcloud/vue-8.14.0
Chore(deps): Bump @nextcloud/vue from 7.12.7 to 8.14.0
2 parents b8d9004 + 582414f commit c6f82c4

11 files changed

+3512
-12661
lines changed

css/notes.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ li:focus .app-navigation-entry__utils .action-item {
2828

2929
/* Welcome / Help */
3030
.feature {
31-
background-position-y: center;
31+
background-position: 0 center;
3232
width: 100%;
3333
min-height: 32px;
3434
line-height: 32px;

package-lock.json

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

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
},
1515
"dependencies": {
1616
"@nextcloud/axios": "^2.5.0",
17-
"@nextcloud/dialogs": "^4.2.7",
17+
"@nextcloud/dialogs": "^5.3.5",
1818
"@nextcloud/event-bus": "^3.3.1",
1919
"@nextcloud/initial-state": "^2.2.0",
2020
"@nextcloud/moment": "^1.3.1",
21-
"@nextcloud/router": "^2.2.1",
22-
"@nextcloud/vue": "^7.12.7",
21+
"@nextcloud/router": "^3.0.1",
22+
"@nextcloud/vue": "^8.14.0",
2323
"diff": "^5.2.0",
2424
"easymde": "^2.18.0",
2525
"markdown-it": "^13.0.2",
@@ -47,4 +47,4 @@
4747
"extends @nextcloud/browserslist-config"
4848
],
4949
"version": "4.10.0"
50-
}
50+
}

src/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<template #footer>
2020
<ul class="app-navigation-entry__settings">
2121
<NcAppNavigationItem
22-
:title="t('notes', 'Notes settings')"
22+
:name="t('notes', 'Notes settings')"
2323
@click.prevent="openSettings"
2424
>
2525
<CogIcon slot="icon" :size="20" />
@@ -50,7 +50,7 @@ import {
5050
} from '@nextcloud/vue'
5151
import { loadState } from '@nextcloud/initial-state'
5252
import { showSuccess, TOAST_UNDO_TIMEOUT, TOAST_PERMANENT_TIMEOUT } from '@nextcloud/dialogs'
53-
import '@nextcloud/dialogs/dist/index.css'
53+
import '@nextcloud/dialogs/style.css'
5454
5555
import PlusIcon from 'vue-material-design-icons/Plus.vue'
5656
import CogIcon from 'vue-material-design-icons/Cog.vue'

src/components/AppSettings.vue

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<template>
22
<NcAppSettingsDialog
3-
:title="t('notes', 'Notes settings')"
3+
:name="t('notes', 'Notes settings')"
44
:class="{ loading: saving }"
55
:show-navigation="true"
66
:open="settingsOpen"
77
@update:open="setSettingsOpen($event)"
88
>
9-
<NcAppSettingsSection id="help-basics" :title="t('notes', 'Basics')">
9+
<NcAppSettingsSection id="help-basics" :name="t('notes', 'Basics')">
1010
<div class="feature icon-add">
1111
{{ t('notes', 'Start writing a note by clicking on “{newnote}” in the app navigation.', { newnote: t('notes', 'New note') }) }}
1212
</div>
@@ -17,7 +17,7 @@
1717
{{ t('notes', 'Organize your notes in categories.') }}
1818
</div>
1919
</NcAppSettingsSection>
20-
<NcAppSettingsSection id="notes-path-section" :title="t('notes', 'Notes path')">
20+
<NcAppSettingsSection id="notes-path-section" :name="t('notes', 'Notes path')">
2121
<p class="app-settings-section__desc">
2222
{{ t('notes', 'Folder to store your notes') }}
2323
</p>
@@ -29,7 +29,7 @@
2929
@click="onChangeNotePath"
3030
>
3131
</NcAppSettingsSection>
32-
<NcAppSettingsSection id="file-suffix-section" :title="t('notes', 'File extension')">
32+
<NcAppSettingsSection id="file-suffix-section" :name="t('notes', 'File extension')">
3333
<p class="app-settings-section__desc">
3434
{{ t('notes', 'File extension for new notes') }}
3535
</p>
@@ -47,7 +47,7 @@
4747
@change="onChangeSettings"
4848
>
4949
</NcAppSettingsSection>
50-
<NcAppSettingsSection id="note-mode-section" :title="t('notes', 'Display mode')">
50+
<NcAppSettingsSection id="note-mode-section" :name="t('notes', 'Display mode')">
5151
<p class="app-settings-section__desc">
5252
{{ t('notes', 'Display mode for notes') }}
5353
</p>
@@ -57,7 +57,7 @@
5757
</option>
5858
</select>
5959
</NcAppSettingsSection>
60-
<NcAppSettingsSection id="help-shortcuts" :title="t('notes', 'Shortcuts')">
60+
<NcAppSettingsSection id="help-shortcuts" :name="t('notes', 'Shortcuts')">
6161
<div class="feature icon-toggle-filelist">
6262
{{ t('notes', 'Use shortcuts to quickly navigate this app.') }}
6363
</div>
@@ -72,7 +72,7 @@
7272
</tr>
7373
</table>
7474
</NcAppSettingsSection>
75-
<NcAppSettingsSection id="help-apps" :title="t('notes', 'Mobile apps')">
75+
<NcAppSettingsSection id="help-apps" :name="t('notes', 'Mobile apps')">
7676
<HelpMobile />
7777
</NcAppSettingsSection>
7878
</NcAppSettingsDialog>
@@ -84,7 +84,7 @@ import {
8484
NcAppSettingsSection,
8585
} from '@nextcloud/vue'
8686
87-
import { FilePicker, FilePickerType } from '@nextcloud/dialogs'
87+
import { getFilePickerBuilder } from '@nextcloud/dialogs'
8888
8989
import { setSettings } from '../NotesService.js'
9090
import store from '../store.js'
@@ -153,24 +153,22 @@ export default {
153153
},
154154
155155
methods: {
156-
onChangeNotePath(event) {
157-
// Code Example from: https://github.com/nextcloud/text/blob/main/src/components/Menu/ActionInsertLink.vue#L130-L155
158-
const filePicker = new FilePicker(
159-
t('text', 'Select folder to link to'),
160-
false, // multiselect
161-
['text/directory'], // mime filter
162-
true, // modal
163-
FilePickerType.Choose, // type
164-
true, // directories
165-
event.target.value === '' ? '/' : event.target.value, // path
166-
)
167-
filePicker.pick().then((file) => {
168-
const client = OC.Files.getClient()
169-
client.getFileInfo(file).then((_status, fileInfo) => {
170-
this.settings.notesPath = fileInfo.path === '/' ? `/${fileInfo.name}` : `${fileInfo.path}/${fileInfo.name}`
171-
this.onChangeSettingsReload()
156+
async onChangeNotePath(event) {
157+
const filePicker = getFilePickerBuilder(t('notes', 'Pick a notes folder'))
158+
.allowDirectories(true)
159+
.startAt(event.target.value === '' ? '/' : event.target.value)
160+
.addButton({
161+
label: t('notes', 'Set notes folder'),
162+
callback: (nodes) => {
163+
const node = nodes[0]
164+
this.settings.notesPath = node.path
165+
this.onChangeSettingsReload()
166+
},
172167
})
173-
})
168+
.build()
169+
170+
await filePicker.pick()
171+
174172
},
175173
onChangeSettings() {
176174
this.saving = true

src/components/CategoriesList.vue

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,38 @@
11
<template>
22
<Fragment>
33
<NcAppNavigationItem
4-
:title="t('notes', 'All notes')"
4+
:name="t('notes', 'All notes')"
55
:class="{ active: selectedCategory === null }"
66
@click.prevent.stop="onSelectCategory(null)"
77
>
8-
<HistoryIcon slot="icon" :size="20" />
9-
<NcAppNavigationCounter slot="counter">
10-
{{ numNotes }}
11-
</NcAppNavigationCounter>
8+
<template #icon>
9+
<HistoryIcon :size="20" />
10+
</template>
11+
<template #counter>
12+
<NcCounterBubble>
13+
{{ numNotes }}
14+
</NcCounterBubble>
15+
</template>
1216
</NcAppNavigationItem>
1317

14-
<NcAppNavigationCaption :title="t('notes', 'Categories')" />
18+
<NcAppNavigationCaption :name="t('notes', 'Categories')" />
1519

1620
<NcAppNavigationItem v-for="category in categories"
1721
:key="category.name"
18-
:title="categoryTitle(category.name)"
22+
:name="categoryTitle(category.name)"
1923
:icon="category.name === '' ? 'icon-emptyfolder' : 'icon-files'"
2024
:class="{ active: category.name === selectedCategory }"
2125
@click.prevent.stop="onSelectCategory(category.name)"
2226
>
23-
<FolderOutlineIcon v-if="category.name === ''" slot="icon" :size="20" />
24-
<FolderIcon v-else slot="icon" :size="20" />
25-
<NcAppNavigationCounter slot="counter">
26-
{{ category.count }}
27-
</NcAppNavigationCounter>
27+
<template #icon>
28+
<FolderOutlineIcon v-if="category.name === ''" :size="20" />
29+
<FolderIcon v-else :size="20" />
30+
</template>
31+
<template #counter>
32+
<NcCounterBubble>
33+
{{ category.count }}
34+
</NcCounterBubble>
35+
</template>
2836
</NcAppNavigationItem>
2937
</Fragment>
3038
</template>
@@ -33,7 +41,7 @@
3341
import {
3442
NcAppNavigationItem,
3543
NcAppNavigationCaption,
36-
NcAppNavigationCounter,
44+
NcCounterBubble,
3745
} from '@nextcloud/vue'
3846
import { Fragment } from 'vue-fragment'
3947
@@ -52,7 +60,7 @@ export default {
5260
Fragment,
5361
NcAppNavigationItem,
5462
NcAppNavigationCaption,
55-
NcAppNavigationCounter,
63+
NcCounterBubble,
5664
FolderIcon,
5765
FolderOutlineIcon,
5866
HistoryIcon,
@@ -83,7 +91,7 @@ export default {
8391
},
8492
}
8593
</script>
86-
<style scoped>
94+
<style lang="scss" scoped>
8795
.app-navigation-entry-wrapper.active:deep(.app-navigation-entry) {
8896
background-color: var(--color-primary-element-light) !important;
8997
}

src/components/EditorEasyMDE.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import EasyMDE from 'easymde'
3333
import axios from '@nextcloud/axios'
3434
import { generateUrl } from '@nextcloud/router'
3535
import { showError } from '@nextcloud/dialogs'
36-
import '@nextcloud/dialogs/dist/index.css'
36+
import '@nextcloud/dialogs/style.css'
3737
import {
3838
NcActions,
3939
NcActionButton,

src/components/NoteItem.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<NcListItem
3-
:title="title"
3+
:name="title"
44
:active="isSelected"
55
:to="{ name: 'note', params: { noteId: note.id.toString() } }"
66
@update:menuOpen="onMenuChange"
@@ -23,7 +23,6 @@
2323
<FileDocumentOutlineIcon v-else
2424
slot="icon"
2525
:size="20"
26-
fill-color="var(--color-text-lighter)"
2726
/>
2827
</template>
2928
<template v-if="isShared" #indicator>
@@ -297,8 +296,11 @@ export default {
297296
},
298297
}
299298
</script>
300-
<style scoped>
299+
<style lang="scss" scoped>
301300
.material-design-icon {
302-
width: 44px;
301+
width: var(--default-clickable-area);
302+
.list-item__wrapper--active & {
303+
color: var(--color-primary-element-text) !important;
304+
}
303305
}
304306
</style>

src/components/NotesCaption.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
2-
<h3 class="title">
3-
{{ title }}
2+
<h3 class="name">
3+
{{ name }}
44
</h3>
55
</template>
66

@@ -12,7 +12,7 @@ export default {
1212
},
1313
1414
props: {
15-
title: {
15+
name: {
1616
type: String,
1717
required: true,
1818
},
@@ -21,7 +21,7 @@ export default {
2121
</script>
2222

2323
<style scoped>
24-
.title {
24+
.name {
2525
font-weight: bold;
2626
color: var(--color-primary-element);
2727
font-size: var(--default-font-size);

src/components/NotesView.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
<template v-for="(group, idx) in groupedNotes" v-else>
1414
<NotesCaption v-if="group.category && category!==group.category"
1515
:key="group.category"
16-
:title="categoryToLabel(group.category)"
16+
:name="categoryToLabel(group.category)"
1717
/>
1818
<NotesCaption v-if="group.timeslot"
1919
:key="group.timeslot"
20-
:title="group.timeslot"
20+
:name="group.timeslot"
2121
/>
2222
<NotesList
2323
:key="idx"

src/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import App from './App.vue'
33
import router from './router.js'
44
import store from './store.js'
55

6+
__webpack_nonce__ = btoa(OC.requestToken) // eslint-disable-line
7+
__webpack_public_path__ = OC.linkTo('notes', 'js/') // eslint-disable-line
8+
69
Vue.mixin({ methods: { t, n } })
710

811
// Make sure that the filesClient is available in the global scope used by the sidebar

0 commit comments

Comments
 (0)