mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-18 13:29:03 +08:00
parent
a987370657
commit
7410a41331
17 changed files with 31 additions and 2 deletions
|
|
@ -34,6 +34,7 @@ type ChangeQuicks struct {
|
|||
type QuickJump struct {
|
||||
ID uint `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Alias string `json:"alias"`
|
||||
Title string `json:"title"`
|
||||
Detail string `json:"detail"`
|
||||
Recommend int `json:"recommend"`
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ type AppLauncher struct {
|
|||
type QuickJump struct {
|
||||
BaseModel
|
||||
Name string `json:"name"`
|
||||
Alias string `json:"alias"`
|
||||
Title string `json:"title"`
|
||||
Detail string `json:"detail"`
|
||||
Recommend int `json:"recommend"`
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ func (u *LauncherRepo) UpdateQuicks(quicks []model.QuickJump) error {
|
|||
if err := tx.Model(&model.QuickJump{}).Where("id = ?", item.ID).Updates(map[string]interface{}{
|
||||
"is_show": item.IsShow,
|
||||
"detail": item.Detail,
|
||||
"alias": item.Alias,
|
||||
}).Error; err != nil {
|
||||
tx.Rollback()
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ func InitAgentDB() {
|
|||
migrations.InitLocalSSHConn,
|
||||
migrations.InitLocalSSHShow,
|
||||
migrations.InitRecordStatus,
|
||||
migrations.AddShowNameForQuickJump,
|
||||
})
|
||||
if err := m.Migrate(); err != nil {
|
||||
global.LOG.Error(err)
|
||||
|
|
|
|||
|
|
@ -576,3 +576,10 @@ var InitRecordStatus = &gormigrate.Migration{
|
|||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
var AddShowNameForQuickJump = &gormigrate.Migration{
|
||||
ID: "20250918-add-show-name-for-quick-jump",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
return tx.AutoMigrate(&model.QuickJump{})
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ export namespace Dashboard {
|
|||
export interface QuickJump {
|
||||
id: number;
|
||||
name: string;
|
||||
alias: string;
|
||||
title: string;
|
||||
detail: string;
|
||||
recommend: number;
|
||||
|
|
|
|||
|
|
@ -387,6 +387,7 @@ const message = {
|
|||
home: {
|
||||
recommend: 'recommend',
|
||||
dir: 'dir',
|
||||
alias: 'Alias',
|
||||
quickDir: 'Quick Dir',
|
||||
database: 'Database - All',
|
||||
restart_1panel: 'Restart panel',
|
||||
|
|
|
|||
|
|
@ -376,6 +376,7 @@ const message = {
|
|||
home: {
|
||||
recommend: 'おすすめ',
|
||||
dir: 'ディレクトリ',
|
||||
alias: 'エイリアス',
|
||||
quickDir: 'クイックディレクトリ',
|
||||
database: 'データベース - すべて',
|
||||
restart_1panel: 'パネルを再起動します',
|
||||
|
|
|
|||
|
|
@ -378,6 +378,7 @@ const message = {
|
|||
home: {
|
||||
recommend: '추천',
|
||||
dir: '디렉토리',
|
||||
alias: '별칭',
|
||||
quickDir: '빠른 디렉토리',
|
||||
database: '데이터베이스 - 전체',
|
||||
restart_1panel: '패널 재시작',
|
||||
|
|
|
|||
|
|
@ -384,6 +384,7 @@ const message = {
|
|||
home: {
|
||||
recommend: 'cadangan',
|
||||
dir: 'direktori',
|
||||
alias: 'Alias',
|
||||
quickDir: 'Direktori Pantas',
|
||||
database: 'Pangkalan Data - Semua',
|
||||
restart_1panel: 'Mulakan semula panel',
|
||||
|
|
|
|||
|
|
@ -382,6 +382,7 @@ const message = {
|
|||
home: {
|
||||
recommend: 'recomendar',
|
||||
dir: 'dir',
|
||||
alias: 'Apelido',
|
||||
quickDir: 'Diretório Rápido',
|
||||
database: 'Banco de Dados - Todos',
|
||||
restart_1panel: 'Reiniciar painel',
|
||||
|
|
|
|||
|
|
@ -379,6 +379,7 @@ const message = {
|
|||
home: {
|
||||
recommend: 'рекомендовать',
|
||||
dir: 'каталог',
|
||||
alias: 'Псевдоним',
|
||||
quickDir: 'Быстрый каталог',
|
||||
database: 'База данных - Все',
|
||||
restart_1panel: 'Перезапустить панель',
|
||||
|
|
|
|||
|
|
@ -391,6 +391,7 @@ const message = {
|
|||
home: {
|
||||
recommend: 'tavsiye etmek',
|
||||
dir: 'dizin',
|
||||
alias: 'Takma Ad',
|
||||
quickDir: 'Hızlı Dizin',
|
||||
database: 'Veritabanı - Tümü',
|
||||
restart_1panel: 'Paneli yeniden başlat',
|
||||
|
|
|
|||
|
|
@ -377,6 +377,7 @@ const message = {
|
|||
home: {
|
||||
recommend: '推薦',
|
||||
dir: '目錄',
|
||||
alias: '別名',
|
||||
quickDir: '快捷目錄',
|
||||
database: '資料庫 - 全部',
|
||||
restart_1panel: '重啟面板',
|
||||
|
|
|
|||
|
|
@ -376,6 +376,7 @@ const message = {
|
|||
home: {
|
||||
recommend: '推荐',
|
||||
dir: '目录',
|
||||
alias: '别名',
|
||||
quickDir: '快捷目录',
|
||||
database: '数据库 - 所有',
|
||||
restart_1panel: '重启面板',
|
||||
|
|
|
|||
|
|
@ -53,12 +53,12 @@
|
|||
<span>{{ $t(item.title, 2) }}</span>
|
||||
<div class="count">
|
||||
<el-tooltip
|
||||
v-if="item.detail.length > 20"
|
||||
v-if="item.alias || item.detail.length > 20"
|
||||
:content="item.detail"
|
||||
placement="bottom"
|
||||
>
|
||||
<span @click="quickJump(item)">
|
||||
{{ item.detail.substring(0, 18) + '...' }}
|
||||
{{ item.alias || item.detail.substring(0, 18) + '...' }}
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<span @click="quickJump(item)" v-else>{{ item.detail }}</span>
|
||||
|
|
|
|||
|
|
@ -14,12 +14,20 @@
|
|||
<el-input v-model="row.detail" class="w-full">
|
||||
<template #prepend>
|
||||
<el-button
|
||||
class="w-16"
|
||||
v-if="row.name === 'File' && row.isShow"
|
||||
icon="Folder"
|
||||
@click="fileRef.acceptParams({ path: row.detail, isAll: true })"
|
||||
/>
|
||||
</template>
|
||||
</el-input>
|
||||
<el-input v-model="row.alias" class="mt-1">
|
||||
<template #prepend>
|
||||
<el-button class="w-16">
|
||||
{{ $t('home.alias') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue