mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-18 21:38:57 +08:00
parent
2836207850
commit
f12e70ef5d
11 changed files with 26 additions and 7 deletions
|
|
@ -63,15 +63,18 @@ import { uploadLicense } from '@/api/modules/setting';
|
|||
import DockerProxy from '@/components/docker-proxy/index.vue';
|
||||
import { GlobalStore } from '@/store';
|
||||
import { UploadFile, UploadFiles, UploadInstance, UploadProps, UploadRawFile, genFileId } from 'element-plus';
|
||||
import { getXpackSettingForTheme } from '@/utils/xpack';
|
||||
import { getXpackSettingForTheme, loadMasterProductProFromDB, loadProductProFromDB } from '@/utils/xpack';
|
||||
const globalStore = GlobalStore();
|
||||
|
||||
const em = defineEmits(['search']);
|
||||
|
||||
const loading = ref(false);
|
||||
const open = ref(false);
|
||||
const uploadRef = ref<UploadInstance>();
|
||||
const uploaderFiles = ref<UploadFiles>([]);
|
||||
const isImport = ref();
|
||||
const isForce = ref();
|
||||
const withoutReload = ref();
|
||||
|
||||
const withDockerRestart = ref();
|
||||
|
||||
|
|
@ -79,6 +82,7 @@ const oldLicense = ref();
|
|||
interface DialogProps {
|
||||
oldLicense: string;
|
||||
isImport: boolean;
|
||||
withoutReload: boolean;
|
||||
}
|
||||
|
||||
const acceptParams = (params: DialogProps) => {
|
||||
|
|
@ -86,6 +90,8 @@ const acceptParams = (params: DialogProps) => {
|
|||
uploaderFiles.value = [];
|
||||
uploadRef.value?.clearFiles();
|
||||
isImport.value = params?.isImport;
|
||||
withoutReload.value = params.withoutReload;
|
||||
|
||||
open.value = true;
|
||||
};
|
||||
|
||||
|
|
@ -131,17 +137,19 @@ const submit = async () => {
|
|||
loading.value = true;
|
||||
await uploadLicense(oldLicense.value, formData)
|
||||
.then(async () => {
|
||||
globalStore.isProductPro = true;
|
||||
if (globalStore.isMaster) {
|
||||
globalStore.isMasterProductPro = true;
|
||||
}
|
||||
getXpackSettingForTheme();
|
||||
loading.value = false;
|
||||
uploadRef.value!.clearFiles();
|
||||
uploaderFiles.value = [];
|
||||
open.value = false;
|
||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||
window.location.reload();
|
||||
if (!withoutReload.value) {
|
||||
loadMasterProductProFromDB();
|
||||
loadProductProFromDB();
|
||||
getXpackSettingForTheme();
|
||||
window.location.reload();
|
||||
} else {
|
||||
em('search');
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false;
|
||||
|
|
|
|||
|
|
@ -2065,6 +2065,7 @@ const message = {
|
|||
pro: 'Pro',
|
||||
trial: 'Trial',
|
||||
add: 'Add Community Edition',
|
||||
licenseBindHelper: 'Free node quotas can only be used when the license is bound to a node',
|
||||
licenseAlert:
|
||||
'Community Edition nodes can only be added when the license is properly bound to a node. Only nodes properly bound to the license support switching.',
|
||||
licenseUnbindHelper: 'Community Edition nodes detected for this license. Please unbind and try again!',
|
||||
|
|
|
|||
|
|
@ -2074,6 +2074,8 @@ const message = {
|
|||
pro: 'Pro',
|
||||
trial: 'Prueba',
|
||||
add: 'Agregar versión Community',
|
||||
licenseBindHelper:
|
||||
'Las cuotas de nodo gratuitas solo se pueden utilizar cuando la licencia está vinculada a un nodo',
|
||||
licenseAlert:
|
||||
'Solo se pueden agregar nodos Community cuando la licencia está correctamente vinculada. Solo los nodos vinculados admiten cambios.',
|
||||
licenseUnbindHelper: 'Nodos Community detectados en esta licencia. Desvincule e intente nuevamente.',
|
||||
|
|
|
|||
|
|
@ -1979,6 +1979,7 @@ const message = {
|
|||
pro: '専門',
|
||||
trial: '体験',
|
||||
add: 'コミュニティ版を追加',
|
||||
licenseBindHelper: 'ライセンスがノードにバインドされている場合にのみ、無料ノードクォータを使用できます',
|
||||
licenseAlert:
|
||||
'ライセンスがノードに正常にバインドされている場合のみ、コミュニティ版ノードを追加できます。ライセンスに正常にバインドされているノードのみ切り替えがサポートされます。',
|
||||
licenseUnbindHelper:
|
||||
|
|
|
|||
|
|
@ -1948,6 +1948,7 @@ const message = {
|
|||
pro: 'Pro',
|
||||
trial: '체험판',
|
||||
add: '커뮤니티 에디션 추가',
|
||||
licenseBindHelper: '라이선스가 노드에 바인딩된 경우에만 무료 노드 할당량을 사용할 수 있습니다',
|
||||
licenseAlert:
|
||||
'라이선스가 노드에 정상적으로 바인딩된 경우에만 커뮤니티 에디션 노드를 추가할 수 있습니다. 라이선스에 정상적으로 바인딩된 노드만 전환이 지원됩니다.',
|
||||
licenseUnbindHelper: '이 라이선스에 커뮤니티 에디션 노드가 존재합니다. 바인딩 해제 후 다시 시도하세요!',
|
||||
|
|
|
|||
|
|
@ -2042,6 +2042,7 @@ const message = {
|
|||
pro: 'Pro',
|
||||
trial: 'Percubaan',
|
||||
add: 'Tambah Edisi Komuniti',
|
||||
licenseBindHelper: 'Kuota nod percuma hanya boleh digunakan apabila lesen terikat pada nod',
|
||||
licenseAlert:
|
||||
'Nod Edisi Komuniti hanya boleh ditambah apabila lesen terikat dengan betul pada nod. Hanya nod yang terikat dengan betul pada lesen menyokong penukaran.',
|
||||
licenseUnbindHelper: 'Nod Edisi Komuniti dikesan untuk lesen ini. Sila lepaskan ikatan dan cuba lagi!',
|
||||
|
|
|
|||
|
|
@ -2034,6 +2034,7 @@ const message = {
|
|||
pro: 'Pro',
|
||||
trial: 'Teste',
|
||||
add: 'Adicionar Edição Comunitária',
|
||||
licenseBindHelper: 'As cotas de nó gratuitas só podem ser usadas quando a licença está vinculada a um nó',
|
||||
licenseAlert:
|
||||
'Nós da Edição Comunitária só podem ser adicionados quando a licença está devidamente vinculada a um nó. Apenas nós devidamente vinculados à licença suportam troca.',
|
||||
licenseUnbindHelper:
|
||||
|
|
|
|||
|
|
@ -2033,6 +2033,7 @@ const message = {
|
|||
pro: 'Pro',
|
||||
trial: 'Пробная версия',
|
||||
add: 'Добавить Community Edition',
|
||||
licenseBindHelper: 'Бесплатные квоты узлов можно использовать только тогда, когда лицензия привязана к узлу',
|
||||
licenseAlert:
|
||||
'Узлы Community Edition можно добавлять только при правильной привязке лицензии к узлу. Переключение поддерживается только для узлов, правильно привязанных к лицензии.',
|
||||
licenseUnbindHelper:
|
||||
|
|
|
|||
|
|
@ -2087,6 +2087,7 @@ const message = {
|
|||
pro: 'Pro',
|
||||
trial: 'Deneme',
|
||||
add: 'Topluluk Sürümünü Ekle',
|
||||
licenseBindHelper: 'Ücretsiz düğüm kotası yalnızca lisans bir düğüme bağlı olduğunda kullanılabilir',
|
||||
licenseAlert:
|
||||
'Topluluk Sürümü düğümleri yalnızca lisans bir düğüme düzgün şekilde bağlandığında eklenebilir. Yalnızca düzgün şekilde bağlanmış düğümler geçiş yapmayı destekler.',
|
||||
licenseUnbindHelper:
|
||||
|
|
|
|||
|
|
@ -1927,6 +1927,7 @@ const message = {
|
|||
pro: '專業版:',
|
||||
trial: '試用',
|
||||
add: '新增社區版',
|
||||
licenseBindHelper: '僅當授權已綁定節點時,才能使用其免費節點額度',
|
||||
licenseAlert: '僅當許可證正常綁定到節點時,該許可證才能新增社區版節點,只有正常綁定到許可證的節點支援切換。',
|
||||
licenseUnbindHelper: '檢測到該許可證存在社區版節點,請解除綁定後重試!',
|
||||
subscription: '訂閱',
|
||||
|
|
|
|||
|
|
@ -1920,6 +1920,7 @@ const message = {
|
|||
pro: '专业版',
|
||||
trial: '试用',
|
||||
add: '添加社区版',
|
||||
licenseBindHelper: '仅当许可证已绑定节点时,才能使用其免费节点额度',
|
||||
licenseAlert: '仅当许可证正常绑定到节点时,该许可证才能添加社区版节点,只有正常绑定到许可证的节点支持切换。',
|
||||
licenseUnbindHelper: '检测到该许可证存在社区版节点,请解绑后重试!',
|
||||
subscription: '订阅',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue