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
4 changes: 2 additions & 2 deletions js/privacy-main.js

Large diffs are not rendered by default.

43 changes: 14 additions & 29 deletions js/privacy-main.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,37 +33,22 @@
* MIT Licensed
*/

/*! For license information please see ActionButton.js.LICENSE.txt */
/*!
* focus-trap 7.1.0
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*/

/*! For license information please see Actions.js.LICENSE.txt */
/*!
* tabbable 6.0.1
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/

/*! For license information please see Avatar.js.LICENSE.txt */
/*! For license information please see NcActionButton.js.LICENSE.txt */

/*! For license information please see Multiselect.js.LICENSE.txt */
/*! For license information please see NcActions.js.LICENSE.txt */

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
/*! For license information please see NcAvatar.js.LICENSE.txt */

/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.16.1
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/*! For license information please see NcMultiselect.js.LICENSE.txt */

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
2 changes: 1 addition & 1 deletion js/privacy-main.js.map

Large diffs are not rendered by default.

689 changes: 390 additions & 299 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 @@ -34,7 +34,7 @@
"@nextcloud/initial-state": "^2.0.0",
"@nextcloud/l10n": "^1.6.0",
"@nextcloud/router": "^2.0.0",
"@nextcloud/vue": "^5.3.1",
"@nextcloud/vue": "^7.1.0-beta.1",
"vue": "^2.7.14",
"vue-click-outside": "^1.1.0"
},
Expand Down
30 changes: 15 additions & 15 deletions src/components/Admins.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@
<div class="who-has-access">
<span :class="{ hidden: !isLoading }" class="icon icon-loading" />
<div v-for="admin in admins" :key="admin.id" class="admin-avatar-container">
<Avatar :user="admin.internal ? admin.id : null"
<NcAvatar :user="admin.internal ? admin.id : null"
:display-name="admin.displayname"
:size="64"
:is-no-user="!admin.internal"
:show-user-status="false" />
<Actions v-if="!admin.internal">
<ActionButton icon="icon-close" @click="deleteAdditionalAdmin(admin)">
<NcActions v-if="!admin.internal">
<NcActionButton icon="icon-close" @click="deleteAdditionalAdmin(admin)">
{{ $t('privacy', 'Remove external admin') }}
</ActionButton>
</Actions>
</NcActionButton>
</NcActions>
</div>

<div v-if="$is_admin">
<Actions v-if="!isAdding" class="addAdditionalAdmin">
<ActionButton icon="icon-add" @click.stop.prevent="openNewAdmin">
<NcActions v-if="!isAdding" class="addAdditionalAdmin">
<NcActionButton icon="icon-add" @click.stop.prevent="openNewAdmin">
{{ $t('privacy', 'Add external admin') }}
</ActionButton>
</Actions>
</NcActionButton>
</NcActions>
<form v-if="isAdding"
v-click-outside="closeNewAdmin"
class="addAdditionalAdminFormContainer"
Expand All @@ -66,16 +66,16 @@ import ClickOutside from 'vue-click-outside'
import HttpClient from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
import { showError } from '@nextcloud/dialogs'
import Actions from '@nextcloud/vue/dist/Components/Actions.js'
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton.js'
import Avatar from '@nextcloud/vue/dist/Components/Avatar.js'
import NcActions from '@nextcloud/vue/dist/Components/NcActions.js'
import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'
import NcAvatar from '@nextcloud/vue/dist/Components/NcAvatar.js'

export default {
name: 'Admins',
components: {
Actions,
ActionButton,
Avatar,
NcActions,
NcActionButton,
NcAvatar,
},
directives: {
ClickOutside,
Expand Down
14 changes: 7 additions & 7 deletions src/components/Encryption.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
v-html="label" />
<!--eslint-enable-->
</div>
<Actions v-if="$is_admin && !isEditing">
<ActionButton icon="icon-rename" @click.stop.prevent="openEditFullDiskEncryptionForm" />
</Actions>
<NcActions v-if="$is_admin && !isEditing">
<NcActionButton icon="icon-rename" @click.stop.prevent="openEditFullDiskEncryptionForm" />
</NcActions>
<div v-if="isEditing" v-click-outside="cancelEditFullDiskEncryptionForm">
<form>
<input id="fullDiskEncryptionEnabledCheckbox"
Expand All @@ -54,16 +54,16 @@ import ClickOutside from 'vue-click-outside'

import HttpClient from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
import Actions from '@nextcloud/vue/dist/Components/Actions.js'
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton.js'
import NcActions from '@nextcloud/vue/dist/Components/NcActions.js'
import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'
import { loadState } from '@nextcloud/initial-state'
import { showError } from '@nextcloud/dialogs'

export default {
name: 'Encryption',
components: {
Actions,
ActionButton,
NcActions,
NcActionButton,
},
directives: {
ClickOutside,
Expand Down
22 changes: 11 additions & 11 deletions src/components/Location.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
<p v-show="!isEditingLocation">
<span v-show="country">{{ $t('privacy', 'Your data is located in:') }} <strong>{{ country }}</strong>.</span>
<span v-show="!country">{{ $t('privacy', 'The admin has not selected the location of the server yet.') }}</span>
<Actions v-if="$is_admin">
<ActionButton icon="icon-rename" @click="editLocation">
<NcActions v-if="$is_admin">
<NcActionButton icon="icon-rename" @click="editLocation">
{{ t('privacy', 'Change data location') }}
</ActionButton>
</Actions>
</NcActionButton>
</NcActions>
</p>
<div v-show="isEditingLocation" class="multiselect-container">
<Multiselect :disabled="isSavingChanges"
<NcMultiselect :disabled="isSavingChanges"
:options="options"
:searchable="true"
track-by="code"
Expand All @@ -47,9 +47,9 @@
<script>
import HttpClient from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect.js'
import Actions from '@nextcloud/vue/dist/Components/Actions.js'
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton.js'
import NcMultiselect from '@nextcloud/vue/dist/Components/NcMultiselect.js'
import NcActions from '@nextcloud/vue/dist/Components/NcActions.js'
import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'
import { loadState } from '@nextcloud/initial-state'
import { showError } from '@nextcloud/dialogs'

Expand All @@ -62,10 +62,10 @@ import MapSvg from './Map.vue'
export default {
name: 'Location',
components: {
ActionButton,
Actions,
NcActionButton,
NcActions,
MapSvg,
Multiselect,
NcMultiselect,
},
data() {
return {
Expand Down
6 changes: 3 additions & 3 deletions src/components/Shares.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<span :class="{hidden: !isEmptyList}">
{{ $t('privacy', 'You don\'t have any shares with individual users.') }}
</span>
<Avatar v-for="uid in uniqueShareUIDs"
<NcAvatar v-for="uid in uniqueShareUIDs"
:key="uid"
:user="uid"
:display-name="uidDisplaynameMap[uid]"
Expand All @@ -41,12 +41,12 @@ import HttpClient from '@nextcloud/axios'
import { generateOcsUrl } from '@nextcloud/router'
import { getCurrentUser } from '@nextcloud/auth'
import { showError } from '@nextcloud/dialogs'
import Avatar from '@nextcloud/vue/dist/Components/Avatar.js'
import NcAvatar from '@nextcloud/vue/dist/Components/NcAvatar.js'

export default {
name: 'Shares',
components: {
Avatar,
NcAvatar,
},
data() {
return {
Expand Down
3 changes: 0 additions & 3 deletions css/privacy.scss → src/css/privacy.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
@include icon-black-white('control', 'privacy', 1);
@include icon-black-white('freedom', 'privacy', 1);
@include icon-black-white('knowledge', 'privacy', 1);

.user-data-manifesto-rights {
padding: 15px 0;
Expand Down
2 changes: 2 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import Location from './components/Location.vue'
import Encryption from './components/Encryption.vue'
import Shares from './components/Shares.vue'

import './css/privacy.scss'

Vue.prototype.$t = translate
Vue.prototype.$n = translatePlural
Vue.prototype.$is_admin = OC.isUserAdmin()
Expand Down