From 959e5ca27672c40a0b9211dca43e9f0ac505463f Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Tue, 26 Jan 2021 14:28:53 +0100 Subject: [PATCH 1/4] Remove duplicate definition of .copyable-text and improve table layout --- assets/sass/layout.scss | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/assets/sass/layout.scss b/assets/sass/layout.scss index 9e14352..4f4124b 100644 --- a/assets/sass/layout.scss +++ b/assets/sass/layout.scss @@ -693,6 +693,7 @@ td.actions { th { border-bottom: 1px solid #39434a; + white-space: nowrap; } tr:nth-child(even) { @@ -859,37 +860,7 @@ td.actions { } .content { - overflow: hidden; - white-space: nowrap; - padding: 8px; - } - - .copy-button { - margin: 0; - padding: 0; - border-radius: 0; - - .feather { - --icon-size: 20px; - margin: 8px; - } - } -} - -.copyable-text { - display: flex; - flex-direction: row; - margin: 8px; - - background-color: darken($backgroundColor, 2%); - border-radius: 5px; - overflow: hidden; - - .title { - padding: 8px; - } - - .content { + width: 0; flex-grow: 1; overflow: hidden; white-space: nowrap; @@ -939,3 +910,7 @@ td.actions { background: $secondary; } } + +.table-col-grow { + width: 100%; +} From 0f83dd7ad6d3302496769f7fdc2778fe72a41aef Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Tue, 30 Mar 2021 12:32:41 +0200 Subject: [PATCH 2/4] layout.scss: add pagination default style --- assets/sass/layout.scss | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/assets/sass/layout.scss b/assets/sass/layout.scss index 4f4124b..66e8363 100644 --- a/assets/sass/layout.scss +++ b/assets/sass/layout.scss @@ -914,3 +914,30 @@ td.actions { .table-col-grow { width: 100%; } + +.pagination { + ul { + display: flex; + flex-direction: row; + list-style: none; + padding: 8px; + + justify-content: center; + + li { + a, &.active, &.ellipsis { + display: block; + min-width: 40px; + height: 40px; + padding: 4px; + + line-height: 32px; + text-align:center; + + &:hover:not(.active):not(.ellipsis) { + background-color: #fff5; + } + } + } + } +} From ceaa0769bcad9c03898709a41e13df3b0d7dff43 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Tue, 30 Mar 2021 12:39:40 +0200 Subject: [PATCH 3/4] Upgrade dependencies --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2eefcc6..f7c65e8 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@typescript-eslint/eslint-plugin": "^4.3.0", "@typescript-eslint/parser": "^4.3.0", "babel-loader": "^8.1.0", - "concurrently": "^5.1.0", + "concurrently": "^6.0.0", "css-loader": "^5.0.0", "eslint": "^7.10.0", "feather-icons": "^4.28.0", @@ -43,14 +43,14 @@ "imagemin-gifsicle": "^7.0.0", "imagemin-mozjpeg": "^9.0.0", "imagemin-pngquant": "^9.0.0", - "imagemin-svgo": "^8.0.0", + "imagemin-svgo": "^9.0.0", "img-loader": "^3.0.1", "jest": "^26.1.0", "maildev": "^1.1.0", "mini-css-extract-plugin": "^1.2.1", "node-sass": "^5.0.0", "nodemon": "^2.0.3", - "sass-loader": "^10.0.1", + "sass-loader": "^11.0.1", "terser-webpack-plugin": "^5.0.3", "ts-jest": "^26.1.1", "ts-loader": "^8.0.4", From 12f82f0f3dcea4d20d4e92b9f7f29069d1c385bb Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Tue, 30 Mar 2021 12:44:09 +0200 Subject: [PATCH 4/4] package.json: use NodeJS scripts instead of unix commands --- .eslintrc.json | 1 + package.json | 10 +++++----- scripts/clean.js | 10 ++++++++++ scripts/prepare-sources.js | 4 ++++ 4 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 scripts/clean.js create mode 100644 scripts/prepare-sources.js diff --git a/.eslintrc.json b/.eslintrc.json index cdf57c6..a506e1e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -88,6 +88,7 @@ }, "ignorePatterns": [ "jest.config.js", + "scripts/**/*", "webpack.config.js", "dist/**/*", "public/**/*", diff --git a/package.json b/package.json index f7c65e8..2e8efd7 100644 --- a/package.json +++ b/package.json @@ -8,13 +8,13 @@ "main": "dist/main.js", "scripts": { "test": "jest --verbose --runInBand", - "clean": "(test ! -d dist || rm -r dist)", - "prepareSources": "cp package.json src/", + "clean": "node scripts/clean.js", + "prepare-sources": "node scripts/prepare-sources.js", "compile": "yarn clean && tsc", - "build": "yarn prepareSources && yarn compile && webpack --mode production", - "dev": "yarn prepareSources && concurrently -k -n \"Typescript,Node,Webpack,Maildev\" -p \"[{name}]\" -c \"blue,green,red,yellow\" \"tsc --watch\" \"nodemon\" \"webpack --watch --mode development\" \"maildev\"", + "build": "yarn prepare-sources && yarn compile && webpack --mode production", + "dev": "yarn prepare-sources && concurrently -k -n \"Typescript,Node,Webpack,Maildev\" -p \"[{name}]\" -c \"blue,green,red,yellow\" \"tsc --watch\" \"nodemon\" \"webpack --watch --mode development\" \"maildev\"", "start": "yarn build && node", - "lint": "eslint . --ext .js,.jsx,.ts,.tsx" + "lint": "eslint ." }, "devDependencies": { "@babel/core": "^7.9.0", diff --git a/scripts/clean.js b/scripts/clean.js new file mode 100644 index 0000000..d5ef093 --- /dev/null +++ b/scripts/clean.js @@ -0,0 +1,10 @@ +const fs = require('fs'); + +[ + 'dist', +].forEach(file => { + if (fs.existsSync(file)) { + console.log('Cleaning', file, '...'); + fs.rmSync(file, {recursive: true}); + } +}); diff --git a/scripts/prepare-sources.js b/scripts/prepare-sources.js new file mode 100644 index 0000000..a78c2f3 --- /dev/null +++ b/scripts/prepare-sources.js @@ -0,0 +1,4 @@ +const fs = require('fs'); +const path = require('path'); + +fs.copyFileSync('package.json', path.join('src', 'package.json'));