diff --git a/.env.example b/.env.example
index 3edc37b..b179561 100644
--- a/.env.example
+++ b/.env.example
@@ -1 +1,2 @@
VUE_APP_BASE_URL=https://staging.disfactory.tw/api
+VUE_APP_IMGUR_FALLBACK_URL=https://api.disfactory.tw/imgur
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 662ce18..4e64fae 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -66,6 +66,7 @@ jobs:
run: |
npm ci
echo "VUE_APP_BASE_URL=https://staging.disfactory.tw/api" > .env
+ echo "VUE_APP_IMGUR_FALLBACK_URL=https://staging.disfactory.tw/imgur" >> .env
npm run build
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@3.7.1
@@ -95,6 +96,7 @@ jobs:
run: |
npm ci
echo "VUE_APP_BASE_URL=https://api.disfactory.tw/api" > .env.production
+ echo "VUE_APP_IMGUR_FALLBACK_URL=https://api.disfactory.tw/imgur" >> .env.production
npm run build
echo "disfactory.tw" > dist/CNAME
- name: Deploy to GitHub Pages
diff --git a/src/components/FactoryDetailPage.vue b/src/components/FactoryDetailPage.vue
index cc0ffc0..4835ba4 100644
--- a/src/components/FactoryDetailPage.vue
+++ b/src/components/FactoryDetailPage.vue
@@ -56,7 +56,7 @@
-
+
@@ -145,9 +145,13 @@ import { getFactoryReportRecords } from '@/api'
import { useAppState } from '../lib/appState'
import { FactoryImage, getDisplayStatusText, ReportRecord } from '../types'
+import ImgurFallbackImage from './ImgurFallbackImage.vue'
export default createComponent({
name: 'FactoryDetailPage',
+ components: {
+ ImgurFallbackImage
+ },
setup () {
const [appState, { pageTransition, expandFactoryDetail, collapseFactoryDetail, toggleFactoryDetail }] = useAppState()
diff --git a/src/components/ImgurFallbackImage.vue b/src/components/ImgurFallbackImage.vue
new file mode 100644
index 0000000..0897247
--- /dev/null
+++ b/src/components/ImgurFallbackImage.vue
@@ -0,0 +1,58 @@
+
+
+
+
+