diff options
author | dartcafe <github@dartcafe.de> | 2022-10-29 11:08:57 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2022-10-29 11:08:57 +0300 |
commit | 250124a449d2e0637c73b2551656cf03715f1790 (patch) | |
tree | 6ac3c848f5ae1465c9f96bd31eedf503793ea022 | |
parent | 99719c34c73c2411cf4553d062454686d1fe83f3 (diff) |
final tidy
Signed-off-by: dartcafe <github@dartcafe.de>
-rw-r--r-- | img/polls-black.svg | 7 | ||||
-rw-r--r-- | lib/Activity/PollChanges.php | 2 | ||||
-rw-r--r-- | lib/Notification/Notifier.php | 2 | ||||
-rw-r--r-- | lib/Provider/ActivityProvider.php | 2 | ||||
-rw-r--r-- | lib/Settings/AdminSection.php | 2 | ||||
-rw-r--r-- | lib/Settings/PersonalSection.php | 2 | ||||
-rw-r--r-- | src/js/App.vue | 1 | ||||
-rw-r--r-- | src/js/assets/icons/material-design/email.svg | 1 | ||||
-rw-r--r-- | src/js/assets/icons/material-design/link-variant.svg | 1 | ||||
-rw-r--r-- | src/js/assets/icons/material-design/share-variant.svg | 1 | ||||
-rw-r--r-- | src/js/assets/scss/icons-md.scss | 25 | ||||
-rw-r--r-- | src/js/components/User/UserItem.vue | 34 |
12 files changed, 17 insertions, 63 deletions
diff --git a/img/polls-black.svg b/img/polls-black.svg deleted file mode 100644 index acaf7958..00000000 --- a/img/polls-black.svg +++ /dev/null @@ -1,7 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" height="32" width="32" viewBox="0 0 32 32"> - <g fill="#000"> - <rect y="2" x="3" height="26" width="7" /> - <rect y="12" x="12" height="16" width="7" /> - <rect y="8" x="21" height="20" width="7" /> - </g> -</svg> diff --git a/lib/Activity/PollChanges.php b/lib/Activity/PollChanges.php index 30dcab5f..6a492fd2 100644 --- a/lib/Activity/PollChanges.php +++ b/lib/Activity/PollChanges.php @@ -54,7 +54,7 @@ class PollChanges implements IFilter { } public function getIcon() : string { - return $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('polls', 'polls-black.svg')); + return $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('polls', 'polls.svg')); } public function getPriority() : int { diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php index 32a30e38..ba7f4d08 100644 --- a/lib/Notification/Notifier.php +++ b/lib/Notification/Notifier.php @@ -108,7 +108,7 @@ class Notifier implements INotifier { $notification->setIcon( $this->urlGenerator->getAbsoluteURL( - $this->urlGenerator->imagePath('polls', 'polls-black.svg') + $this->urlGenerator->imagePath('polls', 'polls.svg') ) ); diff --git a/lib/Provider/ActivityProvider.php b/lib/Provider/ActivityProvider.php index 7c2ba47d..79a1d752 100644 --- a/lib/Provider/ActivityProvider.php +++ b/lib/Provider/ActivityProvider.php @@ -94,7 +94,7 @@ class ActivityProvider implements IProvider { } $this->l10n = $this->transFactory->get($event->getApp(), $language); - $event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath($event->getApp(), 'polls-black.svg'))); + $event->setIcon($this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath($event->getApp(), 'polls.svg'))); $this->setSubjects($event, $this->activityService->getActivityMessage($event, $language, $this->activityManager->isFormattingFilteredObject())); return $event; } diff --git a/lib/Settings/AdminSection.php b/lib/Settings/AdminSection.php index a8c928b5..4a2972a2 100644 --- a/lib/Settings/AdminSection.php +++ b/lib/Settings/AdminSection.php @@ -52,6 +52,6 @@ class AdminSection implements IIconSection { } public function getIcon(): string { - return $this->urlGenerator->imagePath('polls', 'polls-black.svg'); + return $this->urlGenerator->imagePath('polls', 'polls.svg'); } } diff --git a/lib/Settings/PersonalSection.php b/lib/Settings/PersonalSection.php index 00fa0ef4..8f6fe332 100644 --- a/lib/Settings/PersonalSection.php +++ b/lib/Settings/PersonalSection.php @@ -52,6 +52,6 @@ class PersonalSection implements IIconSection { } public function getIcon(): string { - return $this->urlGenerator->imagePath('polls', 'polls-black.svg'); + return $this->urlGenerator->imagePath('polls', 'polls.svg'); } } diff --git a/src/js/App.vue b/src/js/App.vue index bc34d747..ca23b46d 100644 --- a/src/js/App.vue +++ b/src/js/App.vue @@ -40,7 +40,6 @@ import '@nextcloud/dialogs/styles/toast.scss' import './assets/scss/colors.scss' import './assets/scss/hacks.scss' import './assets/scss/icons.scss' -import './assets/scss/icons-md.scss' import './assets/scss/print.scss' import './assets/scss/transitions.scss' import './assets/scss/markdown.scss' diff --git a/src/js/assets/icons/material-design/email.svg b/src/js/assets/icons/material-design/email.svg deleted file mode 100644 index 0abbea7e..00000000 --- a/src/js/assets/icons/material-design/email.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20,8L12,13L4,8V6L12,11L20,6M20,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4Z" /></svg>
\ No newline at end of file diff --git a/src/js/assets/icons/material-design/link-variant.svg b/src/js/assets/icons/material-design/link-variant.svg deleted file mode 100644 index b6e1bb21..00000000 --- a/src/js/assets/icons/material-design/link-variant.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10.59,13.41C11,13.8 11,14.44 10.59,14.83C10.2,15.22 9.56,15.22 9.17,14.83C7.22,12.88 7.22,9.71 9.17,7.76V7.76L12.71,4.22C14.66,2.27 17.83,2.27 19.78,4.22C21.73,6.17 21.73,9.34 19.78,11.29L18.29,12.78C18.3,11.96 18.17,11.14 17.89,10.36L18.36,9.88C19.54,8.71 19.54,6.81 18.36,5.64C17.19,4.46 15.29,4.46 14.12,5.64L10.59,9.17C9.41,10.34 9.41,12.24 10.59,13.41M13.41,9.17C13.8,8.78 14.44,8.78 14.83,9.17C16.78,11.12 16.78,14.29 14.83,16.24V16.24L11.29,19.78C9.34,21.73 6.17,21.73 4.22,19.78C2.27,17.83 2.27,14.66 4.22,12.71L5.71,11.22C5.7,12.04 5.83,12.86 6.11,13.65L5.64,14.12C4.46,15.29 4.46,17.19 5.64,18.36C6.81,19.54 8.71,19.54 9.88,18.36L13.41,14.83C14.59,13.66 14.59,11.76 13.41,10.59C13,10.2 13,9.56 13.41,9.17Z" /></svg>
\ No newline at end of file diff --git a/src/js/assets/icons/material-design/share-variant.svg b/src/js/assets/icons/material-design/share-variant.svg deleted file mode 100644 index 1f4cea20..00000000 --- a/src/js/assets/icons/material-design/share-variant.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M18,16.08C17.24,16.08 16.56,16.38 16.04,16.85L8.91,12.7C8.96,12.47 9,12.24 9,12C9,11.76 8.96,11.53 8.91,11.3L15.96,7.19C16.5,7.69 17.21,8 18,8A3,3 0 0,0 21,5A3,3 0 0,0 18,2A3,3 0 0,0 15,5C15,5.24 15.04,5.47 15.09,5.7L8.04,9.81C7.5,9.31 6.79,9 6,9A3,3 0 0,0 3,12A3,3 0 0,0 6,15C6.79,15 7.5,14.69 8.04,14.19L15.16,18.34C15.11,18.55 15.08,18.77 15.08,19C15.08,20.61 16.39,21.91 18,21.91C19.61,21.91 20.92,20.61 20.92,19A2.92,2.92 0 0,0 18,16.08Z" /></svg>
\ No newline at end of file diff --git a/src/js/assets/scss/icons-md.scss b/src/js/assets/scss/icons-md.scss deleted file mode 100644 index 6c3e034d..00000000 --- a/src/js/assets/scss/icons-md.scss +++ /dev/null @@ -1,25 +0,0 @@ -// material design icons -@mixin svg-icon($url) { - background-image: $url; -} - -:root { - --icon-md-email: url('../icons/material-design/email.svg'); - --icon-md-share-variant: url('../icons/material-design/share-variant.svg'); - --icon-md-link-variant: url('../icons/material-design/link-variant.svg'); - - --icon-size: 18px; - --icon-md-color-default: #000; - --icon-color-dark: #000; - --icon-md-color-light: #fff; -} - -[class*='icon-mask-md-'] { - background-color: #000; -} - -// material design icons -// just svg background icon -.icon-svg-md-email { @include svg-icon(var(--icon-md-email)); } -.icon-svg-md-share { @include svg-icon(var(--icon-md-share-variant)); } -.icon-svg-md-link { @include svg-icon(var(--icon-md-link-variant)); } diff --git a/src/js/components/User/UserItem.vue b/src/js/components/User/UserItem.vue index 3eefb7ac..d5b43a3f 100644 --- a/src/js/components/User/UserItem.vue +++ b/src/js/components/User/UserItem.vue @@ -52,11 +52,8 @@ <div class="name"> {{ name }} </div> - <div v-if="type === 'admin'" class="description"> - {{ t("polls", "Is granted admin rights for this poll") }} - </div> - <div v-else-if="displayEmailAddress" class="description"> - {{ displayEmailAddress }} + <div class="description"> + {{ description }} </div> </div> @@ -66,7 +63,6 @@ <script> import { getCurrentUser } from '@nextcloud/auth' - import { NcAvatar } from '@nextcloud/vue' export default { @@ -181,28 +177,21 @@ export default { useIconSlot() { return !['user', 'admin'].includes(this.type) }, + description() { + if (this.type === 'admin') return t('polls', 'Is granted admin rights for this poll') + if (this.displayEmailAddress) return this.displayEmailAddress + return '' + }, name() { - if (this.type === 'public' && this.userId !== 'addPublic') { - return t('polls', 'Public link') - } - - if (this.type === 'internalAccess') { - return t('polls', 'Internal access') - } - - if (this.displayName) { - return this.displayName - } - + if (this.type === 'public' && this.userId !== 'addPublic') return t('polls', 'Public link') + if (this.type === 'internalAccess') return t('polls', 'Internal access') + if (this.displayName) return this.displayName return this.userId - }, avatarUserId() { - if (this.isGuestComputed) { - return this.name - } + if (this.isGuestComputed) return this.name return this.userId }, @@ -225,6 +214,7 @@ export default { if (this.showEmail && ['external', 'email'].includes(this.type) && this.emailAddress !== this.name) { return this.emailAddress } + return '' }, |