Skip to content

Commit 061ee05

Browse files
authored
Merge pull request #8 from raj457036/v0.1.23
V0.1.23
2 parents dd5c90d + 7209be6 commit 061ee05

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1416
-210
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[submodule "packages/copycat_pro"]
22
path = packages/copycat_pro
3-
url = git@github.com:raj457036/copycat_pro.git
3+
url = ssh://git@github.com:raj457036/copycat_pro.git
44
update = merge
55
[submodule "packages/copycat_base"]
66
path = packages/copycat_base
7-
url = git@github.com:raj457036/copycat_base.git
7+
url = ssh://git@github.com:raj457036/copycat_base.git
88
update = merge
99

ChangeLog.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
## 0.1.23 ( WIP )
2+
3+
#### Features
4+
5+
WIP
6+
7+
#### Bug Fixes
8+
9+
- Fix: Incorrect frequenent syncing error message toast when syncing files
10+
11+
## 0.1.22
12+
13+
#### Features
14+
15+
- 🎉 Drag and Drop ( Desktop and Ipad Os, Android will be coming in upcoming updates )
16+
- 🎉 Customization and Themings
17+
- 🎉 Advance filters by type, sub types, date range, sorting, etc. ( Feature request )
18+
- 🎉 New and polished user interface. ( Feature request )
19+
- 💪 Performance improvements when large amount of clips are synced and decrypted.
20+
- Toggling clipboard by clicking on the menu icon/tray icon. ( Feature request )
21+
- We fixed alot of bugs which you might have experienced.
22+
23+
#### Bug Fixes and Improvements
24+
25+
##### Windows
26+
27+
- File/Media copying from Explorer app not working as expected.
28+
29+
## 0.1.21
30+
31+
Enhancements Based on our Discord community and Feedback from users.
32+
33+
#### Critical Changes:
34+
35+
- Full Local Clipboard: All core features (except Syncing) are now available without requiring sign-in.
36+
37+
- Local End-to-End Encryption: Enhanced security for all users when using syncing.
38+
- Extensive Keyboard Shortcuts: Faster navigation with new keyboard shortcuts.
39+
- Home - Ctrl/Cmd + D
40+
- Search - Ctrl/Cmd + F
41+
- Collection - Ctrl/Cmd + C
42+
- Settings - Ctrl/Cmd + X
43+
- Paste - Ctrl/Cmd + V
44+
- Sync/Refresh - Ctrl/Cmd + R
45+
- Navigation - Arrow Keys ( ← ↑ → ↓ )
46+
- Hide/Close/Go Back - Escape
47+
48+
#### General Changes:
49+
50+
- Bug fixes and localization improvements.
51+
- UI tweaks for a better user experience.
52+
53+
## 0.1.20
54+
55+
#### Android ( Bug Fixes )
56+
57+
- Fix the issue where forget password link sent on email was not working.
58+
59+
#### MacOS ( Intel • Critical Update )
60+
61+
- Intel mac crashing on launch has been fixed.
62+
63+
## 0.1.19
64+
65+
- Improved memory management
66+
- Bug fixes and stability enhancements
67+
68+
#### Windows/MacOS ( Critical Update )
69+
70+
- Critical bug fixes including abnormal memory usage under certain circumstances.
71+
72+
## 0.1.18
73+
74+
- Bug fixes and performance optimization

lib/main.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ class AppContent extends StatelessWidget {
137137
syncCubit.syncHours = subscription.syncHours;
138138
syncCubit.syncChanges(force: true);
139139
context.read<AppConfigCubit>().load(subscription);
140+
context.read<SyncManagerCubit>().loadSub(subscription);
140141
}
141142
}
142143
},

lib/pages/collections/pages/create_edit/page.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:clipboard/pages/collections/pages/create_edit/widgets/create_edit_form.dart';
2+
import 'package:copycat_base/constants/numbers/breakpoints.dart';
23
import 'package:copycat_base/constants/widget_styles.dart';
34
import 'package:copycat_base/db/clip_collection/clipcollection.dart';
45
import 'package:copycat_base/l10n/l10n.dart';
@@ -55,21 +56,21 @@ class ClipCollectionCreateEditMobilePageContent extends StatelessWidget {
5556
}
5657

5758
class ClipCollectionCreateEditPage extends StatelessWidget {
58-
final bool isDialog;
5959
final ClipCollection? collection;
6060

6161
const ClipCollectionCreateEditPage({
6262
super.key,
6363
this.collection,
64-
this.isDialog = false,
6564
});
6665

6766
@override
6867
Widget build(BuildContext context) {
6968
final title = collection == null
7069
? context.locale.createCollection
7170
: context.locale.editCollection;
72-
if (isDialog) {
71+
final width = MediaQuery.of(context).size.width;
72+
final smallScreen = Breakpoints.isMobile(width);
73+
if (!smallScreen) {
7374
return ClipCollectionCreateEditDesktopPageContent(
7475
title: title,
7576
collection: collection,

lib/pages/collections/widgets/collection_list_item.dart

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -59,27 +59,36 @@ class ClipCollectionListItem extends StatelessWidget {
5959
onPressed: () => delete(context),
6060
),
6161
],
62-
child: ListTile(
63-
shape: shape,
64-
autofocus: autoFocus,
65-
leading: Text(
66-
collection.emoji,
67-
style: textTheme.headlineMedium,
68-
),
69-
title: Text(collection.title, maxLines: 1),
70-
titleTextStyle: textTheme.titleMedium?.copyWith(
71-
fontWeight: FontWeight.bold,
72-
),
73-
subtitle: Text(
74-
collection.description ?? context.locale.noDescription,
75-
maxLines: 1,
76-
overflow: TextOverflow.ellipsis,
77-
),
78-
isThreeLine: true,
79-
titleAlignment: ListTileTitleAlignment.center,
80-
trailing: const Icon(Icons.chevron_right),
81-
onTap: () => showDetail(context),
82-
),
62+
child: Builder(builder: (context) {
63+
return GestureDetector(
64+
onSecondaryTapDown: (detail) {
65+
final position = detail.globalPosition;
66+
Menu.of(context).openPopupMenu(context, position);
67+
},
68+
child: ListTile(
69+
shape: shape,
70+
autofocus: autoFocus,
71+
leading: Text(
72+
collection.emoji,
73+
style: textTheme.headlineMedium,
74+
),
75+
title: Text(collection.title, maxLines: 1),
76+
titleTextStyle: textTheme.titleMedium?.copyWith(
77+
fontWeight: FontWeight.bold,
78+
),
79+
subtitle: Text(
80+
collection.description ?? context.locale.noDescription,
81+
maxLines: 1,
82+
overflow: TextOverflow.ellipsis,
83+
),
84+
isThreeLine: true,
85+
titleAlignment: ListTileTitleAlignment.center,
86+
trailing: const Icon(Icons.chevron_right),
87+
onLongPress: () => Menu.of(context).openOptionDialog(context),
88+
onTap: () => showDetail(context),
89+
),
90+
);
91+
}),
8392
);
8493
}
8594
}

lib/pages/collections/widgets/dialogs/create_collection.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Future<void> showCreateCollectionDialog(BuildContext context) async {
2020
showDialog(
2121
context: context,
2222
builder: (context) => const Dialog(
23-
child: ClipCollectionCreateEditPage(isDialog: true),
23+
child: ClipCollectionCreateEditPage(),
2424
),
2525
);
2626
}

lib/pages/layout/navbar_layout.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:clipboard/utils/utility.dart';
2+
import 'package:clipboard/widgets/network_observer.dart';
23
import 'package:clipboard/widgets/titlebar.dart';
34
import 'package:copycat_base/common/logging.dart';
45
import 'package:flutter/material.dart';
@@ -24,8 +25,7 @@ class NavBarPage extends StatefulWidget {
2425
class _NavBarPageState extends State<NavBarPage> {
2526
@override
2627
Widget build(BuildContext context) {
27-
//TODO::: Widget child = NetworkObserver(child: widget.child);
28-
Widget child = widget.child;
28+
Widget child = NetworkObserver(child: widget.child);
2929
if (isDesktopPlatform) child = TitlebarView(child: child);
3030
return PopScope(
3131
canPop: false,

lib/pages/preview/page.dart

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import 'package:clipboard/pages/preview/widgets/media_preview.dart';
44
import 'package:clipboard/pages/preview/widgets/preview_options.dart';
55
import 'package:clipboard/pages/preview/widgets/text_preview.dart';
66
import 'package:clipboard/pages/preview/widgets/url_preview.dart';
7+
import 'package:copycat_base/constants/numbers/breakpoints.dart';
78
import 'package:copycat_base/constants/widget_styles.dart';
89
import 'package:copycat_base/db/clipboard_item/clipboard_item.dart';
910
import 'package:copycat_base/enums/clip_type.dart';
@@ -123,22 +124,27 @@ class ClipboardItemMobilePreviewPageContent extends StatelessWidget {
123124
}
124125

125126
class ClipboardItemPreviewPage extends StatelessWidget {
126-
final bool isDialog;
127127
final ClipboardItem item;
128128
const ClipboardItemPreviewPage({
129129
super.key,
130130
required this.item,
131-
this.isDialog = false,
132131
});
133132

134133
@override
135134
Widget build(BuildContext context) {
136-
if (isDialog) {
135+
final width = MediaQuery.of(context).size.width;
136+
final smallScreen = Breakpoints.isMobile(width);
137+
if (!smallScreen) {
137138
return ClipboardItemDesktopPreviewPageContent(item: item);
138139
}
139140
return Scaffold(
140141
appBar: AppBar(
141142
title: Text(context.locale.preview),
143+
actions: const [
144+
CloseButton(),
145+
width12,
146+
],
147+
automaticallyImplyLeading: false,
142148
),
143149
body: ClipboardItemMobilePreviewPageContent(item: item),
144150
);

lib/pages/preview/widgets/clip_detail_form.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import 'package:copycat_base/db/clip_collection/clipcollection.dart';
55
import 'package:copycat_base/db/clipboard_item/clipboard_item.dart';
66
import 'package:copycat_base/l10n/l10n.dart';
77
import 'package:copycat_base/utils/common_extension.dart';
8+
import 'package:copycat_base/utils/utility.dart';
89
import 'package:flutter/material.dart';
910
import 'package:flutter_bloc/flutter_bloc.dart';
1011
import 'package:form_validator/form_validator.dart';
@@ -79,8 +80,8 @@ class _ClipDetailFormState extends State<ClipDetailForm> {
7980
: descriptionController.text.trim();
8081

8182
final updatedItem = widget.item.copyWith(
82-
title: title,
83-
description: description,
83+
title: cleanUpString(title),
84+
description: cleanUpString(description),
8485
collectionId: collectionId?.$1,
8586
serverCollectionId: collectionId?.$2,
8687
)..applyId(widget.item);

lib/pages/preview/widgets/media_preview.dart

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import 'dart:typed_data';
22

33
import 'package:blurhash_dart/blurhash_dart.dart';
4+
import 'package:clipboard/utils/clipboard_actions.dart';
45
import 'package:copycat_base/constants/strings/asset_constants.dart';
56
import 'package:copycat_base/constants/widget_styles.dart';
67
import 'package:copycat_base/db/clipboard_item/clipboard_item.dart';
8+
import 'package:copycat_base/l10n/l10n.dart';
79
import 'package:flutter/material.dart';
810
import 'package:flutter_svg_provider/flutter_svg_provider.dart';
911
import 'package:image/image.dart' as img;
@@ -18,7 +20,7 @@ class MediaClipPreviewCard extends StatelessWidget {
1820
required this.isMobile,
1921
});
2022

21-
ImageProvider getPreview() {
23+
ImageProvider? getPreview() {
2224
if (item.localPath != null) {
2325
if (item.fileMimeType!.contains("svg")) {
2426
return Svg(
@@ -40,35 +42,55 @@ class MediaClipPreviewCard extends StatelessWidget {
4042
}
4143
}
4244

43-
Icon getIcon() {
45+
void open() async {
46+
openFile(item);
47+
}
48+
49+
Widget? getPrimaryView(BuildContext context) {
4450
if (item.fileMimeType != null) {
4551
if (item.fileMimeType!.startsWith("image")) {
46-
return const Icon(
47-
Icons.image,
48-
color: Colors.white,
52+
return const Align(
53+
alignment: Alignment(-.98, -.98),
54+
child: Icon(
55+
Icons.image,
56+
color: Colors.white,
57+
),
4958
);
5059
}
5160
if (item.fileMimeType!.startsWith("video")) {
52-
return const Icon(
53-
Icons.ondemand_video_rounded,
54-
color: Colors.white,
61+
if (item.inCache) {
62+
return Center(
63+
child: ElevatedButton.icon(
64+
icon: const Icon(Icons.play_arrow_rounded),
65+
onPressed: open,
66+
label: Text(context.locale.open),
67+
),
68+
);
69+
}
70+
return const Align(
71+
alignment: Alignment(-.98, -.98),
72+
child: Icon(
73+
Icons.video_file,
74+
color: Colors.white,
75+
),
5576
);
5677
}
5778
if (item.fileMimeType!.startsWith("audio")) {
58-
return const Icon(
59-
Icons.audiotrack,
60-
color: Colors.white,
79+
return const Align(
80+
alignment: Alignment(-.98, -.98),
81+
child: Icon(
82+
Icons.audiotrack,
83+
color: Colors.white,
84+
),
6185
);
6286
}
6387
}
64-
return const Icon(
65-
Icons.image,
66-
color: Colors.white,
67-
);
88+
return null;
6889
}
6990

7091
@override
7192
Widget build(BuildContext context) {
93+
final preview = getPreview();
7294
return Card.filled(
7395
margin: isMobile
7496
? const EdgeInsets.only(
@@ -86,20 +108,19 @@ class MediaClipPreviewCard extends StatelessWidget {
86108
),
87109
child: DecoratedBox(
88110
decoration: BoxDecoration(
89-
image: DecorationImage(
90-
image: getPreview(),
91-
fit: BoxFit.contain,
92-
),
111+
image: preview != null
112+
? DecorationImage(
113+
image: preview,
114+
fit: BoxFit.contain,
115+
)
116+
: null,
93117
borderRadius: isMobile
94118
? radius12
95119
: const BorderRadius.horizontal(
96120
left: Radius.circular(12),
97121
),
98122
),
99-
child: Align(
100-
alignment: const Alignment(0.95, 0.95),
101-
child: getIcon(),
102-
),
123+
child: getPrimaryView(context),
103124
),
104125
);
105126
}

0 commit comments

Comments
 (0)