🍱 Vue.js components for Nextcloud app development ✌ https://npmjs.org/@nextcloud/vue
Перейти к файлу
John Molakvoæ 1d34d8945d
Update README.md
2021-04-06 08:23:26 +02:00
.github Fix AutoApprove Action 2021-03-22 14:16:03 +01:00
build Fix translation extraction 2021-03-28 23:38:29 +02:00
cypress Update cypress screenshots 2021-03-27 10:28:18 +01:00
docs fix package rename 2019-10-29 15:57:09 +01:00
l10n Translate /l10n/messages.pot in zh_HK 2021-04-04 03:22:52 +00:00
src Make sure to pass all props and attributes to single-action Actions 2021-03-31 16:32:59 +02:00
styleguide Proxy avatar to fixed image 2020-11-18 08:56:24 +01:00
tests add missing user event tests for appSideBarTabs 2020-11-18 20:28:10 +01:00
.editorconfig Init component structure 2018-08-17 16:57:42 +02:00
.eslintrc.js Fix old import 2020-03-26 09:55:37 +01:00
.gitignore Add changelog file 2020-11-25 17:57:34 +01:00
.npmignore Add gettext-based translations 2020-02-21 11:20:00 +01:00
.stylelintignore Icon font 2019-01-07 17:06:57 +01:00
.stylelintrc.js Allow pausing ongoing modal slideshow 2019-08-07 12:34:12 +02:00
CHANGELOG.md Update changelog for v3.8.0 2021-03-26 10:18:06 +01:00
LICENSE Copyright typo fix 2018-10-26 10:50:25 +02:00
Makefile Fix old import 2020-03-26 09:55:37 +01:00
README.md Update README.md 2021-04-06 08:23:26 +02:00
babel.config.js Use babel env usage & corejs@3 2019-11-27 12:59:24 +01:00
cypress.json Bump cypress config and split into two specs 2020-11-05 16:44:57 +01:00
package-lock.json Bump core-js from 3.9.1 to 3.10.0 2021-04-01 03:05:19 +00:00
package.json Merge pull request #1783 from nextcloud/dependencies/nextcloud-eslint 2021-03-29 11:34:45 +02:00
styleguide.config.js Render the first action icon slot if single action 2021-03-09 19:13:43 +01:00
webpack.common.js Compress translations on bundle 2021-03-24 14:54:28 +01:00
webpack.dev.js Bump webpack-merge from 4.2.2 to 5.0.8 2020-07-08 13:08:32 +02:00
webpack.prod.js Bump webpack-merge from 4.2.2 to 5.0.8 2020-07-08 13:08:32 +02:00

README.md

Vue components

npm last version travis build status Dependabot status Code coverage

This repo contains the various Vue.js components that Nextcloud uses for its internal design and structure. It provides standardized UI elements for building Nextcloud app frontends with Vue.js.

Documentation

A list of available components with examples to try out is available in the documentation.

Getting started

App example

If you want to check a real live example of a nextcloud app that uses this library, you can head over to https://github.com/skjnldsv/vueexample/ We will try to maintain this repository the best we can, but some example might be obsolete. Always check this repository documentation.

Install the library

npm i --save @nextcloud/vue

Usage

To use a component, just import it:

import { AppNavigation } from '@nextcloud/vue'

Depending on which components you use, you might want to only import individual (separately bundled) components:

import Avatar from '@nextcloud/vue/dist/Components/Avatar'

Development setup

If you want to work on improving the components its best to run the latest code and link it to your local Nextcloud installation:

  1. Install the dependencies with npm ci
  2. Build the components every time you do changes: npm run build
  3. Connect it to your local Nextcloud development setup:
    • In this repository do npm link
    • In the repository of an app do npm link @nextcloud/vue (you need to re-link any time you do npm ci in the app)
  4. Then build the app with: npm run build (or watch for changes with npm run watch)

Styleguide

When developing new components or extending compnents, make sure to also have some bits of related documentation like examples, where applicable. To test components and the documentation in that context, you can run npm run styleguide to run a local server that serves the style guide with all the components.

Using vue-devtools in Firefox

If you want to use vue-devtools in Firefox, you need to patch your nextcloud instance as follow:

diff --git a/lib/public/AppFramework/Http/ContentSecurityPolicy.php b/lib/public/AppFramework/Http/ContentSecurityPolicy.php
index 3a9ab8f8c1..4bc2b4a4d0 100644
--- a/lib/public/AppFramework/Http/ContentSecurityPolicy.php
+++ b/lib/public/AppFramework/Http/ContentSecurityPolicy.php
@@ -42,9 +42,9 @@ namespace OCP\AppFramework\Http;
  */
 class ContentSecurityPolicy extends EmptyContentSecurityPolicy {
        /** @var bool Whether inline JS snippets are allowed */
-       protected $inlineScriptAllowed = false;
+       protected $inlineScriptAllowed = true;
        /** @var bool Whether eval in JS scripts is allowed */
-       protected $evalScriptAllowed = false;
+       protected $evalScriptAllowed = true;
        /** @var array Domains from which scripts can get loaded */
        protected $allowedScriptDomains = [
                '\'self\'',

Releasing a new version

  • Checkout latest master (pull);
  • Edit CHANGELOG.md and add new entries there for the new version, then create a commit;
  • Run npm version patch (npm version minor if minor). This will return a new version name, make sure it matches what was added in the CHANGELOG.md;
  • Push the tag and the master branch git push origin master [printed-version-name];
  • Make the tag a release on github and add the changelog (https://github.com/nextcloud/nextcloud-vue/releases);
  • Click edit on a previous release and copy the body of the changelog;
  • Go back, click on your release and paste the copied text;
  • Edit all the version numbers;
  • Click on preview and click on view full changelog, this will show you all the prs that have been; added since the previous version;
  • Copy them in the changelog with the same format as previous ones;