From 55fbf7fbbf9074f8c01d44dcd7be6a14814b630d Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 16 Feb 2022 17:12:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- custom/public/css/git.openi.css | 153 +++++++++++++++++++++++--- modules/notification/base/notifier.go | 2 +- options/locale/locale_en-US.ini | 6 + options/locale/locale_zh-CN.ini | 9 +- templates/user/dashboard/feeds.tmpl | 18 +-- 5 files changed, 158 insertions(+), 30 deletions(-) diff --git a/custom/public/css/git.openi.css b/custom/public/css/git.openi.css index 502ba8d88..b849d0cd4 100644 --- a/custom/public/css/git.openi.css +++ b/custom/public/css/git.openi.css @@ -44,6 +44,12 @@ -webkit-line-clamp: 2; -webkit-box-orient: vertical; } +.ui.label{ + font-weight: normal; +} +.active { + color: #0366D6 !important; +} .opacity5{ opacity:0.5;} .radius15{ border-radius:1.5rem !important; } @@ -250,9 +256,13 @@ box-shadow: none !important; } .homeorg-list .card .ui.small.header .content{ - width: calc(100% - 3.25em); + width: calc(100% - 3.75em); +} +.homepro-tit{ + z-index: 9; + position: relative; } -.homepro-list{ +.homepro-list, .homeorg-list{ position: relative; z-index: 9; padding: 1.0em 1.0em 3.0em; @@ -261,42 +271,153 @@ .homepro-list .ui.card{ border-radius: 15px; background-color: #FFF; - box-shadow: 0px 5px 10px 0px rgba(105, 192, 255, 30); - border: 1px solid rgba(105, 192, 255, 40); + box-shadow: 0px 5px 10px 0px rgba(105, 192, 255, .3); + border: 1px solid rgba(105, 192, 255, .4); min-height: 10.8em; } .homepro-list .ui.card>.content>.header{ line-height: 40px !important; } -.homepro-list .swiper-pagination-bullet-active{ +.homepro-list .swiper-pagination-bullet-active, .homeorg-list .swiper-pagination-bullet-active{ width: 40px; - border-radius: 4px; + border-radius: 4px; } .i-env > div{ position: relative; } +/**seach**/ +/**搜索导航条适配窄屏**/ +.seachnav{ + overflow-x: auto; + overflow-y: hidden; + scrollbar-width: none; /* firefox */ + -ms-overflow-style: none; /* IE 10+ */ +} +.seachnav::-webkit-scrollbar { + display: none; /* Chrome Safari */ +} +.ui.green.button, .ui.green.buttons .button{ + background-color: #5BB973; +} +.seach .repos--seach{ + padding-bottom: 0; + border-bottom: none; +} +.seach .ui.secondary.pointing.menu{ + border-bottom: none; +} +.seach .ui.secondary.pointing.menu .item > i{ + margin-right: 5px; +} +.seach .ui.secondary.pointing.menu .active.item{ + border-bottom-width: 2px; + margin: 0 0 -1px; +} +.seach .ui.menu .active.item>.label { + background: #1684FC; + color: #FFF; +} +.seach .ui.menu .item>.label:not(.active.item>.label) { + background: #e8e8e8; + color: rgba(0,0,0,.6); +} + +.highlight{ + color: red; +} +.ui.list .list>.item>img.image+.content, .ui.list>.item>img.image+.content { + width: calc(100% - 3.0em); + margin-left: 0; +} + +.seach .ui.list .list>.item .header, .seach .ui.list>.item .header{ + margin-bottom: 0.5em; + font-size: 1.4rem !important; + font-weight: normal; +} +.seach .time, .seach .time a{ + font-size: 12px; + color: grey; +} + +.seach .list .item.members .ui.avatar.image { + width: 3.2em; + height: 3.2em; +} +.ui.list .list>.item.members>img.image+.content, .ui.list>.item.members>img.image+.content { + width: calc(100% - 4.0em); + margin-left: 0; +} + @media only screen and (max-width: 767px) { .am-mt-30{ margin-top: 1.5rem !important;} .ui.secondary.hometop.segment{ - margin-bottom: 2.0rem; + margin-bottom: 5.0rem; } - .bannerpic, .i-code-pic{ + .bannerpic{ display: none; } - .i-code h2::before { - left: calc(-5.0rem + 6px); + #homenews{ + bottom: -3em; } - .i-code h2.am-bw::before{ - left: calc(-4.0rem + 6px); + #homenews > p { + margin-left: 1.0em; + } + .homenews{ + padding-left: 1.3em !important; + border-radius: 1.5em; + } + .homenews::before{ + left: 2em; + } + .homepro-tit > p{ + background: #FFF; + } + .homeorg{ + padding-left: 3.5em; + } + .homeorg-tit::after { + left: -2.3em; + } + .homeorg-list{ + margin: 0 0 2.0em !important; + } + .homeorg-list > .column{ + width: 3em !important; + margin-left: -0.5em; + padding: 0.5rem 0 0 !important; + } + .homeorg-list .card{ + background: none !important; + } + .homeorg-list .card > .content{ + padding: 0 !important; + } + + .homeorg-list > .column .card .ui.header>img{ + width: 3.0em; + height: 3.0em; + border-radius: 2.0em; + border: 2px solid #FFF; + } + .homeorg-list > .column .card .ui.header > .content{ + display: none; } .leftline01{ - width: calc(50% - 4.0rem); + width: 4.0em; + bottom: 4em; + border-radius: 0 0 0 3.0em; + } + .leftline02, .leftline02-2{ + left: 6.0em; + top: calc(-4.0em - 2px); + border-radius: 0 3.0em 3.0em 0; + width: calc(50% - 6.0em); } - .leftline02{ - left: calc(50% - 1.0rem); - top: calc(-3.5rem - 2px); + .leftline02-2 { + width: calc(50% - 8.0em); } } diff --git a/modules/notification/base/notifier.go b/modules/notification/base/notifier.go index 4a8e16f18..8f5436c75 100644 --- a/modules/notification/base/notifier.go +++ b/modules/notification/base/notifier.go @@ -54,5 +54,5 @@ type Notifier interface { NotifySyncCreateRef(doer *models.User, repo *models.Repository, refType, refFullName string) NotifySyncDeleteRef(doer *models.User, repo *models.Repository, refType, refFullName string) - NotifyOtherTask(doer *models.User, repo *models.Repository, id string, name string) + NotifyOtherTask(doer *models.User, repo *models.Repository, id string, name string, optype models.ActionType) } diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index a42af2824..c768ad005 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -2639,6 +2639,12 @@ mirror_sync_delete = synced and deleted reference %[2]s at %s#%[2]s` reject_pull_request = `suggested changes for %s#%[2]s` upload_dataset=`upload dataset %s#%[2]s` +task_gpudebugjob=`created CPU/GPU type debugging task%s#%[2]s` +task_npudebugjob=`created NPU type debugging task %s#%[2]s` +task_trainjob=`created training task%s#%[2]s` +task_inferencejob=`created reasoning task %s#%[2]s` +task_benchmark=`created profiling task %s#%[2]s` +task_createmodel=`created new model %s#%[2]s` [tool] ago = %s ago diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 4cf2d330a..bddff4ac6 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -2646,7 +2646,14 @@ mirror_sync_create=从镜像同步了新的引用 %[2]s mirror_sync_delete=从镜像同步并从 %[3]s 删除了引用 %[2]s approve_pull_request=`同意了 %s#%[2]s` reject_pull_request=`建议变更 %s#%[2]s` -upload_dataset=`上传了数据集 %s#%[2]s` +upload_dataset=`上传了数据集文件 %s#%[2]s` +task_gpudebugjob=`创建了CPU/GPU类型调试任务 %s#%[2]s` +task_npudebugjob=`创建了NPU类型调试任务 %s#%[2]s` +task_trainjob=`创建了训练任务 %s#%[2]s` +task_inferencejob=`创建了推理任务 %s#%[2]s` +task_benchmark=`创建了评测任务 %s#%[2]s` +task_createmodel=`导入了新模型 %s#%[2]s` + [tool] ago=%s前 from_now=%s 之后 diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl index 09baa10e6..55d9ca7f6 100644 --- a/templates/user/dashboard/feeds.tmpl +++ b/templates/user/dashboard/feeds.tmpl @@ -73,23 +73,17 @@ {{else if eq .GetOpType 24}} {{$.i18n.Tr "action.upload_dataset" .GetRepoLink .Content .RefName | Str2html}} {{else if eq .GetOpType 25}} - - {{$.i18n.Tr "action.comment_pull" .GetRepoLink $index .ShortRepoPath | Str2html}} + {{$.i18n.Tr "action.task_gpudebugjob" .GetRepoLink .Content .RefName | Str2html}} {{else if eq .GetOpType 26}} - - {{$.i18n.Tr "action.comment_pull" .GetRepoLink $index .ShortRepoPath | Str2html}} + {{$.i18n.Tr "action.task_npudebugjob" .GetRepoLink .Content .RefName | Str2html}} {{else if eq .GetOpType 27}} - - {{$.i18n.Tr "action.comment_pull" .GetRepoLink $index .ShortRepoPath | Str2html}} + {{$.i18n.Tr "action.task_trainjob" .GetRepoLink .Content .RefName | Str2html}} {{else if eq .GetOpType 28}} - - {{$.i18n.Tr "action.comment_pull" .GetRepoLink $index .ShortRepoPath | Str2html}} + {{$.i18n.Tr "action.task_inferencejob" .GetRepoLink .Content .RefName | Str2html}} {{else if eq .GetOpType 29}} - - {{$.i18n.Tr "action.comment_pull" .GetRepoLink $index .ShortRepoPath | Str2html}} + {{$.i18n.Tr "action.task_benchmark" .GetRepoLink .Content .RefName | Str2html}} {{else if eq .GetOpType 30}} - - {{$.i18n.Tr "action.comment_pull" .GetRepoLink $index .ShortRepoPath | Str2html}} + {{$.i18n.Tr "action.task_createmodel" .GetRepoLink .RefName .RefName | Str2html}} {{end}}

{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}