PasteFerry (隔空贴): clipboard and file sync across macOS, Windows and Linux. Direct-first, end-to-end encrypted. Optional official access: no server to host. Independent self-hosting remains available.
Dart airdrop-alternativeclipboardclipboard-sharingclipboard-synccopy-pastecross-platformend-to-end-encryptionfile-syncfile-transferfluttergolanglinuxmacosnat-traversalp2pself-hostedtailscaleuniversal-clipboardwebrtcwindows
feat: rename favorites with an alias
baiyuze925ab41d1da4
diff --git a/client-core/cmd/pasteferryd/main.go b/client-core/cmd/pasteferryd/main.goindex f96af3f..b142461 100644--- a/client-core/cmd/pasteferryd/main.go+++ b/client-core/cmd/pasteferryd/main.go@@ -436,6 +436,7 @@ func run(dataDir string) error {ApplyToClipboard: engine.ApplyToClipboardAs,SearchHistory: engine.SearchHistory,SetFavorite: engine.SetFavorite,+ SetAlias: engine.SetAlias,ClipDetail: engine.ClipDetail,ImagePreview: engine.ImagePreview,CacheBytesUsed: blobs.Size,diff --git a/client-core/internal/rpc/convert.go b/client-core/internal/rpc/convert.goindex 68c026b..4b732a6 100644--- a/client-core/internal/rpc/convert.go+++ b/client-core/internal/rpc/convert.go@@ -44,6 +44,7 @@ func clipToProto(c store.Clip) *pb.ClipRecord {if c.Favorite {r.ExpiresAtUnix = 0 // 收藏不会过期r.FavoritedAtUnix = c.FavoritedAt.Unix()+ r.Alias = c.Alias // 取消收藏后别名还留在库里,只是不再显示}return r}diff --git a/client-core/internal/rpc/server.go b/client-core/internal/rpc/server.goindex 6ed1e4b..871b3f6 100644--- a/client-core/internal/rpc/server.go+++ b/client-core/internal/rpc/server.go@@ -52,7 +52,9 @@ type Deps struct {SearchHistory func(query string, limit int, f store.Filter) ([]store.Clip, error)// SetFavorite 收藏或取消收藏,ClipDetail 是悬停提示框的完整内容,见 sync/favorite.goSetFavorite func(ctx context.Context, clipID string, favorite bool) (store.Clip, error)- ClipDetail func(clipID string) (*pb.ClipDetail, error)+ // SetAlias 给收藏起别名,见 sync.Engine.SetAlias+ SetAlias func(clipID, alias string) (store.Clip, error)+ ClipDetail func(clipID string) (*pb.ClipDetail, error)// 诊断报告要读的日志文件(轮转出去的旧文件在前)与崩溃日志LogFiles func() (logs []string, crash string)// VerboseLog 临时打开详细日志,d 不大于 0 时关闭;VerboseUntil 是打开到什么时候@@ -335,6 +337,17 @@ func (s *Server) SetFavorite(ctx context.Context, req *pb.SetFavoriteRequest) (*return clipToProto(clip), nil}+func (s *Server) SetAlias(_ context.Context, req *pb.SetAliasRequest) (*pb.ClipRecord, error) {+ if s.deps.SetAlias == nil {+ return nil, status.Error(codes.Unimplemented, "请更新后台服务后再重命名")+ }+ clip, err := s.deps.SetAlias(req.GetClipId(), req.GetAlias())+ if err != nil {+ return nil, status.Error(codes.FailedPrecondition, err.Error())+ }+ return clipToProto(clip), nil+}+func (s *Server) GetClipDetail(_ context.Context, req *pb.GetClipDetailRequest) (*pb.ClipDetail, error) {if s.deps.ClipDetail == nil {return nil, status.Error(codes.Unimplemented, "当前版本不支持查看完整内容")diff --git a/client-core/internal/store/store.go b/client-core/internal/store/store.goindex d80e275..ec0884e 100644--- a/client-core/internal/store/store.go+++ b/client-core/internal/store/store.go@@ -73,6 +73,9 @@ type Clip struct {Favorited bool// IsLink 表示整条文字就是一个网址,写入时由 PutClip 算好IsLink bool+ // Alias 是用户给收藏起的别名,空表示没有。取消收藏后仍留着、只是不显示,+ // 撤销取消(再收藏一次)时随之回来+ Alias string}// FavoriteExpiry 是收藏行的 expires_at。不用 0:降级到不认识收藏的旧版后台服务时,@@ -239,6 +242,7 @@ CREATE TABLE IF NOT EXISTS meta ({"favorited_at", "INTEGER NOT NULL DEFAULT 0"},{"source_clip_id", "TEXT NOT NULL DEFAULT ''"},{"is_link", "INTEGER NOT NULL DEFAULT 0"},+ {"alias", "TEXT NOT NULL DEFAULT ''"},} {if err := s.addColumnIfMissing("clips", col.name, col.decl); err != nil {return err@@ -333,8 +337,8 @@ func (s *Store) PutClip(c Clip) error {INSERT INTO clips (id, kind, status, origin_device_id, origin_device_name, outgoing,total_size, text_preview, text_content, text_plain, cache_path,source_paths, error, created_at, expires_at,- favorite, favorited_at, source_clip_id, is_link)-VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)+ favorite, favorited_at, source_clip_id, is_link, alias)+VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)ON CONFLICT(id) DO UPDATE SETstatus=excluded.status, total_size=excluded.total_size,text_preview=excluded.text_preview, text_content=excluded.text_content,@@ -342,11 +346,11 @@ ON CONFLICT(id) DO UPDATE SETcache_path=excluded.cache_path, source_paths=excluded.source_paths,error=excluded.error, expires_at=excluded.expires_at,favorite=excluded.favorite, favorited_at=excluded.favorited_at,- source_clip_id=excluded.source_clip_id, is_link=excluded.is_link`,+ source_clip_id=excluded.source_clip_id, is_link=excluded.is_link, alias=excluded.alias`,c.ID, c.Kind, c.Status, c.OriginDeviceID, c.OriginDeviceName, c.Outgoing,c.TotalSize, c.TextPreview, c.TextContent, c.TextPlain, c.CachePath,string(srcJSON), c.Error, c.CreatedAt.Unix(), c.ExpiresAt.Unix(),- c.Favorite, favoritedAt, c.SourceClipID, c.IsLink)+ c.Favorite, favoritedAt, c.SourceClipID, c.IsLink, c.Alias)if err != nil {return fmt.Errorf("写入 clip: %w", err)}@@ -403,7 +407,7 @@ func (s *Store) ListRecords(limit int, before time.Time, f Filter) ([]Clip, erroreturn s.queryClips(q, args...)}-// SearchClips 找出文字内容或文件名可能包含 query 的记录,按时间倒序,最多 limit 条。+// SearchClips 找出文字内容、文件名或收藏的别名可能包含 query 的记录,按时间倒序,最多 limit 条。//// 这是粗筛:LIKE 只对 ASCII 不分大小写;没存纯文本的 HTML 记录按 HTML 源码匹配,// 标签名也会命中。由调用方按纯文本再核对一遍(见 sync.Engine.SearchHistory)。@@ -423,10 +427,11 @@ func (s *Store) SearchRecords(query string, limit int, f Filter) ([]Clip, error)if f.Favorites {order = `favorited_at DESC, created_at DESC`}- args := append([]any{KindText, like, KindHTML, like, like, KindImage, like}, fargs...)+ args := append([]any{like, KindText, like, KindHTML, like, like, KindImage, like}, fargs...)args = append(args, limit)return s.queryClips(`SELECT `+clipCols+` FROM clips-WHERE ((kind = ? AND text_content LIKE ? ESCAPE '\')+WHERE ((favorite = 1 AND alias LIKE ? ESCAPE '\')+ OR (kind = ? AND text_content LIKE ? ESCAPE '\')OR (kind = ? AND (text_plain LIKE ? ESCAPE '\' OR (text_plain = '' AND text_content LIKE ? ESCAPE '\')))OR (kind <> ? AND EXISTS (SELECT 1 FROM clip_items i WHERE i.clip_id = clips.id AND i.name LIKE ? ESCAPE '\')))`+where+`@@ -460,7 +465,7 @@ LIMIT ?`, limit)const clipCols = `id, kind, status, origin_device_id, origin_device_name, outgoing,total_size, text_preview, text_content, text_plain, cache_path,source_paths, error, created_at, expires_at,- favorite, favorited_at, source_clip_id, is_link,+ favorite, favorited_at, source_clip_id, is_link, alias,(favorite = 0 AND EXISTS (SELECT 1 FROM clips fWHERE f.favorite = 1 AND f.source_clip_id = clips.id))`@@ -479,7 +484,7 @@ func (s *Store) queryClips(query string, args ...any) ([]Clip, error) {if err := rows.Scan(&c.ID, &c.Kind, &c.Status, &c.OriginDeviceID, &c.OriginDeviceName,&c.Outgoing, &c.TotalSize, &c.TextPreview, &c.TextContent, &c.TextPlain,&c.CachePath, &srcJSON, &c.Error, &created, &expires,- &c.Favorite, &favoritedAt, &c.SourceClipID, &c.IsLink, &c.Favorited); err != nil {+ &c.Favorite, &favoritedAt, &c.SourceClipID, &c.IsLink, &c.Alias, &c.Favorited); err != nil {return nil, err}c.CreatedAt = time.Unix(created, 0)@@ -630,6 +635,18 @@ func (s *Store) TouchFavorite(id, sourceID string, at time.Time) error {return err}+// SetAlias 改一条收藏的别名,空串表示去掉。id 不是收藏时返回 ErrNotFound。+func (s *Store) SetAlias(id, alias string) error {+ res, err := s.db.Exec(`UPDATE clips SET alias=? WHERE id=? AND favorite=1`, alias, id)+ if err != nil {+ return err+ }+ if n, err := res.RowsAffected(); err == nil && n == 0 {+ return ErrNotFound+ }+ return nil+}+// Unfavorite 把一条收藏改回复制记录:时间改成 now,保留期到 expires,内容的位置改成缓存目录里的 cacheRel。func (s *Store) Unfavorite(id string, now, expires time.Time, cacheRel string) error {_, err := s.db.Exec(`diff --git a/client-core/internal/sync/alias_test.go b/client-core/internal/sync/alias_test.gonew file mode 100644index 0000000..6e64f38--- /dev/null+++ b/client-core/internal/sync/alias_test.go@@ -0,0 +1,76 @@+package sync++import (+ "context"+ "strings"+ "testing"+ "time"++ "github.com/baiyuze/pasteferry/client-core/internal/store"+)++// 收藏可以起别名:列表显示它、按它(含拼音)能搜到;取消收藏后不显示也搜不到,撤销后回来。+func TestFavoriteAlias(t *testing.T) {+ env := newFavoriteEngine(t)+ ctx := context.Background()+ src := putText(t, env.e, "src", "pnpm install --frozen-lockfile", time.Now().Add(-time.Hour))+ fav, err := env.e.SetFavorite(ctx, src.ID, true)+ if err != nil {+ t.Fatal(err)+ }++ if _, err := env.e.SetAlias(src.ID, "复制记录"); err == nil {+ t.Error("复制记录不该能起别名")+ }+ got, err := env.e.SetAlias(fav.ID, " 装依赖\n 命令 ")+ if err != nil {+ t.Fatal(err)+ }+ if got.Alias != "装依赖 命令" {+ t.Errorf("别名 = %q,应压掉换行与首尾空白", got.Alias)+ }+ if p := recordProto(got); p.GetAlias() != "装依赖 命令" {+ t.Errorf("ClipRecord 的别名 = %q", p.GetAlias())+ }++ favorites := store.Filter{Favorites: true}+ for _, q := range []string{"依赖", "zyl", "zhuangyilai"} {+ found, err := env.e.SearchHistory(q, 50, favorites)+ if err != nil {+ t.Fatal(err)+ }+ if len(found) != 1 || found[0].ID != fav.ID {+ t.Errorf("按别名搜 %q 得到 %v", q, found)+ }+ }++ long := strings.Repeat("长", maxAlias+20)+ if got, _ := env.e.SetAlias(fav.ID, long); len([]rune(got.Alias)) != maxAlias {+ t.Errorf("超长的别名应截到 %d 个字,实际 %d", maxAlias, len([]rune(got.Alias)))+ }+ if _, err := env.e.SetAlias(fav.ID, "装依赖"); err != nil {+ t.Fatal(err)+ }++ back, err := env.e.SetFavorite(ctx, fav.ID, false)+ if err != nil {+ t.Fatal(err)+ }+ if p := recordProto(back); p.GetAlias() != "" {+ t.Errorf("取消收藏后不该显示别名:%q", p.GetAlias())+ }+ if found, _ := env.e.SearchHistory("依赖", 50, store.Filter{}); len(found) != 0 {+ t.Errorf("复制记录不该按别名搜到:%v", found)+ }++ again, err := env.e.SetFavorite(ctx, back.ID, true)+ if err != nil {+ t.Fatal(err)+ }+ if again.Alias != "装依赖" {+ t.Errorf("撤销取消收藏后别名 = %q,应回来", again.Alias)+ }+ if got, _ := env.e.SetAlias(again.ID, " "); got.Alias != "" {+ t.Errorf("清空别名后 = %q", got.Alias)+ }+}diff --git a/client-core/internal/sync/engine.go b/client-core/internal/sync/engine.goindex aa0fa19..69e1943 100644--- a/client-core/internal/sync/engine.go+++ b/client-core/internal/sync/engine.go@@ -941,6 +941,7 @@ func recordProto(clip store.Clip) *pb.ClipRecord {if clip.Favorite {r.ExpiresAtUnix = 0 // 收藏不会过期r.FavoritedAtUnix = clip.FavoritedAt.Unix()+ r.Alias = clip.Alias // 取消收藏后别名还留在库里,只是不再显示}return r}diff --git a/client-core/internal/sync/favorite.go b/client-core/internal/sync/favorite.goindex fde3f05..65f11a1 100644--- a/client-core/internal/sync/favorite.go+++ b/client-core/internal/sync/favorite.go@@ -83,6 +83,26 @@ func (e *Engine) SetFavorite(ctx context.Context, id string, favorite bool) (sto}}+// maxAlias 是别名最多多少个字:列表里一行放得下,再长也看不全+const maxAlias = 100++// SetAlias 给收藏 id 起个别名,alias 为空表示去掉。换行压成空格,首尾空白去掉,超长的截断。+func (e *Engine) SetAlias(id, alias string) (store.Clip, error) {+ e.favMu.Lock()+ defer e.favMu.Unlock()+ alias = strings.Join(strings.Fields(alias), " ")+ if r := []rune(alias); len(r) > maxAlias {+ alias = string(r[:maxAlias])+ }+ if err := e.store.SetAlias(id, alias); err != nil {+ if errors.Is(err, store.ErrNotFound) {+ return store.Clip{}, errors.New("只有收藏可以重命名")+ }+ return store.Clip{}, err+ }+ return e.emitStored(id, "")+}+// newFavorite 由复制记录 src 生成一条收藏:新的 ID,保留原来的复制时间与来源。func newFavorite(src store.Clip) store.Clip {fav := srcdiff --git a/client-core/internal/sync/search.go b/client-core/internal/sync/search.goindex 7b5fce8..e83700a 100644--- a/client-core/internal/sync/search.go+++ b/client-core/internal/sync/search.go@@ -16,7 +16,7 @@ const pinyinScan = 2000// 每条文字只看开头这么多个字有没有拼音匹配,超长的文字不拖慢搜索const pinyinText = 5000-// SearchHistory 搜索复制记录:文字内容或文件名包含 query 的,不分大小写,按时间倒序,最多 limit 条。+// SearchHistory 搜索复制记录:文字内容、文件名或收藏的别名包含 query 的,不分大小写,按时间倒序,最多 limit 条。//// 数据库只能粗筛(见 store.SearchClips),这里按用户看得到的文字再核对一遍:// HTML 记录看纯文本,不看标签。匹配处不在预览片段里的文字记录,预览换成匹配处前后的一段,@@ -38,6 +38,10 @@ func (e *Engine) SearchHistory(query string, limit int, f store.Filter) ([]store}out := candidates[:0]for _, c := range candidates {+ if c.Favorite && indexFold(c.Alias, q) >= 0 {+ out = append(out, c)+ continue+ }if c.Kind != store.KindImage && slices.ContainsFunc(c.Items, func(it store.Item) bool {return indexFold(it.Name, q) >= 0}) {@@ -98,6 +102,10 @@ func (e *Engine) searchPinyin(py string, f store.Filter, found []store.Clip) ([]if seen[c.ID] {continue}+ if c.Favorite && pinyin.Index(c.Alias, py) >= 0 {+ out = append(out, c)+ continue+ }if c.Kind != store.KindImage && slices.ContainsFunc(c.Items, func(it store.Item) bool {return pinyin.Index(it.Name, py) >= 0}) {diff --git a/design/quick-paste-and-favorites.md b/design/quick-paste-and-favorites.mdindex fe58320..8d3520b 100644--- a/design/quick-paste-and-favorites.md+++ b/design/quick-paste-and-favorites.md@@ -272,6 +272,10 @@- 每一行的操作只有两个:放进剪贴板、取消收藏。- 悬停提示框和复制记录页一样。- 取消收藏后,底部提示「已放回复制记录 · 撤销」。+- **重命名(2.4.2)**:悬停时多一个铅笔按钮,给这条收藏起个别名,比如把一张截图叫「报销单」。+ - 收藏页显示别名,按内容拼的标题挪到第二行最前面;快捷窗口里也显示别名。搜索认别名,拼音同样能搜到。+ - 别名最多 100 个字,换行压成空格。清空后保存,就恢复按内容显示。+ - 取消收藏后别名不显示、也搜不到,但还留着:撤销时随之回来。```收藏diff --git a/proto/gen/pasteferry/v1/daemon.pb.go b/proto/gen/pasteferry/v1/daemon.pb.goindex da4cd76..027b9a3 100644--- a/proto/gen/pasteferry/v1/daemon.pb.go+++ b/proto/gen/pasteferry/v1/daemon.pb.go@@ -482,7 +482,9 @@ type ClipRecord struct {Favorited bool `protobuf:"varint,15,opt,name=favorited,proto3" json:"favorited,omitempty"`FavoritedAtUnix int64 `protobuf:"varint,16,opt,name=favorited_at_unix,json=favoritedAtUnix,proto3" json:"favorited_at_unix,omitempty"`// 整条文字就是一个 http(s) 网址- IsLink bool `protobuf:"varint,17,opt,name=is_link,json=isLink,proto3" json:"is_link,omitempty"`+ IsLink bool `protobuf:"varint,17,opt,name=is_link,json=isLink,proto3" json:"is_link,omitempty"`+ // 用户给收藏起的别名,空表示没有。只有收藏有+ Alias string `protobuf:"bytes,18,opt,name=alias,proto3" json:"alias,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -636,6 +638,13 @@ func (x *ClipRecord) GetIsLink() bool {return false}+func (x *ClipRecord) GetAlias() string {+ if x != nil {+ return x.Alias+ }+ return ""+}+type SubscribeRequest struct {state protoimpl.MessageState `protogen:"open.v1"`// 断线重连时带上最后收到的记录时间,daemon 补发这之后的记录@@ -1589,6 +1598,58 @@ func (x *SetFavoriteRequest) GetFavorite() bool {return false}+type SetAliasRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ ClipId string `protobuf:"bytes,1,opt,name=clip_id,json=clipId,proto3" json:"clip_id,omitempty"`+ Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *SetAliasRequest) Reset() {+ *x = SetAliasRequest{}+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[16]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *SetAliasRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*SetAliasRequest) ProtoMessage() {}++func (x *SetAliasRequest) ProtoReflect() protoreflect.Message {+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[16]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use SetAliasRequest.ProtoReflect.Descriptor instead.+func (*SetAliasRequest) Descriptor() ([]byte, []int) {+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{16}+}++func (x *SetAliasRequest) GetClipId() string {+ if x != nil {+ return x.ClipId+ }+ return ""+}++func (x *SetAliasRequest) GetAlias() string {+ if x != nil {+ return x.Alias+ }+ return ""+}+type GetClipDetailRequest struct {state protoimpl.MessageState `protogen:"open.v1"`ClipId string `protobuf:"bytes,1,opt,name=clip_id,json=clipId,proto3" json:"clip_id,omitempty"`@@ -1598,7 +1659,7 @@ type GetClipDetailRequest struct {func (x *GetClipDetailRequest) Reset() {*x = GetClipDetailRequest{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[16]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[17]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1610,7 +1671,7 @@ func (x *GetClipDetailRequest) String() string {func (*GetClipDetailRequest) ProtoMessage() {}func (x *GetClipDetailRequest) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[16]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[17]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1623,7 +1684,7 @@ func (x *GetClipDetailRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use GetClipDetailRequest.ProtoReflect.Descriptor instead.func (*GetClipDetailRequest) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{16}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{17}}func (x *GetClipDetailRequest) GetClipId() string {@@ -1647,7 +1708,7 @@ type ClipDetail struct {func (x *ClipDetail) Reset() {*x = ClipDetail{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[17]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[18]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1659,7 +1720,7 @@ func (x *ClipDetail) String() string {func (*ClipDetail) ProtoMessage() {}func (x *ClipDetail) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[17]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[18]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1672,7 +1733,7 @@ func (x *ClipDetail) ProtoReflect() protoreflect.Message {// Deprecated: Use ClipDetail.ProtoReflect.Descriptor instead.func (*ClipDetail) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{17}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{18}}func (x *ClipDetail) GetText() string {@@ -1720,7 +1781,7 @@ type QuickPasteStatus struct {func (x *QuickPasteStatus) Reset() {*x = QuickPasteStatus{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[18]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[19]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1732,7 +1793,7 @@ func (x *QuickPasteStatus) String() string {func (*QuickPasteStatus) ProtoMessage() {}func (x *QuickPasteStatus) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[18]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[19]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1745,7 +1806,7 @@ func (x *QuickPasteStatus) ProtoReflect() protoreflect.Message {// Deprecated: Use QuickPasteStatus.ProtoReflect.Descriptor instead.func (*QuickPasteStatus) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{18}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{19}}func (x *QuickPasteStatus) GetRunning() bool {@@ -1809,7 +1870,7 @@ type QuickPasteCommand struct {func (x *QuickPasteCommand) Reset() {*x = QuickPasteCommand{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[19]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[20]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1821,7 +1882,7 @@ func (x *QuickPasteCommand) String() string {func (*QuickPasteCommand) ProtoMessage() {}func (x *QuickPasteCommand) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[19]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[20]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1834,7 +1895,7 @@ func (x *QuickPasteCommand) ProtoReflect() protoreflect.Message {// Deprecated: Use QuickPasteCommand.ProtoReflect.Descriptor instead.func (*QuickPasteCommand) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{19}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{20}}func (x *QuickPasteCommand) GetCommand() string {@@ -1854,7 +1915,7 @@ type ListDevicesResponse struct {func (x *ListDevicesResponse) Reset() {*x = ListDevicesResponse{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[20]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[21]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1866,7 +1927,7 @@ func (x *ListDevicesResponse) String() string {func (*ListDevicesResponse) ProtoMessage() {}func (x *ListDevicesResponse) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[20]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[21]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1879,7 +1940,7 @@ func (x *ListDevicesResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use ListDevicesResponse.ProtoReflect.Descriptor instead.func (*ListDevicesResponse) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{20}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{21}}func (x *ListDevicesResponse) GetSelf() *Device {@@ -1909,7 +1970,7 @@ type CreatePairingCodeResponse struct {func (x *CreatePairingCodeResponse) Reset() {*x = CreatePairingCodeResponse{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[21]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[22]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1921,7 +1982,7 @@ func (x *CreatePairingCodeResponse) String() string {func (*CreatePairingCodeResponse) ProtoMessage() {}func (x *CreatePairingCodeResponse) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[21]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[22]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1934,7 +1995,7 @@ func (x *CreatePairingCodeResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use CreatePairingCodeResponse.ProtoReflect.Descriptor instead.func (*CreatePairingCodeResponse) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{21}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{22}}func (x *CreatePairingCodeResponse) GetCode() string {@@ -1971,7 +2032,7 @@ type RedeemPairingCodeRequest struct {func (x *RedeemPairingCodeRequest) Reset() {*x = RedeemPairingCodeRequest{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[22]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[23]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1983,7 +2044,7 @@ func (x *RedeemPairingCodeRequest) String() string {func (*RedeemPairingCodeRequest) ProtoMessage() {}func (x *RedeemPairingCodeRequest) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[22]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[23]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1996,7 +2057,7 @@ func (x *RedeemPairingCodeRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use RedeemPairingCodeRequest.ProtoReflect.Descriptor instead.func (*RedeemPairingCodeRequest) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{22}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{23}}func (x *RedeemPairingCodeRequest) GetCode() string {@@ -2024,7 +2085,7 @@ type RedeemPairingCodeResponse struct {func (x *RedeemPairingCodeResponse) Reset() {*x = RedeemPairingCodeResponse{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[23]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[24]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2036,7 +2097,7 @@ func (x *RedeemPairingCodeResponse) String() string {func (*RedeemPairingCodeResponse) ProtoMessage() {}func (x *RedeemPairingCodeResponse) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[23]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[24]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2049,7 +2110,7 @@ func (x *RedeemPairingCodeResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use RedeemPairingCodeResponse.ProtoReflect.Descriptor instead.func (*RedeemPairingCodeResponse) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{23}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{24}}func (x *RedeemPairingCodeResponse) GetPeer() *Device {@@ -2076,7 +2137,7 @@ type ConfirmPairingRequest struct {func (x *ConfirmPairingRequest) Reset() {*x = ConfirmPairingRequest{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[24]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[25]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2088,7 +2149,7 @@ func (x *ConfirmPairingRequest) String() string {func (*ConfirmPairingRequest) ProtoMessage() {}func (x *ConfirmPairingRequest) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[24]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[25]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2101,7 +2162,7 @@ func (x *ConfirmPairingRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use ConfirmPairingRequest.ProtoReflect.Descriptor instead.func (*ConfirmPairingRequest) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{24}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{25}}func (x *ConfirmPairingRequest) GetPairingSession() string {@@ -2131,7 +2192,7 @@ type NearbyDevice struct {func (x *NearbyDevice) Reset() {*x = NearbyDevice{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[25]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[26]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2143,7 +2204,7 @@ func (x *NearbyDevice) String() string {func (*NearbyDevice) ProtoMessage() {}func (x *NearbyDevice) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[25]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[26]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2156,7 +2217,7 @@ func (x *NearbyDevice) ProtoReflect() protoreflect.Message {// Deprecated: Use NearbyDevice.ProtoReflect.Descriptor instead.func (*NearbyDevice) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{25}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{26}}func (x *NearbyDevice) GetId() string {@@ -2196,7 +2257,7 @@ type NearbyDevices struct {func (x *NearbyDevices) Reset() {*x = NearbyDevices{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[26]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[27]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2208,7 +2269,7 @@ func (x *NearbyDevices) String() string {func (*NearbyDevices) ProtoMessage() {}func (x *NearbyDevices) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[26]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[27]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2221,7 +2282,7 @@ func (x *NearbyDevices) ProtoReflect() protoreflect.Message {// Deprecated: Use NearbyDevices.ProtoReflect.Descriptor instead.func (*NearbyDevices) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{26}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{27}}func (x *NearbyDevices) GetDevices() []*NearbyDevice {@@ -2240,7 +2301,7 @@ type PairNearbyRequest struct {func (x *PairNearbyRequest) Reset() {*x = PairNearbyRequest{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[27]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[28]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2252,7 +2313,7 @@ func (x *PairNearbyRequest) String() string {func (*PairNearbyRequest) ProtoMessage() {}func (x *PairNearbyRequest) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[27]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[28]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2265,7 +2326,7 @@ func (x *PairNearbyRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use PairNearbyRequest.ProtoReflect.Descriptor instead.func (*PairNearbyRequest) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{27}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{28}}func (x *PairNearbyRequest) GetId() string {@@ -2284,7 +2345,7 @@ type UnpairRequest struct {func (x *UnpairRequest) Reset() {*x = UnpairRequest{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[28]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[29]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2296,7 +2357,7 @@ func (x *UnpairRequest) String() string {func (*UnpairRequest) ProtoMessage() {}func (x *UnpairRequest) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[28]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[29]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2309,7 +2370,7 @@ func (x *UnpairRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use UnpairRequest.ProtoReflect.Descriptor instead.func (*UnpairRequest) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{28}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{29}}func (x *UnpairRequest) GetDeviceId() string {@@ -2329,7 +2390,7 @@ type SetDeviceAddressRequest struct {func (x *SetDeviceAddressRequest) Reset() {*x = SetDeviceAddressRequest{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[29]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[30]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2341,7 +2402,7 @@ func (x *SetDeviceAddressRequest) String() string {func (*SetDeviceAddressRequest) ProtoMessage() {}func (x *SetDeviceAddressRequest) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[29]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[30]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2354,7 +2415,7 @@ func (x *SetDeviceAddressRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use SetDeviceAddressRequest.ProtoReflect.Descriptor instead.func (*SetDeviceAddressRequest) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{29}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{30}}func (x *SetDeviceAddressRequest) GetDeviceId() string {@@ -2416,7 +2477,7 @@ type Config struct {func (x *Config) Reset() {*x = Config{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[30]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[31]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2428,7 +2489,7 @@ func (x *Config) String() string {func (*Config) ProtoMessage() {}func (x *Config) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[30]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[31]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2441,7 +2502,7 @@ func (x *Config) ProtoReflect() protoreflect.Message {// Deprecated: Use Config.ProtoReflect.Descriptor instead.func (*Config) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{30}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{31}}func (x *Config) GetAutoSyncThresholdBytes() int64 {@@ -2616,7 +2677,7 @@ type OfficialUsage struct {func (x *OfficialUsage) Reset() {*x = OfficialUsage{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[31]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[32]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2628,7 +2689,7 @@ func (x *OfficialUsage) String() string {func (*OfficialUsage) ProtoMessage() {}func (x *OfficialUsage) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[31]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[32]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2641,7 +2702,7 @@ func (x *OfficialUsage) ProtoReflect() protoreflect.Message {// Deprecated: Use OfficialUsage.ProtoReflect.Descriptor instead.func (*OfficialUsage) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{31}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{32}}func (x *OfficialUsage) GetAvailable() bool {@@ -2729,7 +2790,7 @@ type NetworkInfo struct {func (x *NetworkInfo) Reset() {*x = NetworkInfo{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[32]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[33]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2741,7 +2802,7 @@ func (x *NetworkInfo) String() string {func (*NetworkInfo) ProtoMessage() {}func (x *NetworkInfo) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[32]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[33]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2754,7 +2815,7 @@ func (x *NetworkInfo) ProtoReflect() protoreflect.Message {// Deprecated: Use NetworkInfo.ProtoReflect.Descriptor instead.func (*NetworkInfo) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{32}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{33}}func (x *NetworkInfo) GetLocalPort() int32 {@@ -2814,7 +2875,7 @@ type LanInfo struct {func (x *LanInfo) Reset() {*x = LanInfo{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[33]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[34]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2826,7 +2887,7 @@ func (x *LanInfo) String() string {func (*LanInfo) ProtoMessage() {}func (x *LanInfo) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[33]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[34]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2839,7 +2900,7 @@ func (x *LanInfo) ProtoReflect() protoreflect.Message {// Deprecated: Use LanInfo.ProtoReflect.Descriptor instead.func (*LanInfo) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{33}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{34}}func (x *LanInfo) GetEnabled() bool {@@ -2898,7 +2959,7 @@ type LanPeer struct {func (x *LanPeer) Reset() {*x = LanPeer{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[34]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[35]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2910,7 +2971,7 @@ func (x *LanPeer) String() string {func (*LanPeer) ProtoMessage() {}func (x *LanPeer) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[34]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[35]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2923,7 +2984,7 @@ func (x *LanPeer) ProtoReflect() protoreflect.Message {// Deprecated: Use LanPeer.ProtoReflect.Descriptor instead.func (*LanPeer) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{34}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{35}}func (x *LanPeer) GetDeviceId() string {@@ -2980,7 +3041,7 @@ type NetworkEgress struct {func (x *NetworkEgress) Reset() {*x = NetworkEgress{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[35]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[36]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2992,7 +3053,7 @@ func (x *NetworkEgress) String() string {func (*NetworkEgress) ProtoMessage() {}func (x *NetworkEgress) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[35]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[36]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3005,7 +3066,7 @@ func (x *NetworkEgress) ProtoReflect() protoreflect.Message {// Deprecated: Use NetworkEgress.ProtoReflect.Descriptor instead.func (*NetworkEgress) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{35}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{36}}func (x *NetworkEgress) GetAddress() string {@@ -3063,7 +3124,7 @@ type Status struct {func (x *Status) Reset() {*x = Status{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[36]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[37]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3075,7 +3136,7 @@ func (x *Status) String() string {func (*Status) ProtoMessage() {}func (x *Status) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[36]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[37]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3088,7 +3149,7 @@ func (x *Status) ProtoReflect() protoreflect.Message {// Deprecated: Use Status.ProtoReflect.Descriptor instead.func (*Status) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{36}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{37}}func (x *Status) GetDeviceId() string {@@ -3199,7 +3260,7 @@ type CheckForUpdateRequest struct {func (x *CheckForUpdateRequest) Reset() {*x = CheckForUpdateRequest{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[37]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[38]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3211,7 +3272,7 @@ func (x *CheckForUpdateRequest) String() string {func (*CheckForUpdateRequest) ProtoMessage() {}func (x *CheckForUpdateRequest) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[37]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[38]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3224,7 +3285,7 @@ func (x *CheckForUpdateRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use CheckForUpdateRequest.ProtoReflect.Descriptor instead.func (*CheckForUpdateRequest) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{37}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{38}}func (x *CheckForUpdateRequest) GetLanguage() string {@@ -3246,7 +3307,7 @@ type UpdateRelease struct {func (x *UpdateRelease) Reset() {*x = UpdateRelease{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[38]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[39]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3258,7 +3319,7 @@ func (x *UpdateRelease) String() string {func (*UpdateRelease) ProtoMessage() {}func (x *UpdateRelease) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[38]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[39]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3271,7 +3332,7 @@ func (x *UpdateRelease) ProtoReflect() protoreflect.Message {// Deprecated: Use UpdateRelease.ProtoReflect.Descriptor instead.func (*UpdateRelease) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{38}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{39}}func (x *UpdateRelease) GetVersion() string {@@ -3326,7 +3387,7 @@ type UpdateInfo struct {func (x *UpdateInfo) Reset() {*x = UpdateInfo{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[39]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[40]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3338,7 +3399,7 @@ func (x *UpdateInfo) String() string {func (*UpdateInfo) ProtoMessage() {}func (x *UpdateInfo) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[39]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[40]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3351,7 +3412,7 @@ func (x *UpdateInfo) ProtoReflect() protoreflect.Message {// Deprecated: Use UpdateInfo.ProtoReflect.Descriptor instead.func (*UpdateInfo) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{39}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{40}}func (x *UpdateInfo) GetCurrentVersion() string {@@ -3426,7 +3487,7 @@ type DownloadUpdateRequest struct {func (x *DownloadUpdateRequest) Reset() {*x = DownloadUpdateRequest{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[40]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[41]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3438,7 +3499,7 @@ func (x *DownloadUpdateRequest) String() string {func (*DownloadUpdateRequest) ProtoMessage() {}func (x *DownloadUpdateRequest) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[40]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[41]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3451,7 +3512,7 @@ func (x *DownloadUpdateRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use DownloadUpdateRequest.ProtoReflect.Descriptor instead.func (*DownloadUpdateRequest) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{40}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{41}}func (x *DownloadUpdateRequest) GetVersion() string {@@ -3473,7 +3534,7 @@ type UpdateProgress struct {func (x *UpdateProgress) Reset() {*x = UpdateProgress{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[41]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[42]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3485,7 +3546,7 @@ func (x *UpdateProgress) String() string {func (*UpdateProgress) ProtoMessage() {}func (x *UpdateProgress) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[41]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[42]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3498,7 +3559,7 @@ func (x *UpdateProgress) ProtoReflect() protoreflect.Message {// Deprecated: Use UpdateProgress.ProtoReflect.Descriptor instead.func (*UpdateProgress) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{41}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{42}}func (x *UpdateProgress) GetDownloaded() int64 {@@ -3533,7 +3594,7 @@ type InstallUpdateRequest struct {func (x *InstallUpdateRequest) Reset() {*x = InstallUpdateRequest{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[42]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[43]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3545,7 +3606,7 @@ func (x *InstallUpdateRequest) String() string {func (*InstallUpdateRequest) ProtoMessage() {}func (x *InstallUpdateRequest) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[42]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[43]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3558,7 +3619,7 @@ func (x *InstallUpdateRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use InstallUpdateRequest.ProtoReflect.Descriptor instead.func (*InstallUpdateRequest) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{42}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{43}}func (x *InstallUpdateRequest) GetVersion() string {@@ -3588,7 +3649,7 @@ type UpdateResult struct {func (x *UpdateResult) Reset() {*x = UpdateResult{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[43]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[44]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3600,7 +3661,7 @@ func (x *UpdateResult) String() string {func (*UpdateResult) ProtoMessage() {}func (x *UpdateResult) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[43]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[44]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3613,7 +3674,7 @@ func (x *UpdateResult) ProtoReflect() protoreflect.Message {// Deprecated: Use UpdateResult.ProtoReflect.Descriptor instead.func (*UpdateResult) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{43}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{44}}func (x *UpdateResult) GetFromVersion() string {@@ -3661,7 +3722,7 @@ type ExportDiagnosticsRequest struct {func (x *ExportDiagnosticsRequest) Reset() {*x = ExportDiagnosticsRequest{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[44]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[45]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3673,7 +3734,7 @@ func (x *ExportDiagnosticsRequest) String() string {func (*ExportDiagnosticsRequest) ProtoMessage() {}func (x *ExportDiagnosticsRequest) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[44]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[45]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3686,7 +3747,7 @@ func (x *ExportDiagnosticsRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use ExportDiagnosticsRequest.ProtoReflect.Descriptor instead.func (*ExportDiagnosticsRequest) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{44}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{45}}func (x *ExportDiagnosticsRequest) GetLogLines() int32 {@@ -3712,7 +3773,7 @@ type Diagnostics struct {func (x *Diagnostics) Reset() {*x = Diagnostics{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[45]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[46]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3724,7 +3785,7 @@ func (x *Diagnostics) String() string {func (*Diagnostics) ProtoMessage() {}func (x *Diagnostics) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[45]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[46]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3737,7 +3798,7 @@ func (x *Diagnostics) ProtoReflect() protoreflect.Message {// Deprecated: Use Diagnostics.ProtoReflect.Descriptor instead.func (*Diagnostics) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{45}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{46}}func (x *Diagnostics) GetReport() string {@@ -3756,7 +3817,7 @@ type SetVerboseLogRequest struct {func (x *SetVerboseLogRequest) Reset() {*x = SetVerboseLogRequest{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[46]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[47]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3768,7 +3829,7 @@ func (x *SetVerboseLogRequest) String() string {func (*SetVerboseLogRequest) ProtoMessage() {}func (x *SetVerboseLogRequest) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[46]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[47]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3781,7 +3842,7 @@ func (x *SetVerboseLogRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use SetVerboseLogRequest.ProtoReflect.Descriptor instead.func (*SetVerboseLogRequest) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{46}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{47}}func (x *SetVerboseLogRequest) GetMinutes() int32 {@@ -3801,7 +3862,7 @@ type GetImagePreviewRequest struct {func (x *GetImagePreviewRequest) Reset() {*x = GetImagePreviewRequest{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[47]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[48]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3813,7 +3874,7 @@ func (x *GetImagePreviewRequest) String() string {func (*GetImagePreviewRequest) ProtoMessage() {}func (x *GetImagePreviewRequest) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[47]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[48]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3826,7 +3887,7 @@ func (x *GetImagePreviewRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use GetImagePreviewRequest.ProtoReflect.Descriptor instead.func (*GetImagePreviewRequest) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{47}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{48}}func (x *GetImagePreviewRequest) GetClipId() string {@@ -3854,7 +3915,7 @@ type GetImagePreviewResponse struct {func (x *GetImagePreviewResponse) Reset() {*x = GetImagePreviewResponse{}- mi := &file_pasteferry_v1_daemon_proto_msgTypes[48]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[49]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -3866,7 +3927,7 @@ func (x *GetImagePreviewResponse) String() string {func (*GetImagePreviewResponse) ProtoMessage() {}func (x *GetImagePreviewResponse) ProtoReflect() protoreflect.Message {- mi := &file_pasteferry_v1_daemon_proto_msgTypes[48]+ mi := &file_pasteferry_v1_daemon_proto_msgTypes[49]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -3879,7 +3940,7 @@ func (x *GetImagePreviewResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use GetImagePreviewResponse.ProtoReflect.Descriptor instead.func (*GetImagePreviewResponse) Descriptor() ([]byte, []int) {- return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{48}+ return file_pasteferry_v1_daemon_proto_rawDescGZIP(), []int{49}}func (x *GetImagePreviewResponse) GetPath() string {@@ -3913,7 +3974,7 @@ const file_pasteferry_v1_daemon_proto_rawDesc = "" +"\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +"\x04size\x18\x02 \x01(\x03R\x04size\x12\x15\n" +"\x06is_dir\x18\x03 \x01(\bR\x05isDir\x12!\n" +- "\fcontent_type\x18\x04 \x01(\tR\vcontentType\"\xe7\x04\n" ++ "\fcontent_type\x18\x04 \x01(\tR\vcontentType\"\xfd\x04\n" +"\n" +"ClipRecord\x12\x0e\n" +"\x02id\x18\x01 \x01(\tR\x02id\x12+\n" +@@ -3935,7 +3996,8 @@ const file_pasteferry_v1_daemon_proto_rawDesc = "" +"\bfavorite\x18\x0e \x01(\bR\bfavorite\x12\x1c\n" +"\tfavorited\x18\x0f \x01(\bR\tfavorited\x12*\n" +"\x11favorited_at_unix\x18\x10 \x01(\x03R\x0ffavoritedAtUnix\x12\x17\n" +- "\ais_link\x18\x11 \x01(\bR\x06isLink\"1\n" ++ "\ais_link\x18\x11 \x01(\bR\x06isLink\x12\x14\n" ++ "\x05alias\x18\x12 \x01(\tR\x05alias\"1\n" +"\x10SubscribeRequest\x12\x1d\n" +"\n" +"since_unix\x18\x01 \x01(\x03R\tsinceUnix\"\x8d\x01\n" +@@ -4007,7 +4069,10 @@ const file_pasteferry_v1_daemon_proto_rawDesc = "" +"plain_text\x18\x02 \x01(\bR\tplainText\"I\n" +"\x12SetFavoriteRequest\x12\x17\n" +"\aclip_id\x18\x01 \x01(\tR\x06clipId\x12\x1a\n" +- "\bfavorite\x18\x02 \x01(\bR\bfavorite\"/\n" ++ "\bfavorite\x18\x02 \x01(\bR\bfavorite\"@\n" ++ "\x0fSetAliasRequest\x12\x17\n" ++ "\aclip_id\x18\x01 \x01(\tR\x06clipId\x12\x14\n" ++ "\x05alias\x18\x02 \x01(\tR\x05alias\"/\n" +"\x14GetClipDetailRequest\x12\x17\n" +"\aclip_id\x18\x01 \x01(\tR\x06clipId\"d\n" +"\n" +@@ -4232,7 +4297,7 @@ const file_pasteferry_v1_daemon_proto_rawDesc = "" +"\x18SERVICE_MODE_UNSPECIFIED\x10\x00\x12\x14\n" +"\x10SERVICE_MODE_LAN\x10\x01\x12\x19\n" +"\x15SERVICE_MODE_OFFICIAL\x10\x02\x12\x17\n" +- "\x13SERVICE_MODE_CUSTOM\x10\x032\xa8\x14\n" ++ "\x13SERVICE_MODE_CUSTOM\x10\x032\xef\x14\n" +"\rDaemonService\x12D\n" +"\tSubscribe\x12\x1f.pasteferry.v1.SubscribeRequest\x1a\x14.pasteferry.v1.Event0\x01\x12T\n" +"\vListHistory\x12!.pasteferry.v1.ListHistoryRequest\x1a\".pasteferry.v1.ListHistoryResponse\x12J\n" +@@ -4265,7 +4330,8 @@ const file_pasteferry_v1_daemon_proto_rawDesc = "" +"\x0eDownloadUpdate\x12$.pasteferry.v1.DownloadUpdateRequest\x1a\x1d.pasteferry.v1.UpdateProgress0\x01\x12J\n" +"\rInstallUpdate\x12#.pasteferry.v1.InstallUpdateRequest\x1a\x14.pasteferry.v1.Empty\x12K\n" +"\vSetFavorite\x12!.pasteferry.v1.SetFavoriteRequest\x1a\x19.pasteferry.v1.ClipRecord\x12O\n" +- "\rGetClipDetail\x12#.pasteferry.v1.GetClipDetailRequest\x1a\x19.pasteferry.v1.ClipDetail\x12Z\n" ++ "\rGetClipDetail\x12#.pasteferry.v1.GetClipDetailRequest\x1a\x19.pasteferry.v1.ClipDetail\x12E\n" ++ "\bSetAlias\x12\x1e.pasteferry.v1.SetAliasRequest\x1a\x19.pasteferry.v1.ClipRecord\x12Z\n" +"\x11QuickPasteSession\x12\x1f.pasteferry.v1.QuickPasteStatus\x1a .pasteferry.v1.QuickPasteCommand(\x010\x01\x12L\n" +"\x13GetQuickPasteStatus\x12\x14.pasteferry.v1.Empty\x1a\x1f.pasteferry.v1.QuickPasteStatus\x12O\n" +"\x15SendQuickPasteCommand\x12 .pasteferry.v1.QuickPasteCommand\x1a\x14.pasteferry.v1.EmptyBDZBgithub.com/baiyuze/pasteferry/proto/gen/pasteferry/v1;pasteferryv1b\x06proto3"@@ -4283,7 +4349,7 @@ func file_pasteferry_v1_daemon_proto_rawDescGZIP() []byte {}var file_pasteferry_v1_daemon_proto_enumTypes = make([]protoimpl.EnumInfo, 6)-var file_pasteferry_v1_daemon_proto_msgTypes = make([]protoimpl.MessageInfo, 49)+var file_pasteferry_v1_daemon_proto_msgTypes = make([]protoimpl.MessageInfo, 50)var file_pasteferry_v1_daemon_proto_goTypes = []any{(ClipKind)(0), // 0: pasteferry.v1.ClipKind(ClipStatus)(0), // 1: pasteferry.v1.ClipStatus@@ -4307,39 +4373,40 @@ var file_pasteferry_v1_daemon_proto_goTypes = []any{(*FetchRequest)(nil), // 19: pasteferry.v1.FetchRequest(*ApplyToClipboardRequest)(nil), // 20: pasteferry.v1.ApplyToClipboardRequest(*SetFavoriteRequest)(nil), // 21: pasteferry.v1.SetFavoriteRequest- (*GetClipDetailRequest)(nil), // 22: pasteferry.v1.GetClipDetailRequest- (*ClipDetail)(nil), // 23: pasteferry.v1.ClipDetail- (*QuickPasteStatus)(nil), // 24: pasteferry.v1.QuickPasteStatus- (*QuickPasteCommand)(nil), // 25: pasteferry.v1.QuickPasteCommand- (*ListDevicesResponse)(nil), // 26: pasteferry.v1.ListDevicesResponse- (*CreatePairingCodeResponse)(nil), // 27: pasteferry.v1.CreatePairingCodeResponse- (*RedeemPairingCodeRequest)(nil), // 28: pasteferry.v1.RedeemPairingCodeRequest- (*RedeemPairingCodeResponse)(nil), // 29: pasteferry.v1.RedeemPairingCodeResponse- (*ConfirmPairingRequest)(nil), // 30: pasteferry.v1.ConfirmPairingRequest- (*NearbyDevice)(nil), // 31: pasteferry.v1.NearbyDevice- (*NearbyDevices)(nil), // 32: pasteferry.v1.NearbyDevices- (*PairNearbyRequest)(nil), // 33: pasteferry.v1.PairNearbyRequest- (*UnpairRequest)(nil), // 34: pasteferry.v1.UnpairRequest- (*SetDeviceAddressRequest)(nil), // 35: pasteferry.v1.SetDeviceAddressRequest- (*Config)(nil), // 36: pasteferry.v1.Config- (*OfficialUsage)(nil), // 37: pasteferry.v1.OfficialUsage- (*NetworkInfo)(nil), // 38: pasteferry.v1.NetworkInfo- (*LanInfo)(nil), // 39: pasteferry.v1.LanInfo- (*LanPeer)(nil), // 40: pasteferry.v1.LanPeer- (*NetworkEgress)(nil), // 41: pasteferry.v1.NetworkEgress- (*Status)(nil), // 42: pasteferry.v1.Status- (*CheckForUpdateRequest)(nil), // 43: pasteferry.v1.CheckForUpdateRequest- (*UpdateRelease)(nil), // 44: pasteferry.v1.UpdateRelease- (*UpdateInfo)(nil), // 45: pasteferry.v1.UpdateInfo- (*DownloadUpdateRequest)(nil), // 46: pasteferry.v1.DownloadUpdateRequest- (*UpdateProgress)(nil), // 47: pasteferry.v1.UpdateProgress- (*InstallUpdateRequest)(nil), // 48: pasteferry.v1.InstallUpdateRequest- (*UpdateResult)(nil), // 49: pasteferry.v1.UpdateResult- (*ExportDiagnosticsRequest)(nil), // 50: pasteferry.v1.ExportDiagnosticsRequest- (*Diagnostics)(nil), // 51: pasteferry.v1.Diagnostics- (*SetVerboseLogRequest)(nil), // 52: pasteferry.v1.SetVerboseLogRequest- (*GetImagePreviewRequest)(nil), // 53: pasteferry.v1.GetImagePreviewRequest- (*GetImagePreviewResponse)(nil), // 54: pasteferry.v1.GetImagePreviewResponse+ (*SetAliasRequest)(nil), // 22: pasteferry.v1.SetAliasRequest+ (*GetClipDetailRequest)(nil), // 23: pasteferry.v1.GetClipDetailRequest+ (*ClipDetail)(nil), // 24: pasteferry.v1.ClipDetail+ (*QuickPasteStatus)(nil), // 25: pasteferry.v1.QuickPasteStatus+ (*QuickPasteCommand)(nil), // 26: pasteferry.v1.QuickPasteCommand+ (*ListDevicesResponse)(nil), // 27: pasteferry.v1.ListDevicesResponse+ (*CreatePairingCodeResponse)(nil), // 28: pasteferry.v1.CreatePairingCodeResponse+ (*RedeemPairingCodeRequest)(nil), // 29: pasteferry.v1.RedeemPairingCodeRequest+ (*RedeemPairingCodeResponse)(nil), // 30: pasteferry.v1.RedeemPairingCodeResponse+ (*ConfirmPairingRequest)(nil), // 31: pasteferry.v1.ConfirmPairingRequest+ (*NearbyDevice)(nil), // 32: pasteferry.v1.NearbyDevice+ (*NearbyDevices)(nil), // 33: pasteferry.v1.NearbyDevices+ (*PairNearbyRequest)(nil), // 34: pasteferry.v1.PairNearbyRequest+ (*UnpairRequest)(nil), // 35: pasteferry.v1.UnpairRequest+ (*SetDeviceAddressRequest)(nil), // 36: pasteferry.v1.SetDeviceAddressRequest+ (*Config)(nil), // 37: pasteferry.v1.Config+ (*OfficialUsage)(nil), // 38: pasteferry.v1.OfficialUsage+ (*NetworkInfo)(nil), // 39: pasteferry.v1.NetworkInfo+ (*LanInfo)(nil), // 40: pasteferry.v1.LanInfo+ (*LanPeer)(nil), // 41: pasteferry.v1.LanPeer+ (*NetworkEgress)(nil), // 42: pasteferry.v1.NetworkEgress+ (*Status)(nil), // 43: pasteferry.v1.Status+ (*CheckForUpdateRequest)(nil), // 44: pasteferry.v1.CheckForUpdateRequest+ (*UpdateRelease)(nil), // 45: pasteferry.v1.UpdateRelease+ (*UpdateInfo)(nil), // 46: pasteferry.v1.UpdateInfo+ (*DownloadUpdateRequest)(nil), // 47: pasteferry.v1.DownloadUpdateRequest+ (*UpdateProgress)(nil), // 48: pasteferry.v1.UpdateProgress+ (*InstallUpdateRequest)(nil), // 49: pasteferry.v1.InstallUpdateRequest+ (*UpdateResult)(nil), // 50: pasteferry.v1.UpdateResult+ (*ExportDiagnosticsRequest)(nil), // 51: pasteferry.v1.ExportDiagnosticsRequest+ (*Diagnostics)(nil), // 52: pasteferry.v1.Diagnostics+ (*SetVerboseLogRequest)(nil), // 53: pasteferry.v1.SetVerboseLogRequest+ (*GetImagePreviewRequest)(nil), // 54: pasteferry.v1.GetImagePreviewRequest+ (*GetImagePreviewResponse)(nil), // 55: pasteferry.v1.GetImagePreviewResponse}var file_pasteferry_v1_daemon_proto_depIdxs = []int32{0, // 0: pasteferry.v1.ClipRecord.kind:type_name -> pasteferry.v1.ClipKind@@ -4351,41 +4418,41 @@ var file_pasteferry_v1_daemon_proto_depIdxs = []int32{10, // 6: pasteferry.v1.Event.progress:type_name -> pasteferry.v1.TransferProgress11, // 7: pasteferry.v1.Event.device_changed:type_name -> pasteferry.v1.Device3, // 8: pasteferry.v1.Event.permission_changed:type_name -> pasteferry.v1.ClipboardPermission- 42, // 9: pasteferry.v1.Event.status_changed:type_name -> pasteferry.v1.Status+ 43, // 9: pasteferry.v1.Event.status_changed:type_name -> pasteferry.v1.Status15, // 10: pasteferry.v1.Event.clipboard_written:type_name -> pasteferry.v1.ClipboardWriteResult- 36, // 11: pasteferry.v1.Event.config_changed:type_name -> pasteferry.v1.Config- 24, // 12: pasteferry.v1.Event.quick_paste_changed:type_name -> pasteferry.v1.QuickPasteStatus+ 37, // 11: pasteferry.v1.Event.config_changed:type_name -> pasteferry.v1.Config+ 25, // 12: pasteferry.v1.Event.quick_paste_changed:type_name -> pasteferry.v1.QuickPasteStatus4, // 13: pasteferry.v1.ClipboardWriteResult.outcome:type_name -> pasteferry.v1.ClipboardWriteOutcome0, // 14: pasteferry.v1.ListHistoryRequest.kind_filter:type_name -> pasteferry.v1.ClipKind8, // 15: pasteferry.v1.ListHistoryResponse.records:type_name -> pasteferry.v1.ClipRecord11, // 16: pasteferry.v1.ListDevicesResponse.self:type_name -> pasteferry.v1.Device11, // 17: pasteferry.v1.ListDevicesResponse.peers:type_name -> pasteferry.v1.Device11, // 18: pasteferry.v1.RedeemPairingCodeResponse.peer:type_name -> pasteferry.v1.Device- 31, // 19: pasteferry.v1.NearbyDevices.devices:type_name -> pasteferry.v1.NearbyDevice+ 32, // 19: pasteferry.v1.NearbyDevices.devices:type_name -> pasteferry.v1.NearbyDevice5, // 20: pasteferry.v1.Config.service_mode:type_name -> pasteferry.v1.ServiceMode- 41, // 21: pasteferry.v1.NetworkInfo.egresses:type_name -> pasteferry.v1.NetworkEgress- 39, // 22: pasteferry.v1.NetworkInfo.lan:type_name -> pasteferry.v1.LanInfo- 40, // 23: pasteferry.v1.LanInfo.peers:type_name -> pasteferry.v1.LanPeer+ 42, // 21: pasteferry.v1.NetworkInfo.egresses:type_name -> pasteferry.v1.NetworkEgress+ 40, // 22: pasteferry.v1.NetworkInfo.lan:type_name -> pasteferry.v1.LanInfo+ 41, // 23: pasteferry.v1.LanInfo.peers:type_name -> pasteferry.v1.LanPeer3, // 24: pasteferry.v1.Status.clipboard_permission:type_name -> pasteferry.v1.ClipboardPermission- 37, // 25: pasteferry.v1.Status.official_usage:type_name -> pasteferry.v1.OfficialUsage- 49, // 26: pasteferry.v1.Status.last_update:type_name -> pasteferry.v1.UpdateResult- 44, // 27: pasteferry.v1.UpdateInfo.releases:type_name -> pasteferry.v1.UpdateRelease+ 38, // 25: pasteferry.v1.Status.official_usage:type_name -> pasteferry.v1.OfficialUsage+ 50, // 26: pasteferry.v1.Status.last_update:type_name -> pasteferry.v1.UpdateResult+ 45, // 27: pasteferry.v1.UpdateInfo.releases:type_name -> pasteferry.v1.UpdateRelease9, // 28: pasteferry.v1.DaemonService.Subscribe:input_type -> pasteferry.v1.SubscribeRequest16, // 29: pasteferry.v1.DaemonService.ListHistory:input_type -> pasteferry.v1.ListHistoryRequest18, // 30: pasteferry.v1.DaemonService.DeleteHistory:input_type -> pasteferry.v1.DeleteHistoryRequest19, // 31: pasteferry.v1.DaemonService.Fetch:input_type -> pasteferry.v1.FetchRequest20, // 32: pasteferry.v1.DaemonService.ApplyToClipboard:input_type -> pasteferry.v1.ApplyToClipboardRequest- 53, // 33: pasteferry.v1.DaemonService.GetImagePreview:input_type -> pasteferry.v1.GetImagePreviewRequest+ 54, // 33: pasteferry.v1.DaemonService.GetImagePreview:input_type -> pasteferry.v1.GetImagePreviewRequest6, // 34: pasteferry.v1.DaemonService.ListDevices:input_type -> pasteferry.v1.Empty6, // 35: pasteferry.v1.DaemonService.CreatePairingCode:input_type -> pasteferry.v1.Empty- 28, // 36: pasteferry.v1.DaemonService.RedeemPairingCode:input_type -> pasteferry.v1.RedeemPairingCodeRequest- 30, // 37: pasteferry.v1.DaemonService.ConfirmPairing:input_type -> pasteferry.v1.ConfirmPairingRequest- 34, // 38: pasteferry.v1.DaemonService.Unpair:input_type -> pasteferry.v1.UnpairRequest- 35, // 39: pasteferry.v1.DaemonService.SetDeviceAddress:input_type -> pasteferry.v1.SetDeviceAddressRequest+ 29, // 36: pasteferry.v1.DaemonService.RedeemPairingCode:input_type -> pasteferry.v1.RedeemPairingCodeRequest+ 31, // 37: pasteferry.v1.DaemonService.ConfirmPairing:input_type -> pasteferry.v1.ConfirmPairingRequest+ 35, // 38: pasteferry.v1.DaemonService.Unpair:input_type -> pasteferry.v1.UnpairRequest+ 36, // 39: pasteferry.v1.DaemonService.SetDeviceAddress:input_type -> pasteferry.v1.SetDeviceAddressRequest6, // 40: pasteferry.v1.DaemonService.WatchNearby:input_type -> pasteferry.v1.Empty- 33, // 41: pasteferry.v1.DaemonService.PairNearby:input_type -> pasteferry.v1.PairNearbyRequest+ 34, // 41: pasteferry.v1.DaemonService.PairNearby:input_type -> pasteferry.v1.PairNearbyRequest6, // 42: pasteferry.v1.DaemonService.GetConfig:input_type -> pasteferry.v1.Empty- 36, // 43: pasteferry.v1.DaemonService.UpdateConfig:input_type -> pasteferry.v1.Config+ 37, // 43: pasteferry.v1.DaemonService.UpdateConfig:input_type -> pasteferry.v1.Config6, // 44: pasteferry.v1.DaemonService.GetStatus:input_type -> pasteferry.v1.Empty6, // 45: pasteferry.v1.DaemonService.RequestClipboardPermission:input_type -> pasteferry.v1.Empty6, // 46: pasteferry.v1.DaemonService.RequestLocalNetworkPermission:input_type -> pasteferry.v1.Empty@@ -4393,51 +4460,53 @@ var file_pasteferry_v1_daemon_proto_depIdxs = []int32{6, // 48: pasteferry.v1.DaemonService.RequestNotificationPermission:input_type -> pasteferry.v1.Empty14, // 49: pasteferry.v1.DaemonService.ActivateNotification:input_type -> pasteferry.v1.NotificationAction6, // 50: pasteferry.v1.DaemonService.GetNetwork:input_type -> pasteferry.v1.Empty- 50, // 51: pasteferry.v1.DaemonService.ExportDiagnostics:input_type -> pasteferry.v1.ExportDiagnosticsRequest- 52, // 52: pasteferry.v1.DaemonService.SetVerboseLog:input_type -> pasteferry.v1.SetVerboseLogRequest- 43, // 53: pasteferry.v1.DaemonService.CheckForUpdate:input_type -> pasteferry.v1.CheckForUpdateRequest- 46, // 54: pasteferry.v1.DaemonService.DownloadUpdate:input_type -> pasteferry.v1.DownloadUpdateRequest- 48, // 55: pasteferry.v1.DaemonService.InstallUpdate:input_type -> pasteferry.v1.InstallUpdateRequest+ 51, // 51: pasteferry.v1.DaemonService.ExportDiagnostics:input_type -> pasteferry.v1.ExportDiagnosticsRequest+ 53, // 52: pasteferry.v1.DaemonService.SetVerboseLog:input_type -> pasteferry.v1.SetVerboseLogRequest+ 44, // 53: pasteferry.v1.DaemonService.CheckForUpdate:input_type -> pasteferry.v1.CheckForUpdateRequest+ 47, // 54: pasteferry.v1.DaemonService.DownloadUpdate:input_type -> pasteferry.v1.DownloadUpdateRequest+ 49, // 55: pasteferry.v1.DaemonService.InstallUpdate:input_type -> pasteferry.v1.InstallUpdateRequest21, // 56: pasteferry.v1.DaemonService.SetFavorite:input_type -> pasteferry.v1.SetFavoriteRequest- 22, // 57: pasteferry.v1.DaemonService.GetClipDetail:input_type -> pasteferry.v1.GetClipDetailRequest- 24, // 58: pasteferry.v1.DaemonService.QuickPasteSession:input_type -> pasteferry.v1.QuickPasteStatus- 6, // 59: pasteferry.v1.DaemonService.GetQuickPasteStatus:input_type -> pasteferry.v1.Empty- 25, // 60: pasteferry.v1.DaemonService.SendQuickPasteCommand:input_type -> pasteferry.v1.QuickPasteCommand- 12, // 61: pasteferry.v1.DaemonService.Subscribe:output_type -> pasteferry.v1.Event- 17, // 62: pasteferry.v1.DaemonService.ListHistory:output_type -> pasteferry.v1.ListHistoryResponse- 6, // 63: pasteferry.v1.DaemonService.DeleteHistory:output_type -> pasteferry.v1.Empty- 6, // 64: pasteferry.v1.DaemonService.Fetch:output_type -> pasteferry.v1.Empty- 6, // 65: pasteferry.v1.DaemonService.ApplyToClipboard:output_type -> pasteferry.v1.Empty- 54, // 66: pasteferry.v1.DaemonService.GetImagePreview:output_type -> pasteferry.v1.GetImagePreviewResponse- 26, // 67: pasteferry.v1.DaemonService.ListDevices:output_type -> pasteferry.v1.ListDevicesResponse- 27, // 68: pasteferry.v1.DaemonService.CreatePairingCode:output_type -> pasteferry.v1.CreatePairingCodeResponse- 29, // 69: pasteferry.v1.DaemonService.RedeemPairingCode:output_type -> pasteferry.v1.RedeemPairingCodeResponse- 6, // 70: pasteferry.v1.DaemonService.ConfirmPairing:output_type -> pasteferry.v1.Empty- 6, // 71: pasteferry.v1.DaemonService.Unpair:output_type -> pasteferry.v1.Empty- 6, // 72: pasteferry.v1.DaemonService.SetDeviceAddress:output_type -> pasteferry.v1.Empty- 32, // 73: pasteferry.v1.DaemonService.WatchNearby:output_type -> pasteferry.v1.NearbyDevices- 29, // 74: pasteferry.v1.DaemonService.PairNearby:output_type -> pasteferry.v1.RedeemPairingCodeResponse- 36, // 75: pasteferry.v1.DaemonService.GetConfig:output_type -> pasteferry.v1.Config- 36, // 76: pasteferry.v1.DaemonService.UpdateConfig:output_type -> pasteferry.v1.Config- 42, // 77: pasteferry.v1.DaemonService.GetStatus:output_type -> pasteferry.v1.Status- 6, // 78: pasteferry.v1.DaemonService.RequestClipboardPermission:output_type -> pasteferry.v1.Empty- 6, // 79: pasteferry.v1.DaemonService.RequestLocalNetworkPermission:output_type -> pasteferry.v1.Empty- 13, // 80: pasteferry.v1.DaemonService.GetNotificationStatus:output_type -> pasteferry.v1.NotificationStatus- 13, // 81: pasteferry.v1.DaemonService.RequestNotificationPermission:output_type -> pasteferry.v1.NotificationStatus- 6, // 82: pasteferry.v1.DaemonService.ActivateNotification:output_type -> pasteferry.v1.Empty- 38, // 83: pasteferry.v1.DaemonService.GetNetwork:output_type -> pasteferry.v1.NetworkInfo- 51, // 84: pasteferry.v1.DaemonService.ExportDiagnostics:output_type -> pasteferry.v1.Diagnostics- 42, // 85: pasteferry.v1.DaemonService.SetVerboseLog:output_type -> pasteferry.v1.Status- 45, // 86: pasteferry.v1.DaemonService.CheckForUpdate:output_type -> pasteferry.v1.UpdateInfo- 47, // 87: pasteferry.v1.DaemonService.DownloadUpdate:output_type -> pasteferry.v1.UpdateProgress- 6, // 88: pasteferry.v1.DaemonService.InstallUpdate:output_type -> pasteferry.v1.Empty- 8, // 89: pasteferry.v1.DaemonService.SetFavorite:output_type -> pasteferry.v1.ClipRecord- 23, // 90: pasteferry.v1.DaemonService.GetClipDetail:output_type -> pasteferry.v1.ClipDetail- 25, // 91: pasteferry.v1.DaemonService.QuickPasteSession:output_type -> pasteferry.v1.QuickPasteCommand- 24, // 92: pasteferry.v1.DaemonService.GetQuickPasteStatus:output_type -> pasteferry.v1.QuickPasteStatus- 6, // 93: pasteferry.v1.DaemonService.SendQuickPasteCommand:output_type -> pasteferry.v1.Empty- 61, // [61:94] is the sub-list for method output_type- 28, // [28:61] is the sub-list for method input_type+ 23, // 57: pasteferry.v1.DaemonService.GetClipDetail:input_type -> pasteferry.v1.GetClipDetailRequest+ 22, // 58: pasteferry.v1.DaemonService.SetAlias:input_type -> pasteferry.v1.SetAliasRequest+ 25, // 59: pasteferry.v1.DaemonService.QuickPasteSession:input_type -> pasteferry.v1.QuickPasteStatus+ 6, // 60: pasteferry.v1.DaemonService.GetQuickPasteStatus:input_type -> pasteferry.v1.Empty+ 26, // 61: pasteferry.v1.DaemonService.SendQuickPasteCommand:input_type -> pasteferry.v1.QuickPasteCommand+ 12, // 62: pasteferry.v1.DaemonService.Subscribe:output_type -> pasteferry.v1.Event+ 17, // 63: pasteferry.v1.DaemonService.ListHistory:output_type -> pasteferry.v1.ListHistoryResponse+ 6, // 64: pasteferry.v1.DaemonService.DeleteHistory:output_type -> pasteferry.v1.Empty+ 6, // 65: pasteferry.v1.DaemonService.Fetch:output_type -> pasteferry.v1.Empty+ 6, // 66: pasteferry.v1.DaemonService.ApplyToClipboard:output_type -> pasteferry.v1.Empty+ 55, // 67: pasteferry.v1.DaemonService.GetImagePreview:output_type -> pasteferry.v1.GetImagePreviewResponse+ 27, // 68: pasteferry.v1.DaemonService.ListDevices:output_type -> pasteferry.v1.ListDevicesResponse+ 28, // 69: pasteferry.v1.DaemonService.CreatePairingCode:output_type -> pasteferry.v1.CreatePairingCodeResponse+ 30, // 70: pasteferry.v1.DaemonService.RedeemPairingCode:output_type -> pasteferry.v1.RedeemPairingCodeResponse+ 6, // 71: pasteferry.v1.DaemonService.ConfirmPairing:output_type -> pasteferry.v1.Empty+ 6, // 72: pasteferry.v1.DaemonService.Unpair:output_type -> pasteferry.v1.Empty+ 6, // 73: pasteferry.v1.DaemonService.SetDeviceAddress:output_type -> pasteferry.v1.Empty+ 33, // 74: pasteferry.v1.DaemonService.WatchNearby:output_type -> pasteferry.v1.NearbyDevices+ 30, // 75: pasteferry.v1.DaemonService.PairNearby:output_type -> pasteferry.v1.RedeemPairingCodeResponse+ 37, // 76: pasteferry.v1.DaemonService.GetConfig:output_type -> pasteferry.v1.Config+ 37, // 77: pasteferry.v1.DaemonService.UpdateConfig:output_type -> pasteferry.v1.Config+ 43, // 78: pasteferry.v1.DaemonService.GetStatus:output_type -> pasteferry.v1.Status+ 6, // 79: pasteferry.v1.DaemonService.RequestClipboardPermission:output_type -> pasteferry.v1.Empty+ 6, // 80: pasteferry.v1.DaemonService.RequestLocalNetworkPermission:output_type -> pasteferry.v1.Empty+ 13, // 81: pasteferry.v1.DaemonService.GetNotificationStatus:output_type -> pasteferry.v1.NotificationStatus+ 13, // 82: pasteferry.v1.DaemonService.RequestNotificationPermission:output_type -> pasteferry.v1.NotificationStatus+ 6, // 83: pasteferry.v1.DaemonService.ActivateNotification:output_type -> pasteferry.v1.Empty+ 39, // 84: pasteferry.v1.DaemonService.GetNetwork:output_type -> pasteferry.v1.NetworkInfo+ 52, // 85: pasteferry.v1.DaemonService.ExportDiagnostics:output_type -> pasteferry.v1.Diagnostics+ 43, // 86: pasteferry.v1.DaemonService.SetVerboseLog:output_type -> pasteferry.v1.Status+ 46, // 87: pasteferry.v1.DaemonService.CheckForUpdate:output_type -> pasteferry.v1.UpdateInfo+ 48, // 88: pasteferry.v1.DaemonService.DownloadUpdate:output_type -> pasteferry.v1.UpdateProgress+ 6, // 89: pasteferry.v1.DaemonService.InstallUpdate:output_type -> pasteferry.v1.Empty+ 8, // 90: pasteferry.v1.DaemonService.SetFavorite:output_type -> pasteferry.v1.ClipRecord+ 24, // 91: pasteferry.v1.DaemonService.GetClipDetail:output_type -> pasteferry.v1.ClipDetail+ 8, // 92: pasteferry.v1.DaemonService.SetAlias:output_type -> pasteferry.v1.ClipRecord+ 26, // 93: pasteferry.v1.DaemonService.QuickPasteSession:output_type -> pasteferry.v1.QuickPasteCommand+ 25, // 94: pasteferry.v1.DaemonService.GetQuickPasteStatus:output_type -> pasteferry.v1.QuickPasteStatus+ 6, // 95: pasteferry.v1.DaemonService.SendQuickPasteCommand:output_type -> pasteferry.v1.Empty+ 62, // [62:96] is the sub-list for method output_type+ 28, // [28:62] is the sub-list for method input_type28, // [28:28] is the sub-list for extension type_name28, // [28:28] is the sub-list for extension extendee0, // [0:28] is the sub-list for field type_name@@ -4466,7 +4535,7 @@ func file_pasteferry_v1_daemon_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_pasteferry_v1_daemon_proto_rawDesc), len(file_pasteferry_v1_daemon_proto_rawDesc)),NumEnums: 6,- NumMessages: 49,+ NumMessages: 50,NumExtensions: 0,NumServices: 1,},diff --git a/proto/gen/pasteferry/v1/daemon_grpc.pb.go b/proto/gen/pasteferry/v1/daemon_grpc.pb.goindex f432c37..4ad59d6 100644--- a/proto/gen/pasteferry/v1/daemon_grpc.pb.go+++ b/proto/gen/pasteferry/v1/daemon_grpc.pb.go@@ -54,6 +54,7 @@ const (DaemonService_InstallUpdate_FullMethodName = "/pasteferry.v1.DaemonService/InstallUpdate"DaemonService_SetFavorite_FullMethodName = "/pasteferry.v1.DaemonService/SetFavorite"DaemonService_GetClipDetail_FullMethodName = "/pasteferry.v1.DaemonService/GetClipDetail"+ DaemonService_SetAlias_FullMethodName = "/pasteferry.v1.DaemonService/SetAlias"DaemonService_QuickPasteSession_FullMethodName = "/pasteferry.v1.DaemonService/QuickPasteSession"DaemonService_GetQuickPasteStatus_FullMethodName = "/pasteferry.v1.DaemonService/GetQuickPasteStatus"DaemonService_SendQuickPasteCommand_FullMethodName = "/pasteferry.v1.DaemonService/SendQuickPasteCommand"@@ -117,6 +118,8 @@ type DaemonServiceClient interface {SetFavorite(ctx context.Context, in *SetFavoriteRequest, opts ...grpc.CallOption) (*ClipRecord, error)// 悬停提示框要显示的完整内容。ClipRecord 的 text_preview 最多 120 个字、换行被压平,不够用GetClipDetail(ctx context.Context, in *GetClipDetailRequest, opts ...grpc.CallOption) (*ClipDetail, error)+ // 给收藏起个别名,列表里显示别名、搜索也认它。alias 为空表示去掉别名+ SetAlias(ctx context.Context, in *SetAliasRequest, opts ...grpc.CallOption) (*ClipRecord, error)// 快捷粘贴窗口进程启动后一直保持这个调用:往上报自己的状态,往下收设置页发来的命令。// 调用断开就当作快捷窗口没在运行QuickPasteSession(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[QuickPasteStatus, QuickPasteCommand], error)@@ -461,6 +464,16 @@ func (c *daemonServiceClient) GetClipDetail(ctx context.Context, in *GetClipDetareturn out, nil}+func (c *daemonServiceClient) SetAlias(ctx context.Context, in *SetAliasRequest, opts ...grpc.CallOption) (*ClipRecord, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(ClipRecord)+ err := c.cc.Invoke(ctx, DaemonService_SetAlias_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}+func (c *daemonServiceClient) QuickPasteSession(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[QuickPasteStatus, QuickPasteCommand], error) {cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)stream, err := c.cc.NewStream(ctx, &DaemonService_ServiceDesc.Streams[3], DaemonService_QuickPasteSession_FullMethodName, cOpts...)@@ -552,6 +565,8 @@ type DaemonServiceServer interface {SetFavorite(context.Context, *SetFavoriteRequest) (*ClipRecord, error)// 悬停提示框要显示的完整内容。ClipRecord 的 text_preview 最多 120 个字、换行被压平,不够用GetClipDetail(context.Context, *GetClipDetailRequest) (*ClipDetail, error)+ // 给收藏起个别名,列表里显示别名、搜索也认它。alias 为空表示去掉别名+ SetAlias(context.Context, *SetAliasRequest) (*ClipRecord, error)// 快捷粘贴窗口进程启动后一直保持这个调用:往上报自己的状态,往下收设置页发来的命令。// 调用断开就当作快捷窗口没在运行QuickPasteSession(grpc.BidiStreamingServer[QuickPasteStatus, QuickPasteCommand]) error@@ -659,6 +674,9 @@ func (UnimplementedDaemonServiceServer) SetFavorite(context.Context, *SetFavoritfunc (UnimplementedDaemonServiceServer) GetClipDetail(context.Context, *GetClipDetailRequest) (*ClipDetail, error) {return nil, status.Error(codes.Unimplemented, "method GetClipDetail not implemented")}+func (UnimplementedDaemonServiceServer) SetAlias(context.Context, *SetAliasRequest) (*ClipRecord, error) {+ return nil, status.Error(codes.Unimplemented, "method SetAlias not implemented")+}func (UnimplementedDaemonServiceServer) QuickPasteSession(grpc.BidiStreamingServer[QuickPasteStatus, QuickPasteCommand]) error {return status.Error(codes.Unimplemented, "method QuickPasteSession not implemented")}@@ -1208,6 +1226,24 @@ func _DaemonService_GetClipDetail_Handler(srv interface{}, ctx context.Context,return interceptor(ctx, in, info, handler)}+func _DaemonService_SetAlias_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(SetAliasRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(DaemonServiceServer).SetAlias(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: DaemonService_SetAlias_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(DaemonServiceServer).SetAlias(ctx, req.(*SetAliasRequest))+ }+ return interceptor(ctx, in, info, handler)+}+func _DaemonService_QuickPasteSession_Handler(srv interface{}, stream grpc.ServerStream) error {return srv.(DaemonServiceServer).QuickPasteSession(&grpc.GenericServerStream[QuickPasteStatus, QuickPasteCommand]{ServerStream: stream})}@@ -1366,6 +1402,10 @@ var DaemonService_ServiceDesc = grpc.ServiceDesc{MethodName: "GetClipDetail",Handler: _DaemonService_GetClipDetail_Handler,},+ {+ MethodName: "SetAlias",+ Handler: _DaemonService_SetAlias_Handler,+ },{MethodName: "GetQuickPasteStatus",Handler: _DaemonService_GetQuickPasteStatus_Handler,diff --git a/proto/pasteferry/v1/daemon.proto b/proto/pasteferry/v1/daemon.protoindex 79b8e0d..77f3f03 100644--- a/proto/pasteferry/v1/daemon.proto+++ b/proto/pasteferry/v1/daemon.proto@@ -74,6 +74,8 @@ service DaemonService {rpc SetFavorite(SetFavoriteRequest) returns (ClipRecord);// 悬停提示框要显示的完整内容。ClipRecord 的 text_preview 最多 120 个字、换行被压平,不够用rpc GetClipDetail(GetClipDetailRequest) returns (ClipDetail);+ // 给收藏起个别名,列表里显示别名、搜索也认它。alias 为空表示去掉别名+ rpc SetAlias(SetAliasRequest) returns (ClipRecord);// 快捷粘贴窗口进程启动后一直保持这个调用:往上报自己的状态,往下收设置页发来的命令。// 调用断开就当作快捷窗口没在运行@@ -140,6 +142,8 @@ message ClipRecord {int64 favorited_at_unix = 16;// 整条文字就是一个 http(s) 网址bool is_link = 17;+ // 用户给收藏起的别名,空表示没有。只有收藏有+ string alias = 18;}// ─────────────────────────── 事件流 ───────────────────────────@@ -277,6 +281,11 @@ message SetFavoriteRequest {bool favorite = 2;}+message SetAliasRequest {+ string clip_id = 1;+ string alias = 2;+}+message GetClipDetailRequest {string clip_id = 1;}diff --git a/ui/lib/app_state.dart b/ui/lib/app_state.dartindex c56ee27..2769fc2 100644--- a/ui/lib/app_state.dart+++ b/ui/lib/app_state.dart@@ -713,6 +713,15 @@ class AppState extends ChangeNotifier implements RecordDetails {return r;}+ /// 给收藏起别名,[alias] 为空表示去掉。+ Future<ClipRecord> setAlias(String clipId, String alias) async {+ final r = await _client.setAlias(SetAliasRequest(clipId: clipId, alias: alias));+ _upsert(r);+ _favoriteSearch.patch(r);+ notifyListeners();+ return r;+ }+/// 悬停提示框要显示的完整内容。@overrideFuture<ClipDetail> clipDetail(String clipId) async {@@ -906,6 +915,7 @@ class _RecordSearch {/// 只在后台服务不支持搜索时用;正常情况下由后台服务按全文搜索。bool matchesSearch(ClipRecord r, String query) {final q = query.toLowerCase();+ if (r.favorite && r.alias.toLowerCase().contains(q)) return true;if (r.kind != ClipKind.CLIP_KIND_IMAGE &&r.items.any((i) => i.name.toLowerCase().contains(q))) {return true;diff --git a/ui/lib/gen/pasteferry/v1/daemon.pb.dart b/ui/lib/gen/pasteferry/v1/daemon.pb.dartindex a846839..485eb13 100644--- a/ui/lib/gen/pasteferry/v1/daemon.pb.dart+++ b/ui/lib/gen/pasteferry/v1/daemon.pb.dart@@ -170,6 +170,7 @@ class ClipRecord extends $pb.GeneratedMessage {$core.bool? favorited,$fixnum.Int64? favoritedAtUnix,$core.bool? isLink,+ $core.String? alias,}) {final result = ClipRecord._();if (id != null) result.id = id;@@ -189,6 +190,7 @@ class ClipRecord extends $pb.GeneratedMessage {if (favorited != null) result.favorited = favorited;if (favoritedAtUnix != null) result.favoritedAtUnix = favoritedAtUnix;if (isLink != null) result.isLink = isLink;+ if (alias != null) result.alias = alias;return result;}@@ -225,6 +227,7 @@ class ClipRecord extends $pb.GeneratedMessage {..aOB(15, _omitFieldNames ? '' : 'favorited')..aInt64(16, _omitFieldNames ? '' : 'favoritedAtUnix')..aOB(17, _omitFieldNames ? '' : 'isLink')+ ..aOS(18, _omitFieldNames ? '' : 'alias')..hasRequiredFields = false;@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')@@ -398,6 +401,16 @@ class ClipRecord extends $pb.GeneratedMessage {$core.bool hasIsLink() => $_has(16);@$pb.TagNumber(17)void clearIsLink() => $_clearField(17);++ /// 用户给收藏起的别名,空表示没有。只有收藏有+ @$pb.TagNumber(18)+ $core.String get alias => $_getSZ(17);+ @$pb.TagNumber(18)+ set alias($core.String value) => $_setString(17, value);+ @$pb.TagNumber(18)+ $core.bool hasAlias() => $_has(17);+ @$pb.TagNumber(18)+ void clearAlias() => $_clearField(18);}class SubscribeRequest extends $pb.GeneratedMessage {@@ -1634,6 +1647,75 @@ class SetFavoriteRequest extends $pb.GeneratedMessage {void clearFavorite() => $_clearField(2);}+class SetAliasRequest extends $pb.GeneratedMessage {+ factory SetAliasRequest({+ $core.String? clipId,+ $core.String? alias,+ }) {+ final result = SetAliasRequest._();+ if (clipId != null) result.clipId = clipId;+ if (alias != null) result.alias = alias;+ return result;+ }++ SetAliasRequest._();++ factory SetAliasRequest.fromBuffer($core.List<$core.int> data,+ [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>+ SetAliasRequest()..mergeFromBuffer(data, registry);+ factory SetAliasRequest.fromJson($core.String json,+ [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) =>+ SetAliasRequest()..mergeFromJson(json, registry);++ static final $pb.BuilderInfo _i = $pb.BuilderInfo(+ _omitMessageNames ? '' : 'SetAliasRequest',+ package: const $pb.PackageName(_omitMessageNames ? '' : 'pasteferry.v1'),+ createEmptyInstance: SetAliasRequest.$_createMessage)+ ..aOS(1, _omitFieldNames ? '' : 'clipId')+ ..aOS(2, _omitFieldNames ? '' : 'alias')+ ..hasRequiredFields = false;++ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')+ SetAliasRequest clone() => deepCopy();+ @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')+ SetAliasRequest copyWith(void Function(SetAliasRequest) updates) =>+ super.copyWith((message) => updates(message as SetAliasRequest))+ as SetAliasRequest;++ @$core.override+ $pb.BuilderInfo get info_ => _i;++ @$core.pragma('dart2js:noInline')+ @$core.Deprecated('Use SetAliasRequest() / SetAliasRequest.new instead')+ static SetAliasRequest create() => SetAliasRequest._();+ static $pb.GeneratedMessage $_createMessage() => SetAliasRequest._();+ @$core.override+ SetAliasRequest createEmptyInstance() => SetAliasRequest._();+ @$core.pragma('dart2js:noInline')+ static SetAliasRequest getDefault() =>+ _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SetAliasRequest>(+ SetAliasRequest.$_createMessage);+ static SetAliasRequest? _defaultInstance;++ @$pb.TagNumber(1)+ $core.String get clipId => $_getSZ(0);+ @$pb.TagNumber(1)+ set clipId($core.String value) => $_setString(0, value);+ @$pb.TagNumber(1)+ $core.bool hasClipId() => $_has(0);+ @$pb.TagNumber(1)+ void clearClipId() => $_clearField(1);++ @$pb.TagNumber(2)+ $core.String get alias => $_getSZ(1);+ @$pb.TagNumber(2)+ set alias($core.String value) => $_setString(1, value);+ @$pb.TagNumber(2)+ $core.bool hasAlias() => $_has(1);+ @$pb.TagNumber(2)+ void clearAlias() => $_clearField(2);+}+class GetClipDetailRequest extends $pb.GeneratedMessage {factory GetClipDetailRequest({$core.String? clipId,diff --git a/ui/lib/gen/pasteferry/v1/daemon.pbgrpc.dart b/ui/lib/gen/pasteferry/v1/daemon.pbgrpc.dartindex 6d768ae..0b0f478 100644--- a/ui/lib/gen/pasteferry/v1/daemon.pbgrpc.dart+++ b/ui/lib/gen/pasteferry/v1/daemon.pbgrpc.dart@@ -275,6 +275,14 @@ class DaemonServiceClient extends $grpc.Client {return $createUnaryCall(_$getClipDetail, request, options: options);}+ /// 给收藏起个别名,列表里显示别名、搜索也认它。alias 为空表示去掉别名+ $grpc.ResponseFuture<$0.ClipRecord> setAlias(+ $0.SetAliasRequest request, {+ $grpc.CallOptions? options,+ }) {+ return $createUnaryCall(_$setAlias, request, options: options);+ }+/// 快捷粘贴窗口进程启动后一直保持这个调用:往上报自己的状态,往下收设置页发来的命令。/// 调用断开就当作快捷窗口没在运行$grpc.ResponseStream<$0.QuickPasteCommand> quickPasteSession(@@ -444,6 +452,11 @@ class DaemonServiceClient extends $grpc.Client {'/pasteferry.v1.DaemonService/GetClipDetail',($0.GetClipDetailRequest value) => value.writeToBuffer(),$0.ClipDetail.fromBuffer);+ static final _$setAlias =+ $grpc.ClientMethod<$0.SetAliasRequest, $0.ClipRecord>(+ '/pasteferry.v1.DaemonService/SetAlias',+ ($0.SetAliasRequest value) => value.writeToBuffer(),+ $0.ClipRecord.fromBuffer);static final _$quickPasteSession =$grpc.ClientMethod<$0.QuickPasteStatus, $0.QuickPasteCommand>('/pasteferry.v1.DaemonService/QuickPasteSession',@@ -696,6 +709,13 @@ abstract class DaemonServiceBase extends $grpc.Service {($core.List<$core.int> value) =>$0.GetClipDetailRequest.fromBuffer(value),($0.ClipDetail value) => value.writeToBuffer()));+ $addMethod($grpc.ServiceMethod<$0.SetAliasRequest, $0.ClipRecord>(+ 'SetAlias',+ setAlias_Pre,+ false,+ false,+ ($core.List<$core.int> value) => $0.SetAliasRequest.fromBuffer(value),+ ($0.ClipRecord value) => value.writeToBuffer()));$addMethod($grpc.ServiceMethod<$0.QuickPasteStatus, $0.QuickPasteCommand>('QuickPasteSession',quickPasteSession,@@ -960,6 +980,14 @@ abstract class DaemonServiceBase extends $grpc.Service {$async.Future<$0.ClipDetail> getClipDetail($grpc.ServiceCall call, $0.GetClipDetailRequest request);+ $async.Future<$0.ClipRecord> setAlias_Pre($grpc.ServiceCall $call,+ $async.Future<$0.SetAliasRequest> $request) async {+ return setAlias($call, await $request);+ }++ $async.Future<$0.ClipRecord> setAlias(+ $grpc.ServiceCall call, $0.SetAliasRequest request);+$async.Stream<$0.QuickPasteCommand> quickPasteSession($grpc.ServiceCall call, $async.Stream<$0.QuickPasteStatus> request);diff --git a/ui/lib/gen/pasteferry/v1/daemon.pbjson.dart b/ui/lib/gen/pasteferry/v1/daemon.pbjson.dartindex f1ee33e..51c40bf 100644--- a/ui/lib/gen/pasteferry/v1/daemon.pbjson.dart+++ b/ui/lib/gen/pasteferry/v1/daemon.pbjson.dart@@ -205,6 +205,7 @@ const ClipRecord$json = {'10': 'favoritedAtUnix'},{'1': 'is_link', '3': 17, '4': 1, '5': 8, '10': 'isLink'},+ {'1': 'alias', '3': 18, '4': 1, '5': 9, '10': 'alias'},],};@@ -221,7 +222,7 @@ final $typed_data.Uint8List clipRecordDescriptor = $convert.base64Decode('IAEoCVIFZXJyb3ISHwoLaW1hZ2VfY291bnQYDSABKAVSCmltYWdlQ291bnQSGgoIZmF2b3JpdG''UYDiABKAhSCGZhdm9yaXRlEhwKCWZhdm9yaXRlZBgPIAEoCFIJZmF2b3JpdGVkEioKEWZhdm9y''aXRlZF9hdF91bml4GBAgASgDUg9mYXZvcml0ZWRBdFVuaXgSFwoHaXNfbGluaxgRIAEoCFIGaX'- 'NMaW5r');+ 'NMaW5rEhQKBWFsaWFzGBIgASgJUgVhbGlhcw==');@$core.Deprecated('Use subscribeRequestDescriptor instead')const SubscribeRequest$json = {@@ -567,6 +568,20 @@ final $typed_data.Uint8List setFavoriteRequestDescriptor = $convert.base64Decode'ChJTZXRGYXZvcml0ZVJlcXVlc3QSFwoHY2xpcF9pZBgBIAEoCVIGY2xpcElkEhoKCGZhdm9yaX''RlGAIgASgIUghmYXZvcml0ZQ==');+@$core.Deprecated('Use setAliasRequestDescriptor instead')+const SetAliasRequest$json = {+ '1': 'SetAliasRequest',+ '2': [+ {'1': 'clip_id', '3': 1, '4': 1, '5': 9, '10': 'clipId'},+ {'1': 'alias', '3': 2, '4': 1, '5': 9, '10': 'alias'},+ ],+};++/// Descriptor for `SetAliasRequest`. Decode as a `google.protobuf.DescriptorProto`.+final $typed_data.Uint8List setAliasRequestDescriptor = $convert.base64Decode(+ 'Cg9TZXRBbGlhc1JlcXVlc3QSFwoHY2xpcF9pZBgBIAEoCVIGY2xpcElkEhQKBWFsaWFzGAIgAS'+ 'gJUgVhbGlhcw==');+@$core.Deprecated('Use getClipDetailRequestDescriptor instead')const GetClipDetailRequest$json = {'1': 'GetClipDetailRequest',diff --git a/ui/lib/icons.dart b/ui/lib/icons.dartindex 0fba2ce..e3d0801 100644--- a/ui/lib/icons.dart+++ b/ui/lib/icons.dart@@ -24,6 +24,7 @@ abstract final class AppIcons {static IconData get search => _pick(CupertinoIcons.search, FluentIcons.search_24_regular);static IconData get arrowDownCircle =>_pick(CupertinoIcons.arrow_down_circle, FluentIcons.arrow_circle_down_24_regular);+ static IconData get pencil => _pick(CupertinoIcons.pencil, FluentIcons.edit_24_regular);static IconData get arrowClockwise =>_pick(CupertinoIcons.arrow_clockwise, FluentIcons.arrow_clockwise_24_regular);// 搜索框里的清除按钮:实心圆里一个叉,与系统的搜索框一致diff --git a/ui/lib/l10n/app_en.arb b/ui/lib/l10n/app_en.arbindex 0bc34c7..adb50b2 100644--- a/ui/lib/l10n/app_en.arb+++ b/ui/lib/l10n/app_en.arb@@ -901,5 +901,10 @@"type": "String"}}- }+ },+ "renameAction": "Rename",+ "renameFavoriteTitle": "Rename favorite",+ "renameFavoriteHint": "Shown in Favorites and Quick paste, and you can search for it. Leave it empty to show the content again.",+ "renamedToast": "Renamed",+ "aliasClearedToast": "Showing the content again"}diff --git a/ui/lib/l10n/app_ja.arb b/ui/lib/l10n/app_ja.arbindex e323f1f..b08a26a 100644--- a/ui/lib/l10n/app_ja.arb+++ b/ui/lib/l10n/app_ja.arb@@ -384,5 +384,10 @@"notifyFailedTitle": "受信できませんでした","notifyFailedBody": "{name}\n{error}\nこの通知または履歴から再試行できます。","notifyClipboardFailedTitle": "受信済みですがクリップボードを更新できませんでした",- "notifyClipboardFailedBody": "{name}\n{error}\nこの通知または履歴からクリップボードに入れて再試行できます。"+ "notifyClipboardFailedBody": "{name}\n{error}\nこの通知または履歴からクリップボードに入れて再試行できます。",+ "renameAction": "名前を変更",+ "renameFavoriteTitle": "お気に入りの名前を変更",+ "renameFavoriteHint": "お気に入りとクイックペーストにこの名前が表示され、検索でも見つかります。空欄にすると内容の表示に戻ります。",+ "renamedToast": "名前を変更しました",+ "aliasClearedToast": "内容の表示に戻しました"}diff --git a/ui/lib/l10n/app_localizations.dart b/ui/lib/l10n/app_localizations.dartindex c5993ec..0908b02 100644--- a/ui/lib/l10n/app_localizations.dart+++ b/ui/lib/l10n/app_localizations.dart@@ -2419,6 +2419,36 @@ abstract class AppLocalizations {/// In en, this message translates to:/// **'{name}\n{error}\nUse Copy to clipboard to try again, here or in History.'**String notifyClipboardFailedBody(String name, String error);++ /// No description provided for @renameAction.+ ///+ /// In en, this message translates to:+ /// **'Rename'**+ String get renameAction;++ /// No description provided for @renameFavoriteTitle.+ ///+ /// In en, this message translates to:+ /// **'Rename favorite'**+ String get renameFavoriteTitle;++ /// No description provided for @renameFavoriteHint.+ ///+ /// In en, this message translates to:+ /// **'Shown in Favorites and Quick paste, and you can search for it. Leave it empty to show the content again.'**+ String get renameFavoriteHint;++ /// No description provided for @renamedToast.+ ///+ /// In en, this message translates to:+ /// **'Renamed'**+ String get renamedToast;++ /// No description provided for @aliasClearedToast.+ ///+ /// In en, this message translates to:+ /// **'Showing the content again'**+ String get aliasClearedToast;}class _AppLocalizationsDelegatediff --git a/ui/lib/l10n/app_localizations_en.dart b/ui/lib/l10n/app_localizations_en.dartindex e4598bf..9bd6e0d 100644--- a/ui/lib/l10n/app_localizations_en.dart+++ b/ui/lib/l10n/app_localizations_en.dart@@ -1452,4 +1452,20 @@ class AppLocalizationsEn extends AppLocalizations {String notifyClipboardFailedBody(String name, String error) {return '$name\n$error\nUse Copy to clipboard to try again, here or in History.';}++ @override+ String get renameAction => 'Rename';++ @override+ String get renameFavoriteTitle => 'Rename favorite';++ @override+ String get renameFavoriteHint =>+ 'Shown in Favorites and Quick paste, and you can search for it. Leave it empty to show the content again.';++ @override+ String get renamedToast => 'Renamed';++ @override+ String get aliasClearedToast => 'Showing the content again';}diff --git a/ui/lib/l10n/app_localizations_ja.dart b/ui/lib/l10n/app_localizations_ja.dartindex fa40c80..3ca4ba2 100644--- a/ui/lib/l10n/app_localizations_ja.dart+++ b/ui/lib/l10n/app_localizations_ja.dart@@ -1330,4 +1330,20 @@ class AppLocalizationsJa extends AppLocalizations {String notifyClipboardFailedBody(String name, String error) {return '$name\n$error\nこの通知または履歴からクリップボードに入れて再試行できます。';}++ @override+ String get renameAction => '名前を変更';++ @override+ String get renameFavoriteTitle => 'お気に入りの名前を変更';++ @override+ String get renameFavoriteHint =>+ 'お気に入りとクイックペーストにこの名前が表示され、検索でも見つかります。空欄にすると内容の表示に戻ります。';++ @override+ String get renamedToast => '名前を変更しました';++ @override+ String get aliasClearedToast => '内容の表示に戻しました';}diff --git a/ui/lib/l10n/app_localizations_zh.dart b/ui/lib/l10n/app_localizations_zh.dartindex a3079e7..2ceac9a 100644--- a/ui/lib/l10n/app_localizations_zh.dart+++ b/ui/lib/l10n/app_localizations_zh.dart@@ -1314,6 +1314,21 @@ class AppLocalizationsZh extends AppLocalizations {String notifyClipboardFailedBody(String name, String error) {return '$name\n$error\n可从此通知或复制记录重新放入剪贴板。';}++ @override+ String get renameAction => '重命名';++ @override+ String get renameFavoriteTitle => '重命名收藏';++ @override+ String get renameFavoriteHint => '收藏和快捷粘贴里显示这个名字,搜索也能找到它。留空则恢复显示内容。';++ @override+ String get renamedToast => '已重命名';++ @override+ String get aliasClearedToast => '已恢复显示内容';}/// The translations for Chinese, as used in Hong Kong, using the Han script (`zh_Hant_HK`).@@ -2626,6 +2641,21 @@ class AppLocalizationsZhHantHk extends AppLocalizationsZh {String notifyClipboardFailedBody(String name, String error) {return '$name\n$error\n可從此通知或複製記錄重新放入剪貼簿。';}++ @override+ String get renameAction => '重新命名';++ @override+ String get renameFavoriteTitle => '重新命名收藏';++ @override+ String get renameFavoriteHint => '收藏和快速貼上裡顯示這個名稱,搜尋也找得到。留空則恢復顯示內容。';++ @override+ String get renamedToast => '已重新命名';++ @override+ String get aliasClearedToast => '已恢復顯示內容';}/// The translations for Chinese, as used in Taiwan, using the Han script (`zh_Hant_TW`).@@ -3938,4 +3968,19 @@ class AppLocalizationsZhHantTw extends AppLocalizationsZh {String notifyClipboardFailedBody(String name, String error) {return '$name\n$error\n可從此通知或複製記錄重新放入剪貼簿。';}++ @override+ String get renameAction => '重新命名';++ @override+ String get renameFavoriteTitle => '重新命名收藏';++ @override+ String get renameFavoriteHint => '收藏和快速貼上裡顯示這個名稱,搜尋也找得到。留空則恢復顯示內容。';++ @override+ String get renamedToast => '已重新命名';++ @override+ String get aliasClearedToast => '已恢復顯示內容';}diff --git a/ui/lib/l10n/app_zh.arb b/ui/lib/l10n/app_zh.arbindex 0ca5951..366f0ae 100644--- a/ui/lib/l10n/app_zh.arb+++ b/ui/lib/l10n/app_zh.arb@@ -384,5 +384,10 @@"notifyFailedTitle": "接收失败","notifyFailedBody": "{name}\n{error}\n可从此通知或复制记录重试。","notifyClipboardFailedTitle": "已接收,但未能写入剪贴板",- "notifyClipboardFailedBody": "{name}\n{error}\n可从此通知或复制记录重新放入剪贴板。"+ "notifyClipboardFailedBody": "{name}\n{error}\n可从此通知或复制记录重新放入剪贴板。",+ "renameAction": "重命名",+ "renameFavoriteTitle": "重命名收藏",+ "renameFavoriteHint": "收藏和快捷粘贴里显示这个名字,搜索也能找到它。留空则恢复显示内容。",+ "renamedToast": "已重命名",+ "aliasClearedToast": "已恢复显示内容"}diff --git a/ui/lib/l10n/app_zh_Hant_HK.arb b/ui/lib/l10n/app_zh_Hant_HK.arbindex f3e7371..e4765b7 100644--- a/ui/lib/l10n/app_zh_Hant_HK.arb+++ b/ui/lib/l10n/app_zh_Hant_HK.arb@@ -384,5 +384,10 @@"notifyFailedTitle": "接收失敗","notifyFailedBody": "{name}\n{error}\n可從此通知或複製記錄重試。","notifyClipboardFailedTitle": "已接收,但無法寫入剪貼簿",- "notifyClipboardFailedBody": "{name}\n{error}\n可從此通知或複製記錄重新放入剪貼簿。"+ "notifyClipboardFailedBody": "{name}\n{error}\n可從此通知或複製記錄重新放入剪貼簿。",+ "renameAction": "重新命名",+ "renameFavoriteTitle": "重新命名收藏",+ "renameFavoriteHint": "收藏和快速貼上裡顯示這個名稱,搜尋也找得到。留空則恢復顯示內容。",+ "renamedToast": "已重新命名",+ "aliasClearedToast": "已恢復顯示內容"}diff --git a/ui/lib/l10n/app_zh_Hant_TW.arb b/ui/lib/l10n/app_zh_Hant_TW.arbindex 43fde99..2bc28ec 100644--- a/ui/lib/l10n/app_zh_Hant_TW.arb+++ b/ui/lib/l10n/app_zh_Hant_TW.arb@@ -384,5 +384,10 @@"notifyFailedTitle": "接收失敗","notifyFailedBody": "{name}\n{error}\n可從此通知或複製記錄重試。","notifyClipboardFailedTitle": "已接收,但無法寫入剪貼簿",- "notifyClipboardFailedBody": "{name}\n{error}\n可從此通知或複製記錄重新放入剪貼簿。"+ "notifyClipboardFailedBody": "{name}\n{error}\n可從此通知或複製記錄重新放入剪貼簿。",+ "renameAction": "重新命名",+ "renameFavoriteTitle": "重新命名收藏",+ "renameFavoriteHint": "收藏和快速貼上裡顯示這個名稱,搜尋也找得到。留空則恢復顯示內容。",+ "renamedToast": "已重新命名",+ "aliasClearedToast": "已恢復顯示內容"}diff --git a/ui/lib/pages/favorites_page.dart b/ui/lib/pages/favorites_page.dartindex 84380f0..9ed9788 100644--- a/ui/lib/pages/favorites_page.dart+++ b/ui/lib/pages/favorites_page.dart@@ -246,6 +246,18 @@ class _FavoriteRowState extends State<_FavoriteRow> {tooltip: l.unfavoriteAction,onTap: () => toggleFavorite(context, AppScope.read(context), r),);+ // 重命名:悬停时才显示,和「放进剪贴板」一样不占眼+ final rename = Visibility(+ visible: _hovered,+ maintainSize: true,+ maintainAnimation: true,+ maintainState: true,+ child: IconAction(+ icon: AppIcons.pencil,+ tooltip: l.renameAction,+ onTap: () => renameFavorite(context, AppScope.read(context), r),+ ),+ );switch (r.status) {case ClipStatus.CLIP_STATUS_FETCHING:return Row(@@ -253,6 +265,7 @@ class _FavoriteRowState extends State<_FavoriteRow> {children: [const SizedBox(width: 72, child: LinearProgressIndicator(minHeight: 3)),const SizedBox(width: Insets.sm),+ rename,unfavorite,],);@@ -266,6 +279,7 @@ class _FavoriteRowState extends State<_FavoriteRow> {child: Text(l.retry),),const SizedBox(width: Insets.xs),+ rename,unfavorite,],);@@ -283,6 +297,7 @@ class _FavoriteRowState extends State<_FavoriteRow> {child: Text(l.putOnClipboard),),),+ rename,unfavorite,],);diff --git a/ui/lib/records.dart b/ui/lib/records.dartindex 28d8eee..34721a3 100644--- a/ui/lib/records.dart+++ b/ui/lib/records.dart@@ -44,9 +44,16 @@ IconData kindIcon(ClipRecord r) => switch (r.kind) {_ => AppIcons.questionCircle,};-/// 记录在列表里的标题。搜索时传入 [query]:一次复制了多个文件、搜到的又不是第一个时,+/// 记录在列表里的标题:起了别名的收藏显示别名,其他的见 [contentTitle]。+String recordTitle(ClipRecord r, {String? query}) =>+ hasAlias(r) ? r.alias : contentTitle(r, query: query);++/// 收藏起了别名。取消收藏后别名还留在后台服务里,只是不显示+bool hasAlias(ClipRecord r) => r.favorite && r.alias.isNotEmpty;++/// 按内容拼的标题。搜索时传入 [query]:一次复制了多个文件、搜到的又不是第一个时,/// 标题改用搜到的那个文件名打头,看得出为什么搜到了它。-String recordTitle(ClipRecord r, {String? query}) {+String contentTitle(ClipRecord r, {String? query}) {// 图片和文件的标题按当前界面语言拼:后台服务存下的摘要是写入时的中文,不会跟着换语言if (r.kind == ClipKind.CLIP_KIND_IMAGE) return appL10n.imageRecord;if (r.kind != ClipKind.CLIP_KIND_FILE && r.textPreview.isNotEmpty) {@@ -66,8 +73,9 @@ DateTime recordTime(ClipRecord r) => DateTime.fromMillisecondsSinceEpoch(r.creatDateTime favoritedTime(ClipRecord r) => DateTime.fromMillisecondsSinceEpoch(r.favoritedAtUnix.toInt() * 1000);-/// 列表里标题下面那一行:来源 · 大小 · 时间。收藏显示收藏时间。+/// 列表里标题下面那一行:来源 · 大小 · 时间。收藏显示收藏时间;起了别名的,最前面是按内容拼的标题。String recordMeta(ClipRecord r) => [+ if (hasAlias(r)) contentTitle(r),recordSource(r),if (r.totalSize > 0) humanBytes(r.totalSize.toInt()),r.favorite ? appL10n.favoritedAt(shortDate(favoritedTime(r))) : relativeTime(recordTime(r)),diff --git a/ui/lib/widgets/favorite_actions.dart b/ui/lib/widgets/favorite_actions.dartindex 3636ac5..a4af1e0 100644--- a/ui/lib/widgets/favorite_actions.dart+++ b/ui/lib/widgets/favorite_actions.dart@@ -6,6 +6,7 @@ import '../app_state.dart';import '../gen/pasteferry/v1/daemon.pb.dart';import '../i18n.dart';import '../platform.dart';+import '../records.dart';import 'common.dart';/// 要整份复制、超过这个大小时先确认。见 design/quick-paste-and-favorites.md 第 3.2 节。@@ -66,3 +67,75 @@ Future<bool> _confirmLargeCopy(BuildContext context, ClipRecord r) async {);return ok == true;}++/// 给收藏起别名(重命名)。清空后保存就恢复按内容显示的标题。+Future<void> renameFavorite(BuildContext context, AppState state, ClipRecord r) async {+ final l = context.l10n;+ final alias = await showDialog<String>(+ context: context,+ builder: (_) => _RenameDialog(record: r),+ );+ if (alias == null || alias.trim() == r.alias) return;+ try {+ await state.setAlias(r.id, alias);+ if (context.mounted) showToast(context, alias.trim().isEmpty ? l.aliasClearedToast : l.renamedToast);+ } catch (e) {+ if (context.mounted) showToast(context, AppState.describeError(e), error: true);+ }+}++class _RenameDialog extends StatefulWidget {+ const _RenameDialog({required this.record});++ final ClipRecord record;++ @override+ State<_RenameDialog> createState() => _RenameDialogState();+}++class _RenameDialogState extends State<_RenameDialog> {+ late final _name = TextEditingController(text: widget.record.alias)+ ..selection = TextSelection(baseOffset: 0, extentOffset: widget.record.alias.length);++ @override+ void dispose() {+ _name.dispose();+ super.dispose();+ }++ void _save() => Navigator.pop(context, _name.text);++ @override+ Widget build(BuildContext context) {+ final l = context.l10n;+ return AlertDialog(+ title: Text(l.renameFavoriteTitle),+ content: SizedBox(+ width: 360,+ child: Column(+ mainAxisSize: MainAxisSize.min,+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ TextField(+ controller: _name,+ autofocus: true,+ maxLength: 100,+ decoration: InputDecoration(+ // 没起过别名时,提示里是现在显示的标题+ hintText: contentTitle(widget.record),+ counterText: '',+ ),+ onSubmitted: (_) => _save(),+ ),+ const SizedBox(height: 8),+ Text(l.renameFavoriteHint, style: Theme.of(context).textTheme.bodySmall),+ ],+ ),+ ),+ actions: [+ OutlinedButton(onPressed: () => Navigator.pop(context), child: Text(l.cancel)),+ FilledButton(onPressed: _save, child: Text(l.save)),+ ],+ );+ }+}diff --git a/ui/test/favorites_test.dart b/ui/test/favorites_test.dartindex 5fa616b..eb8518c 100644--- a/ui/test/favorites_test.dart+++ b/ui/test/favorites_test.dart@@ -1,5 +1,6 @@import 'package:fixnum/fixnum.dart';import 'package:flutter/gestures.dart';+import 'package:flutter/material.dart';import 'package:flutter_test/flutter_test.dart';import 'package:pasteferry_ui/app_state.dart';@@ -41,6 +42,16 @@ class _FavState extends AppState {return back;}+ final aliasCalls = <(String, String)>[];++ @override+ Future<ClipRecord> setAlias(String clipId, String alias) async {+ aliasCalls.add((clipId, alias));+ final r = favorites.firstWhere((r) => r.id == clipId).deepCopy()..alias = alias.trim();+ debugEvent(Event(clipUpdated: r));+ return r;+ }+@overrideFuture<ClipDetail> requestClipDetail(String clipId) async {detailCalls.add(clipId);@@ -161,6 +172,43 @@ void main() {expect(state.calls.last, ('fav-of-text', true));});+ testWidgets('收藏可以重命名:列表显示别名,内容挪到第二行;留空恢复', (tester) async {+ final fav = _image.deepCopy()+ ..id = 'fav-of-image'+ ..favorite = true+ ..favoritedAtUnix = _now;+ final state = _seed(favorites: [fav]);+ await tester.pumpWidget(PasteFerryApp(state: state));+ await tester.pump();+ await tester.tap(find.text('收藏').first);+ await tester.pumpAndSettle();++ final mouse = await _hover(tester, find.textContaining('来自 Windows PC'));+ await tester.tap(find.byTooltip('重命名'));+ await tester.pumpAndSettle();+ expect(find.text('重命名收藏'), findsOneWidget);+ await tester.enterText(find.descendant(of: find.byType(AlertDialog), matching: find.byType(TextField)), ' 报销单截图 ');+ await tester.tap(find.text('保存'));+ await tester.pumpAndSettle();+ expect(state.aliasCalls.single, ('fav-of-image', ' 报销单截图 '));+ expect(find.text('报销单截图'), findsOneWidget);+ expect(find.textContaining('图片 · 来自 Windows PC'), findsOneWidget);+ expect(find.text('已重命名'), findsOneWidget);++ // 清空就恢复按内容显示+ await mouse.moveTo(tester.getCenter(find.text('报销单截图')));+ await tester.pump();+ await tester.tap(find.byTooltip('重命名'));+ await tester.pumpAndSettle();+ await tester.enterText(find.descendant(of: find.byType(AlertDialog), matching: find.byType(TextField)), '');+ await tester.tap(find.text('保存'));+ await tester.pumpAndSettle();+ expect(state.aliasCalls.last, ('fav-of-image', ''));+ expect(find.text('报销单截图'), findsNothing);+ expect(find.textContaining('图片 · '), findsNothing);+ expect(find.text('已恢复显示内容'), findsOneWidget);+ });+testWidgets('鼠标停一会儿显示完整内容,移开就消失', (tester) async {final state = _seed();await tester.pumpWidget(PasteFerryApp(state: state));