Skip to content

Commit

Permalink
Fix image path bug for tiles caused by the ingress proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
EmeraldCoder committed Jun 26, 2021
1 parent 65671d2 commit b2dc639
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
VUE_APP_I18N_LOCALE=en
VUE_APP_I18N_FALLBACK_LOCALE=en
VUE_APP_PUBLIC_PATH=/
3 changes: 3 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VUE_APP_I18N_LOCALE=en
VUE_APP_I18N_FALLBACK_LOCALE=en
VUE_APP_PUBLIC_PATH=/riichi/pointer/
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "riichi-pointer-js",
"version": "0.5.2",
"version": "0.5.3",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
Expand Down
8 changes: 7 additions & 1 deletion src/components/Tile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:class="{ 'tile--hoverable': hoverable, 'tile--disabled': disabled }"
class="tile"
>
<svg role="img"><use :xlink:href="'/riichi-mahjong-tiles/svgstore.svg#' + tileSvgStoreKey" /></svg>
<svg role="img"><use :xlink:href="publicPath + 'riichi-mahjong-tiles/svgstore.svg#' + tileSvgStoreKey" /></svg>
</div>
</template>

Expand Down Expand Up @@ -70,6 +70,12 @@ export default {
}
},
data () {
return {
publicPath: process.env.VUE_APP_PUBLIC_PATH
}
},
computed: {
tileSvgStoreKey () {
if (this.tile.suit === 'character') {
Expand Down

0 comments on commit b2dc639

Please sign in to comment.