Skip to content

Commit

Permalink
feat: improvements (#70)
Browse files Browse the repository at this point in the history
* fix: clear search button character

* fix: replace substr with slice

* fix: importing svg files

* fix: move svg files to assets/svg

* fix: rename components/*.js to components/*.jsx

* chore: increment version

* chore: build

Co-authored-by: Johnny Almonte <johnny243@users.noreply.github.com>
  • Loading branch information
johnny243 and johnny243 authored Dec 16, 2021
1 parent 7829df4 commit faf4d0b
Show file tree
Hide file tree
Showing 17 changed files with 1,282 additions and 72 deletions.
14 changes: 14 additions & 0 deletions app/assets/svg/drag-indicator.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions app/assets/svg/reorder-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions app/components/AuthEntry.js → app/components/AuthEntry.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import { totp } from '@Lib/otp';
import CountdownPie from '@Components/CountdownPie';
import AuthMenu from '@Components/AuthMenu';
import DragIndicator from '@Components/DragIndicator';
import DragIndicator from '../assets/svg/drag-indicator.svg';
import { getEntryColor, getVarColorForContrast, hexColorToRGB } from '@Lib/utils';

export default class AuthEntry extends React.Component {
Expand Down Expand Up @@ -154,8 +154,8 @@ export default class AuthEntry extends React.Component {
</div>
<div className="auth-token-info">
<div className="auth-token" onClick={() => this.copyToClipboard(token)}>
<div>{token.substr(0, 3)}</div>
<div>{token.substr(3, 3)}</div>
<div>{token.slice(0, 3)}</div>
<div>{token.slice(3, 6)}</div>
</div>
<div className="auth-countdown">
<CountdownPie
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 0 additions & 20 deletions app/components/DragIndicator.js

This file was deleted.

File renamed without changes.
4 changes: 2 additions & 2 deletions app/components/Home.js → app/components/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ViewEntries from '@Components/ViewEntries';
import ConfirmDialog from '@Components/ConfirmDialog';
import DataErrorAlert from '@Components/DataErrorAlert';
import EditorKit from '@standardnotes/editor-kit';
import ReorderIcon from '@Components/ReorderIcon';
import ReorderIcon from '../assets/svg/reorder-icon.svg';

const initialState = {
text: '',
Expand Down Expand Up @@ -281,7 +281,7 @@ export default class Home extends React.Component {
/>
{searchValue && (
<div onClick={this.clearSearchValue} className="sk-button danger">
<div className="sk-label">X</div>
<div className="sk-label"></div>
</div>
)}
</div>
Expand Down
File renamed without changes.
43 changes: 0 additions & 43 deletions app/components/ReorderIcon.js

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion dist/dist.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sn-token-vault",
"version": "2.0.6",
"version": "2.0.7",
"main": "dist/dist.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand All @@ -21,6 +21,7 @@
"@babel/preset-react": "^7.12.13",
"@standardnotes/editor-kit": "2.1.4",
"@standardnotes/eslint-config-extensions": "^1.0.1",
"@svgr/webpack": "^6.1.2",
"babel-loader": "^8.2.2",
"css-loader": "^5.1.3",
"eslint": "^7.21.0",
Expand Down
9 changes: 8 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ module.exports = {
use: ['babel-loader']
},
{
test: /\.svg$/,
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
exclude: /node_modules/,
use: ['@svgr/webpack'],
},
{
test: /\.svg$/i,
issuer: /\.s[ac]ss$/i,
exclude: /node_modules/,
use: [
{
Expand Down
Loading

0 comments on commit faf4d0b

Please sign in to comment.