Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
php-version: ${{ env.PHP_VERSION }}
- name: Determine minimum Nextcloud API version
if: matrix.version == 'min'
run: echo "NC_API_TAG=^$(php tests/nextcloud-version.php --appinfo)" >> $GITHUB_ENV
run: echo "NC_API_TAG=dev-stable$(php tests/nextcloud-version.php --appinfo)" >> $GITHUB_ENV
- name: Install Dependencies
run: |
composer require --dev nextcloud/ocp:$NC_API_TAG
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The Notes app is a distraction free notes taking app for [Nextcloud](https://www
<screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes-thumbnail.jpg">https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes.png</screenshot>
<dependencies>
<php min-version="7.4" max-version="8.1" />
<nextcloud min-version="22" max-version="26" />
<nextcloud min-version="25" max-version="27" />
</dependencies>
<repair-steps>
<post-migration>
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require-dev": {
"nextcloud/ocp": ">=22",
"nextcloud/ocp": "dev-stable25@dev",
"nextcloud/coding-standard": "^1.0",
"friendsofphp/php-cs-fixer": "^3",
"squizlabs/php_codesniffer": "^3",
Expand All @@ -13,6 +13,5 @@
"OCA\\Notes\\Tests\\API\\": "tests/api/"
}
},
"minimum-stability": "beta",
"prefer-stable": true
}
589 changes: 299 additions & 290 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@nextcloud/event-bus": "^3.0.2",
"@nextcloud/moment": "^1.2.1",
"@nextcloud/router": "^2.0.0",
"@nextcloud/vue": "^5.4.0",
"@nextcloud/vue": "^7.0.0-beta.7",
"diff": "^5.1.0",
"easymde": "^2.18.0",
"markdown-it": "^13.0.1",
Expand Down
41 changes: 21 additions & 20 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<ContentVue app-name="notes" :content-class="{loading: loading.notes}">
<AppNavigation :class="{loading: loading.notes, 'icon-error': error}">
<AppNavigationNew
<NcContent app-name="notes" :content-class="{loading: loading.notes}">
<NcAppNavigation :class="{loading: loading.notes, 'icon-error': error}">
<NcAppNavigationNew
v-show="!loading.notes && !error"
:text="t('notes', 'New note')"
button-id="notes_new_note"
:button-class="['icon-add', { loading: loading.create }]"
@click="onNewNote"
/>
>
<PlusIcon slot="icon" :size="20" />
</NcAppNavigationNew>

<template #list>
<NavigationList v-show="!loading.notes"
Expand All @@ -21,49 +21,50 @@
<template #footer>
<AppSettings v-if="!loading.notes && error !== true" @reload="reloadNotes" />
</template>
</AppNavigation>
</NcAppNavigation>

<AppContent v-if="error">
<NcAppContent v-if="error">
<div style="margin: 2em;">
<h2>{{ t('notes', 'Error') }}</h2>
<p>{{ error }}</p>
<p>{{ t('notes', 'Please see Nextcloud server log for details.') }}</p>
</div>
</AppContent>
</NcAppContent>
<router-view v-else />

<router-view name="sidebar" />
</ContentVue>
</NcContent>
</template>

<script>
import {
AppContent,
AppNavigation,
AppNavigationNew,
Content,
NcAppContent,
NcAppNavigation,
NcAppNavigationNew,
NcContent,
} from '@nextcloud/vue'
import { showSuccess, TOAST_UNDO_TIMEOUT, TOAST_PERMANENT_TIMEOUT } from '@nextcloud/dialogs'
import '@nextcloud/dialogs/styles/toast.scss'

import PlusIcon from 'vue-material-design-icons/Plus.vue'

import { config } from './config.js'
import { fetchNotes, noteExists, createNote, undoDeleteNote } from './NotesService.js'
import AppSettings from './components/AppSettings.vue'
import NavigationList from './components/NavigationList.vue'
import store from './store.js'

const ContentVue = Content

export default {
name: 'App',

components: {
AppContent,
AppNavigation,
AppNavigationNew,
AppSettings,
ContentVue,
NavigationList,
NcAppContent,
NcAppNavigation,
NcAppNavigationNew,
NcContent,
PlusIcon,
},

data() {
Expand Down
8 changes: 4 additions & 4 deletions src/components/AppSettings.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<AppNavigationSettings :title="t('notes', 'Notes settings')" :class="{ loading: saving }">
<NcAppNavigationSettings :title="t('notes', 'Notes settings')" :class="{ loading: saving }">
<div class="settings-block">
<p class="settings-hint">
<label for="notesPath">{{ t('notes', 'Folder to store your notes') }}</label>
Expand Down Expand Up @@ -42,12 +42,12 @@
</option>
</select>
</div>
</AppNavigationSettings>
</NcAppNavigationSettings>
</template>

<script>
import {
AppNavigationSettings,
NcAppNavigationSettings,
} from '@nextcloud/vue'

import { setSettings } from '../NotesService.js'
Expand All @@ -57,7 +57,7 @@ export default {
name: 'AppSettings',

components: {
AppNavigationSettings,
NcAppNavigationSettings,
},

data() {
Expand Down
58 changes: 28 additions & 30 deletions src/components/Dashboard.vue
Original file line number Diff line number Diff line change
@@ -1,52 +1,50 @@
<template>
<div class="dashboard-box">
<DashboardWidget :items="items" :loading="loading">
<NcDashboardWidget
empty-content-icon="icon-notes"
:empty-content-message="t('notes', 'No notes yet')"
:items="items"
:loading="loading"
>
<template #default="{ item }">
<DashboardWidgetItem
<NcDashboardWidgetItem
:target-url="getItemTargetUrl(item)"
:main-text="item.title"
:sub-text="subtext(item)"
>
<template #avatar>
<div
class="note-item"
:class="{ 'note-item-favorite': item.favorite, 'note-item-no-favorites': !hasFavorites }"
/>
</template>
</DashboardWidgetItem>
<div slot="avatar"
class="note-item"
:class="{ 'note-item-favorite': item.favorite, 'note-item-no-favorites': !hasFavorites }"
/>
</NcDashboardWidgetItem>
</template>
<template #empty-content>
<EmptyContent icon="icon-notes">
<template #desc>
<p class="notes-empty-content-label">
{{ t('notes', 'No notes yet') }}
</p>
</template>
</EmptyContent>
</template>
</DashboardWidget>
</NcDashboardWidget>
<div v-if="!loading" class="buttons-footer">
<a :href="createNoteUrl" class="button">
<NcButton :href="createNoteUrl">
<PlusIcon slot="icon" :size="20" />
{{ t('notes', 'New note') }}
</a>
</NcButton>
</div>
</div>
</template>

<script>
import { DashboardWidget, DashboardWidgetItem, EmptyContent } from '@nextcloud/vue'
import { NcButton, NcDashboardWidget, NcDashboardWidgetItem } from '@nextcloud/vue'
import { generateUrl } from '@nextcloud/router'

import PlusIcon from 'vue-material-design-icons/Plus.vue'

import { getDashboardData } from '../NotesService.js'
import { categoryLabel } from '../Util.js'

export default {
name: 'Dashboard',

components: {
DashboardWidget,
DashboardWidgetItem,
EmptyContent,
NcButton,
NcDashboardWidget,
NcDashboardWidgetItem,
PlusIcon,
},

data() {
Expand Down Expand Up @@ -104,7 +102,7 @@ export default {
}

.note-item-favorite {
background: var(--icon-starred-yellow, var(--icon-star-dark-FC0, var(--icon-star-dark-fc0)));
background: var(--icon-starred-yellow);
}

.note-item {
Expand All @@ -126,9 +124,9 @@ export default {
}

.buttons-footer {
position: absolute;
bottom: 1em;
width: 100%;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
margin-top: 8px;
}
</style>
26 changes: 13 additions & 13 deletions src/components/EditorEasyMDE.vue
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<template>
<div>
<div class="upload-button">
<Actions
<NcActions
container=".upload-button"
default-icon="icon-picture"
menu-align="right"
>
<ActionButton
<NcActionButton
icon="icon-upload"
:close-after-click="true"
@click="onClickUploadImage"
>
{{ t('notes', 'Upload image') }}
</ActionButton>
<ActionButton
</NcActionButton>
<NcActionButton
icon="icon-picture"
:close-after-click="true"
@click="onClickInsertImage"
>
{{ t('notes', 'Insert image') }}
</ActionButton>
</Actions>
</NcActionButton>
</NcActions>
</div>
<div class="markdown-editor" @click="onClickEditor">
<textarea />
Expand All @@ -35,8 +35,8 @@ import { generateUrl } from '@nextcloud/router'
import { showError } from '@nextcloud/dialogs'
import '@nextcloud/dialogs/styles/toast.scss'
import {
Actions,
ActionButton,
NcActions,
NcActionButton,
} from '@nextcloud/vue'
import { basename, relative } from 'path'

Expand All @@ -46,8 +46,8 @@ export default {
name: 'EditorEasyMDE',

components: {
Actions,
ActionButton,
NcActions,
NcActionButton,
},

props: {
Expand Down Expand Up @@ -351,14 +351,14 @@ export default {
position: absolute;
background-color: var(--color-main-background);
border: 1px solid #878787;
border-radius: 1px;
border-radius: var(--border-radius);
background-position: center;
margin-top: 3px;
margin-top: 5px;
margin-left: 2px;
}

.CodeMirror .cm-formatting-task.cm-property::before {
background-image: var(--icon-checkmark-fff);
background-image: var(--icon-checkmark-white);
background-color: var(--color-primary-element);
border-color: var(--color-primary-element);
}
Expand Down
1 change: 1 addition & 0 deletions src/components/EditorMarkdownIt.vue
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ export default {
list-style-type: none;
input {
min-height: initial !important;
height: auto !important;
cursor: pointer;
}
label {
Expand Down
6 changes: 3 additions & 3 deletions src/components/Loading.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<template>
<AppContent class="loading" />
<NcAppContent class="loading" />
</template>
<script>

import {
AppContent,
NcAppContent,
} from '@nextcloud/vue'

export default {
name: 'Loading',

components: {
AppContent,
NcAppContent,
},
}

Expand Down
Loading