Skip to content

Commit

Permalink
feat(files): improved files error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmcg committed Mar 10, 2022
1 parent af24a0a commit e84872c
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 10 deletions.
14 changes: 7 additions & 7 deletions components/views/files/controls/Controls.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
multiple
/>
</div>
<TypographyError
v-if="errors.length"
v-for="error in errors"
:key="error"
:text="error"
class="error"
/>
<div class="error-container" v-if="errors.length">
<alert-triangle-icon size="1.3x" />
<div>
<TypographyError v-for="error in errors" :key="error" :text="error" />
</div>
<x-icon size="1.3x" class="close" @click="errors=[]" />
</div>
<div class="switcher-container">
<TypographyText :size="6" :text="$t('pages.files.browse.files')" />
<FilesViewSwitcher :changeView="changeView" />
Expand Down
19 changes: 18 additions & 1 deletion components/views/files/controls/Controls.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,25 @@
}
}

.error {
.error-container {
&:extend(.round-corners);
display: flex;
gap: @light-spacing;
padding: @light-spacing;
border: 1px solid @red;
margin-bottom: @normal-spacing;
div {
display: flex;
gap: @xlight-spacing;
flex-direction: column;
}
svg {
color: @red;
&.close {
margin-left: auto;
cursor: pointer;
}
}
}

.switcher-container {
Expand Down
9 changes: 8 additions & 1 deletion components/views/files/controls/Controls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@
<script lang="ts">
import Vue from 'vue'
import { mapState } from 'vuex'
import { FolderPlusIcon, FilePlusIcon } from 'satellite-lucide-icons'
import {
FolderPlusIcon,
FilePlusIcon,
AlertTriangleIcon,
XIcon,
} from 'satellite-lucide-icons'
import { isHeic } from '~/utilities/Heic'
const convert = require('heic-convert')
export default Vue.extend({
components: {
FolderPlusIcon,
FilePlusIcon,
AlertTriangleIcon,
XIcon,
},
// todo - best practice would be emitting rather than passing function as a prop - AP-639
props: {
Expand Down
2 changes: 1 addition & 1 deletion cypress
Submodule cypress updated 43 files
+5 −5 fixtures/mobile-devices.json
+40 −11 integration/chat-features.js
+41 −40 integration/create-account-negative-tests.js
+111 −80 integration/create-account.js
+31 −26 integration/import-account-negative-tests.js
+32 −11 integration/import-account.js
+50 −0 integration/localstorage-validations.js
+15 −11 integration/mobiles-responsiveness.js
+98 −0 integration/pin-unlock-validations.js
+81 −74 integration/privacy-page-toggles.js
+163 −0 integration/snapshots-test.js
+6 −3 integration/version-release-notes.js
+2 −0 package.json
+5 −1 plugins/index.js
+ ...hots/All Integration Specs/Snapshots Testing -- Create Account - Buffering screen after submission.snap.png
+ ... Integration Specs/Snapshots Testing -- Create Account - Create or Import Account Selection screen.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Create Account - PIN screen.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Create Account - Privacy Settings screen.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Create Account - User Input Screen.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Import account - Buffering screen.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Import account - Click on emojis.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Import account - Click on glyphs.snap.png
+ ... Integration Specs/Snapshots Testing -- Import account - Create or Import Account Selection screen.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Import account - Enter passphrase screen.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Import account - Go to a chat.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Import account - Go to files.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Import account - Go to friends.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Import account - Main Screen Loaded.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Import account - PIN screen.snap.png
+ ...hots/All Integration Specs/Snapshots Testing -- Import account - Screen after adding recovery seed.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Import account - Settings - Developer - App Info.snap.png
+ ...ll Integration Specs/Snapshots Testing -- Import account - Settings - General - Accounts & Devices.snap.png
+ ...ots/All Integration Specs/Snapshots Testing -- Import account - Settings - General - Audio & Video.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Import account - Settings - General - Keybinds.snap.png
+ ...shots/All Integration Specs/Snapshots Testing -- Import account - Settings - General - Personalize.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Import account - Settings - General - Privacy.snap.png
+ snapshots/All Integration Specs/Snapshots Testing -- Import account - Settings - General - Profile.snap.png
+ ...All Integration Specs/Snapshots Testing -- Import account - Settings - Realms & Security - Network.snap.png
+ .../All Integration Specs/Snapshots Testing -- Import account - Settings - Realms & Security - Realms.snap.png
+ ...All Integration Specs/Snapshots Testing -- Import account - Settings - Realms & Security - Storage.snap.png
+158 −41 support/commands.js
+1 −0 support/index.js
+1,008 −4 yarn.lock

0 comments on commit e84872c

Please sign in to comment.