#1951 fix-1579 提供个人中心缺省页

Merged
wangjr merged 12 commits from fix-1579 into V20220415 2 years ago
  1. +10
    -0
      options/locale/locale_en-US.ini
  2. +12
    -0
      options/locale/locale_zh-CN.ini
  3. +97
    -0
      templates/user/dashboard/dashboard.tmpl

+ 10
- 0
options/locale/locale_en-US.ini View File

@@ -266,6 +266,16 @@ search_related=related
search_maybe=maybe
search_ge=

wecome_AI_plt = Welcome to OpenI AI Collaboration Platform!
explore_AI = Explore better AI, come here to find more interesting
datasets = Datasets
repositories = Repositories
use_plt__fuction = To use the AI collaboration functions provided by this platform, such as: hosting code, sharing data, debugging algorithms or training models, start with
provide_resoure = Computing resources of CPU/GPU/NPU are provided freely for various types of AI tasks.
activity = Activity
no_events = There are no events related
or_t = or

[explore]
repos = Repositories
select_repos = Select the project


+ 12
- 0
options/locale/locale_zh-CN.ini View File

@@ -268,6 +268,18 @@ search_related=相关
search_maybe=约为
search_ge=个

wecome_AI_plt=欢迎来到启智AI协作平台!
explore_AI = 探索更好的AI,来这里发现更有意思的
datasets = 数据集
repositories = 项目
use_plt__fuction = 使用本平台提供的AI协作功能,如:托管代码、共享数据、调试算法或训练模型,请先
provide_resoure = 平台目前免费提供CPU、GPU、NPU的算力资源,可进行多种类型的AI任务。
create_pro = 创建项目
activity = 活动
no_events = 还没有与您相关的活动
or_t = 或


[explore]
repos=项目
select_repos=精选项目


+ 97
- 0
templates/user/dashboard/dashboard.tmpl View File

@@ -5,13 +5,110 @@
{{template "base/alert" .}}
<div class="ui mobile reversed stackable grid">
<div class="ui container ten wide column">
<div class="default" id = 'default_page'>
<div class="w_title">
{{.i18n.Tr "home.wecome_AI_plt"}}
</div>
<div class="content">
<p >{{.i18n.Tr "home.explore_AI"}} <a href="{{AppSubUrl}}/explore/repos"> {{.i18n.Tr "home.repositories"}}</a> {{.i18n.Tr "home.or_t"}} <a href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "home.datasets"}}</a></p>
<p >{{.i18n.Tr "home.use_plt__fuction"}}&nbsp;<a class="mini ui blue button" href="{{AppSubUrl}}/repo/create{{if .ContextUser.IsOrganization}}?org={{.ContextUser.ID}}{{end}}" >{{.i18n.Tr "repo.create_repo"}}</a></p>
<p > {{.i18n.Tr "home.provide_resoure"}}</p>
</div>
<div class="guide ">
<a class="mini ui blue basic button" style="font-weight:700" href="https://git.openi.org.cn/zeizei/OpenI_Learning" target="_blank">{{.i18n.Tr "custom.Platform_Tutorial"}} <i class="ri-arrow-right-line" ></i></a>
</div>
</div>
{{if .EnableHeatmap}}
{{template "user/dashboard/heatmap" .}}
{{end}}
{{template "user/dashboard/feeds" .}}
<diV id = "activity_cont">
<div class="ui placeholder segment bgtask-none padding_none line" >
<div class="act_title" style="padding-left: 0px ;">
{{.i18n.Tr "home.activity"}} :
</div>
<div class="ui icon header bgtask-header-pic"></div>
<p class="p_hint">
{{.i18n.Tr "home.no_events"}}
</p>
</div>
</diV>
</div>
{{template "user/dashboard/repolist" .}}
</div>
</div>
</div>
{{template "base/footer" .}}
<script>

const {AppSubUrl, StaticUrlPrefix, csrf} = window.config;
uid_ = Number((document.querySelector('meta[name=_context_uid]') || {}).content)
console.log("uid:",uid_)
let URL = AppSubUrl + '/api/v1/repos/search?sort=updated&order=desc&uid='+uid_ +'&q=&page=1&limit=10&mode= ';
$.getJSON(URL, (result, _textStatus, request) => {
const counts_pro = request.getResponseHeader('X-Total-Count');
console.log("count:",counts_pro)
if (counts_pro != 0){
document.getElementById("default_page").style.display = "none";
document.getElementById("activity_cont").style.display = "none"
}
})
</script>

<style>
.default{
background-color: rgba(24, 144, 255, 0.1);
margin-bottom: 20px;
border-radius: 15px;
line-height: 20px;
padding:0px 25px;
}
.w_title{
padding-top: 25px;
color: rgba(16, 16, 16, 100);
font-size: 20px;
text-align: left;
font-weight: 700;
}
.content{
color: rgba(80, 85, 89, 100);
font-size: 14px;
text-align: left;
font-family: SourceHanSansSC-regular;
margin-top: 20px;
}

.guide{
margin-top:30px;
padding-bottom: 30px;
}

.activity{
margin-top: 20px;
}
.act_title{
color: rgba(16, 16, 16, 100) !important;
font-size: 20px;
text-align: left;
background-color: #fff !important;
font-weight: 700;
}
.p_hint{
color: rgba(136, 136, 136, 100);
font-size: 14px;
text-align: center;
font-family: SourceHanSansSC-regular;
}
.padding_none{
padding: 0px !important;
}

.ui.placeholder.segment {
min-height: 15rem !important;
}
.line{
border-top: 1px solid rgba(187, 187, 187, 0.5) !important;
margin-top: 20px !important;
}
</style>

Loading…
Cancel
Save