Browse Source

Merge branch 'V20220228' into fix-1488

pull/1529/head
zhoupzh 3 years ago
parent
commit
9375cf8a23
3 changed files with 10 additions and 9 deletions
  1. +2
    -2
      templates/repo/debugjob/index.tmpl
  2. +1
    -1
      templates/repo/home.tmpl
  3. +7
    -6
      web_src/js/components/EditAboutInfo.vue

+ 2
- 2
templates/repo/debugjob/index.tmpl View File

@@ -490,11 +490,11 @@


<script> <script>
// 调试和评分新开窗口 // 调试和评分新开窗口
console.log({{.Tasks}})
const {AppSubUrl, StaticUrlPrefix, csrf} = window.config; const {AppSubUrl, StaticUrlPrefix, csrf} = window.config;
let url={{.RepoLink}} let url={{.RepoLink}}
let getParam=getQueryVariable('debugListType') let getParam=getQueryVariable('debugListType')
let dropdownValue = getParam==='all'||getParam==='' ? '全部' : getParam
let dropdownValue = ['all','',false].includes(getParam)? '全部' : getParam
localStorage.setItem('all',location.href) localStorage.setItem('all',location.href)
function getQueryVariable(variable) function getQueryVariable(variable)
{ {


+ 1
- 1
templates/repo/home.tmpl View File

@@ -255,7 +255,7 @@
{{end}} {{end}}
</div> </div>
<div class="ui six wide tablet four wide computer column"> <div class="ui six wide tablet four wide computer column">
<div id="repo-desc" data-IsSigned= "{{.IsSigned}}" >
<div id="repo-desc" data-IsAdmin= "{{.Permission.IsAdmin}}" data-IsArchived="{{.Repository.IsArchived}}" >
<h4 id="about-desc" class="ui header">简介</h4> <h4 id="about-desc" class="ui header">简介</h4>
<input type="hidden" id="edit-alias" value="{{.Repository.Alias}}"> <input type="hidden" id="edit-alias" value="{{.Repository.Alias}}">
<p> <p>


+ 7
- 6
web_src/js/components/EditAboutInfo.vue View File

@@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<h4 id="about-desc" class="ui header desc-home">简介 <h4 id="about-desc" class="ui header desc-home">简介
<a class="edit-icon" v-if="IsSigned" id ="editBtn" href="javascript:void(0)" @click="editClick" >
<a class="edit-icon" v-if="IsPermit" id ="editBtn" href="javascript:void(0)" @click="editClick" >
<i class="gray edit outline icon" style="margin-right: 0;"></i> <i class="gray edit outline icon" style="margin-right: 0;"></i>
</a> </a>
</h4> </h4>
@@ -53,7 +53,7 @@ export default {
index_web: '', index_web: '',
repo_name_name: '', repo_name_name: '',
alias:'', alias:'',
IsSigned:false
IsPermit:false
}, },
// rule1:[{min:3,max:5,message:'1',trigger:"blur"}], // rule1:[{min:3,max:5,message:'1',trigger:"blur"}],
rule: { rule: {
@@ -65,14 +65,15 @@ export default {
}, },
methods: { methods: {
getIsSigned(){ getIsSigned(){
this.IsSigned = document.getElementById("repo-desc").dataset.issigned;
var isadmin= document.getElementById("repo-desc").dataset.isadmin;
var isarchived=document.getElementById("repo-desc").dataset.isarchived;
// console.log("IsSigned:",this.IsSigned) // console.log("IsSigned:",this.IsSigned)
if (this.IsSigned==true || this.IsSigned=="true"){
this.IsSigned=true;
if ((isadmin==true || isadmin=="true")&& (isarchived==false || isarchived=="false")){
this.IsPermit=true;
} }
}, },
editClick() { editClick() {
if (this.IsSigned){
if (this.IsPermit){
this.editDataDialog = true; this.editDataDialog = true;
} }
}, },


Loading…
Cancel
Save