mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-01-07 23:55:15 +08:00
fix: Fix the issue where pressing Enter in the image tag drawer causes a refresh (#10649)
This commit is contained in:
parent
fcf864156d
commit
26e480f242
12 changed files with 47 additions and 11 deletions
|
|
@ -29,6 +29,8 @@ func init() {
|
|||
updateCmd.AddCommand(updateUserName)
|
||||
updateCmd.AddCommand(updatePassword)
|
||||
updateCmd.AddCommand(updatePort)
|
||||
|
||||
updateCmd.AddCommand(updateVersion)
|
||||
}
|
||||
|
||||
var updateCmd = &cobra.Command{
|
||||
|
|
@ -79,6 +81,32 @@ var updatePort = &cobra.Command{
|
|||
return nil
|
||||
},
|
||||
}
|
||||
var updateVersion = &cobra.Command{
|
||||
Use: "version",
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
i18n.UseI18nForCmd(language)
|
||||
if !isRoot() {
|
||||
fmt.Println(i18n.GetMsgWithMapForCmd("SudoHelper", map[string]interface{}{"cmd": "sudo 1pctl update version"}))
|
||||
return nil
|
||||
}
|
||||
version := args[0]
|
||||
if len(version) == 0 || !strings.HasPrefix(version, "v2.") {
|
||||
fmt.Println("err version in param input")
|
||||
return nil
|
||||
}
|
||||
db, err := loadDBConn("core.db")
|
||||
if err != nil {
|
||||
fmt.Println(i18n.GetMsgWithMapForCmd("DBConnErr", map[string]interface{}{"err": err.Error()}))
|
||||
return err
|
||||
}
|
||||
if err := setSettingByKey(db, "SystemVersion", version); err != nil {
|
||||
fmt.Println(i18n.GetMsgWithMapForCmd("UpdateUserErr", map[string]interface{}{"err": err.Error()}))
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
func username() {
|
||||
reader := bufio.NewReader(os.Stdin)
|
||||
|
|
|
|||
|
|
@ -1605,7 +1605,7 @@ const message = {
|
|||
syncHelper: 'The sync operation will clean invalid keys and sync new complete key pairs. Continue?',
|
||||
input: 'Manual Input',
|
||||
import: 'File Upload',
|
||||
authKeys: 'Public Key Management',
|
||||
authKeys: 'Authorization Keys',
|
||||
authKeysHelper: 'Save current public key information?',
|
||||
pubkey: 'Key info',
|
||||
pubKeyHelper: 'The current key information only takes effect for user {0}',
|
||||
|
|
|
|||
|
|
@ -1602,7 +1602,7 @@ const message = {
|
|||
'La operación de sincronización limpiará las claves inválidas y sincronizará nuevos pares de claves completos. ¿Desea continuar?',
|
||||
input: 'Entrada manual',
|
||||
import: 'Subir archivo',
|
||||
authKeys: 'Gestión de Claves Públicas',
|
||||
authKeys: 'Claves de Autorización',
|
||||
authKeysHelper: '¿Guardar información actual de clave pública?',
|
||||
pubkey: 'Información de clave',
|
||||
pubKeyHelper: 'La información de la clave actual solo tiene efecto para el usuario {0}',
|
||||
|
|
|
|||
|
|
@ -1550,7 +1550,7 @@ const message = {
|
|||
syncHelper: '同期操作は無効なキーをクリーンアップし、新しい完全なキーペアを同期します。続行しますか?',
|
||||
input: '手動入力',
|
||||
import: 'ファイルアップロード',
|
||||
authKeys: '公開鍵管理',
|
||||
authKeys: '認証キー',
|
||||
authKeysHelper: '現在の公開鍵情報を保存しますか?',
|
||||
pubkey: '重要な情報',
|
||||
encryptionMode: '暗号化モード',
|
||||
|
|
|
|||
|
|
@ -1531,7 +1531,7 @@ const message = {
|
|||
syncHelper: '동기화 작업으로 유효하지 않은 키를 정리하고 새로운 완전한 키 쌍을 동기화합니다. 계속하시겠습니까?',
|
||||
input: '수동 입력',
|
||||
import: '파일 업로드',
|
||||
authKeys: '공개 키 관리',
|
||||
authKeys: 'Kunci Pengesahan',
|
||||
authKeysHelper: '현재 공개 키 정보를 저장하시겠습니까?',
|
||||
pubkey: '키 정보',
|
||||
encryptionMode: '암호화 모드',
|
||||
|
|
|
|||
|
|
@ -1595,7 +1595,7 @@ const message = {
|
|||
'Operasi segerak akan membersihkan kunci tidak sah dan menyegerakkan pasangan kunci baru yang lengkap. Teruskan?',
|
||||
input: 'Input Manual',
|
||||
import: 'Muat Naik Fail',
|
||||
authKeys: 'Pengurusan Kunci Awam',
|
||||
authKeys: 'Kunci Pengesahan',
|
||||
authKeysHelper: 'Simpan maklumat kunci awam semasa?',
|
||||
pubkey: 'Maklumat kunci',
|
||||
pubKeyHelper: 'Maklumat kunci semasa hanya berkuat kuasa untuk pengguna {0}',
|
||||
|
|
|
|||
|
|
@ -1585,7 +1585,7 @@ const message = {
|
|||
'A operação de sincronização limpará chaves inválidas e sincronizará novos pares de chaves completos. Continuar?',
|
||||
input: 'Entrada Manual',
|
||||
import: 'Upload de Arquivo',
|
||||
authKeys: 'Gerenciamento de Chaves Públicas',
|
||||
authKeys: 'Chaves de Autorização',
|
||||
authKeysHelper: 'Salvar informações atuais da chave pública?',
|
||||
pubkey: 'Informações da chave',
|
||||
pubKeyHelper: 'A informação da chave atual só tem efeito para o usuário {0}',
|
||||
|
|
|
|||
|
|
@ -1588,7 +1588,7 @@ const message = {
|
|||
'Операция синхронизации удалит недействительные ключи и синхронизирует новые полные ключевые пары. Продолжить?',
|
||||
input: 'Ручной ввод',
|
||||
import: 'Загрузка файла',
|
||||
authKeys: 'Управление Открытыми Ключами',
|
||||
authKeys: 'Ключи Авторизации',
|
||||
authKeysHelper: 'Сохранить текущую информацию об открытом ключе?',
|
||||
pubkey: 'Информация о ключе',
|
||||
pubKeyHelper: 'Текущая информация о ключе действительна только для пользователя {0}',
|
||||
|
|
|
|||
|
|
@ -1625,7 +1625,7 @@ const message = {
|
|||
'Eşitleme işlemi geçersiz anahtarları temizleyecek ve yeni tam anahtar çiftlerini eşitleyecek. Devam edilsin mi?',
|
||||
input: 'Manuel Giriş',
|
||||
import: 'Dosya Yükleme',
|
||||
authKeys: 'Ortak Anahtar Yönetimi',
|
||||
authKeys: 'Yetki Anahtarları',
|
||||
authKeysHelper: 'Mevcut ortak anahtar bilgilerini kaydet?',
|
||||
pubkey: 'Anahtar bilgisi',
|
||||
pubKeyHelper: 'Mevcut anahtar bilgileri yalnızca {0} kullanıcısı için geçerlidir',
|
||||
|
|
|
|||
|
|
@ -1524,7 +1524,7 @@ const message = {
|
|||
syncHelper: '同步操作將清理失效金鑰並同步新增的完整金鑰對,是否繼續?',
|
||||
input: '手動輸入',
|
||||
import: '文件上傳',
|
||||
authKeys: '公鑰管理',
|
||||
authKeys: '授權金鑰',
|
||||
authKeysHelper: '是否儲存目前公鑰資訊?',
|
||||
pubkey: '金鑰資訊',
|
||||
pubKeyHelper: '目前金鑰資訊僅對使用者 {0} 生效',
|
||||
|
|
|
|||
|
|
@ -1520,7 +1520,7 @@ const message = {
|
|||
syncHelper: '同步操作将清理失效密钥并同步新增的完整密钥对,是否继续?',
|
||||
input: '手动输入',
|
||||
import: '文件上传',
|
||||
authKeys: '公钥管理',
|
||||
authKeys: '授权密钥',
|
||||
authKeysHelper: '是否保存当前公钥信息?',
|
||||
pubkey: '密钥信息',
|
||||
pubKeyHelper: '当前密钥信息仅对用户 {0} 生效',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,14 @@
|
|||
<template>
|
||||
<DrawerPro v-model="drawerVisible" :header="$t('container.imageTag')" @close="handleClose" size="large">
|
||||
<el-form v-loading="loading" label-position="top" ref="formRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form
|
||||
v-loading="loading"
|
||||
label-position="top"
|
||||
ref="formRef"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
@submit.prevent
|
||||
>
|
||||
<el-form-item :label="$t('app.source')">
|
||||
<el-checkbox v-model="form.fromRepo">{{ $t('container.imageRepo') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue