diff --git a/client/.prettierrc.js b/client/.prettierrc.js index 83b090e..cc41960 100644 --- a/client/.prettierrc.js +++ b/client/.prettierrc.js @@ -10,5 +10,5 @@ module.exports = { proseWrap: 'always', htmlWhitespaceSensitivity: 'strict', endOfLine: 'lf', - arrowParens: 'avoid' + arrowParens: 'avoid', }; diff --git a/client/package.json b/client/package.json index f1edb13..6470eb5 100644 --- a/client/package.json +++ b/client/package.json @@ -16,8 +16,12 @@ }, "dependencies": { "axios": "^0.21.1", + "bootstrap": "^5.1.3", + "bootstrap-vue": "^2.21.2", "core-js": "^3.6.5", - "vue": "^2.6.12", + "vue": "^2.6.14", + "node-fetch": "^2.6.2", + "node-http": "0.0.5", "vuelidate": "^0.7.6", "vuetify": "^2.4.0", "vuex": "^3.6.0" @@ -49,7 +53,9 @@ "parserOptions": { "parser": "babel-eslint" }, - "rules": {} + "rules": { + "vue/no-unused-components": "off" + } }, "browserslist": [ "> 1%", @@ -58,4 +64,4 @@ ], "_id": "redis-shopping-cart-client@1.0.0", "license": "MIT" -} +} \ No newline at end of file diff --git a/client/public/index.html b/client/public/index.html index 0deacb3..fba3ffd 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -1,29 +1,24 @@ - - - - - - Redis Shopping Cart - - - - - +
+ + + + \ No newline at end of file diff --git a/client/src/App.vue b/client/src/App.vue index 58be81e..b38ead4 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -5,7 +5,9 @@
mdi-cart-plus
-

TinyHat.me Online Store

+

TinyHat.me Online Store

@@ -18,6 +20,7 @@ + @@ -34,6 +37,7 @@ import Cart from '@/components/Cart'; import ProductList from '@/components/ProductList'; import ResetDataBtn from '@/components/ResetDataBtn.vue'; import Info from '@/components/Info'; +import CustomHat from '@/components/CustomHat.vue'; export default { name: 'App', @@ -41,6 +45,7 @@ export default { components: { ProductList, Cart, + CustomHat, ResetDataBtn, Info }, diff --git a/client/src/components/CustomHat.vue b/client/src/components/CustomHat.vue new file mode 100644 index 0000000..1dbcf33 --- /dev/null +++ b/client/src/components/CustomHat.vue @@ -0,0 +1,55 @@ + + + diff --git a/client/src/components/Product.vue b/client/src/components/Product.vue index fb2e5b0..0b48443 100644 --- a/client/src/components/Product.vue +++ b/client/src/components/Product.vue @@ -2,10 +2,7 @@
- +
diff --git a/client/src/components/ProductList.vue b/client/src/components/ProductList.vue index d064de5..a718fa6 100644 --- a/client/src/components/ProductList.vue +++ b/client/src/components/ProductList.vue @@ -1,15 +1,15 @@ diff --git a/client/src/main.js b/client/src/main.js index dd71934..9800e10 100644 --- a/client/src/main.js +++ b/client/src/main.js @@ -3,6 +3,16 @@ import store from './store'; import vuetify from './plugins/vuetify'; import App from './App.vue'; import './styles/styles.scss'; +import { BootstrapVue, IconsPlugin } from 'bootstrap-vue' + +// Import Bootstrap an BootstrapVue CSS files (order is important) +import 'bootstrap/dist/css/bootstrap.css' +import 'bootstrap-vue/dist/bootstrap-vue.css' + +// Make BootstrapVue available throughout your project +Vue.use(BootstrapVue) +// Optionally install the BootstrapVue icon components plugin +Vue.use(IconsPlugin) Vue.config.productionTip = false; diff --git a/client/src/styles/styles.scss b/client/src/styles/styles.scss index 4f63dfb..d542989 100644 --- a/client/src/styles/styles.scss +++ b/client/src/styles/styles.scss @@ -41,3 +41,15 @@ input { box-shadow: 0px 3px 1px -2px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 1px 5px 0px rgb(0 0 0 / 12%) !important; } + +.file-upload { + margin-top: 1rem !important; +} + +.file-cont { + margin-top: 1rem !important; +} + +.hidden { + display: none !important; +} \ No newline at end of file diff --git a/dump.rdb b/dump.rdb new file mode 100644 index 0000000..076810a Binary files /dev/null and b/dump.rdb differ diff --git a/server/.env.example b/server/.env.example index bfc8171..618b317 100644 --- a/server/.env.example +++ b/server/.env.example @@ -10,6 +10,6 @@ REDIS_HOST=127.0.0.1 REDIS_PORT=6379 # You can set password here -REDIS_PASSWORD= +REDIS_PASSWORD=11954 COMPOSE_PROJECT_NAME=redis-shopping-cart diff --git a/server/dump.rdb b/server/dump.rdb new file mode 100644 index 0000000..a67bafc Binary files /dev/null and b/server/dump.rdb differ diff --git a/server/src/controllers/Product/IndexController.js b/server/src/controllers/Product/IndexController.js index 50e86f3..ee899b1 100644 --- a/server/src/controllers/Product/IndexController.js +++ b/server/src/controllers/Product/IndexController.js @@ -22,11 +22,11 @@ class ProductIndexController { let products = await result.json() for (const product of products) { - const { url } = product; + var { url } = product; url = url.replace("https://tinyhats.s3.amazonaws.com/", "") url = url.replace(".png", "") await this.redisClientService.jsonSet(`product:${url}`, '.', JSON.stringify(product)); - + productList.push(product); } diff --git a/server/src/controllers/Product/ResetController.js b/server/src/controllers/Product/ResetController.js index 1f643c2..ca283cf 100644 --- a/server/src/controllers/Product/ResetController.js +++ b/server/src/controllers/Product/ResetController.js @@ -19,7 +19,6 @@ class ProductResetController { var { url } = product; url = url.replace("https://tinyhats.s3.amazonaws.com/", "") url = url.replace(".png", "") - console.log(url) await this.redisClientService.jsonSet(`product:${url}`, '.', JSON.stringify(product)); }