Skip to content

Commit

Permalink
feat: 编辑平台时禁止修改授权方式
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Aug 4, 2023
1 parent e97a7ab commit 7dbc4a0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/components/set/publish/PlatformAddForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,14 @@ initPage()
type="error"
:closable="false"
/>
<el-alert class="top-tip" :title="'当前平台类型为=>' + ptype" type="warning" :closable="false" />
<el-alert class="top-tip" :title="'当前平台类型为=>' + ptype" type="info" :closable="false" />
<!-- 子平台名称 -->
<el-form-item v-if="formData.subtypeOptions.length > 0" label="子平台类型">
<el-select v-model="formData.subtype" class="m-2" placeholder="请选择" @change="handleSubPlatformTypeChange">
<el-option v-for="item in formData.subtypeOptions" :key="item" :label="item" :value="item" />
</el-select>
</el-form-item>
<el-alert v-else class="top-tip" :title="'子平台类型为=>' + formData.subtype" type="warning" :closable="false" />
<el-alert v-else class="top-tip" :title="'子平台类型为=>' + formData.subtype" type="info" :closable="false" />
<!-- 平台key -->
<el-form-item :label="t('dynamic.platform.key')" prop="platformKey">
{{ formData.dynCfg.platformKey }}
Expand Down
2 changes: 1 addition & 1 deletion src/components/set/publish/PlatformQuickAdd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ initPage()
<div class="platform-desc">
<p>{{ formData.ptype.description }}</p>
<p>
<el-alert class="desc-tip" type="warning" title="点击图标快速添加,或者点击下方按钮自定义添加"></el-alert>
<el-alert class="desc-tip" type="info" title="点击图标快速添加,或者点击下方按钮自定义添加"></el-alert>
</p>
</div>
<div class="icon-list">
Expand Down
7 changes: 4 additions & 3 deletions src/components/set/publish/PlatformUpdateForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,16 @@ initPage()
<el-alert
class="top-tip"
:title="'当前平台类型为=>' + formData.dynCfg.platformKey"
type="warning"
type="info"
:closable="false"
/>
<el-alert
class="top-tip"
:title="'子平台类型为=>' + formData.dynCfg.subPlatformType"
type="warning"
type="info"
:closable="false"
/>
<el-alert class="top-tip" title="注意:为了保留配置信息的完整性,编辑平台时授权方式不可修改,如需切换,请新建新的实例" type="warning" :closable="false" />
<!-- 平台key -->
<el-form-item :label="t('dynamic.platform.key')" prop="platformKey">
{{ formData.dynCfg.platformKey }}
Expand All @@ -178,7 +179,7 @@ initPage()
</el-form-item>
<!-- 授权方式 -->
<el-form-item label="授权方式" prop="authMode">
<el-select v-model="formData.dynCfg.authMode" placeholder="请选择">
<el-select v-model="formData.dynCfg.authMode" placeholder="请选择" :disabled="true">
<el-option :value="AuthMode.API" label="API授权" />
<el-option :value="AuthMode.WEBSITE" label="网页授权" />
</el-select>
Expand Down
2 changes: 1 addition & 1 deletion src/locales/zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ export default {
"setting.platform.add.this": "新增此平台",
"setting.platform.universal": "通用平台",
"setting.platform.universal.desc":
"目前支持的通用平台有:语雀,采用API授权。这些平台通常提供了现代化的REST API,可以方便的进行集成。",
"目前支持的通用平台有:语雀、Notion等,采用API授权。这些平台通常提供了现代化的REST API,可以方便的进行集成。",
"setting.platform.wordpress": "WordPress",
"setting.platform.wordpress.desc":
"Wordpress 通过Xmlrpc API支持,采用 API 授权。WordPress是一个自由开源的博客软件和内容管理系统,具有数量众多的优质插件和主题。",
Expand Down

0 comments on commit 7dbc4a0

Please sign in to comment.