chore: replace icons (#5914)

Co-authored-by: nathan <nathan@appflowy.io>
This commit is contained in:
Annie 2024-08-10 18:05:53 +08:00 committed by GitHub
parent 7abe9f4661
commit cd0f8d80e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 57 additions and 26 deletions

View File

@ -133,7 +133,7 @@ enum DatabaseViewSettings {
filter => FlowySvgs.filter_s, filter => FlowySvgs.filter_s,
sort => FlowySvgs.sort_ascending_s, sort => FlowySvgs.sort_ascending_s,
board => FlowySvgs.board_s, board => FlowySvgs.board_s,
calendar => FlowySvgs.date_s, calendar => FlowySvgs.calendar_s,
duplicate => FlowySvgs.copy_s, duplicate => FlowySvgs.copy_s,
delete => FlowySvgs.delete_s, delete => FlowySvgs.delete_s,
}; };

View File

@ -181,7 +181,7 @@ class LayoutDateField extends StatelessWidget {
onUpdated(fieldInfo.id); onUpdated(fieldInfo.id);
popoverMutex.close(); popoverMutex.close();
}, },
leftIcon: const FlowySvg(FlowySvgs.grid_s), leftIcon: const FlowySvg(FlowySvgs.date_s),
rightIcon: fieldInfo.id == fieldId rightIcon: fieldInfo.id == fieldId
? const FlowySvg(FlowySvgs.check_s) ? const FlowySvg(FlowySvgs.check_s)
: null, : null,

View File

@ -26,7 +26,7 @@ extension DatabaseLayoutExtension on DatabaseLayoutPB {
FlowySvgData get icon { FlowySvgData get icon {
return switch (this) { return switch (this) {
DatabaseLayoutPB.Board => FlowySvgs.board_s, DatabaseLayoutPB.Board => FlowySvgs.board_s,
DatabaseLayoutPB.Calendar => FlowySvgs.date_s, DatabaseLayoutPB.Calendar => FlowySvgs.calendar_s,
DatabaseLayoutPB.Grid => FlowySvgs.grid_s, DatabaseLayoutPB.Grid => FlowySvgs.grid_s,
_ => throw UnimplementedError(), _ => throw UnimplementedError(),
}; };

View File

@ -23,7 +23,7 @@ extension DatabaseSettingActionExtension on DatabaseSettingAction {
FlowySvgData iconData() { FlowySvgData iconData() {
switch (this) { switch (this) {
case DatabaseSettingAction.showProperties: case DatabaseSettingAction.showProperties:
return FlowySvgs.properties_s; return FlowySvgs.multiselect_s;
case DatabaseSettingAction.showLayout: case DatabaseSettingAction.showLayout:
return FlowySvgs.database_layout_m; return FlowySvgs.database_layout_m;
case DatabaseSettingAction.showGroup: case DatabaseSettingAction.showGroup:

View File

@ -64,6 +64,9 @@ class _ShareButton extends StatelessWidget {
Radius.circular(10.0), Radius.circular(10.0),
), ),
textColor: Theme.of(context).colorScheme.onPrimary, textColor: Theme.of(context).colorScheme.onPrimary,
onPressed: () {
// Do nothing, but it needs to provide an empty action in order to show cursorß
},
); );
} }
} }

View File

@ -2,6 +2,7 @@ import 'dart:io';
import 'package:flowy_infra/size.dart'; import 'package:flowy_infra/size.dart';
import 'package:flowy_infra_ui/style_widget/hover.dart'; import 'package:flowy_infra_ui/style_widget/hover.dart';
import 'package:flowy_infra_ui/style_widget/text.dart';
import 'package:flowy_infra_ui/widget/flowy_tooltip.dart'; import 'package:flowy_infra_ui/widget/flowy_tooltip.dart';
import 'package:flowy_infra_ui/widget/ignore_parent_gesture.dart'; import 'package:flowy_infra_ui/widget/ignore_parent_gesture.dart';
import 'package:flowy_infra_ui/widget/spacing.dart'; import 'package:flowy_infra_ui/widget/spacing.dart';
@ -292,6 +293,7 @@ class FlowyTextButton extends StatelessWidget {
this.padding = const EdgeInsets.symmetric(horizontal: 8, vertical: 6), this.padding = const EdgeInsets.symmetric(horizontal: 8, vertical: 6),
this.hoverColor, this.hoverColor,
this.fillColor, this.fillColor,
this.textColor,
this.heading, this.heading,
this.radius, this.radius,
this.mainAxisAlignment = MainAxisAlignment.start, this.mainAxisAlignment = MainAxisAlignment.start,
@ -346,6 +348,7 @@ class FlowyTextButton extends StatelessWidget {
final Widget? heading; final Widget? heading;
final Color? hoverColor; final Color? hoverColor;
final Color? fillColor; final Color? fillColor;
final Color? textColor;
final BorderRadius? radius; final BorderRadius? radius;
final MainAxisAlignment mainAxisAlignment; final MainAxisAlignment mainAxisAlignment;
final String? tooltip; final String? tooltip;
@ -364,9 +367,10 @@ class FlowyTextButton extends StatelessWidget {
children.add(heading!); children.add(heading!);
children.add(const HSpace(8)); children.add(const HSpace(8));
} }
children.add(Text( children.add(FlowyText(
text, text,
overflow: overflow, overflow: overflow,
color: textColor,
textAlign: TextAlign.center, textAlign: TextAlign.center,
)); ));

View File

@ -51,9 +51,11 @@ class RoundedTextButton extends StatelessWidget {
radius: borderRadius ?? Corners.s6Border, radius: borderRadius ?? Corners.s6Border,
fontColor: textColor ?? Theme.of(context).colorScheme.onPrimary, fontColor: textColor ?? Theme.of(context).colorScheme.onPrimary,
fillColor: fillColor ?? Theme.of(context).colorScheme.primary, fillColor: fillColor ?? Theme.of(context).colorScheme.primary,
textColor: textColor,
hoverColor: hoverColor:
hoverColor ?? Theme.of(context).colorScheme.primaryContainer, hoverColor ?? Theme.of(context).colorScheme.primaryContainer,
padding: padding, padding: padding,
), ),
), ),
); );

View File

@ -1,7 +1,15 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10 2H13C13.5523 2 14 2.44772 14 3V6" stroke="#333333" stroke-linecap="round" stroke-linejoin="round"/> <g clip-path="url(#clip0_45_20)">
<path d="M6 2H3C2.44772 2 2 2.44772 2 3V6" stroke="#333333" stroke-linecap="round" stroke-linejoin="round"/> <path d="M1.38501 4.325V2.855C1.38501 2.0465 2.04651 1.385 2.85501 1.385H4.32501" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M6 14H3C2.44772 14 2 13.5523 2 13V10" stroke="#333333" stroke-linecap="round" stroke-linejoin="round"/> <path d="M11.675 1.385H13.145C13.9535 1.385 14.615 2.0465 14.615 2.855V4.325" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M10 14H13C13.5523 14 14 13.5523 14 13V10" stroke="#333333" stroke-linecap="round" stroke-linejoin="round"/> <path d="M14.615 11.675V13.145C14.615 13.9535 13.9535 14.615 13.145 14.615H11.675" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
<rect x="6" y="6" width="4" height="4" rx="1" stroke="#333333"/> <path d="M4.32501 14.615H2.85501C2.04651 14.615 1.38501 13.9535 1.38501 13.145V11.675" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5.06001 4.325H8.73501C8.73501 4.325 9.47001 4.325 9.47001 5.06V7.265C9.47001 7.265 9.47001 8 8.73501 8H5.06001C5.06001 8 4.32501 8 4.32501 7.265V5.06C4.32501 5.06 4.32501 4.325 5.06001 4.325Z" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M7.26503 8H10.94C10.94 8 11.675 8 11.675 8.735V10.94C11.675 10.94 11.675 11.675 10.94 11.675H7.26503C7.26503 11.675 6.53003 11.675 6.53003 10.94V8.735C6.53003 8.735 6.53003 8 7.26503 8Z" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<defs>
<clipPath id="clip0_45_20">
<rect width="16" height="16" fill="white"/>
</clipPath>
</defs>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 620 B

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,4 +1,19 @@
<svg width="800" height="800" viewBox="-.02 0 122.88 122.88" xmlns="http://www.w3.org/2000/svg"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path <g clip-path="url(#clip0_45_2)">
d="M81.54 4.71c0-2.62 2.58-4.71 5.77-4.71 3.2 0 5.77 2.13 5.77 4.71V25.4c0 2.62-2.58 4.71-5.77 4.71-3.2 0-5.77-2.13-5.77-4.71V4.71zM20.4 89.87l7.55-.47c.16 1.22.5 2.16 1 2.79.82 1.04 1.99 1.56 3.51 1.56 1.13 0 2.01-.26 2.62-.8.61-.54.92-1.15.92-1.85 0-.66-.29-1.26-.87-1.79-.58-.53-1.93-1.02-4.06-1.49-3.49-.78-5.96-1.82-7.45-3.12-1.5-1.29-2.25-2.95-2.25-4.96 0-1.32.38-2.56 1.15-3.74.77-1.18 1.92-2.1 3.46-2.77 1.54-.67 3.65-1.01 6.32-1.01 3.29 0 5.79.61 7.52 1.84 1.72 1.22 2.75 3.17 3.08 5.84l-7.47.44c-.2-1.17-.62-2.02-1.25-2.55-.64-.53-1.52-.8-2.64-.8-.92 0-1.62.2-2.09.59-.47.39-.7.87-.7 1.43 0 .41.19.77.57 1.1.37.34 1.25.65 2.65.95 3.47.75 5.96 1.51 7.46 2.28 1.5.77 2.6 1.71 3.28 2.85.68 1.13 1.02 2.4 1.02 3.81 0 1.65-.46 3.17-1.37 4.56-.92 1.39-2.19 2.45-3.83 3.17-1.64.72-3.7 1.08-6.19 1.08-4.37 0-7.4-.84-9.09-2.53-1.67-1.68-2.63-3.82-2.85-6.41zm44.13-17.22h7.94v15.33c0 1.52-.24 2.95-.71 4.3a9.377 9.377 0 01-2.23 3.55c-1.01 1.01-2.07 1.72-3.18 2.13-1.54.57-3.4.86-5.56.86-1.25 0-2.62-.09-4.1-.26-1.48-.17-2.72-.52-3.71-1.04-.99-.52-1.9-1.26-2.72-2.22-.83-.96-1.39-1.95-1.69-2.96-.49-1.64-.74-3.08-.74-4.35V72.65h7.94v15.69c0 1.4.39 2.5 1.16 3.28.78.79 1.86 1.19 3.23 1.19 1.36 0 2.43-.39 3.21-1.17.77-.77 1.16-1.87 1.16-3.3V72.65zm13.32 0h7.42l9.65 14.21V72.65h7.51v25.73h-7.51l-9.59-14.13v14.13h-7.47V72.65h-.01zM29.53 4.71C29.53 2.09 32.11 0 35.3 0c3.2 0 5.77 2.13 5.77 4.71V25.4c0 2.62-2.58 4.71-5.77 4.71-3.2 0-5.77-2.13-5.77-4.71V4.71zM7.56 44.09h107.62V22.66c0-.8-.31-1.55-.84-2.04-.53-.53-1.24-.84-2.04-.84h-9.31c-1.78 0-3.2-2.63-3.2-4.41 0-1.78 1.42-3.2 3.2-3.2h10.53c2.58 0 4.88 1.07 6.57 2.75 1.69 1.69 2.75 4.04 2.75 6.57v92.06c0 2.58-1.07 4.88-2.75 6.57-1.69 1.69-4.04 2.75-6.57 2.75H9.33c-2.58 0-4.88-1.07-6.57-2.75-1.69-1.68-2.76-4.04-2.76-6.57V21.49c0-2.58 1.07-4.88 2.75-6.57 1.69-1.69 4.04-2.75 6.57-2.75H20.6c1.78 0 3.2 1.42 3.2 3.2s-1.42 4.41-3.2 4.41H10.54c-.8 0-1.55.31-2.09.84-.53.53-.84 1.24-.84 2.09v21.43l-.05-.05zm107.63 8.81H7.56v59.4c0 .8.31 1.55.84 2.09.53.53 1.24.84 2.09.84h101.76c.8 0 1.55-.31 2.09-.84.53-.53.84-1.24.84-2.09V52.9h.01zM50.36 19.73c-1.78 0-3.2-2.63-3.2-4.41 0-1.78 1.42-3.2 3.2-3.2h21.49c1.78 0 3.2 1.42 3.2 3.2 0 1.78-1.42 4.41-3.2 4.41H50.36z" /> <path d="M1.16284 7.82906C1.16284 5.25056 1.16284 3.96137 1.96384 3.16031C2.7649 2.35931 4.05409 2.35931 6.63259 2.35931H9.36747C11.9459 2.35931 13.2352 2.35931 14.0362 3.16031C14.8372 3.96137 14.8372 5.25056 14.8372 7.82906V9.1965C14.8372 11.7749 14.8372 13.0642 14.0362 13.8652C13.2352 14.6662 11.9459 14.6663 9.36747 14.6663H6.63259C4.05409 14.6663 2.7649 14.6662 1.96384 13.8652C1.16284 13.0642 1.16284 11.7749 1.16284 9.1965V7.82906Z" stroke="black"/>
<path d="M4.58136 2.35931V1.33369" stroke="black" stroke-linecap="round"/>
<path d="M11.4186 2.35931V1.33369" stroke="black" stroke-linecap="round"/>
<path d="M1.50464 5.77787H14.4954" stroke="black" stroke-linecap="round"/>
<path d="M12.1023 11.2477C12.1023 11.6253 11.7962 11.9314 11.4186 11.9314C11.041 11.9314 10.7349 11.6253 10.7349 11.2477C10.7349 10.8701 11.041 10.5639 11.4186 10.5639C11.7962 10.5639 12.1023 10.8701 12.1023 11.2477Z" fill="black"/>
<path d="M12.1023 8.51281C12.1023 8.89044 11.7962 9.1965 11.4186 9.1965C11.041 9.1965 10.7349 8.89044 10.7349 8.51281C10.7349 8.13519 11.041 7.82906 11.4186 7.82906C11.7962 7.82906 12.1023 8.13519 12.1023 8.51281Z" fill="black"/>
<path d="M8.68372 11.2477C8.68372 11.6253 8.3776 11.9314 7.99997 11.9314C7.62235 11.9314 7.31628 11.6253 7.31628 11.2477C7.31628 10.8701 7.62235 10.5639 7.99997 10.5639C8.3776 10.5639 8.68372 10.8701 8.68372 11.2477Z" fill="black"/>
<path d="M8.68372 8.51281C8.68372 8.89044 8.3776 9.1965 7.99997 9.1965C7.62235 9.1965 7.31628 8.89044 7.31628 8.51281C7.31628 8.13519 7.62235 7.82906 7.99997 7.82906C8.3776 7.82906 8.68372 8.13519 8.68372 8.51281Z" fill="black"/>
<path d="M5.26514 11.2477C5.26514 11.6253 4.95902 11.9314 4.58139 11.9314C4.20377 11.9314 3.89771 11.6253 3.89771 11.2477C3.89771 10.8701 4.20383 10.5639 4.58139 10.5639C4.95896 10.5639 5.26514 10.8701 5.26514 11.2477Z" fill="black"/>
<path d="M5.26514 8.51281C5.26514 8.89044 4.95902 9.1965 4.58139 9.1965C4.20377 9.1965 3.89771 8.89044 3.89771 8.51281C3.89771 8.13519 4.20383 7.82906 4.58139 7.82906C4.95896 7.82906 5.26514 8.13519 5.26514 8.51281Z" fill="black"/>
</g>
<defs>
<clipPath id="clip0_45_2">
<rect width="16" height="16" fill="white"/>
</clipPath>
</defs>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#clip0_45_18)">
<path <path d="M5 1V9H1V1H5ZM1 0C0.734784 0 0.48043 0.105357 0.292893 0.292893C0.105357 0.48043 0 0.734784 0 1L0 9C0 9.26522 0.105357 9.51957 0.292893 9.70711C0.48043 9.89464 0.734784 10 1 10H5C5.26522 10 5.51957 9.89464 5.70711 9.70711C5.89464 9.51957 6 9.26522 6 9V1C6 0.734784 5.89464 0.48043 5.70711 0.292893C5.51957 0.105357 5.26522 0 5 0L1 0ZM14 2V7H9V2H14ZM9 1C8.73478 1 8.48043 1.10536 8.29289 1.29289C8.10536 1.48043 8 1.73478 8 2V7C8 7.26522 8.10536 7.51957 8.29289 7.70711C8.48043 7.89464 8.73478 8 9 8H14C14.2652 8 14.5196 7.89464 14.7071 7.70711C14.8946 7.51957 15 7.26522 15 7V2C15 1.73478 14.8946 1.48043 14.7071 1.29289C14.5196 1.10536 14.2652 1 14 1H9ZM5 13V15H3V13H5ZM3 12C2.73478 12 2.48043 12.1054 2.29289 12.2929C2.10536 12.4804 2 12.7348 2 13V15C2 15.2652 2.10536 15.5196 2.29289 15.7071C2.48043 15.8946 2.73478 16 3 16H5C5.26522 16 5.51957 15.8946 5.70711 15.7071C5.89464 15.5196 6 15.2652 6 15V13C6 12.7348 5.89464 12.4804 5.70711 12.2929C5.51957 12.1054 5.26522 12 5 12H3ZM15 11V13H9V11H15ZM9 10C8.73478 10 8.48043 10.1054 8.29289 10.2929C8.10536 10.4804 8 10.7348 8 11V13C8 13.2652 8.10536 13.5196 8.29289 13.7071C8.48043 13.8946 8.73478 14 9 14H15C15.2652 14 15.5196 13.8946 15.7071 13.7071C15.8946 13.5196 16 13.2652 16 13V11C16 10.7348 15.8946 10.4804 15.7071 10.2929C15.5196 10.1054 15.2652 10 15 10H9Z" fill="black"/>
d="M3 6C3 3.79086 4.79086 2 7 2H17C19.2091 2 21 3.79086 21 6C21 8.20914 19.2091 10 17 10H7C4.79086 10 3 8.20914 3 6Z" </g>
stroke="#000000" stroke-width="2" /> <defs>
<path <clipPath id="clip0_45_18">
d="M3 16C3 14.8954 3.89543 14 5 14H8C9.10457 14 10 14.8954 10 16V19C10 20.1046 9.10457 21 8 21H5C3.89543 21 3 20.1046 3 19V16Z" <rect width="16" height="16" fill="white"/>
stroke="#000000" stroke-width="2" /> </clipPath>
<path </defs>
d="M14 17.5C14 15.567 15.567 14 17.5 14C19.433 14 21 15.567 21 17.5C21 19.433 19.433 21 17.5 21C15.567 21 14 19.433 14 17.5Z"
stroke="#000000" stroke-width="2" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 708 B

After

Width:  |  Height:  |  Size: 1.5 KiB