diff --git a/src/components/links/LinkCard.vue b/src/components/links/LinkCard.vue new file mode 100644 index 00000000..b5611cf4 --- /dev/null +++ b/src/components/links/LinkCard.vue @@ -0,0 +1,102 @@ + + + + + diff --git a/src/data/changelog.json b/src/data/changelog.json index dc03a926..a99d23d1 100644 --- a/src/data/changelog.json +++ b/src/data/changelog.json @@ -1,4 +1,10 @@ [ + { + "time": "2024-10-28", + "changes": [ + "增加友情链接页面,感谢小刻食堂提供支持" + ] + }, { "time": "2024-08-27", "changes": ["【精英材料计算】森空岛功能支持跟随多帐号切换"] diff --git a/src/locales/cn/app.json b/src/locales/cn/app.json index aa00171f..918e4d68 100644 --- a/src/locales/cn/app.json +++ b/src/locales/cn/app.json @@ -6,7 +6,8 @@ "material": "精英材料计算", "level": "干员升级计算", "riic": "基建技能筛选", - "depot": "仓库材料导入" + "depot": "仓库材料导入", + "links": "友情链接" }, "setting": { "rememberLastPage": "记住最后一次打开的选项卡", diff --git a/src/locales/jp/app.json b/src/locales/jp/app.json index 4127e45f..0f6628f2 100644 --- a/src/locales/jp/app.json +++ b/src/locales/jp/app.json @@ -6,7 +6,8 @@ "material": "@:(common.operator)育成", "level": "レベルアップ計算", "riic": "基地スキル", - "depot": "倉庫のインポート" + "depot": "倉庫のインポート", + "links": "リンク集" }, "setting": { "rememberLastPage": "最後開いたページを記憶する", diff --git a/src/locales/kr/app.json b/src/locales/kr/app.json index d3203759..b70e5cc0 100644 --- a/src/locales/kr/app.json +++ b/src/locales/kr/app.json @@ -6,7 +6,8 @@ "material": "재료 계산기", "level": "레벨 업", "riic": "기반시설 스킬", - "depot": "창고 가져오기" + "depot": "창고 가져오기", + "links": "링크 모음" }, "setting": { "rememberLastPage": "마지막으로 열었던 탭 기억하기", diff --git a/src/locales/tw/app.json b/src/locales/tw/app.json index 1e765319..45e8f9d4 100644 --- a/src/locales/tw/app.json +++ b/src/locales/tw/app.json @@ -6,7 +6,8 @@ "material": "精英材料計算", "level": "幹員升級計算", "riic": "基建技能篩選", - "depot": "倉庫材料導入" + "depot": "倉庫材料導入", + "links": "友情連結" }, "setting": { "rememberLastPage": "記住最後一次打開的索引標籤", diff --git a/src/locales/us/app.json b/src/locales/us/app.json index 33eb6894..303f80b8 100644 --- a/src/locales/us/app.json +++ b/src/locales/us/app.json @@ -6,7 +6,8 @@ "material": "Material Calculation", "level": "Level Up", "riic": "RIIC Skills", - "depot": "Depot Import" + "depot": "Depot Import", + "links": "Links" }, "setting": { "rememberLastPage": "Remember last tab opened", diff --git a/src/main.js b/src/main.js index 3bfca382..c52b7285 100644 --- a/src/main.js +++ b/src/main.js @@ -58,6 +58,7 @@ new Vue({ provide() { return { isReleasedChar: this.isReleasedChar, + getRoot: () => this, }; }, data: { diff --git a/src/router.js b/src/router.js index 2293b331..5845a1cd 100644 --- a/src/router.js +++ b/src/router.js @@ -39,15 +39,15 @@ export const router = new Router({ { path: '/material', name: 'material', - component: waitDataReady(() => - import(/* webpackChunkName: "app.material" */ './views/Material/index.vue'), + component: waitDataReady( + () => import(/* webpackChunkName: "app.material" */ './views/Material/index.vue'), ), }, { path: '/level', name: 'level', - component: waitDataReady(() => - import(/* webpackChunkName: "app.level" */ './views/Level.vue'), + component: waitDataReady( + () => import(/* webpackChunkName: "app.level" */ './views/Level.vue'), ), }, { @@ -58,10 +58,15 @@ export const router = new Router({ { path: '/depot', name: 'depot', - component: waitDataReady(() => - import(/* webpackChunkName: "app.depot" */ './views/Depot.vue'), + component: waitDataReady( + () => import(/* webpackChunkName: "app.depot" */ './views/Depot.vue'), ), }, + { + path: '/links', + name: 'links', + component: () => import(/* webpackChunkName: "app.links" */ './views/Links.vue'), + }, ], }); @@ -90,4 +95,7 @@ export const meta = { icon: 'apps', chip: 'v1', }, + links: { + icon: 'link', + }, }; diff --git a/src/utils/ceobeCanteen.js b/src/utils/ceobeCanteen.js new file mode 100644 index 00000000..206b98c1 --- /dev/null +++ b/src/utils/ceobeCanteen.js @@ -0,0 +1,13 @@ +import { computed, inject } from 'vue'; + +export const useCeobeApiUtils = () => { + const isLocaleZH = computed(() => inject('getRoot')?.()?.$root.localeZH); + + const getLocalizedText = obj => + obj[isLocaleZH.value ? 'zh_CN' : 'en_US'] || obj.zh_CN || obj.en_US || ''; + + return { + isLocaleZH, + getLocalizedText, + }; +}; diff --git a/src/views/Links.vue b/src/views/Links.vue new file mode 100644 index 00000000..e886a26d --- /dev/null +++ b/src/views/Links.vue @@ -0,0 +1,99 @@ + + + + +