|
239 | 239 | </div>
|
240 | 240 |
|
241 | 241 | <div class="left-icons">
|
242 |
| - <a-tooltip :title="t('CHAT')" placement="bottom"> |
| 242 | + <a-tooltip |
| 243 | + :title="t('CHAT')" |
| 244 | + placement="bottom" |
| 245 | + v-if="enableChat" |
| 246 | + > |
243 | 247 | <a @click="goChat()" class="icon-button">
|
244 | 248 | <MessageOutlined />
|
245 | 249 | </a>
|
|
308 | 312 | <MessageOutlined
|
309 | 313 | style="margin-right: 8px; cursor: pointer"
|
310 | 314 | @click="goChat(record.model)"
|
| 315 | + v-if="enableChat" |
311 | 316 | />
|
312 | 317 | {{ record.model }}
|
313 | 318 | </span>
|
@@ -1167,6 +1172,8 @@ const tableData = ref([]);
|
1167 | 1172 | const totalModels = ref(0);
|
1168 | 1173 | const completedModels = ref(0);
|
1169 | 1174 | const progressPercent = ref(0);
|
| 1175 | +const chatSite = ref('https://chat.crond.dev'); |
| 1176 | +const enableChat = ref(true); |
1170 | 1177 | const pagination = reactive({
|
1171 | 1178 | current: 1,
|
1172 | 1179 | pageSize: 8, // 默认每页显示8条,可以根据需要调整
|
@@ -1320,6 +1327,12 @@ const getQueryParams = async () => {
|
1320 | 1327 | if (settingsObj.concurrency) {
|
1321 | 1328 | modelConcurrency.value = settingsObj.concurrency;
|
1322 | 1329 | }
|
| 1330 | + if (settingsObj.chatSite) { |
| 1331 | + chatSite.value = settingsObj.chatSite; |
| 1332 | + } |
| 1333 | + if (settingsObj.enableChat) { |
| 1334 | + enableChat.value = settingsObj.enableChat; |
| 1335 | + } |
1323 | 1336 | if (!settingsObj.closeAnnouncement) {
|
1324 | 1337 | showAnnouncement();
|
1325 | 1338 | const updateInfo = await checkForUpdates(
|
@@ -2674,9 +2687,9 @@ function goChat(modelName) {
|
2674 | 2687 | return;
|
2675 | 2688 | }
|
2676 | 2689 | //判断是否有modelName 没有就不给url 传值
|
2677 |
| - let url = `https://chat.crond.dev/#/?settings={"key":"${apiKey.value}","url":"${apiUrl.value}"}`; |
| 2690 | + let url = `${chatSite.value}/#/?settings={"key":"${apiKey.value}","url":"${apiUrl.value}"}`; |
2678 | 2691 | if (modelName) {
|
2679 |
| - url = `https://chat.crond.dev/#/?settings={"key":"${apiKey.value}","url":"${apiUrl.value}","model":"${modelName}"}`; |
| 2692 | + url = `${chatSite.value}/#/?settings={"key":"${apiKey.value}","url":"${apiUrl.value}","model":"${modelName}"}`; |
2680 | 2693 | }
|
2681 | 2694 | window.open(url);
|
2682 | 2695 | }
|
|
0 commit comments