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