| @@ -976,12 +976,12 @@ func CreateUser(u *User) (err error) { | |||||
| result, err := blockchain.CreateBlockchainAccount() | result, err := blockchain.CreateBlockchainAccount() | ||||
| if err != nil { | if err != nil { | ||||
| log.Error("createBlockchainAccount failed:", err.Error()) | log.Error("createBlockchainAccount failed:", err.Error()) | ||||
| return err | |||||
| //return err | |||||
| } else { | |||||
| u.PublicKey = result.Payload["publickey"].(string) | |||||
| u.PrivateKey = result.Payload["privatekey"].(string) | |||||
| } | } | ||||
| u.PublicKey = result.Payload["publickey"].(string) | |||||
| u.PrivateKey = result.Payload["privatekey"].(string) | |||||
| sess := x.NewSession() | sess := x.NewSession() | ||||
| defer sess.Close() | defer sess.Close() | ||||
| if err = sess.Begin(); err != nil { | if err = sess.Begin(); err != nil { | ||||
| @@ -1841,6 +1841,14 @@ | |||||
| "async-done": "^1.2.2" | "async-done": "^1.2.2" | ||||
| } | } | ||||
| }, | }, | ||||
| "async-validator": { | |||||
| "version": "1.8.5", | |||||
| "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz", | |||||
| "integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==", | |||||
| "requires": { | |||||
| "babel-runtime": "6.x" | |||||
| } | |||||
| }, | |||||
| "asynckit": { | "asynckit": { | ||||
| "version": "0.4.0", | "version": "0.4.0", | ||||
| "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", | ||||
| @@ -1934,6 +1942,11 @@ | |||||
| } | } | ||||
| } | } | ||||
| }, | }, | ||||
| "babel-helper-vue-jsx-merge-props": { | |||||
| "version": "2.0.3", | |||||
| "resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz", | |||||
| "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg==" | |||||
| }, | |||||
| "babel-loader": { | "babel-loader": { | ||||
| "version": "8.1.0", | "version": "8.1.0", | ||||
| "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz", | "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.1.0.tgz", | ||||
| @@ -3882,6 +3895,26 @@ | |||||
| "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.437.tgz", | "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.437.tgz", | ||||
| "integrity": "sha512-PBQn2q68ErqMyBUABh9Gh8R6DunGky8aB5y3N5lPM7OVpldwyUbAK5AX9WcwE/5F6ceqvQ+iQLYkJYRysAs6Bg==" | "integrity": "sha512-PBQn2q68ErqMyBUABh9Gh8R6DunGky8aB5y3N5lPM7OVpldwyUbAK5AX9WcwE/5F6ceqvQ+iQLYkJYRysAs6Bg==" | ||||
| }, | }, | ||||
| "element-ui": { | |||||
| "version": "2.15.5", | |||||
| "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.5.tgz", | |||||
| "integrity": "sha512-B/YCdz2aRY2WnFXzbTRTHPKZHBD/2KV6u88EBnkaARC/Lyxnap+7vpvrcW5UNTyVwjItS5Fj1eQyRy6236lbXg==", | |||||
| "requires": { | |||||
| "async-validator": "~1.8.1", | |||||
| "babel-helper-vue-jsx-merge-props": "^2.0.0", | |||||
| "deepmerge": "^1.2.0", | |||||
| "normalize-wheel": "^1.0.1", | |||||
| "resize-observer-polyfill": "^1.5.0", | |||||
| "throttle-debounce": "^1.0.1" | |||||
| }, | |||||
| "dependencies": { | |||||
| "deepmerge": { | |||||
| "version": "1.5.2", | |||||
| "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz", | |||||
| "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==" | |||||
| } | |||||
| } | |||||
| }, | |||||
| "elliptic": { | "elliptic": { | ||||
| "version": "6.5.4", | "version": "6.5.4", | ||||
| "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", | "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", | ||||
| @@ -9186,6 +9219,11 @@ | |||||
| "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", | "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", | ||||
| "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==" | "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==" | ||||
| }, | }, | ||||
| "normalize-wheel": { | |||||
| "version": "1.0.1", | |||||
| "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz", | |||||
| "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=" | |||||
| }, | |||||
| "now-and-later": { | "now-and-later": { | ||||
| "version": "2.0.1", | "version": "2.0.1", | ||||
| "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", | "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", | ||||
| @@ -11687,6 +11725,11 @@ | |||||
| "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.0.0.tgz", | "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.0.0.tgz", | ||||
| "integrity": "sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA==" | "integrity": "sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA==" | ||||
| }, | }, | ||||
| "resize-observer-polyfill": { | |||||
| "version": "1.5.1", | |||||
| "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", | |||||
| "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" | |||||
| }, | |||||
| "resolve": { | "resolve": { | ||||
| "version": "1.17.0", | "version": "1.17.0", | ||||
| "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", | ||||
| @@ -13526,6 +13569,11 @@ | |||||
| "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.6.0.tgz", | "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.6.0.tgz", | ||||
| "integrity": "sha512-49WtAWS+tcsy93dRt6P0P3AMD2m5PvXRhuEA0kaXos5ZLlujtYmpmFsB+QvWUSxE1ZsstmYXfQ7L40+EcQgpAQ==" | "integrity": "sha512-49WtAWS+tcsy93dRt6P0P3AMD2m5PvXRhuEA0kaXos5ZLlujtYmpmFsB+QvWUSxE1ZsstmYXfQ7L40+EcQgpAQ==" | ||||
| }, | }, | ||||
| "throttle-debounce": { | |||||
| "version": "1.1.0", | |||||
| "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz", | |||||
| "integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg==" | |||||
| }, | |||||
| "through": { | "through": { | ||||
| "version": "2.3.8", | "version": "2.3.8", | ||||
| "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", | ||||
| @@ -19,6 +19,7 @@ | |||||
| "cssnano": "4.1.10", | "cssnano": "4.1.10", | ||||
| "domino": "2.1.5", | "domino": "2.1.5", | ||||
| "dropzone": "5.7.2", | "dropzone": "5.7.2", | ||||
| "element-ui": "2.15.5", | |||||
| "esdk-obs-browserjs": "3.20.7", | "esdk-obs-browserjs": "3.20.7", | ||||
| "esdk-obs-nodejs": "3.20.11", | "esdk-obs-nodejs": "3.20.11", | ||||
| "fast-glob": "3.2.2", | "fast-glob": "3.2.2", | ||||
| @@ -127,7 +127,7 @@ | |||||
| <img src="/img/i-pic-01.svg"> | <img src="/img/i-pic-01.svg"> | ||||
| </div> | </div> | ||||
| <div class="content"> | <div class="content"> | ||||
| <a class="ui centered header">开发要素统一管理</a> | |||||
| <h3 class="ui centered header">开发要素统一管理</h3> | |||||
| <div class="description"> | <div class="description"> | ||||
| 平台提供了AI开发四大要素:模型代码、数据集、模型和执行环境的统一管理 | 平台提供了AI开发四大要素:模型代码、数据集、模型和执行环境的统一管理 | ||||
| </div> | </div> | ||||
| @@ -138,7 +138,7 @@ | |||||
| <img src="/img/i-pic-02.svg"> | <img src="/img/i-pic-02.svg"> | ||||
| </div> | </div> | ||||
| <div class="content"> | <div class="content"> | ||||
| <a class="ui centered header">数据协同与共享</a> | |||||
| <h3 class="ui centered header">数据协同与共享</h3> | |||||
| <div class="description"> | <div class="description"> | ||||
| 通过在项目中上传数据集,项目成员多人协作完成数据预处理;也可以通过将数据设置为公有数据集,与社区开发者共同建立更好的模型 | 通过在项目中上传数据集,项目成员多人协作完成数据预处理;也可以通过将数据设置为公有数据集,与社区开发者共同建立更好的模型 | ||||
| </div> | </div> | ||||
| @@ -149,7 +149,7 @@ | |||||
| <img src="/img/i-pic-03.svg"> | <img src="/img/i-pic-03.svg"> | ||||
| </div> | </div> | ||||
| <div class="content"> | <div class="content"> | ||||
| <a class="ui centered header">模型管理与共享</a> | |||||
| <h3 class="ui centered header">模型管理与共享</h3> | |||||
| <div class="description"> | <div class="description"> | ||||
| 将模型与代码版本建立关联,可以基于代码历史版本,使用不同的方式调整模型,并将结果保存下来;训练好的模型可以开放共享,让更多人的使用模型测试并提出反馈 | 将模型与代码版本建立关联,可以基于代码历史版本,使用不同的方式调整模型,并将结果保存下来;训练好的模型可以开放共享,让更多人的使用模型测试并提出反馈 | ||||
| </div> | </div> | ||||
| @@ -160,7 +160,7 @@ | |||||
| <img src="/img/i-pic-04.svg"> | <img src="/img/i-pic-04.svg"> | ||||
| </div> | </div> | ||||
| <div class="content"> | <div class="content"> | ||||
| <a class="ui centered header">一次配置,多次使用</a> | |||||
| <h3 class="ui centered header">一次配置,多次使用</h3> | |||||
| <div class="description"> | <div class="description"> | ||||
| 提供执行环境共享,一次配置,多次使用,降低模型开发门槛,避免花费重复的时间配置复杂的环境 | 提供执行环境共享,一次配置,多次使用,降低模型开发门槛,避免花费重复的时间配置复杂的环境 | ||||
| </div> | </div> | ||||
| @@ -197,37 +197,55 @@ | |||||
| </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"> | <div id="repo-desc"> | ||||
| <h4 class="ui header">简介</h4> | |||||
| <h4 id="about-desc" class="ui header">简介 | |||||
| <!-- <a class="edit-icon" href="javascript:void(0)"> | |||||
| <i class="gray edit outline icon"></i> | |||||
| </a> --> | |||||
| </h4> | |||||
| <p> | <p> | ||||
| {{if .Repository.DescriptionHTML}} | |||||
| <span class="description">{{.Repository.DescriptionHTML}}</span> | |||||
| {{else}} | |||||
| <span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span> | |||||
| {{end}} | |||||
| <a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a> | |||||
| {{if .Repository.DescriptionHTML}} | |||||
| <span class="description" style="word-break:break-all">{{.Repository.DescriptionHTML}}</span> | |||||
| {{else}} | |||||
| <span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span> | |||||
| {{end}} | |||||
| </p> | </p> | ||||
| </div> | </div> | ||||
| {{if .Repository.Website}} | |||||
| <p class="ui"> | |||||
| <i class="gray linkify icon"></i> | |||||
| <a class="link" target="_blank" href="{{.Repository.Website}}">{{.Repository.Website}}</a> | |||||
| </p> | |||||
| {{end}} | |||||
| <p class="ui" id="repo-topics"> | <p class="ui" id="repo-topics"> | ||||
| <i class="grey bookmark icon"></i> | <i class="grey bookmark icon"></i> | ||||
| {{range .Topics}}<a class="ui repo-topic small label topic" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}} | {{range .Topics}}<a class="ui repo-topic small label topic" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}} | ||||
| {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<a id="manage_topic">{{.i18n.Tr "repo.topic.manage_topics"}}</a>{{end}} | {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<a id="manage_topic">{{.i18n.Tr "repo.topic.manage_topics"}}</a>{{end}} | ||||
| </p> | </p> | ||||
| <p class="ui"> | <p class="ui"> | ||||
| <i class="grey code icon"></i> | <i class="grey code icon"></i> | ||||
| {{range .LanguageStats}} | {{range .LanguageStats}} | ||||
| {{.Language}} | {{.Language}} | ||||
| {{end}} | {{end}} | ||||
| </p> | </p> | ||||
| {{if .LICENSE}} | |||||
| <p class="ui"> | <p class="ui"> | ||||
| <i class="grey clone icon"></i> | <i class="grey clone icon"></i> | ||||
| {{if .LICENSE}} | |||||
| {{.LICENSE}} | |||||
| {{end}} | |||||
| {{.LICENSE}} | |||||
| </p> | </p> | ||||
| {{end}} | |||||
| <div class="ui divider"></div> | <div class="ui divider"></div> | ||||
| @@ -0,0 +1,144 @@ | |||||
| <template> | |||||
| <div> | |||||
| <h4 id="about-desc" class="ui header">简介 | |||||
| <a class="edit-icon" href="javascript:void(0)" @click="editClick"> | |||||
| <i class="gray edit outline icon"></i> | |||||
| </a> | |||||
| </h4> | |||||
| <edit-dialog-cmpt | |||||
| :vmContext="vmContext" | |||||
| dialogTitle="编辑仓库信息" | |||||
| v-model="editDataDialog" | |||||
| :deleteCallback="editDataFunc" | |||||
| :deleteLoading ="editDataListLoading" | |||||
| deleteParam = "ruleForm" | |||||
| @input="initForm" | |||||
| > | |||||
| <div slot="title"> | |||||
| </div> | |||||
| <div slot="content"> | |||||
| <el-form label-position="top" :model="info" :rules="rule" ref="ruleForm"> | |||||
| <el-form-item label="简介" prop="desc"> | |||||
| <el-input v-model="info.desc" type="textarea" :autosize="{minRows:2,maxRows:6}"></el-input> | |||||
| </el-form-item> | |||||
| <el-form-item label="主页" prop="index_web" > | |||||
| <el-input v-model="info.index_web" placeholder="主页(eg: https://git.openi.org.cn)"></el-input> | |||||
| </el-form-item> | |||||
| </el-form> | |||||
| </div> | |||||
| </edit-dialog-cmpt> | |||||
| </div> | |||||
| </template> | |||||
| <script> | |||||
| const {_AppSubUrl, _StaticUrlPrefix, csrf} = window.config; | |||||
| import editDialogCmpt from './basic/editDialog.vue'; | |||||
| export default { | |||||
| components: { | |||||
| editDialogCmpt, | |||||
| }, | |||||
| data() { | |||||
| return { | |||||
| vmContext: this, | |||||
| editDataDialog: false, | |||||
| editDataListLoading: false, | |||||
| url: '', | |||||
| info: { | |||||
| desc: '', | |||||
| index_web: '', | |||||
| repo_name_name: '', | |||||
| }, | |||||
| // rule1:[{min:3,max:5,message:'1',trigger:"blur"}], | |||||
| rule: { | |||||
| index_web: [ | |||||
| {required: false, pattern: /(^$)|(^(http|https):\/\/(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).*)|(^(http|https):\/\/[a-zA-Z0-9]+([_\-\.][a-zA-Z0-9]+)*\.[a-zA-Z]{2,10}(:[0-9]{1,10})?(\?.*)?(\/.*)?$)/,message:'请输入有效的URL',tigger:['change','blur']} | |||||
| ] | |||||
| } | |||||
| }; | |||||
| }, | |||||
| methods: { | |||||
| editClick() { | |||||
| this.editDataDialog = true; | |||||
| }, | |||||
| getDesc() { | |||||
| const el = $('span.description').text(); | |||||
| this.info.desc = el; | |||||
| }, | |||||
| getWeb() { | |||||
| const el = $('a.link').text(); | |||||
| this.info.index_web = el; | |||||
| }, | |||||
| getRepoName() { | |||||
| const el = this.url.split('/')[2]; | |||||
| this.info.repo_name = el; | |||||
| }, | |||||
| initForm(diaolog) { | |||||
| if (diaolog === false) { | |||||
| console.log("--watch----------") | |||||
| this.getRepoName(); | |||||
| this.getDesc(); | |||||
| this.getWeb(); | |||||
| } | |||||
| }, | |||||
| editDataFunc(formName) { | |||||
| this.$refs[formName].validate((valid)=>{ | |||||
| if (valid) { | |||||
| this.$axios({ | |||||
| method: 'post', | |||||
| url: this.url, | |||||
| header: {'content-type': 'application/x-www-form-urlencoded'}, | |||||
| data: this.qs.stringify({ | |||||
| _csrf: csrf, | |||||
| action: 'update', | |||||
| repo_name: this.info.repo_name, | |||||
| description: this.info.desc, | |||||
| website: this.info.index_web | |||||
| }) | |||||
| }).then((res) => { | |||||
| location.reload(); | |||||
| this.editDataDialog = false; | |||||
| }).catch((error) => { | |||||
| this.editDataDialog = false; | |||||
| }) | |||||
| } | |||||
| else { | |||||
| return false; | |||||
| } | |||||
| }) | |||||
| }, | |||||
| getUrl() { | |||||
| const url = `${window.location.pathname}/settings`; | |||||
| this.url = url; | |||||
| } | |||||
| }, | |||||
| mounted() { | |||||
| this.getUrl(); | |||||
| this.getRepoName(); | |||||
| this.getDesc(); | |||||
| this.getWeb(); | |||||
| }, | |||||
| created() { | |||||
| } | |||||
| }; | |||||
| </script> | |||||
| <style scoped> | |||||
| .edit-icon{ | |||||
| float: right; | |||||
| font-size: 16px; | |||||
| display: block; | |||||
| top: -2px; | |||||
| color: #8c92a4; | |||||
| background-color: transparent; | |||||
| } | |||||
| </style> | |||||
| @@ -0,0 +1,105 @@ | |||||
| <template> | |||||
| <el-dialog :close-on-click-modal="!deleteLoading" v-dlg-drag :title="dialogTitle" :visible.sync="deleteDialog"> | |||||
| <div class="message-box__content"> | |||||
| <div class="message-box-title" > | |||||
| <slot name="title"></slot> | |||||
| </div> | |||||
| <div class="message-box-info"> | |||||
| <slot name="info"></slot> | |||||
| </div> | |||||
| </div> | |||||
| <slot name="content"></slot> | |||||
| <div slot="footer" class="dialog-footer"> | |||||
| <el-button @click="deleteDialog = false">{{"取消"}}</el-button> | |||||
| <el-button type="primary" @click="deleteCallback.call(vmContext,deleteParam)">{{"确定"}}</el-button> | |||||
| </div> | |||||
| </el-dialog> | |||||
| </template> | |||||
| <script type="text/javascript"> | |||||
| export default { | |||||
| data() { | |||||
| return { | |||||
| deleteDialog: false, | |||||
| }; | |||||
| }, | |||||
| props: { | |||||
| vmContext: { | |||||
| type: Object, | |||||
| default() { | |||||
| return {}; | |||||
| } | |||||
| }, | |||||
| dialogTitle: { | |||||
| type: String, | |||||
| default: '', | |||||
| }, | |||||
| deleteLoading: { | |||||
| type: Boolean, | |||||
| default: false, | |||||
| }, | |||||
| deleteCallback: { | |||||
| type: Function, | |||||
| default() { | |||||
| return () => {}; | |||||
| } | |||||
| }, | |||||
| deleteParam: { | |||||
| type: String, | |||||
| default: '' | |||||
| }, | |||||
| value: { | |||||
| type: Boolean, | |||||
| default: false, | |||||
| } | |||||
| }, | |||||
| computed: { | |||||
| }, | |||||
| watch: { | |||||
| deleteDialog() { | |||||
| this.$emit('input', this.deleteDialog); | |||||
| }, | |||||
| value() { | |||||
| this.deleteDialog = this.value; | |||||
| }, | |||||
| }, | |||||
| created() { | |||||
| this.deleteDialog = this.value; | |||||
| } | |||||
| }; | |||||
| </script> | |||||
| <style scoped> | |||||
| .el-message-box__content .icon{float:left;} | |||||
| .message-box__content{} | |||||
| .message-box__content .icon{float:left;margin-right:20px;} | |||||
| .message-box__content .message-box-title{font-size:16px;padding:2px 0;color:#333;} | |||||
| .message-box__content .message-box-p{font-size:16px;padding:20px 0;color:#333;} | |||||
| .message-box__content .message-box-info{color:#999;padding:2px 0;} | |||||
| .dialog-footer,.el-message-box__btns{text-align:center;} | |||||
| /deep/ .el-dialog__header { | |||||
| background: #0067b3; | |||||
| padding: 12px 30px; | |||||
| line-height: 25px;} | |||||
| /deep/ .el-dialog__title { | |||||
| font-family: PingFangSC-Regular; | |||||
| font-size: 18px; | |||||
| color: #fff; | |||||
| font-weight: 200; | |||||
| line-height: 25px; | |||||
| height: 25px; | |||||
| } | |||||
| /deep/ .el-dialog__footer { | |||||
| background: #eff3f9; | |||||
| padding: 20px 30px; | |||||
| } | |||||
| /deep/ .el-dialog{ | |||||
| width: 40%; | |||||
| } | |||||
| </style> | |||||
| @@ -6,6 +6,10 @@ import './publicpath.js'; | |||||
| import './polyfills.js'; | import './polyfills.js'; | ||||
| import Vue from 'vue'; | import Vue from 'vue'; | ||||
| import ElementUI from 'element-ui'; | |||||
| import 'element-ui/lib/theme-chalk/index.css'; | |||||
| import axios from 'axios'; | |||||
| import qs from 'qs'; | |||||
| import 'jquery.are-you-sure'; | import 'jquery.are-you-sure'; | ||||
| import './vendor/semanticdropdown.js'; | import './vendor/semanticdropdown.js'; | ||||
| import {svg} from './utils.js'; | import {svg} from './utils.js'; | ||||
| @@ -29,8 +33,12 @@ import { | |||||
| } from './features/notification.js'; | } from './features/notification.js'; | ||||
| import {createCodeEditor} from './features/codeeditor.js'; | import {createCodeEditor} from './features/codeeditor.js'; | ||||
| import MinioUploader from './components/MinioUploader.vue'; | import MinioUploader from './components/MinioUploader.vue'; | ||||
| import ObsUploader from './components/ObsUploader.vue' | |||||
| import ObsUploader from './components/ObsUploader.vue'; | |||||
| import EditAboutInfo from './components/EditAboutInfo.vue'; | |||||
| Vue.use(ElementUI); | |||||
| Vue.prototype.$axios = axios; | |||||
| Vue.prototype.qs = qs; | |||||
| const {AppSubUrl, StaticUrlPrefix, csrf} = window.config; | const {AppSubUrl, StaticUrlPrefix, csrf} = window.config; | ||||
| function htmlEncode(text) { | function htmlEncode(text) { | ||||
| @@ -2957,6 +2965,7 @@ $(document).ready(async () => { | |||||
| initVueApp(); | initVueApp(); | ||||
| initVueUploader(); | initVueUploader(); | ||||
| initObsUploader(); | initObsUploader(); | ||||
| initVueEditAbout(); | |||||
| initTeamSettings(); | initTeamSettings(); | ||||
| initCtrlEnterSubmit(); | initCtrlEnterSubmit(); | ||||
| initNavbarContentToggle(); | initNavbarContentToggle(); | ||||
| @@ -3642,6 +3651,19 @@ function initVueUploader() { | |||||
| }); | }); | ||||
| } | } | ||||
| function initVueEditAbout() { | |||||
| const el = document.getElementById('about-desc'); | |||||
| console.log(el) | |||||
| if (!el) { | |||||
| return; | |||||
| } | |||||
| new Vue({ | |||||
| el: '#about-desc', | |||||
| render: h => h(EditAboutInfo) | |||||
| }); | |||||
| } | |||||
| // 新增 | // 新增 | ||||
| function initObsUploader() { | function initObsUploader() { | ||||
| const el = document.getElementById('obsUploader'); | const el = document.getElementById('obsUploader'); | ||||