Skip to content

Commit

Permalink
Merge pull request #8 from raj457036/v0.1.23
Browse files Browse the repository at this point in the history
V0.1.23
  • Loading branch information
raj457036 authored Sep 3, 2024
2 parents dd5c90d + 7209be6 commit 061ee05
Show file tree
Hide file tree
Showing 42 changed files with 1,416 additions and 210 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[submodule "packages/copycat_pro"]
path = packages/copycat_pro
url = git@github.com:raj457036/copycat_pro.git
url = ssh://git@github.com:raj457036/copycat_pro.git
update = merge
[submodule "packages/copycat_base"]
path = packages/copycat_base
url = git@github.com:raj457036/copycat_base.git
url = ssh://git@github.com:raj457036/copycat_base.git
update = merge

74 changes: 74 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
## 0.1.23 ( WIP )

#### Features

WIP

#### Bug Fixes

- Fix: Incorrect frequenent syncing error message toast when syncing files

## 0.1.22

#### Features

- 🎉 Drag and Drop ( Desktop and Ipad Os, Android will be coming in upcoming updates )
- 🎉 Customization and Themings
- 🎉 Advance filters by type, sub types, date range, sorting, etc. ( Feature request )
- 🎉 New and polished user interface. ( Feature request )
- 💪 Performance improvements when large amount of clips are synced and decrypted.
- Toggling clipboard by clicking on the menu icon/tray icon. ( Feature request )
- We fixed alot of bugs which you might have experienced.

#### Bug Fixes and Improvements

##### Windows

- File/Media copying from Explorer app not working as expected.

## 0.1.21

Enhancements Based on our Discord community and Feedback from users.

#### Critical Changes:

- Full Local Clipboard: All core features (except Syncing) are now available without requiring sign-in.

- Local End-to-End Encryption: Enhanced security for all users when using syncing.
- Extensive Keyboard Shortcuts: Faster navigation with new keyboard shortcuts.
- Home - Ctrl/Cmd + D
- Search - Ctrl/Cmd + F
- Collection - Ctrl/Cmd + C
- Settings - Ctrl/Cmd + X
- Paste - Ctrl/Cmd + V
- Sync/Refresh - Ctrl/Cmd + R
- Navigation - Arrow Keys ( ← ↑ → ↓ )
- Hide/Close/Go Back - Escape

#### General Changes:

- Bug fixes and localization improvements.
- UI tweaks for a better user experience.

## 0.1.20

#### Android ( Bug Fixes )

- Fix the issue where forget password link sent on email was not working.

#### MacOS ( Intel • Critical Update )

- Intel mac crashing on launch has been fixed.

## 0.1.19

- Improved memory management
- Bug fixes and stability enhancements

#### Windows/MacOS ( Critical Update )

- Critical bug fixes including abnormal memory usage under certain circumstances.

## 0.1.18

- Bug fixes and performance optimization
1 change: 1 addition & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class AppContent extends StatelessWidget {
syncCubit.syncHours = subscription.syncHours;
syncCubit.syncChanges(force: true);
context.read<AppConfigCubit>().load(subscription);
context.read<SyncManagerCubit>().loadSub(subscription);
}
}
},
Expand Down
7 changes: 4 additions & 3 deletions lib/pages/collections/pages/create_edit/page.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:clipboard/pages/collections/pages/create_edit/widgets/create_edit_form.dart';
import 'package:copycat_base/constants/numbers/breakpoints.dart';
import 'package:copycat_base/constants/widget_styles.dart';
import 'package:copycat_base/db/clip_collection/clipcollection.dart';
import 'package:copycat_base/l10n/l10n.dart';
Expand Down Expand Up @@ -55,21 +56,21 @@ class ClipCollectionCreateEditMobilePageContent extends StatelessWidget {
}

class ClipCollectionCreateEditPage extends StatelessWidget {
final bool isDialog;
final ClipCollection? collection;

const ClipCollectionCreateEditPage({
super.key,
this.collection,
this.isDialog = false,
});

@override
Widget build(BuildContext context) {
final title = collection == null
? context.locale.createCollection
: context.locale.editCollection;
if (isDialog) {
final width = MediaQuery.of(context).size.width;
final smallScreen = Breakpoints.isMobile(width);
if (!smallScreen) {
return ClipCollectionCreateEditDesktopPageContent(
title: title,
collection: collection,
Expand Down
51 changes: 30 additions & 21 deletions lib/pages/collections/widgets/collection_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,36 @@ class ClipCollectionListItem extends StatelessWidget {
onPressed: () => delete(context),
),
],
child: ListTile(
shape: shape,
autofocus: autoFocus,
leading: Text(
collection.emoji,
style: textTheme.headlineMedium,
),
title: Text(collection.title, maxLines: 1),
titleTextStyle: textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.bold,
),
subtitle: Text(
collection.description ?? context.locale.noDescription,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
isThreeLine: true,
titleAlignment: ListTileTitleAlignment.center,
trailing: const Icon(Icons.chevron_right),
onTap: () => showDetail(context),
),
child: Builder(builder: (context) {
return GestureDetector(
onSecondaryTapDown: (detail) {
final position = detail.globalPosition;
Menu.of(context).openPopupMenu(context, position);
},
child: ListTile(
shape: shape,
autofocus: autoFocus,
leading: Text(
collection.emoji,
style: textTheme.headlineMedium,
),
title: Text(collection.title, maxLines: 1),
titleTextStyle: textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.bold,
),
subtitle: Text(
collection.description ?? context.locale.noDescription,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
isThreeLine: true,
titleAlignment: ListTileTitleAlignment.center,
trailing: const Icon(Icons.chevron_right),
onLongPress: () => Menu.of(context).openOptionDialog(context),
onTap: () => showDetail(context),
),
);
}),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Future<void> showCreateCollectionDialog(BuildContext context) async {
showDialog(
context: context,
builder: (context) => const Dialog(
child: ClipCollectionCreateEditPage(isDialog: true),
child: ClipCollectionCreateEditPage(),
),
);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/layout/navbar_layout.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:clipboard/utils/utility.dart';
import 'package:clipboard/widgets/network_observer.dart';
import 'package:clipboard/widgets/titlebar.dart';
import 'package:copycat_base/common/logging.dart';
import 'package:flutter/material.dart';
Expand All @@ -24,8 +25,7 @@ class NavBarPage extends StatefulWidget {
class _NavBarPageState extends State<NavBarPage> {
@override
Widget build(BuildContext context) {
//TODO::: Widget child = NetworkObserver(child: widget.child);
Widget child = widget.child;
Widget child = NetworkObserver(child: widget.child);
if (isDesktopPlatform) child = TitlebarView(child: child);
return PopScope(
canPop: false,
Expand Down
12 changes: 9 additions & 3 deletions lib/pages/preview/page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:clipboard/pages/preview/widgets/media_preview.dart';
import 'package:clipboard/pages/preview/widgets/preview_options.dart';
import 'package:clipboard/pages/preview/widgets/text_preview.dart';
import 'package:clipboard/pages/preview/widgets/url_preview.dart';
import 'package:copycat_base/constants/numbers/breakpoints.dart';
import 'package:copycat_base/constants/widget_styles.dart';
import 'package:copycat_base/db/clipboard_item/clipboard_item.dart';
import 'package:copycat_base/enums/clip_type.dart';
Expand Down Expand Up @@ -123,22 +124,27 @@ class ClipboardItemMobilePreviewPageContent extends StatelessWidget {
}

class ClipboardItemPreviewPage extends StatelessWidget {
final bool isDialog;
final ClipboardItem item;
const ClipboardItemPreviewPage({
super.key,
required this.item,
this.isDialog = false,
});

@override
Widget build(BuildContext context) {
if (isDialog) {
final width = MediaQuery.of(context).size.width;
final smallScreen = Breakpoints.isMobile(width);
if (!smallScreen) {
return ClipboardItemDesktopPreviewPageContent(item: item);
}
return Scaffold(
appBar: AppBar(
title: Text(context.locale.preview),
actions: const [
CloseButton(),
width12,
],
automaticallyImplyLeading: false,
),
body: ClipboardItemMobilePreviewPageContent(item: item),
);
Expand Down
5 changes: 3 additions & 2 deletions lib/pages/preview/widgets/clip_detail_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:copycat_base/db/clip_collection/clipcollection.dart';
import 'package:copycat_base/db/clipboard_item/clipboard_item.dart';
import 'package:copycat_base/l10n/l10n.dart';
import 'package:copycat_base/utils/common_extension.dart';
import 'package:copycat_base/utils/utility.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:form_validator/form_validator.dart';
Expand Down Expand Up @@ -79,8 +80,8 @@ class _ClipDetailFormState extends State<ClipDetailForm> {
: descriptionController.text.trim();

final updatedItem = widget.item.copyWith(
title: title,
description: description,
title: cleanUpString(title),
description: cleanUpString(description),
collectionId: collectionId?.$1,
serverCollectionId: collectionId?.$2,
)..applyId(widget.item);
Expand Down
67 changes: 44 additions & 23 deletions lib/pages/preview/widgets/media_preview.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import 'dart:typed_data';

import 'package:blurhash_dart/blurhash_dart.dart';
import 'package:clipboard/utils/clipboard_actions.dart';
import 'package:copycat_base/constants/strings/asset_constants.dart';
import 'package:copycat_base/constants/widget_styles.dart';
import 'package:copycat_base/db/clipboard_item/clipboard_item.dart';
import 'package:copycat_base/l10n/l10n.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg_provider/flutter_svg_provider.dart';
import 'package:image/image.dart' as img;
Expand All @@ -18,7 +20,7 @@ class MediaClipPreviewCard extends StatelessWidget {
required this.isMobile,
});

ImageProvider getPreview() {
ImageProvider? getPreview() {
if (item.localPath != null) {
if (item.fileMimeType!.contains("svg")) {
return Svg(
Expand All @@ -40,35 +42,55 @@ class MediaClipPreviewCard extends StatelessWidget {
}
}

Icon getIcon() {
void open() async {
openFile(item);
}

Widget? getPrimaryView(BuildContext context) {
if (item.fileMimeType != null) {
if (item.fileMimeType!.startsWith("image")) {
return const Icon(
Icons.image,
color: Colors.white,
return const Align(
alignment: Alignment(-.98, -.98),
child: Icon(
Icons.image,
color: Colors.white,
),
);
}
if (item.fileMimeType!.startsWith("video")) {
return const Icon(
Icons.ondemand_video_rounded,
color: Colors.white,
if (item.inCache) {
return Center(
child: ElevatedButton.icon(
icon: const Icon(Icons.play_arrow_rounded),
onPressed: open,
label: Text(context.locale.open),
),
);
}
return const Align(
alignment: Alignment(-.98, -.98),
child: Icon(
Icons.video_file,
color: Colors.white,
),
);
}
if (item.fileMimeType!.startsWith("audio")) {
return const Icon(
Icons.audiotrack,
color: Colors.white,
return const Align(
alignment: Alignment(-.98, -.98),
child: Icon(
Icons.audiotrack,
color: Colors.white,
),
);
}
}
return const Icon(
Icons.image,
color: Colors.white,
);
return null;
}

@override
Widget build(BuildContext context) {
final preview = getPreview();
return Card.filled(
margin: isMobile
? const EdgeInsets.only(
Expand All @@ -86,20 +108,19 @@ class MediaClipPreviewCard extends StatelessWidget {
),
child: DecoratedBox(
decoration: BoxDecoration(
image: DecorationImage(
image: getPreview(),
fit: BoxFit.contain,
),
image: preview != null
? DecorationImage(
image: preview,
fit: BoxFit.contain,
)
: null,
borderRadius: isMobile
? radius12
: const BorderRadius.horizontal(
left: Radius.circular(12),
),
),
child: Align(
alignment: const Alignment(0.95, 0.95),
child: getIcon(),
),
child: getPrimaryView(context),
),
);
}
Expand Down
Loading

0 comments on commit 061ee05

Please sign in to comment.