aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src/components/PersonalInfo/DetailsSection.vue
blob: a69b6d58ed73f4124b29527bbfb9740a4bbf46b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!--
  - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  - SPDX-License-Identifier: AGPL-3.0-or-later
-->

<template>
	<section>
		<HeaderBar :is-heading="true" :readable="t('settings', 'Details')" />

		<div class="details">
			<div class="details__groups">
				<Account :size="20" />
				<div class="details__groups-info">
					<p>{{ t('settings', 'You are a member of the following groups:') }}</p>
					<p class="details__groups-list">
						{{ groups.join(', ') }}
					</p>
				</div>
			</div>
			<div class="details__quota">
				<CircleSlice :size="20" />
				<div class="details__quota-info">
					<p class="details__quota-text" v-html="quotaText" />
					<NcProgressBar size="medium"
						:value="usageRelative"
						:error="usageRelative > 80" />
				</div>
			</div>
		</div>
	</section>
</template>

<script>
import { loadState } from '@nextcloud/initial-state'
import NcProgressBar from '@nextcloud/vue/dist/Components/NcProgressBar.js'

import Account from 'vue-material-design-icons/Account.vue'
import CircleSlice from 'vue-material-design-icons/CircleSlice3.vue'

import HeaderBar from './shared/HeaderBar.vue'

/** SYNC to be kept in sync with `lib/public/Files/FileInfo.php` */
const SPACE_UNLIMITED = -3

const { groups, quota, totalSpace, usage, usageRelative } = loadState('settings', 'personalInfoParameters', {})

export default {
	name: 'DetailsSection',

	components: {
		Account,
		CircleSlice,
		HeaderBar,
		NcProgressBar,
	},

	data() {
		return {
			groups,
			usageRelative,
		}
	},

	computed: {
		quotaText() {
			if (quota === SPACE_UNLIMITED) {
				return t('settings', 'You are using <strong>{usage}</strong>', { usage })
			}
			return t(
				'settings',
				'You are using <strong>{usage}</strong> of <strong>{totalSpace}</strong> (<strong>{usageRelative}%</strong>)',
				{ usage, totalSpace, usageRelative },
			)
		},
	},
}
</script>

<style lang="scss" scoped>
.details {
	display: flex;
	flex-direction: column;
	margin-block: 10px;
	margin-inline: 0 32px;
	gap: 16px 0;
	color: var(--color-text-maxcontrast);

	&__groups,
	&__quota {
		display: flex;
		gap: 0 10px;

		&-info {
			display: flex;
			flex-direction: column;
			width: 100%;
			gap: 4px 0;
		}

		&-list {
			font-weight: bold;
		}

		&:deep(.material-design-icon) {
			align-self: flex-start;
			margin-top: 2px;
		}
	}
}
</style>
Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# 
# Translators:
# mnestis <transifex@mnestis.net>, 2013
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-10-27 02:28-0400\n"
"PO-Revision-Date: 2013-10-23 10:41+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/owncloud/language/en_GB/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: en_GB\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: private/app.php:243
#, php-format
msgid ""
"App \"%s\" can't be installed because it is not compatible with this version"
" of ownCloud."
msgstr "App \"%s\" can't be installed because it is not compatible with this version of ownCloud."

#: private/app.php:255
msgid "No app name specified"
msgstr "No app name specified"

#: private/app.php:360
msgid "Help"
msgstr "Help"

#: private/app.php:373
msgid "Personal"
msgstr "Personal"

#: private/app.php:384
msgid "Settings"
msgstr "Settings"

#: private/app.php:396
msgid "Users"
msgstr "Users"

#: private/app.php:409
msgid "Admin"
msgstr "Admin"

#: private/app.php:873
#, php-format
msgid "Failed to upgrade \"%s\"."
msgstr "Failed to upgrade \"%s\"."

#: private/avatar.php:60
msgid "Unknown filetype"
msgstr "Unknown filetype"

#: private/avatar.php:65
msgid "Invalid image"
msgstr "Invalid image"

#: private/defaults.php:36
msgid "web services under your control"
msgstr "web services under your control"

#: private/files.php:66 private/files.php:98
#, php-format
msgid "cannot open \"%s\""
msgstr "cannot open \"%s\""

#: private/files.php:226
msgid "ZIP download is turned off."
msgstr "ZIP download is turned off."

#: private/files.php:227
msgid "Files need to be downloaded one by one."
msgstr "Files need to be downloaded one by one."

#: private/files.php:228 private/files.php:256
msgid "Back to Files"
msgstr "Back to Files"

#: private/files.php:253
msgid "Selected files too large to generate zip file."
msgstr "Selected files too large to generate zip file."

#: private/files.php:254
msgid ""
"Download the files in smaller chunks, seperately or kindly ask your "
"administrator."
msgstr "Download the files in smaller chunks, seperately or kindly ask your administrator."

#: private/installer.php:63
msgid "No source specified when installing app"
msgstr "No source specified when installing app"

#: private/installer.php:70
msgid "No href specified when installing app from http"
msgstr "No href specified when installing app from http"

#: private/installer.php:75
msgid "No path specified when installing app from local file"
msgstr "No path specified when installing app from local file"

#: private/installer.php:89
#, php-format
msgid "Archives of type %s are not supported"
msgstr "Archives of type %s are not supported"

#: private/installer.php:103
msgid "Failed to open archive when installing app"
msgstr "Failed to open archive when installing app"

#: private/installer.php:125
msgid "App does not provide an info.xml file"
msgstr "App does not provide an info.xml file"

#: private/installer.php:131
msgid "App can't be installed because of not allowed code in the App"
msgstr "App can't be installed because of unallowed code in the App"

#: private/installer.php:140
msgid ""
"App can't be installed because it is not compatible with this version of "
"ownCloud"
msgstr "App can't be installed because it is not compatible with this version of ownCloud"

#: private/installer.php:146
msgid ""
"App can't be installed because it contains the <shipped>true</shipped> tag "
"which is not allowed for non shipped apps"
msgstr "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps"

#: private/installer.php:152
msgid ""
"App can't be installed because the version in info.xml/version is not the "
"same as the version reported from the app store"
msgstr "App can't be installed because the version in info.xml/version is not the same as the version reported from the app store"

#: private/installer.php:162
msgid "App directory already exists"
msgstr "App directory already exists"

#: private/installer.php:175
#, php-format
msgid "Can't create app folder. Please fix permissions. %s"
msgstr "Can't create app folder. Please fix permissions. %s"

#: private/json.php:28
msgid "Application is not enabled"
msgstr "Application is not enabled"

#: private/json.php:39 private/json.php:62 private/json.php:73
msgid "Authentication error"
msgstr "Authentication error"

#: private/json.php:51
msgid "Token expired. Please reload page."
msgstr "Token expired. Please reload page."

#: private/search/provider/file.php:18 private/search/provider/file.php:36
msgid "Files"
msgstr "Files"

#: private/search/provider/file.php:27 private/search/provider/file.php:34
msgid "Text"
msgstr "Text"

#: private/search/provider/file.php:30
msgid "Images"
msgstr "Images"

#: private/setup/abstractdatabase.php:22
#, php-format
msgid "%s enter the database username."
msgstr "%s enter the database username."

#: private/setup/abstractdatabase.php:25
#, php-format
msgid "%s enter the database name."
msgstr "%s enter the database name."

#: private/setup/abstractdatabase.php:28
#, php-format
msgid "%s you may not use dots in the database name"
msgstr "%s you may not use dots in the database name"

#: private/setup/mssql.php:20
#, php-format
msgid "MS SQL username and/or password not valid: %s"
msgstr "MS SQL username and/or password not valid: %s"

#: private/setup/mssql.php:21 private/setup/mysql.php:13
#: private/setup/oci.php:114 private/setup/postgresql.php:24
#: private/setup/postgresql.php:70
msgid "You need to enter either an existing account or the administrator."
msgstr "You need to enter either an existing account or the administrator."

#: private/setup/mysql.php:12
msgid "MySQL username and/or password not valid"
msgstr "MySQL username and/or password not valid"

#: private/setup/mysql.php:67 private/setup/oci.php:54
#: private/setup/oci.php:121 private/setup/oci.php:147
#: private/setup/oci.php:154 private/setup/oci.php:165
#: private/setup/oci.php:172 private/setup/oci.php:181
#: private/setup/oci.php:189 private/setup/oci.php:198
#: private/setup/oci.php:204 private/setup/postgresql.php:89
#: private/setup/postgresql.php:98 private/setup/postgresql.php:115
#: private/setup/postgresql.php:125 private/setup/postgresql.php:134
#, php-format
msgid "DB Error: \"%s\""
msgstr "DB Error: \"%s\""

#: private/setup/mysql.php:68 private/setup/oci.php:55
#: private/setup/oci.php:122 private/setup/oci.php:148
#: private/setup/oci.php:155 private/setup/oci.php:166
#: private/setup/oci.php:182 private/setup/oci.php:190
#: private/setup/oci.php:199 private/setup/postgresql.php:90
#: private/setup/postgresql.php:99 private/setup/postgresql.php:116
#: private/setup/postgresql.php:126 private/setup/postgresql.php:135
#, php-format
msgid "Offending command was: \"%s\""
msgstr "Offending command was: \"%s\""

#: private/setup/mysql.php:85
#, php-format
msgid "MySQL user '%s'@'localhost' exists already."
msgstr "MySQL user '%s'@'localhost' exists already."

#: private/setup/mysql.php:86
msgid "Drop this user from MySQL"
msgstr "Drop this user from MySQL"

#: private/setup/mysql.php:91
#, php-format
msgid "MySQL user '%s'@'%%' already exists"
msgstr "MySQL user '%s'@'%%' already exists"

#: private/setup/mysql.php:92
msgid "Drop this user from MySQL."
msgstr "Drop this user from MySQL."

#: private/setup/oci.php:34
msgid "Oracle connection could not be established"
msgstr "Oracle connection could not be established"

#: private/setup/oci.php:41 private/setup/oci.php:113
msgid "Oracle username and/or password not valid"
msgstr "Oracle username and/or password not valid"

#: private/setup/oci.php:173 private/setup/oci.php:205
#, php-format
msgid "Offending command was: \"%s\", name: %s, password: %s"
msgstr "Offending command was: \"%s\", name: %s, password: %s"

#: private/setup/postgresql.php:23 private/setup/postgresql.php:69
msgid "PostgreSQL username and/or password not valid"
msgstr "PostgreSQL username and/or password not valid"

#: private/setup.php:28
msgid "Set an admin username."
msgstr "Set an admin username."

#: private/setup.php:31
msgid "Set an admin password."
msgstr "Set an admin password."

#: private/setup.php:184
msgid ""
"Your web server is not yet properly setup to allow files synchronization "
"because the WebDAV interface seems to be broken."
msgstr "Your web server is not yet properly setup to allow files synchronisation because the WebDAV interface seems to be broken."

#: private/setup.php:185
#, php-format
msgid "Please double check the <a href='%s'>installation guides</a>."
msgstr "Please double check the <a href='%s'>installation guides</a>."

#: private/tags.php:194
#, php-format
msgid "Could not find category \"%s\""
msgstr "Could not find category \"%s\""

#: private/template/functions.php:130
msgid "seconds ago"
msgstr "seconds ago"

#: private/template/functions.php:131
msgid "%n minute ago"
msgid_plural "%n minutes ago"
msgstr[0] "%n minute ago"
msgstr[1] "%n minutes ago"

#: private/template/functions.php:132
msgid "%n hour ago"
msgid_plural "%n hours ago"
msgstr[0] "%n hour ago"
msgstr[1] "%n hours ago"

#: private/template/functions.php:133
msgid "today"
msgstr "today"

#: private/template/functions.php:134
msgid "yesterday"
msgstr "yesterday"

#: private/template/functions.php:136
msgid "%n day go"
msgid_plural "%n days ago"
msgstr[0] "%n day go"
msgstr[1] "%n days ago"

#: private/template/functions.php:138
msgid "last month"
msgstr "last month"

#: private/template/functions.php:139
msgid "%n month ago"
msgid_plural "%n months ago"
msgstr[0] "%n month ago"
msgstr[1] "%n months ago"

#: private/template/functions.php:141
msgid "last year"
msgstr "last year"

#: private/template/functions.php:142
msgid "years ago"
msgstr "years ago"

#: private/template.php:297 public/util.php:103
msgid "Caused by:"
msgstr "Caused by:"