summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJessica <jessica@Absolventas-MacBook-Pro.local>2018-08-20 18:10:07 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-08-28 15:43:24 +0200
commitcad9ce3b813e83e0b4175997829e10704bc9141b (patch)
treef593fe4af3d6dfe1c49613d310fa3aa42b111a5d
parentab5177e35a18614ff182026af3998dc18fb62893 (diff)
updated scss files to include copyright and only linked in oen file
-rw-r--r--css/contacts.scss4
-rw-r--r--css/contacts.scss.orig26
-rw-r--r--css/settings-section.scss5
-rw-r--r--css/settings/settings-addressbook-sharee.scss23
-rw-r--r--css/settings/settings-addressbook-shares.scss54
-rw-r--r--css/settings/settings-addressbook.scss28
-rw-r--r--src/store/addressbooks.js.orig285
7 files changed, 74 insertions, 351 deletions
diff --git a/css/contacts.scss b/css/contacts.scss
index 2c116110..8c5f9ba6 100644
--- a/css/contacts.scss
+++ b/css/contacts.scss
@@ -16,7 +16,9 @@ $grid-input-height-with-margin: #{$grid-height-unit - $grid-input-margin * 2};
@import 'settings-section';
-@import 'settings';
+@import 'settings/settings-addressbook';
+@import 'settings/settings-addressbook-shares';
+@import 'settings/settings-addressbook-sharee';
@import 'ContactDetails';
@import './Properties/Properties';
@import './Properties/PropertyTitle';
diff --git a/css/contacts.scss.orig b/css/contacts.scss.orig
deleted file mode 100644
index da8fbc66..00000000
--- a/css/contacts.scss.orig
+++ /dev/null
@@ -1,26 +0,0 @@
-<<<<<<< HEAD
-$grid-height-unit: 40px;
-$grid-input-padding: 7px;
-$grid-input-margin: 3px;
-$grid-column-width: 380px;
-$grid-input-height-with-margin: #{$grid-height-unit - $grid-input-margin * 2};
-
-@mixin generate-grid-span($default-unit) {
- // we only supports 10 props of the same type
- @for $i from 1 through 10 {
- &.grid-span-#{$i} {
- // default unit + title + bottom padding
- grid-row-start: span #{$i * $default-unit};
- }
- }
-}
-
-
-@import 'settings';
-@import 'ContactDetails';
-@import './Properties/Properties';
-@import './Properties/PropertyTitle';
-=======
-@import 'settings-section';
-@import 'details';
->>>>>>> added BEM styling and structuring after meeting
diff --git a/css/settings-section.scss b/css/settings-section.scss
index a2696d3a..c0786008 100644
--- a/css/settings-section.scss
+++ b/css/settings-section.scss
@@ -21,11 +21,6 @@
*
*/
-
-@import 'settings/settings-addressbook';
-@import 'settings/settings-addressbook-shares';
-@import 'settings/settings-addressbook-sharee';
-
// contacts settings section
#app-settings-content {
.settings-section {
diff --git a/css/settings/settings-addressbook-sharee.scss b/css/settings/settings-addressbook-sharee.scss
index 9ea3bd0b..d11a5b6a 100644
--- a/css/settings/settings-addressbook-sharee.scss
+++ b/css/settings/settings-addressbook-sharee.scss
@@ -1,3 +1,26 @@
+/**
+ * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
+ *
+ * @author John Molakvoæ <skjnldsv@protonmail.com>
+ * author Team Popcorn <teampopcornberlin@gmail.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
.addressbook__sharee {
padding: 0 5px;
display: inline-flex;
diff --git a/css/settings/settings-addressbook-shares.scss b/css/settings/settings-addressbook-shares.scss
index c8ea519e..365b5b0f 100644
--- a/css/settings/settings-addressbook-shares.scss
+++ b/css/settings/settings-addressbook-shares.scss
@@ -1,34 +1,28 @@
+/**
+ * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
+ *
+ * @author John Molakvoæ <skjnldsv@protonmail.com>
+ * author Team Popcorn <teampopcornberlin@gmail.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
.addressbook-shares {
width: 100%;
- .dropdown-menu {
- border: 1px solid #d1d1d1;
- border-radius: 0 0 3px 3px;
- max-height: 200px;
- margin-top: -2px;
- overflow-y: auto;
- display: flex;
- flex-wrap: wrap;
- background-color: #fff;
- position: relative;
- width: 100%;
- z-index: 500;
- top: -2px;
- left: 0px;
- li {
- width: 100%;
- padding: 8px 9px 9px;
- cursor: pointer;
- }
- li.active {
- background: #f0f0f0;
- }
- }
- &__input {
- width: 100% !important;
- margin-right: 0;
- padding-right: 30px;
- text-overflow: ellipsis;
- }
&__list {
margin-top: 8px;
margin-bottom: 12px;
@@ -36,7 +30,7 @@
flex-direction: column;
}
- .multiselect-vue {
+ .multiselect.multiselect-vue {
width: inherit;
.multiselect__tags:focus-within,
diff --git a/css/settings/settings-addressbook.scss b/css/settings/settings-addressbook.scss
index bda520fa..6a72f935 100644
--- a/css/settings/settings-addressbook.scss
+++ b/css/settings/settings-addressbook.scss
@@ -1,4 +1,26 @@
-// BLOCK
+/**
+ * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
+ *
+ * @author John Molakvoæ <skjnldsv@protonmail.com>
+ * author Team Popcorn <teampopcornberlin@gmail.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
.addressbook {
display: flex;
align-items: center;
@@ -26,6 +48,4 @@
&__share {
margin-left: auto;
}
-}
-
-// MODIFIER \ No newline at end of file
+} \ No newline at end of file
diff --git a/src/store/addressbooks.js.orig b/src/store/addressbooks.js.orig
deleted file mode 100644
index 141b8b31..00000000
--- a/src/store/addressbooks.js.orig
+++ /dev/null
@@ -1,285 +0,0 @@
-/**
- * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
- *
- * @author John Molakvoæ <skjnldsv@protonmail.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-/* eslint-disable-next-line import/no-webpack-loader-syntax */
-import vcfFile from '!raw-loader!./FakeName.vcf'
-import parseVcf from '../services/parseVcf'
-import Vue from 'vue'
-
-import client from '../services/cdav'
-
-const addressbookModel = {
- id: '',
- displayName: '',
- enabled: true,
- owner: '',
- shares: [],
- contacts: {},
- url: ''
-}
-
-const state = {
- addressbooks: []
-}
-
-const mutations = {
-
- /**
- * Add addressbook into state
- *
- * @param {Object} state Default state
- * @param {Object} addressbooks Addressbook
- */
- addAddressbooks(state, addressbook) {
- // extend the addressbook to the default model
- state.addressbooks.push(Object.assign({}, addressbookModel, addressbook))
- },
-
- /**
- * Append a list of contacts to an addressbook
- * and remove duplicates
- *
- * @param {Object} state
- * @param {Object} data
- * @param {Object} data.addressbook the addressbook
- * @param {Contact[]} data.contacts array of contacts to append
- */
- appendContactsToAddressbook(state, { addressbook, contacts }) {
- addressbook = state.addressbooks.find(search => search === addressbook)
-
- // convert list into an array and remove duplicate
- addressbook.contacts = contacts.reduce((list, contact) => {
- if (list[contact.uid]) {
- console.debug('Duplicate contact overrided', list[contact.uid], contact)
- }
- Vue.set(list, contact.uid, contact)
- return list
- }, addressbook.contacts)
- },
-
- /**
- * Add a contact to an addressbook and overwrite if duplicate uid
- *
- * @param {Object} state
- * @param {Contact} contact
- */
- addContactToAddressbook(state, contact) {
- let addressbook = state.addressbooks.find(search => search.id === contact.addressbook.id)
- Vue.set(addressbook.contacts, contact.uid, contact)
- },
-
- /**
- * Delete a contact in a specified addressbook
- *
- * @param {Object} state
- * @param {Contact} contact the contact to delete
- */
- deleteContactFromAddressbook(state, contact) {
- let addressbook = state.addressbooks.find(search => search.id === contact.addressbook.id)
- Vue.delete(addressbook, contact.uid)
- },
-
- /**
- * Share addressbook with a user or group
- *
- * @param {Object} state
- * @param {Object} data
- * @param {Object} data.addressbook the addressbook
- * @param {String} data.sharee the sharee
- * @param {Boolean} data.group group
- */
-<<<<<<< HEAD
- shareAddressbook(state, [ addressbook, sharee ]) {
- addressbook = state.addressbooks.find(search => search === addressbook)
-=======
- shareAddressbook(state, { addressbook, sharee, group }) {
- addressbook = state.addressbooks.find(search => search.id === addressbook.id)
->>>>>>> refractored and changed comments, fixed bug with search for sharees function
- let newSharee = {}
- newSharee.displayname = sharee
- newSharee.writeable = false
- addressbook.shares.push(newSharee)
- },
-
- /**
- * Remove Sharee from addressbook shares list
- *
- * @param {Object} state
- * @param {Object} sharee the sharee
- */
- removeSharee(state, sharee) {
- let addressbook = state.addressbooks.find(search => {
- for (let i in search.shares) {
- if (search.shares[i] === sharee) {
- return true
- }
- }
- })
- addressbook.shares.splice(addressbook.shares.indexOf(sharee), 1)
- },
-
- /**
- * Toggle sharee's writable permission
- *
- * @param {Object} state
- * @param {Object} sharee the sharee
- */
- updateShareeWritable(state, sharee) {
- let addressbook = state.addressbooks.find(search => {
- for (let i in search.shares) {
- if (search.shares[i] === sharee) {
- return true
- }
- }
- })
- sharee = addressbook.shares.find(search => search === sharee)
- sharee.writeable = !sharee.writeable
- }
-
-}
-
-const getters = {
- getAddressbooks: state => state.addressbooks
-}
-
-const actions = {
-
- /**
- * Retrieve and commit addressbooks
- *
- * @param {Object} context
- * @returns {Promise} fetch and commit
- */
- async getAddressbooks(context) {
- let addressbooks = client.addressbookHomes.map(addressbook => {
- return {
- id: 'ab1',
- displayName: 'Addressbook 1',
- enabled: true,
- owner: 'admin',
-<<<<<<< HEAD
- dav: addressbook
-=======
- shares: [],
- contacts: {}
- },
- {
- id: 'ab2',
- displayName: 'Addressbook 2',
- enabled: false,
- owner: 'admin',
- shares: [],
- contacts: {}
- },
- {
- id: 'ab3',
- displayName: 'Addressbook 3',
- enabled: true,
- owner: 'User1',
- shares: [],
- contacts: {}
->>>>>>> refractored and changed comments, fixed bug with search for sharees function
- }
- ]
- // fake request
- return new Promise((resolve, reject) => {
- return setTimeout(() => {
- addressbooks.forEach(addressbook => {
- context.commit('addAddressbooks', addressbook)
- })
- resolve()
- return addressbooks
- }, 1000)
- })
- addressbooks.forEach(addressbook => {
- context.commit('addAddressbooks', addressbook)
- })
- return addressbooks
- },
-
- /**
- * Retrieve the contacts of the specified addressbook
- * and commit the results
- *
- * @param {Object} context
- * @param {Object} addressbook
- */
- async getContactsFromAddressBook(context, addressbook) {
- let contacts = parseVcf(vcfFile, addressbook)
- context.commit('appendContactsToAddressbook', { addressbook, contacts })
- context.commit('appendContacts', contacts)
- context.commit('sortContacts')
- context.commit('appendGroupsFromContacts', contacts)
- },
-
- /**
- * Remove sharee from Addressbook
- * @param {Object} context Current context
- * @param {Object} sharee Addressbook sharee object
- */
- removeSharee(context, sharee) {
- // Remove sharee from addressbook.
- context.commit('removeSharee', sharee)
- },
-
- /**
- * Toggle permissions of Addressbook Sharees writeable rights
- * @param {Object} context Current context
- * @param {Object} sharee Addressbook sharee object
- */
- toggleShareeWritable(context, sharee) {
- // Toggle sharee edit permissions.
- context.commit('updateShareeWritable', sharee)
- },
-
- /**
- * Share Adressbook with User or Group
- * @param {Object} context Current context
- * @param {Object} data.addressbook the addressbook
- * @param {String} data.sharee the sharee
- * @param {Boolean} data.group group
- */
- shareAddressbook(context, { addressbook, sharee, group }) {
- // Share addressbook with entered group or user
-<<<<<<< HEAD
- context.commit('shareAddressbook', [ addressbook, sharee, group ])
- },
-
- /**
- * Move a contact to the provided addressbook
- *
- * @param {Object} context
- * @param {Object} data
- * @param {Contact} data.contact
- * @param {Object} data.addressbook
- */
- moveContactToAddressbook(context, { contact, addressbook }) {
- context.commit('deleteContactFromAddressbook', contact)
- context.commit('updateContactAddressbook', { contact, addressbook })
- context.commit('addContactToAddressbook', contact)
-=======
- context.commit('shareAddressbook', { addressbook, sharee, group })
->>>>>>> refractored and changed comments, fixed bug with search for sharees function
- }
-}
-
-export default { state, mutations, getters, actions }