diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index b81dc9694..ed8700ed2 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -223,6 +223,7 @@ issues.in_your_repos = In your repositories repos = Repositories users = Users organizations = Organizations +images = CloudImages search = Search code = Code repo_no_results = No matching repositories found. diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 79abd7895..554c4275d 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -224,6 +224,7 @@ issues.in_your_repos=属于该用户项目的 repos=项目 users=用户 organizations=组织 +images = 云脑镜像 search=搜索 code=代码 repo_no_results=未找到匹配的项目。 diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index 80d0d2275..0dac7824c 100755 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -28,6 +28,7 @@ {{.i18n.Tr "custom.head.dataset"}} {{.i18n.Tr "explore.users"}} {{.i18n.Tr "explore.organizations"}} + {{.i18n.Tr "explore.images"}} {{else if .IsLandingPageHome}} @@ -42,6 +43,7 @@ {{.i18n.Tr "datasets"}} {{.i18n.Tr "explore.users"}} {{.i18n.Tr "explore.organizations"}} + {{.i18n.Tr "explore.images"}} {{else if .IsLandingPageExplore}} diff --git a/templates/base/head_navbar_home.tmpl b/templates/base/head_navbar_home.tmpl index 8f89a368b..2379c1782 100644 --- a/templates/base/head_navbar_home.tmpl +++ b/templates/base/head_navbar_home.tmpl @@ -28,6 +28,7 @@ {{.i18n.Tr "custom.head.dataset"}} {{.i18n.Tr "explore.users"}} {{.i18n.Tr "explore.organizations"}} + {{.i18n.Tr "explore.images"}} {{else if .IsLandingPageHome}} @@ -42,6 +43,7 @@ {{.i18n.Tr "datasets"}} {{.i18n.Tr "explore.users"}} {{.i18n.Tr "explore.organizations"}} + {{.i18n.Tr "explore.images"}} {{else if .IsLandingPageExplore}} diff --git a/templates/explore/images.tmpl b/templates/explore/images.tmpl new file mode 100644 index 000000000..226a61168 --- /dev/null +++ b/templates/explore/images.tmpl @@ -0,0 +1,7 @@ +{{template "base/head" .}} +
+ + +
+ +{{template "base/footer" .}} \ No newline at end of file diff --git a/web_src/js/components/Images.vue b/web_src/js/components/Images.vue new file mode 100644 index 000000000..40a2ff18f --- /dev/null +++ b/web_src/js/components/Images.vue @@ -0,0 +1,420 @@ + + + + + diff --git a/web_src/js/index.js b/web_src/js/index.js index 2de20b0d4..991a13c21 100755 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -35,6 +35,7 @@ import {createCodeEditor} from './features/codeeditor.js'; import MinioUploader from './components/MinioUploader.vue'; import ObsUploader from './components/ObsUploader.vue'; import EditAboutInfo from './components/EditAboutInfo.vue'; +import Images from './components/Images.vue' Vue.use(ElementUI); Vue.prototype.$axios = axios; @@ -2966,6 +2967,7 @@ $(document).ready(async () => { initVueUploader(); initObsUploader(); initVueEditAbout(); + initVueImages(); initTeamSettings(); initCtrlEnterSubmit(); initNavbarContentToggle(); @@ -3653,7 +3655,7 @@ function initVueUploader() { function initVueEditAbout() { const el = document.getElementById('about-desc'); - console.log(el) + if (!el) { return; } @@ -3664,6 +3666,21 @@ function initVueEditAbout() { }); } + +function initVueImages() { + const el = document.getElementById('images'); + console.log("el",el) + + if (!el) { + return; + } + + new Vue({ + el: '#images', + render: h => h(Images) + }); +} + // 新增 function initObsUploader() { const el = document.getElementById('obsUploader');