Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ts components #41

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6723bb0
Added ts component dependencies and configs
DamSenViet Oct 9, 2022
616a86c
Converted PatternItems components to ts
DamSenViet Oct 9, 2022
8cb13bd
Converted icon components to ts
DamSenViet Oct 9, 2022
fa00a3b
Converted modal components to ts
DamSenViet Oct 9, 2022
57cbf7b
Converted positioned components to ts
DamSenViet Oct 9, 2022
717d648
Converted wrapper components to ts
DamSenViet Oct 9, 2022
ed6c296
Converted more shared components to ts
DamSenViet Oct 9, 2022
cc54b84
Converted About page components to ts
DamSenViet Oct 9, 2022
13bdb44
Converted FAQ page components to ts
DamSenViet Oct 9, 2022
5d4bdbb
Updated DrawingTool interface types
DamSenViet Oct 9, 2022
72b4cc8
Converted Passport component to ts
DamSenViet Oct 15, 2022
92e316b
Convert Browse page components to ts
DamSenViet Oct 15, 2022
81bc545
Converted ConvertImage component to ts
DamSenViet Oct 16, 2022
30aa437
Converted Editor's ColorTools components to ts
DamSenViet Oct 26, 2022
8cd1bf2
Converted App component to ts
DamSenViet Nov 23, 2022
f50978b
Converted Missing component to ts
DamSenViet Nov 23, 2022
67954c2
Converted Home component to ts
DamSenViet Nov 23, 2022
9257700
Converted ImportMenuItem component to ts
DamSenViet Nov 23, 2022
3f514a1
Converted Updates page components to ts
DamSenViet Jan 8, 2023
2d11719
Converted Moderator page components to ts
DamSenViet Jan 8, 2023
5913d33
Converted IconRibbonTailLeft copmonent to ts
DamSenViet Jan 8, 2023
0609f86
Converted Banner component to ts
DamSenViet Jan 8, 2023
3389335
Updated DrawingTool interface types
DamSenViet Jan 8, 2023
9619856
Converted Editor component to ts
DamSenViet Jan 8, 2023
f2082ba
Converted Preview component to ts
DamSenViet Jan 8, 2023
516428a
Converted Storage component to ts
DamSenViet Jan 8, 2023
36b5632
Converted Toolbar component to ts
DamSenViet Jan 8, 2023
2972441
Converted ThreeDRender component to ts
DamSenViet Jan 8, 2023
42d18b8
Merge branch 'development' into ts-components
DamSenViet Jan 8, 2023
64eaa58
Update package-lock
DamSenViet Jun 18, 2023
0447681
Add container configs
DamSenViet Jun 18, 2023
03213ae
Debounced auto search browse options
DamSenViet Jun 18, 2023
dafc028
Fix standee modal loading race condition
DamSenViet Jun 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build
node_modules
stats
2 changes: 1 addition & 1 deletion .swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"parser": {
"syntax": "typescript",
"tsx": false,
"decorators": false,
"decorators": true,
"dynamicImport": true
},
"transform": null,
Expand Down
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:16-alpine
WORKDIR /app
COPY . .
ENV DEV_HOST=0.0.0.0
ENV DEV_PORT=3000
EXPOSE 3000
RUN npm install
CMD ["npm", "run", "dev"]
2 changes: 0 additions & 2 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const VueLoaderPlugin = require('vue-loader/lib/plugin');
const { VuetifyLoaderPlugin } = require('vuetify-loader');
const TerserPlugin = require('terser-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeThreePlugin = require('@vxna/optimize-three-webpack-plugin');
const env = require('../etc/env'); // assume already loaded, checked
const {
pathToClientSrc,
Expand Down Expand Up @@ -264,7 +263,6 @@ const htmlWebpackOptions = {
const plugins = [
new VueLoaderPlugin(),
new VuetifyLoaderPlugin(),
new OptimizeThreePlugin(),
new webpack.DefinePlugin({ "env": JSON.stringify(clientEnv) }),
];

Expand Down
81 changes: 58 additions & 23 deletions package-lock.json

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

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
"@types/lodash": "^4.14.178",
"@types/lz-string": "^1.3.34",
"@types/papaparse": "^5.3.1",
"@types/three": "^0.137.0",
"@types/three": "0.137.0",
"@types/uuid": "^8.3.4",
"@vxna/optimize-three-webpack-plugin": "^5.1.3",
"@zxing/library": "^0.17.1",
"axios": "^0.24.0",
"copy-webpack-plugin": "^11.0.0",
Expand All @@ -52,21 +51,23 @@
"stream": "^0.0.2",
"swc-loader": "^0.1.15",
"terser-webpack-plugin": "^5.2.5",
"three": "^0.135.0",
"three": "0.137.0",
"uuid": "^8.3.2",
"vue": "^2.6.14",
"vue-advanced-cropper": "^1.9.0",
"vue-fragment": "^1.5.2",
"vue-i18n": "^8.26.7",
"vue-loader": "^15.9.8",
"vue-markdown-loader": "^2.5.0",
"vue-property-decorator": "^9.1.2",
"vue-router": "^3.5.3",
"vue-style-loader": "^4.1.3",
"vue-svg-loader": "^0.16.0",
"vue-template-compiler": "^2.6.14",
"vuetify": "^2.6.1",
"vuetify-loader": "^1.7.3",
"vuex": "^3.6.2",
"vuex-class": "^0.3.2",
"webpack": "^5.64.4",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-dev-server": "^4.6.0",
Expand Down
11 changes: 5 additions & 6 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
</VApp>
</template>

<script>
<script lang="ts">
import { Vue, Component } from "vue-property-decorator";
import {
VApp,
VMain,
Expand All @@ -19,17 +20,15 @@ import {
import NavigationButton from "./components/positioned/NavigationButton.vue";
import Banner from "./components/positioned/Banner.vue";

export default {
name: "App",
@Component({
components: {
VApp,
VMain,
NavigationButton,
Banner,
},
data: function () {
return {};
},
})
export default class App extends Vue{
};
</script>

Expand Down
52 changes: 25 additions & 27 deletions src/components/ACNLQRGenerator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,36 @@
<img :src="image" @click="pattClick" />
</template>

<script>
<script lang="ts">
import { Vue, Component, Prop, Watch } from "vue-property-decorator";
import generateACNLQR from "@/libs/ACNLQRGenerator";

export default {
name: "ACNLQRGenerator",
props: {
pattern: {
type: String,
required: true,
},
},
data: function () {
return { image: "" };
},
watch: {
//Whenever pattern changes, draw it!
pattern(newData, oldData) {
generateACNLQR(newData).then((d) => {
this.image = d;
});
},
},
mounted: function () {
@Component
export default class ACNLQRGenerator extends Vue {
@Prop({
type: String,
required: true,
}) pattern!: string;

image: string = "";

pattClick() {
this.$emit("pattclick", this.pattern);
}

//Whenever pattern changes, draw it!
@Watch('pattern')
onPatternChange(newData: string) {
generateACNLQR(newData).then((d) => {
this.image = d;
});
}

mounted() {
generateACNLQR(this.pattern).then((d) => {
this.image = d;
});
},
methods: {
pattClick() {
this.$emit("pattclick", this.pattern);
},
},
}
};
</script>

Expand Down
18 changes: 9 additions & 9 deletions src/components/Banner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
</div>
</template>

<script>
export default {
name: "Banner",
props: {
bannerText: String,
},
data: function () {
return {};
},
<script lang="ts">
import { Vue, Component, Prop } from "vue-property-decorator";

@Component
export default class Banner extends Vue {
@Prop({
type: String,
required: true,
}) bannerText!: string;
};
</script>

Expand Down
Loading