Skip to content

Commit

Permalink
White icons fix for preview, fix 927
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Mar 4, 2019
1 parent 8110491 commit 91dd5c3
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 13 deletions.
6 changes: 3 additions & 3 deletions css/ContactDetailsAvatar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
background-position: center;
cursor: pointer;
}
label.icon-upload-white {
label.icon-upload-force-white {
opacity: .5;
z-index: 2;
position: absolute;
Expand All @@ -65,7 +65,7 @@
opacity: .7;
}
}
&__photo + label.icon-upload-white {
&__photo + label.icon-upload-force-white {
opacity: 0;
}
&__options {
Expand Down Expand Up @@ -98,7 +98,7 @@
background-size: contain;
margin: 50px;
}
label.icon-upload-white {
label.icon-upload-force-white {
position: relative;
}
.contact-header-avatar__options {
Expand Down
15 changes: 15 additions & 0 deletions css/icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,18 @@
.icon-up {
@include icon-color('up', 'contacts', $color-black, 1);
}

.icon-delete-force-white {
// using #fffffe to trick the accessibility dark theme icon invert
@include icon-color('delete', 'contacts', '#fffffe', 1);
}

.icon-download-force-white {
// using #fffffe to trick the accessibility dark theme icon invert
@include icon-color('download', 'contacts', '#fffffe', 1);
}

.icon-upload-force-white {
// using #fffffe to trick the accessibility dark theme icon invert
@include icon-color('upload', 'contacts', '#fffffe', 1);
}
1 change: 1 addition & 0 deletions img/delete.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/download.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions img/upload.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 20 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
"stylelint-config-recommended-scss": "^3.2.0",
"stylelint-scss": "^3.5.4",
"stylelint-webpack-plugin": "^0.10.5",
"url-loader": "^1.1.2",
"vue-loader": "^15.7.0",
"vue-template-compiler": "^2.6.8",
"webpack": "^4.29.6",
Expand Down
6 changes: 3 additions & 3 deletions src/components/ContactDetails/ContactDetailsAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
<input id="contact-avatar-upload" type="file" class="hidden"
accept="image/*" @change="processFile">
<label v-if="!contact.addressbook.readOnly" v-tooltip.auto="t('contacts', 'Upload a new picture')"
for="contact-avatar-upload" class="icon-upload-white" @click="processFile" />
<div v-if="maximizeAvatar && !contact.addressbook.readOnly" class="icon-delete-white" @click="removePhoto" />
<a v-if="maximizeAvatar" :href="contact.url + '?photo'" class="icon-download-white" />
for="contact-avatar-upload" class="icon-upload-force-white" @click="processFile" />
<div v-if="maximizeAvatar && !contact.addressbook.readOnly" class="icon-delete-force-white" @click="removePhoto" />
<a v-if="maximizeAvatar" :href="contact.url + '?photo'" class="icon-download-force-white" />
</div>
</div>
</div>
Expand Down
5 changes: 1 addition & 4 deletions webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ module.exports = {
},
{
test: /\.(png|jpg|gif|svg)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]?[hash]'
}
loader: 'url-loader'
}
]
},
Expand Down

0 comments on commit 91dd5c3

Please sign in to comment.