forked from jsnbuchanan/crowd-funder-for-time-pwa
fix: update Vue template syntax and improve Vite config
- Fix Vue template syntax in App.vue by using proper event handler format - Update Vite config to properly handle ESM imports and crypto modules - Add manual chunks for better code splitting - Improve environment variable handling in vite-env.d.ts - Fix TypeScript linting errors in App.vue
This commit is contained in:
@@ -15,35 +15,35 @@
|
||||
/>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { toSvg } from "jdenticon";
|
||||
import { Vue, Component, Prop } from "vue-facing-decorator";
|
||||
import { toSvg } from 'jdenticon'
|
||||
import { Vue, Component, Prop } from 'vue-facing-decorator'
|
||||
|
||||
const BLANK_CONFIG = {
|
||||
lightness: {
|
||||
color: [1.0, 1.0],
|
||||
grayscale: [1.0, 1.0],
|
||||
grayscale: [1.0, 1.0]
|
||||
},
|
||||
saturation: {
|
||||
color: 0.0,
|
||||
grayscale: 0.0,
|
||||
grayscale: 0.0
|
||||
},
|
||||
backColor: "#0000",
|
||||
};
|
||||
backColor: '#0000'
|
||||
}
|
||||
|
||||
@Component
|
||||
export default class ProjectIcon extends Vue {
|
||||
@Prop entityId = "";
|
||||
@Prop iconSize = 0;
|
||||
@Prop imageUrl = "";
|
||||
@Prop linkToFull = false;
|
||||
@Prop entityId = ''
|
||||
@Prop iconSize = 0
|
||||
@Prop imageUrl = ''
|
||||
@Prop linkToFull = false
|
||||
|
||||
generateIdenticon() {
|
||||
if (this.imageUrl) {
|
||||
return `<img src="${this.imageUrl}" class="w-full h-full object-contain" />`;
|
||||
return `<img src="${this.imageUrl}" class="w-full h-full object-contain" />`
|
||||
} else {
|
||||
const config = this.entityId ? undefined : BLANK_CONFIG;
|
||||
const svgString = toSvg(this.entityId, this.iconSize, config);
|
||||
return svgString;
|
||||
const config = this.entityId ? undefined : BLANK_CONFIG
|
||||
const svgString = toSvg(this.entityId, this.iconSize, config)
|
||||
return svgString
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user