-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Vinicius Reis <vinicius.reis@nextcloud.com>
- Loading branch information
Vinicius Reis
committed
Aug 11, 2022
1 parent
31e9219
commit c517f05
Showing
204 changed files
with
1,836 additions
and
69 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
import Vue from 'vue' | ||
import './assets/additional.scss' | ||
import './assets/icons.css' | ||
|
||
/** | ||
* From server util.js | ||
* | ||
* @param {string} t The string to chunkify | ||
* @return {Array} | ||
*/ | ||
function chunkify(t) { | ||
// Adapted from http://my.opera.com/GreyWyvern/blog/show.dml/1671288 | ||
const tz = [] | ||
let x = 0 | ||
let y = -1 | ||
let n = 0 | ||
let c | ||
|
||
while (x < t.length) { | ||
c = t.charAt(x) // only include the dot in strings | ||
|
||
const m = !n && (c === '.' || (c >= '0' && c <= '9')) | ||
|
||
if (m !== n) { | ||
// next chunk | ||
y++ | ||
tz[y] = '' | ||
n = m | ||
} | ||
|
||
tz[y] += c | ||
x++ | ||
} | ||
|
||
return tz | ||
} | ||
|
||
window.OC = { | ||
getCurrentUser() { | ||
return { | ||
uid: 'admin', | ||
displayName: 'Administrator', | ||
} | ||
}, | ||
generateUrl() { | ||
return 'https://nextcloud.com/wp-content/themes/next/assets/img/common/nextcloud-square-logo.png' | ||
}, | ||
getLanguage() { | ||
return 'en' | ||
}, | ||
isUserAdmin() { | ||
return true | ||
}, | ||
config: {}, | ||
Util: { | ||
/** | ||
* Compare two strings to provide a natural sort | ||
* | ||
* @param {string} a first string to compare | ||
* @param {string} b second string to compare | ||
* @return {number} -1 if b comes before a, 1 if a comes before b | ||
* or 0 if the strings are identical | ||
*/ | ||
naturalSortCompare: function naturalSortCompare(a, b) { | ||
let x | ||
const aa = chunkify(a) | ||
const bb = chunkify(b) | ||
|
||
for (x = 0; aa[x] && bb[x]; x++) { | ||
if (aa[x] !== bb[x]) { | ||
const aNum = Number(aa[x]) | ||
const bNum = Number(bb[x]) // note: == is correct here | ||
|
||
/* eslint-disable-next-line */ | ||
if (aNum == aa[x] && bNum == bb[x]) { | ||
return aNum - bNum | ||
} else { | ||
// Note: This locale setting isn't supported by all browsers but for the ones | ||
// that do there will be more consistency between client-server sorting | ||
return aa[x].localeCompare(bb[x], OC.getLanguage()) | ||
} | ||
} | ||
} | ||
|
||
return aa.length - bb.length | ||
}, | ||
}, | ||
webroot: '', | ||
} | ||
|
||
window.OCA = {} | ||
window.appName = 'nextcloud-vue' | ||
|
||
Vue.prototype.OC = window.OC | ||
Vue.prototype.OCA = window.OCA | ||
|
||
window.NextcloudVueDocs = { | ||
tags: '<?xml version="1.0"?><d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"><d:response><d:href>/remote.php/dav/systemtags/</d:href><d:propstat><d:prop><oc:id/><oc:display-name/><oc:user-visible/><oc:user-assignable/><oc:can-assign/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/systemtags/7</d:href><d:propstat><d:prop><oc:id>7</oc:id><oc:display-name>tag1</oc:display-name><oc:user-visible>true</oc:user-visible><oc:user-assignable>true</oc:user-assignable><oc:can-assign>true</oc:can-assign></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/systemtags/2</d:href><d:propstat><d:prop><oc:id>2</oc:id><oc:display-name>tag2</oc:display-name><oc:user-visible>false</oc:user-visible><oc:user-assignable>true</oc:user-assignable><oc:can-assign>true</oc:can-assign></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/systemtags/3</d:href><d:propstat><d:prop><oc:id>3</oc:id><oc:display-name>tag3</oc:display-name><oc:user-visible>true</oc:user-visible><oc:user-assignable>true</oc:user-assignable><oc:can-assign>true</oc:can-assign></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/systemtags/4</d:href><d:propstat><d:prop><oc:id>4</oc:id><oc:display-name>important</oc:display-name><oc:user-visible>true</oc:user-visible><oc:user-assignable>true</oc:user-assignable><oc:can-assign>true</oc:can-assign></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/systemtags/1</d:href><d:propstat><d:prop><oc:id>1</oc:id><oc:display-name>secret</oc:display-name><oc:user-visible>true</oc:user-visible><oc:user-assignable>false</oc:user-assignable><oc:can-assign>true</oc:can-assign></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/systemtags/5</d:href><d:propstat><d:prop><oc:id>5</oc:id><oc:display-name>test</oc:display-name><oc:user-visible>true</oc:user-visible><oc:user-assignable>false</oc:user-assignable><oc:can-assign>true</oc:can-assign></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/systemtags/6</d:href><d:propstat><d:prop><oc:id>6</oc:id><oc:display-name>test2</oc:display-name><oc:user-visible>false</oc:user-visible><oc:user-assignable>false</oc:user-assignable><oc:can-assign>true</oc:can-assign></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response></d:multistatus>', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { defineConfig } from 'histoire' | ||
import { HstVue } from '@histoire/plugin-vue2' | ||
|
||
export default defineConfig({ | ||
setupFile: './docs/histoire-setup.js', | ||
plugins: [ | ||
HstVue(), | ||
], | ||
theme: { | ||
title: '@nextcloud/vue', | ||
// favicon: '/my-favicon.svg', | ||
// logo: { | ||
// square: '/src/img/logo-square.svg', | ||
// light: '/src/img/logo-light.svg', | ||
// dark: '/src/img/logo-dark.svg', | ||
// }, | ||
// colors: { | ||
// primary: defaultColors.cyan, | ||
// }, | ||
logoHref: 'https://github.com/nextcloud/nextcloud-vue', | ||
}, | ||
}) |
Oops, something went wrong.