Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions agent/app/dto/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
1 change: 1 addition & 0 deletions agent/app/model/app_launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
1 change: 1 addition & 0 deletions agent/app/repo/app_launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions agent/init/migration/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func InitAgentDB() {
migrations.InitLocalSSHConn,
migrations.InitLocalSSHShow,
migrations.InitRecordStatus,
migrations.AddShowNameForQuickJump,
})
if err := m.Migrate(); err != nil {
global.LOG.Error(err)
Expand Down
7 changes: 7 additions & 0 deletions agent/init/migration/migrations/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{})
},
}
1 change: 1 addition & 0 deletions frontend/src/api/interface/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export namespace Dashboard {
export interface QuickJump {
id: number;
name: string;
alias: string;
title: string;
detail: string;
recommend: number;
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ const message = {
home: {
recommend: 'recommend',
dir: 'dir',
alias: 'Alias',
quickDir: 'Quick Dir',
database: 'Database - All',
restart_1panel: 'Restart panel',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ const message = {
home: {
recommend: 'おすすめ',
dir: 'ディレクトリ',
alias: 'エイリアス',
quickDir: 'クイックディレクトリ',
database: 'データベース - すべて',
restart_1panel: 'パネルを再起動します',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ const message = {
home: {
recommend: '추천',
dir: '디렉토리',
alias: '별칭',
quickDir: '빠른 디렉토리',
database: '데이터베이스 - 전체',
restart_1panel: '패널 재시작',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/ms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/pt-br.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ const message = {
home: {
recommend: 'рекомендовать',
dir: 'каталог',
alias: 'Псевдоним',
quickDir: 'Быстрый каталог',
database: 'База данных - Все',
restart_1panel: 'Перезапустить панель',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/tr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/zh-Hant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ const message = {
home: {
recommend: '推薦',
dir: '目錄',
alias: '別名',
quickDir: '快捷目錄',
database: '資料庫 - 全部',
restart_1panel: '重啟面板',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lang/modules/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ const message = {
home: {
recommend: '推荐',
dir: '目录',
alias: '别名',
quickDir: '快捷目录',
database: '数据库 - 所有',
restart_1panel: '重启面板',
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/home/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/views/home/quick/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Loading