Add ability to clone contact
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
1d41416dec
commit
02de7d76e4
|
@ -138,3 +138,20 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pick-addressbook-modal {
|
||||
.modal-container {
|
||||
display: flex;
|
||||
overflow: visible;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-evenly;
|
||||
margin-bottom: 20px;
|
||||
padding: 10px;
|
||||
background-color: #fff;
|
||||
.multiselect {
|
||||
flex: 1 1 100%;
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
@include icon-black-white('up', 'contacts', 1);
|
||||
@include icon-black-white('no-calendar', 'contacts', 1);
|
||||
@include icon-black-white('language', 'contacts', 2);
|
||||
@include icon-black-white('clone', 'contacts', 2);
|
||||
|
||||
.icon-up-force-white {
|
||||
// using #fffffe to trick the accessibility dark theme icon invert
|
||||
|
@ -54,3 +55,4 @@
|
|||
// using #fffffe to trick the accessibility dark theme icon invert
|
||||
@include icon-color('picture', 'places', '#fffffe', 1, true);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M11.8 13.8H2.2V4.2h9.6m1.2 0c0-.67-.53-1.2-1.2-1.2H2.2C1.53 3 1 3.53 1 4.2v9.6c0 .67.53 1.2 1.2 1.2h9.6c.67 0 1.2-.53 1.2-1.2"/><path d="m4.2 1c-0.67 0-1.2 0.54-1.2 1.2h10.8v10.8c0.67 0 1.2-0.53 1.2-1.2v-9.6c0-0.67-0.53-1.2-1.2-1.2z"/></svg>
|
After Width: | Height: | Size: 327 B |
|
@ -4033,22 +4033,26 @@
|
|||
"dependencies": {
|
||||
"abbrev": {
|
||||
"version": "1.1.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
||||
"optional": true
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||
"optional": true
|
||||
},
|
||||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
|
||||
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
|
||||
"optional": true
|
||||
},
|
||||
"are-we-there-yet": {
|
||||
"version": "1.1.5",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
|
||||
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"delegates": "^1.0.0",
|
||||
|
@ -4057,12 +4061,14 @@
|
|||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"optional": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
|
@ -4071,32 +4077,38 @@
|
|||
},
|
||||
"chownr": {
|
||||
"version": "1.1.3",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz",
|
||||
"integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==",
|
||||
"optional": true
|
||||
},
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
|
||||
"optional": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"optional": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
||||
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
|
||||
"optional": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
||||
"optional": true
|
||||
},
|
||||
"debug": {
|
||||
"version": "3.2.6",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
|
||||
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ms": "^2.1.1"
|
||||
|
@ -4104,22 +4116,26 @@
|
|||
},
|
||||
"deep-extend": {
|
||||
"version": "0.6.0",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
||||
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
|
||||
"optional": true
|
||||
},
|
||||
"delegates": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
||||
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
|
||||
"optional": true
|
||||
},
|
||||
"detect-libc": {
|
||||
"version": "1.0.3",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
|
||||
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
|
||||
"optional": true
|
||||
},
|
||||
"fs-minipass": {
|
||||
"version": "1.2.7",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz",
|
||||
"integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minipass": "^2.6.0"
|
||||
|
@ -4127,12 +4143,14 @@
|
|||
},
|
||||
"fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
||||
"optional": true
|
||||
},
|
||||
"gauge": {
|
||||
"version": "2.7.4",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
|
||||
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"aproba": "^1.0.3",
|
||||
|
@ -4147,7 +4165,8 @@
|
|||
},
|
||||
"glob": {
|
||||
"version": "7.1.6",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
|
||||
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
|
@ -4160,12 +4179,14 @@
|
|||
},
|
||||
"has-unicode": {
|
||||
"version": "2.0.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
||||
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
|
||||
"optional": true
|
||||
},
|
||||
"iconv-lite": {
|
||||
"version": "0.4.24",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safer-buffer": ">= 2.1.2 < 3"
|
||||
|
@ -4173,7 +4194,8 @@
|
|||
},
|
||||
"ignore-walk": {
|
||||
"version": "3.0.3",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz",
|
||||
"integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimatch": "^3.0.4"
|
||||
|
@ -4181,7 +4203,8 @@
|
|||
},
|
||||
"inflight": {
|
||||
"version": "1.0.6",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"once": "^1.3.0",
|
||||
|
@ -4190,17 +4213,20 @@
|
|||
},
|
||||
"inherits": {
|
||||
"version": "2.0.4",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"optional": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
|
||||
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
|
||||
"optional": true
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
||||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
|
@ -4208,12 +4234,14 @@
|
|||
},
|
||||
"isarray": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
|
||||
"optional": true
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
|
@ -4221,12 +4249,14 @@
|
|||
},
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
||||
"optional": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.9.0",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
|
||||
"integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.2",
|
||||
|
@ -4235,7 +4265,8 @@
|
|||
},
|
||||
"minizlib": {
|
||||
"version": "1.3.3",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz",
|
||||
"integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minipass": "^2.9.0"
|
||||
|
@ -4243,7 +4274,8 @@
|
|||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
|
@ -4251,12 +4283,14 @@
|
|||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
||||
"optional": true
|
||||
},
|
||||
"needle": {
|
||||
"version": "2.4.0",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz",
|
||||
"integrity": "sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"debug": "^3.2.6",
|
||||
|
@ -4266,7 +4300,8 @@
|
|||
},
|
||||
"node-pre-gyp": {
|
||||
"version": "0.14.0",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz",
|
||||
"integrity": "sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"detect-libc": "^1.0.2",
|
||||
|
@ -4283,7 +4318,8 @@
|
|||
},
|
||||
"nopt": {
|
||||
"version": "4.0.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
|
||||
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"abbrev": "1",
|
||||
|
@ -4292,7 +4328,8 @@
|
|||
},
|
||||
"npm-bundled": {
|
||||
"version": "1.1.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz",
|
||||
"integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"npm-normalize-package-bin": "^1.0.1"
|
||||
|
@ -4300,12 +4337,14 @@
|
|||
},
|
||||
"npm-normalize-package-bin": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz",
|
||||
"integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==",
|
||||
"optional": true
|
||||
},
|
||||
"npm-packlist": {
|
||||
"version": "1.4.7",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.7.tgz",
|
||||
"integrity": "sha512-vAj7dIkp5NhieaGZxBJB8fF4R0078rqsmhJcAfXZ6O7JJhjhPK96n5Ry1oZcfLXgfun0GWTZPOxaEyqv8GBykQ==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ignore-walk": "^3.0.1",
|
||||
|
@ -4314,7 +4353,8 @@
|
|||
},
|
||||
"npmlog": {
|
||||
"version": "4.1.2",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
|
||||
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"are-we-there-yet": "~1.1.2",
|
||||
|
@ -4325,17 +4365,20 @@
|
|||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
||||
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
|
||||
"optional": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
|
||||
"optional": true
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
|
@ -4343,17 +4386,20 @@
|
|||
},
|
||||
"os-homedir": {
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
|
||||
"optional": true
|
||||
},
|
||||
"os-tmpdir": {
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
||||
"optional": true
|
||||
},
|
||||
"osenv": {
|
||||
"version": "0.1.5",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
|
||||
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"os-homedir": "^1.0.0",
|
||||
|
@ -4362,17 +4408,20 @@
|
|||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"optional": true
|
||||
},
|
||||
"process-nextick-args": {
|
||||
"version": "2.0.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
|
||||
"optional": true
|
||||
},
|
||||
"rc": {
|
||||
"version": "1.2.8",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
|
||||
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"deep-extend": "^0.6.0",
|
||||
|
@ -4383,14 +4432,16 @@
|
|||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "1.2.0",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "2.3.6",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"core-util-is": "~1.0.0",
|
||||
|
@ -4404,7 +4455,8 @@
|
|||
},
|
||||
"rimraf": {
|
||||
"version": "2.7.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
|
||||
"integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"glob": "^7.1.3"
|
||||
|
@ -4412,37 +4464,44 @@
|
|||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"optional": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"optional": true
|
||||
},
|
||||
"sax": {
|
||||
"version": "1.2.4",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
|
||||
"optional": true
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.7.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
|
||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
||||
"optional": true
|
||||
},
|
||||
"set-blocking": {
|
||||
"version": "2.0.0",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
||||
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
|
||||
"optional": true
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.2",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
|
||||
"optional": true
|
||||
},
|
||||
"string-width": {
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
||||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
|
@ -4452,7 +4511,8 @@
|
|||
},
|
||||
"string_decoder": {
|
||||
"version": "1.1.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "~5.1.0"
|
||||
|
@ -4460,7 +4520,8 @@
|
|||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
|
@ -4468,12 +4529,14 @@
|
|||
},
|
||||
"strip-json-comments": {
|
||||
"version": "2.0.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
||||
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
|
||||
"optional": true
|
||||
},
|
||||
"tar": {
|
||||
"version": "4.4.13",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz",
|
||||
"integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"chownr": "^1.1.1",
|
||||
|
@ -4487,12 +4550,14 @@
|
|||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
|
||||
"optional": true
|
||||
},
|
||||
"wide-align": {
|
||||
"version": "1.1.3",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
|
||||
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"string-width": "^1.0.2 || 2"
|
||||
|
@ -4500,12 +4565,14 @@
|
|||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"optional": true
|
||||
},
|
||||
"yallist": {
|
||||
"version": "3.1.1",
|
||||
"bundled": true,
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
|
||||
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</ActionButton>
|
||||
</template>
|
||||
<script>
|
||||
import { ActionButton } from '@nextcloud/vue'
|
||||
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
|
||||
import ActionsMixin from '../../mixins/ActionsMixin'
|
||||
|
||||
export default {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</ActionCheckbox>
|
||||
</template>
|
||||
<script>
|
||||
import { ActionCheckbox } from '@nextcloud/vue'
|
||||
import ActionCheckbox from '@nextcloud/vue/dist/Components/ActionCheckbox'
|
||||
import ActionsMixin from '../../mixins/ActionsMixin'
|
||||
|
||||
export default {
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
:class="{'icon-loading-small': loadingUpdate,
|
||||
[`${warning.icon}`]: warning}"
|
||||
class="header-icon"
|
||||
href="#" />
|
||||
@click="onWarningClick" />
|
||||
|
||||
<!-- conflict message -->
|
||||
<div v-if="conflict"
|
||||
|
@ -117,12 +117,23 @@
|
|||
@click="updateContact" />
|
||||
|
||||
<!-- menu actions -->
|
||||
<Actions class="header-menu" menu-align="right">
|
||||
<Actions ref="actions"
|
||||
class="header-menu"
|
||||
menu-align="right"
|
||||
:open.sync="openedMenu">
|
||||
<ActionLink :href="contact.url"
|
||||
:download="`${contact.displayName}.vcf`"
|
||||
icon="icon-download">
|
||||
{{ t('contacts', 'Download') }}
|
||||
</ActionLink>
|
||||
<!-- user can clone if there is at least one option available -->
|
||||
<ActionButton v-if="isReadOnly && addressbooksOptions.length > 0"
|
||||
ref="cloneAction"
|
||||
:close-after-click="true"
|
||||
icon="icon-clone"
|
||||
@click="cloneContact">
|
||||
{{ t('contacts', 'Clone contact') }}
|
||||
</ActionButton>
|
||||
<ActionButton icon="icon-qrcode" @click="showQRcode">
|
||||
{{ t('contacts', 'Generate QR Code') }}
|
||||
</ActionButton>
|
||||
|
@ -135,9 +146,34 @@
|
|||
<!-- qrcode -->
|
||||
<Modal v-if="qrcode"
|
||||
id="qrcode-modal"
|
||||
:clear-view-delay="-1"
|
||||
:title="contact.displayName"
|
||||
@close="closeQrModal">
|
||||
<img :src="`data:image/svg+xml;base64,${qrcode}`" class="qrcode" width="400">
|
||||
<img :src="`data:image/svg+xml;base64,${qrcode}`"
|
||||
:alt="t('contacts', 'Contact vcard as qrcode')"
|
||||
class="qrcode"
|
||||
width="400">
|
||||
</Modal>
|
||||
|
||||
<!-- pick addressbook when cloning contact -->
|
||||
<Modal v-if="showPickAddressbookModal"
|
||||
id="pick-addressbook-modal"
|
||||
:clear-view-delay="-1"
|
||||
:title="t('contacts', 'Pick an address book')"
|
||||
@close="closePickAddressbookModal">
|
||||
<Multiselect ref="pickAddressbook"
|
||||
v-model="pickedAddressbook"
|
||||
:allow-empty="false"
|
||||
:options="addressbooksOptions"
|
||||
:placeholder="t('contacts', 'Select addressbook')"
|
||||
track-by="id"
|
||||
label="name" />
|
||||
<button @click="closePickAddressbookModal">
|
||||
{{ t('contacts', 'Cancel') }}
|
||||
</button>
|
||||
<button class="primary" @click="cloneContact">
|
||||
{{ t('contacts', 'Clone contact') }}
|
||||
</button>
|
||||
</Modal>
|
||||
</header>
|
||||
|
||||
|
@ -193,7 +229,12 @@ import debounce from 'debounce'
|
|||
import PQueue from 'p-queue'
|
||||
import qr from 'qr-image'
|
||||
import { stringify } from 'ical.js'
|
||||
import { ActionLink, ActionButton } from '@nextcloud/vue'
|
||||
import Actions from '@nextcloud/vue/dist/Components/Actions'
|
||||
import ActionLink from '@nextcloud/vue/dist/Components/ActionLink'
|
||||
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
|
||||
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
|
||||
import Modal from '@nextcloud/vue/dist/Components/Modal'
|
||||
import { showError } from '@nextcloud/dialogs'
|
||||
|
||||
import rfcProps from '../models/rfcProps'
|
||||
import validate from '../services/validate'
|
||||
|
@ -211,6 +252,7 @@ export default {
|
|||
name: 'ContactDetails',
|
||||
|
||||
components: {
|
||||
Actions,
|
||||
ActionButton,
|
||||
ActionLink,
|
||||
AddNewProp,
|
||||
|
@ -219,6 +261,8 @@ export default {
|
|||
PropertyGroups,
|
||||
PropertyRev,
|
||||
PropertySelect,
|
||||
Modal,
|
||||
Multiselect,
|
||||
},
|
||||
|
||||
props: {
|
||||
|
@ -247,6 +291,8 @@ export default {
|
|||
loadingUpdate: false,
|
||||
openedMenu: false,
|
||||
qrcode: '',
|
||||
showPickAddressbookModal: false,
|
||||
pickedAddressbook: null,
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -377,6 +423,7 @@ export default {
|
|||
|
||||
/**
|
||||
* Store getters filtered and mapped to usable object
|
||||
* This is the list of addressbooks that are available to write
|
||||
*
|
||||
* @returns {Array}
|
||||
*/
|
||||
|
@ -504,11 +551,11 @@ export default {
|
|||
await this.updateLocalContact(contact)
|
||||
} catch (error) {
|
||||
if (error.name === 'ParserError') {
|
||||
OC.Notification.showTemporary(t('contacts', 'Syntax error. Cannot open the contact.'))
|
||||
showError(t('contacts', 'Syntax error. Cannot open the contact.'))
|
||||
} else if (error.status === 404) {
|
||||
OC.Notification.showTemporary(t('contacts', `The contact doesn't exists anymore on the server.`))
|
||||
showError(t('contacts', `The contact doesn't exists anymore on the server.`))
|
||||
} else {
|
||||
OC.Notification.showTemporary(t('contacts', `Unable to retrieve the contact from the server, please check your network connection.`))
|
||||
showError(t('contacts', `Unable to retrieve the contact from the server, please check your network connection.`))
|
||||
}
|
||||
console.error(error)
|
||||
// trigger a local deletion from the store only
|
||||
|
@ -556,6 +603,41 @@ export default {
|
|||
})
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
showError(t('contacts', 'An error occured while trying to move the contact'))
|
||||
} finally {
|
||||
this.loadingUpdate = false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Copy contact to the specified addressbook
|
||||
*
|
||||
* @param {string} addressbookId the desired addressbook ID
|
||||
*/
|
||||
async copyContactToAddressbook(addressbookId) {
|
||||
const addressbook = this.addressbooks.find(search => search.id === addressbookId)
|
||||
this.loadingUpdate = true
|
||||
if (addressbook) {
|
||||
try {
|
||||
const contact = await this.$store.dispatch('copyContactToAddressbook', {
|
||||
// we need to use the store contact, not the local contact
|
||||
// using this.contact and not this.localContact
|
||||
contact: this.contact,
|
||||
addressbook,
|
||||
})
|
||||
// select the contact again
|
||||
this.$router.push({
|
||||
name: 'contact',
|
||||
params: {
|
||||
selectedGroup: this.$route.params.selectedGroup,
|
||||
selectedContact: contact.key,
|
||||
},
|
||||
})
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
window.temp1 = error
|
||||
showError(t('contacts', 'An error occured while trying to copy the contact'))
|
||||
} finally {
|
||||
this.loadingUpdate = false
|
||||
}
|
||||
|
@ -600,6 +682,42 @@ export default {
|
|||
this.debounceUpdateContact()
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Clone the current contact to another addressbook
|
||||
*/
|
||||
async cloneContact() {
|
||||
// only one addressbook, let's clone it there
|
||||
if (this.pickedAddressbook && this.addressbooks.find(addressbook => addressbook.id === this.pickedAddressbook.id)) {
|
||||
console.debug('Cloning contact to', this.pickedAddressbook.name)
|
||||
await this.copyContactToAddressbook(this.pickedAddressbook.id)
|
||||
this.closePickAddressbookModal()
|
||||
} else if (this.addressbooksOptions.length === 1) {
|
||||
console.debug('Cloning contact to', this.addressbooksOptions[0].name)
|
||||
await this.copyContactToAddressbook(this.addressbooksOptions[0].id)
|
||||
} else {
|
||||
this.showPickAddressbookModal = true
|
||||
}
|
||||
},
|
||||
|
||||
closePickAddressbookModal() {
|
||||
this.showPickAddressbookModal = false
|
||||
this.pickedAddressbook = null
|
||||
},
|
||||
|
||||
/**
|
||||
* The user clicked the warning icon
|
||||
*/
|
||||
onWarningClick() {
|
||||
// if the user clicked the readonly icon, let's focus the clone button
|
||||
if (this.isReadOnly && this.addressbooksOptions.length > 0) {
|
||||
this.openedMenu = true
|
||||
this.$nextTick(() => {
|
||||
// focus the clone button
|
||||
this.$refs.actions.onMouseFocusAction({ target: this.$refs.cloneAction.$el })
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<div class="property__label" />
|
||||
|
||||
<!-- type selector -->
|
||||
<multiselect :options="availableProperties"
|
||||
<Multiselect :options="availableProperties"
|
||||
:placeholder="t('contacts', 'Choose property type')"
|
||||
class="property__value"
|
||||
track-by="id"
|
||||
|
@ -40,6 +40,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
|
||||
import rfcProps from '../../models/rfcProps'
|
||||
import Contact from '../../models/contact'
|
||||
import PropertyTitle from '../Properties/PropertyTitle'
|
||||
|
@ -49,6 +50,7 @@ export default {
|
|||
name: 'ContactDetailsAddNewProp',
|
||||
|
||||
components: {
|
||||
Multiselect,
|
||||
PropertyTitle,
|
||||
},
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
|
||||
<Modal v-if="maximizeAvatar"
|
||||
ref="modal"
|
||||
:clear-view-delay="-1"
|
||||
class="contact-header-modal"
|
||||
size="large"
|
||||
:title="contact.displayName"
|
||||
|
@ -86,7 +87,10 @@
|
|||
|
||||
<script>
|
||||
import debounce from 'debounce'
|
||||
import { ActionLink, ActionButton } from '@nextcloud/vue'
|
||||
import Actions from '@nextcloud/vue/dist/Components/Actions'
|
||||
import ActionLink from '@nextcloud/vue/dist/Components/ActionLink'
|
||||
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
|
||||
import Modal from '@nextcloud/vue/dist/Components/Modal'
|
||||
|
||||
import { getFilePickerBuilder } from '@nextcloud/dialogs'
|
||||
import { generateRemoteUrl } from '@nextcloud/router'
|
||||
|
@ -99,8 +103,10 @@ export default {
|
|||
name: 'ContactDetailsAvatar',
|
||||
|
||||
components: {
|
||||
Actions,
|
||||
ActionLink,
|
||||
ActionButton,
|
||||
Modal,
|
||||
},
|
||||
|
||||
props: {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<ActionButton icon="icon-delete" @click="deleteProperty">
|
||||
{{ t('contacts', 'Delete') }}
|
||||
</ActionButton>
|
||||
<actions :is="action"
|
||||
<Actions :is="action"
|
||||
v-for="(action, index) in actions"
|
||||
:key="index"
|
||||
:component="propertyComponent" />
|
||||
|
@ -33,12 +33,14 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { ActionButton } from '@nextcloud/vue'
|
||||
import Actions from '@nextcloud/vue/dist/Components/Actions'
|
||||
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
|
||||
|
||||
export default {
|
||||
name: 'PropertyActions',
|
||||
|
||||
components: {
|
||||
Actions,
|
||||
ActionButton,
|
||||
},
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
<div class="property__row">
|
||||
<!-- type selector -->
|
||||
<multiselect v-if="propModel.options"
|
||||
<Multiselect v-if="propModel.options"
|
||||
v-model="localType"
|
||||
:options="options"
|
||||
:searchable="false"
|
||||
|
@ -84,7 +84,8 @@
|
|||
<script>
|
||||
import debounce from 'debounce'
|
||||
import moment from 'moment'
|
||||
import { DatetimePicker } from '@nextcloud/vue'
|
||||
import DatetimePicker from '@nextcloud/vue/dist/Components/DatetimePicker'
|
||||
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
|
||||
import { getLocale } from '@nextcloud/l10n'
|
||||
import { VCardTime } from 'ical.js'
|
||||
|
||||
|
@ -96,6 +97,7 @@ export default {
|
|||
name: 'PropertyDateTime',
|
||||
|
||||
components: {
|
||||
Multiselect,
|
||||
DatetimePicker,
|
||||
PropertyTitle,
|
||||
PropertyActions,
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</div>
|
||||
|
||||
<!-- multiselect taggable groups with a limit to 3 groups shown -->
|
||||
<multiselect v-model="localValue"
|
||||
<Multiselect v-model="localValue"
|
||||
:options="groups"
|
||||
:placeholder="t('contacts', 'Add contact in group')"
|
||||
:multiple="true"
|
||||
|
@ -51,18 +51,23 @@
|
|||
<span slot="noResult">
|
||||
{{ t('settings', 'No results') }}
|
||||
</span>
|
||||
</multiselect>
|
||||
</Multiselect>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from 'debounce'
|
||||
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
|
||||
import Contact from '../../models/contact'
|
||||
|
||||
export default {
|
||||
name: 'PropertyGroups',
|
||||
|
||||
components: {
|
||||
Multiselect,
|
||||
},
|
||||
|
||||
props: {
|
||||
propModel: {
|
||||
type: Object,
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
<div class="property__row">
|
||||
<!-- type selector -->
|
||||
<multiselect v-if="propModel.options"
|
||||
<Multiselect v-if="propModel.options"
|
||||
v-model="localType"
|
||||
:options="options"
|
||||
:placeholder="t('contacts', 'Select type')"
|
||||
|
@ -101,6 +101,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
|
||||
import PropertyMixin from '../../mixins/PropertyMixin'
|
||||
import PropertyTitle from './PropertyTitle'
|
||||
import PropertyActions from './PropertyActions'
|
||||
|
@ -109,6 +110,7 @@ export default {
|
|||
name: 'PropertyMultipleText',
|
||||
|
||||
components: {
|
||||
Multiselect,
|
||||
PropertyTitle,
|
||||
PropertyActions,
|
||||
},
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
{{ propModel.readableName }}
|
||||
</div>
|
||||
|
||||
<multiselect v-model="matchedOptions"
|
||||
<Multiselect v-model="matchedOptions"
|
||||
:options="propModel.options"
|
||||
:placeholder="t('contacts', 'Select option')"
|
||||
:disabled="isSingleOption || isReadOnly"
|
||||
|
@ -59,6 +59,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
|
||||
import PropertyMixin from '../../mixins/PropertyMixin'
|
||||
import PropertyTitle from './PropertyTitle'
|
||||
import PropertyActions from './PropertyActions'
|
||||
|
@ -67,6 +68,7 @@ export default {
|
|||
name: 'PropertySelect',
|
||||
|
||||
components: {
|
||||
Multiselect,
|
||||
PropertyTitle,
|
||||
PropertyActions,
|
||||
},
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
<div class="property__row">
|
||||
<!-- type selector -->
|
||||
<multiselect v-if="propModel.options"
|
||||
<Multiselect v-if="propModel.options"
|
||||
v-model="localType"
|
||||
:options="options"
|
||||
:placeholder="t('contacts', 'Select type')"
|
||||
|
@ -92,6 +92,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
|
||||
import debounce from 'debounce'
|
||||
import PropertyMixin from '../../mixins/PropertyMixin'
|
||||
import PropertyTitle from './PropertyTitle'
|
||||
|
@ -101,6 +102,7 @@ export default {
|
|||
name: 'PropertyText',
|
||||
|
||||
components: {
|
||||
Multiselect,
|
||||
PropertyTitle,
|
||||
PropertyActions,
|
||||
},
|
||||
|
|
|
@ -93,18 +93,23 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { ActionLink, ActionButton, ActionInput, ActionCheckbox } from '@nextcloud/vue'
|
||||
import Actions from '@nextcloud/vue/dist/Components/Actions'
|
||||
import ActionLink from '@nextcloud/vue/dist/Components/ActionLink'
|
||||
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
|
||||
import ActionInput from '@nextcloud/vue/dist/Components/ActionInput'
|
||||
import ActionCheckbox from '@nextcloud/vue/dist/Components/ActionCheckbox'
|
||||
import ShareAddressBook from './SettingsAddressbookShare'
|
||||
|
||||
export default {
|
||||
name: 'SettingsAddressbook',
|
||||
|
||||
components: {
|
||||
ShareAddressBook,
|
||||
ActionLink,
|
||||
ActionButton,
|
||||
ActionInput,
|
||||
ActionCheckbox,
|
||||
ActionInput,
|
||||
ActionLink,
|
||||
Actions,
|
||||
ShareAddressBook,
|
||||
},
|
||||
|
||||
props: {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<template>
|
||||
<div class="addressbook-shares">
|
||||
<multiselect
|
||||
<Multiselect
|
||||
id="users-groups-search"
|
||||
:options="usersOrGroups"
|
||||
:searchable="true"
|
||||
|
@ -48,6 +48,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
|
||||
import client from '../../services/cdav'
|
||||
|
||||
import addressBookSharee from './SettingsAddressbookSharee'
|
||||
|
@ -55,9 +56,12 @@ import debounce from 'debounce'
|
|||
|
||||
export default {
|
||||
name: 'SettingsAddressbookShare',
|
||||
|
||||
components: {
|
||||
Multiselect,
|
||||
addressBookSharee,
|
||||
},
|
||||
|
||||
props: {
|
||||
addressbook: {
|
||||
type: Object,
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
@close="toggleModal">
|
||||
<section class="import-contact__modal-addressbook">
|
||||
<h3>{{ t('contacts', 'Import contacts') }}</h3>
|
||||
<multiselect
|
||||
<Multiselect
|
||||
v-if="!isSingleAddressbook"
|
||||
id="select-addressbook"
|
||||
v-model="selectedAddressbook"
|
||||
|
@ -47,7 +47,7 @@
|
|||
<template slot="singleLabel" slot-scope="{ option }">
|
||||
{{ t('contacts', `Import into the '{addressbookName}' addressbook`, { addressbookName: option.displayName }) }}
|
||||
</template>
|
||||
</multiselect>
|
||||
</Multiselect>
|
||||
</section>
|
||||
<section class="import-contact__modal-pick">
|
||||
<input id="contact-import"
|
||||
|
@ -84,6 +84,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Modal from '@nextcloud/vue/dist/Components/Modal'
|
||||
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
|
||||
import { encodePath } from '@nextcloud/paths'
|
||||
import { getCurrentUser } from '@nextcloud/auth'
|
||||
import { generateRemoteUrl } from '@nextcloud/router'
|
||||
|
@ -103,6 +105,11 @@ const picker = getFilePickerBuilder(t('contacts', 'Choose a vCard file to import
|
|||
export default {
|
||||
name: 'SettingsImportContacts',
|
||||
|
||||
components: {
|
||||
Modal,
|
||||
Multiselect,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
cancelRequest: () => {},
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<template>
|
||||
<div class="sort-contacts">
|
||||
<multiselect
|
||||
<Multiselect
|
||||
id="sort-by"
|
||||
:value="orderKeyOption"
|
||||
:searchable="false"
|
||||
|
@ -36,10 +36,15 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
|
||||
|
||||
export default {
|
||||
name: 'SettingsSortContacts',
|
||||
|
||||
components: {
|
||||
Multiselect,
|
||||
},
|
||||
|
||||
computed: {
|
||||
/* Order Keys */
|
||||
options() {
|
||||
|
|
10
src/main.js
10
src/main.js
|
@ -32,7 +32,6 @@ import { generateFilePath } from '@nextcloud/router'
|
|||
import { getRequestToken } from '@nextcloud/auth'
|
||||
|
||||
/** GLOBAL COMPONENTS AND DIRECTIVE */
|
||||
import { Actions, DatetimePicker, Multiselect, PopoverMenu, Modal } from '@nextcloud/vue'
|
||||
import ClickOutside from 'vue-click-outside'
|
||||
import VTooltip from '@nextcloud/vue/dist/Directives/Tooltip'
|
||||
import VueClipboard from 'vue-clipboard2'
|
||||
|
@ -48,13 +47,7 @@ __webpack_nonce__ = btoa(getRequestToken())
|
|||
// eslint-disable-next-line
|
||||
__webpack_public_path__ = generateFilePath('contacts', '', 'js/')
|
||||
|
||||
// Register global components
|
||||
Vue.component('Actions', Actions)
|
||||
Vue.component('DatetimePicker', DatetimePicker)
|
||||
Vue.component('Modal', Modal)
|
||||
Vue.component('Multiselect', Multiselect)
|
||||
Vue.component('PopoverMenu', PopoverMenu)
|
||||
|
||||
// Register global directives
|
||||
Vue.directive('ClickOutside', ClickOutside)
|
||||
Vue.directive('Tooltip', VTooltip)
|
||||
|
||||
|
@ -71,6 +64,7 @@ Vue.prototype.oc_config = oc_config
|
|||
Vue.prototype.OC = OC
|
||||
Vue.prototype.OCA = OCA
|
||||
|
||||
// Force redirect if rewrite enabled but accessed through index.php
|
||||
if (window.location.pathname.split('/')[1] === 'index.php'
|
||||
&& oc_config.modRewriteWorking) {
|
||||
router.push({
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
*/
|
||||
|
||||
import Vue from 'vue'
|
||||
import ICAL from 'ical.js'
|
||||
import pLimit from 'p-limit'
|
||||
|
||||
import Contact from '../models/contact'
|
||||
|
@ -407,7 +406,7 @@ const actions = {
|
|||
|
||||
// Get vcard string
|
||||
try {
|
||||
const vData = ICAL.stringify(contact.vCard.jCal)
|
||||
const vData = contact.vCard.toString()
|
||||
// push contact to server and use limit
|
||||
requests.push(limit(() => contact.addressbook.dav.createVCard(vData)
|
||||
.then((response) => {
|
||||
|
@ -512,6 +511,34 @@ const actions = {
|
|||
await context.commit('addContactToAddressbook', contact)
|
||||
return contact
|
||||
},
|
||||
|
||||
/**
|
||||
* Copy a contact to the provided addressbook
|
||||
*
|
||||
* @param {Object} context the store mutations
|
||||
* @param {Object} data destructuring object
|
||||
* @param {Contact} data.contact the contact to copy
|
||||
* @param {Object} data.addressbook the addressbook to move the contact to
|
||||
* @returns {Contact} the new contact object
|
||||
*/
|
||||
async copyContactToAddressbook(context, { contact, addressbook }) {
|
||||
// init new contact & strip old uid
|
||||
const vData = contact.vCard.toString().replace(/^UID.+/im, '')
|
||||
const newContact = new Contact(vData, addressbook)
|
||||
|
||||
try {
|
||||
const response = await contact.dav.copy(addressbook.dav)
|
||||
// setting the contact dav property
|
||||
Vue.set(newContact, 'dav', response)
|
||||
|
||||
} catch (error) {
|
||||
throw error
|
||||
}
|
||||
// success, update store
|
||||
await context.commit('addContact', newContact)
|
||||
await context.commit('addContactToAddressbook', newContact)
|
||||
return newContact
|
||||
},
|
||||
}
|
||||
|
||||
export default { state, mutations, getters, actions }
|
||||
|
|
|
@ -89,17 +89,15 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
AppContent,
|
||||
AppNavigation,
|
||||
AppNavigationItem,
|
||||
AppNavigationCounter,
|
||||
AppNavigationNew,
|
||||
AppNavigationSettings,
|
||||
ActionButton,
|
||||
Content,
|
||||
Modal,
|
||||
} from '@nextcloud/vue'
|
||||
import AppContent from '@nextcloud/vue/dist/Components/AppContent'
|
||||
import AppNavigation from '@nextcloud/vue/dist/Components/AppNavigation'
|
||||
import AppNavigationItem from '@nextcloud/vue/dist/Components/AppNavigationItem'
|
||||
import AppNavigationCounter from '@nextcloud/vue/dist/Components/AppNavigationCounter'
|
||||
import AppNavigationNew from '@nextcloud/vue/dist/Components/AppNavigationNew'
|
||||
import AppNavigationSettings from '@nextcloud/vue/dist/Components/AppNavigationSettings'
|
||||
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
|
||||
import Content from '@nextcloud/vue/dist/Components/Content'
|
||||
import Modal from '@nextcloud/vue/dist/Components/Modal'
|
||||
import isMobile from '@nextcloud/vue/dist/Mixins/isMobile'
|
||||
|
||||
import moment from 'moment'
|
||||
|
|
Loading…
Reference in New Issue