mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: improve sidebar UI (#5453)
* fix: revert dark main color * fix: workspace name font size * fix: only show collapse button when hovering the sidebar * fix: remove expand button after workspace name * fix: change settings icon opactiy to 0.7 * chore: replace favorite icon * chore: add arrow icon after section name * chore: replace trash bin icon * chore: adjust collapse icon padding * feat: redesign question bubble * fix: replace favorite icon * fix: remove trash button padding * chore: replace hover color * feat: add more padding to tooltip * feat: add hover effect to arrow icon * feat: add hover effect to add view button * fix: view title color * feat: replace question bubble * feat: replace default page icon * fix: header icon size * fix: add view button padding * fix: unable to insert default image on desktop * fix: notification button size issue * fix: workspace icon size * feat: add a divider between favorite space and add new page button
This commit is contained in:
@ -19,7 +19,7 @@ class BoardPluginBuilder implements PluginBuilder {
|
||||
String get menuName => LocaleKeys.board_menuName.tr();
|
||||
|
||||
@override
|
||||
FlowySvgData get icon => FlowySvgs.board_s;
|
||||
FlowySvgData get icon => FlowySvgs.icon_board_s;
|
||||
|
||||
@override
|
||||
PluginType get pluginType => PluginType.board;
|
||||
|
@ -2,8 +2,8 @@ import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/plugins/database/tab_bar/tab_bar_view.dart';
|
||||
import 'package:appflowy/startup/plugin/plugin.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
class CalendarPluginBuilder extends PluginBuilder {
|
||||
@override
|
||||
@ -19,7 +19,7 @@ class CalendarPluginBuilder extends PluginBuilder {
|
||||
String get menuName => LocaleKeys.calendar_menuName.tr();
|
||||
|
||||
@override
|
||||
FlowySvgData get icon => FlowySvgs.date_s;
|
||||
FlowySvgData get icon => FlowySvgs.icon_calendar_s;
|
||||
|
||||
@override
|
||||
PluginType get pluginType => PluginType.calendar;
|
||||
|
@ -2,8 +2,8 @@ import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/plugins/database/tab_bar/tab_bar_view.dart';
|
||||
import 'package:appflowy/startup/plugin/plugin.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:appflowy_backend/protobuf/flowy-folder/view.pb.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
class GridPluginBuilder implements PluginBuilder {
|
||||
@override
|
||||
@ -19,7 +19,7 @@ class GridPluginBuilder implements PluginBuilder {
|
||||
String get menuName => LocaleKeys.grid_menuName.tr();
|
||||
|
||||
@override
|
||||
FlowySvgData get icon => FlowySvgs.grid_s;
|
||||
FlowySvgData get icon => FlowySvgs.icon_grid_s;
|
||||
|
||||
@override
|
||||
PluginType get pluginType => PluginType.grid;
|
||||
|
@ -44,7 +44,7 @@ class DatabaseDocumentPluginBuilder extends PluginBuilder {
|
||||
String get menuName => LocaleKeys.document_menuName.tr();
|
||||
|
||||
@override
|
||||
FlowySvgData get icon => FlowySvgs.document_s;
|
||||
FlowySvgData get icon => FlowySvgs.icon_document_s;
|
||||
|
||||
@override
|
||||
PluginType get pluginType => PluginType.databaseDocument;
|
||||
|
@ -37,7 +37,7 @@ class DocumentPluginBuilder extends PluginBuilder {
|
||||
String get menuName => LocaleKeys.document_menuName.tr();
|
||||
|
||||
@override
|
||||
FlowySvgData get icon => FlowySvgs.document_s;
|
||||
FlowySvgData get icon => FlowySvgs.icon_document_s;
|
||||
|
||||
@override
|
||||
PluginType get pluginType => PluginType.document;
|
||||
@ -148,7 +148,7 @@ class DocumentPluginWidgetBuilder extends PluginWidgetBuilder
|
||||
? [
|
||||
DocumentCollaborators(
|
||||
key: ValueKey('collaborators_${view.id}'),
|
||||
width: 150,
|
||||
width: 120,
|
||||
height: 32,
|
||||
view: view,
|
||||
),
|
||||
|
@ -1,14 +1,17 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:appflowy_editor/appflowy_editor.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
const String kLocalImagesKey = 'local_images';
|
||||
|
||||
List<String> get builtInAssetImages => [
|
||||
"assets/images/app_flowy_abstract_cover_1.jpg",
|
||||
"assets/images/app_flowy_abstract_cover_2.jpg",
|
||||
'assets/images/built_in_cover_images/m_cover_image_1.jpg',
|
||||
'assets/images/built_in_cover_images/m_cover_image_2.jpg',
|
||||
'assets/images/built_in_cover_images/m_cover_image_3.jpg',
|
||||
'assets/images/built_in_cover_images/m_cover_image_4.jpg',
|
||||
'assets/images/built_in_cover_images/m_cover_image_5.jpg',
|
||||
'assets/images/built_in_cover_images/m_cover_image_6.jpg',
|
||||
];
|
||||
|
||||
class ColorOption {
|
||||
|
@ -155,7 +155,7 @@ class _DesktopCoverState extends State<DesktopCover> {
|
||||
);
|
||||
case CoverType.asset:
|
||||
return Image.asset(
|
||||
widget.coverDetails!,
|
||||
PageStyleCoverImageType.builtInImagePath(detail),
|
||||
fit: BoxFit.cover,
|
||||
);
|
||||
case CoverType.color:
|
||||
|
@ -28,8 +28,6 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:string_validator/string_validator.dart';
|
||||
|
||||
import 'cover_editor.dart';
|
||||
|
||||
const double kCoverHeight = 250.0;
|
||||
const double kIconHeight = 60.0;
|
||||
const double kToolbarHeight = 40.0; // with padding to the top
|
||||
@ -296,7 +294,7 @@ class _DocumentHeaderToolbarState extends State<DocumentHeaderToolbar> {
|
||||
leftIconSize: const Size.square(18),
|
||||
onTap: () => widget.onIconOrCoverChanged(
|
||||
cover: PlatformExtension.isDesktopOrWeb
|
||||
? (CoverType.asset, builtInAssetImages.first)
|
||||
? (CoverType.asset, '1')
|
||||
: (CoverType.color, '0xffe8e0ff'),
|
||||
),
|
||||
useIntrinsicWidth: true,
|
||||
|
@ -191,7 +191,13 @@ class EditorMigration {
|
||||
} else {
|
||||
switch (coverType) {
|
||||
case CoverType.asset:
|
||||
// The new version does not support the asset cover.
|
||||
extra = {
|
||||
ViewExtKeys.coverKey: {
|
||||
ViewExtKeys.coverTypeKey:
|
||||
PageStyleCoverImageType.builtInImage.toString(),
|
||||
ViewExtKeys.coverValueKey: coverDetails,
|
||||
},
|
||||
};
|
||||
break;
|
||||
case CoverType.color:
|
||||
extra = {
|
||||
|
Reference in New Issue
Block a user