Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 11 additions & 20 deletions lib/app/config/app_typeface_editor.dart
Original file line number Diff line number Diff line change
@@ -1,37 +1,28 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_quill/flutter_quill.dart';
import 'package:grimity/app/config/app_color.dart';
import 'package:gds/gds.dart';

abstract class AppTypefaceEditor {
const AppTypefaceEditor._();
class AppTypefaceEditor {
const AppTypefaceEditor({required this.context});

static TextStyle get editorFontFamily => TextStyle(fontFamily: 'Pretendard');
final BuildContext context;

static TextStyle get paragraph =>
editorFontFamily.copyWith(fontSize: 16, fontWeight: FontWeight.w500, height: 24 / 16, color: AppColor.gray800);
TextStyle get paragraph => GdsTypography.label2.copyWith(color: context.gdsColors.text.grayBold);
TextStyle get h1 => GdsTypography.subtitle1.copyWith(color: context.gdsColors.text.grayBold);
TextStyle get h2 => GdsTypography.body1SB.copyWith(color: context.gdsColors.text.grayBold);

static TextStyle get h1 =>
editorFontFamily.copyWith(fontSize: 32, fontWeight: FontWeight.w700, height: 38 / 32, color: AppColor.gray800);

static TextStyle get h2 =>
editorFontFamily.copyWith(fontSize: 24, fontWeight: FontWeight.w600, height: 30 / 24, color: AppColor.gray800);

// p { padding-bottom: 6px }
static const _pBottom = VerticalSpacing(0, 6);

// h1/h2 { padding-bottom: 14px }
static const _hBottom = VerticalSpacing(0, 14);

static const _lineSpacing = VerticalSpacing.zero;

static const _hSpacing = HorizontalSpacing.zero;

static DefaultStyles get quillDefaultStyles => DefaultStyles(
DefaultStyles get defaultStyles => DefaultStyles(
paragraph: DefaultTextBlockStyle(paragraph, _hSpacing, _pBottom, _lineSpacing, null),
h1: DefaultTextBlockStyle(h1, _hSpacing, _hBottom, _lineSpacing, null),
h2: DefaultTextBlockStyle(h2, _hSpacing, _hBottom, _lineSpacing, null),
link: paragraph.copyWith(color: context.gdsColors.text.primaryNormal),
placeHolder: DefaultTextBlockStyle(
paragraph.copyWith(color: AppColor.gray500),
paragraph.copyWith(color: context.gdsColors.text.graySubtle),
_hSpacing,
_pBottom,
_lineSpacing,
Expand Down
7 changes: 7 additions & 0 deletions lib/app/enum/post_type.enum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ enum PostType {
final String jsonKey;
const PostType(this.displayName, this.jsonKey);

/// 사용자가 업로드 가능한 [PostType] 목록
static const List<PostType> uploadableTypes = [
PostType.normal,
PostType.question,
PostType.feedback,
];

static PostType fromString(String value) {
return PostType.values.firstWhere((e) => e.toJson() == value, orElse: () => PostType.normal);
}
Expand Down
2 changes: 0 additions & 2 deletions lib/presentation/album_organize/album_organize_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'package:grimity/domain/entity/user.dart';
import 'package:grimity/presentation/album_organize/album_organize_view.dart';
import 'package:grimity/presentation/album_organize/provider/album_organize_page_argument_provider.dart';
import 'package:grimity/presentation/album_organize/view/album_organize_body_view.dart';
import 'package:grimity/presentation/album_organize/view/album_organize_fab_view.dart';
import 'package:grimity/presentation/album_organize/widget/album_organize_app_bar.dart';
import 'package:grimity/presentation/common/widget/navigation/grimity_drawer.dart';

Expand All @@ -22,7 +21,6 @@ class AlbumOrganizePage extends ConsumerWidget {
albumOrganizeAppBar: AlbumOrganizeAppBar(),
albumOrganizeDrawer: GrimityDrawer(),
albumOrganizeBodyView: AlbumOrganizeBodyView(),
albumOrganizeFabView: AlbumOrganizeFabView(),
),
);
}
Expand Down
2 changes: 0 additions & 2 deletions lib/presentation/album_organize/album_organize_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ class AlbumOrganizeView extends ConsumerWidget {
required this.albumOrganizeAppBar,
required this.albumOrganizeDrawer,
required this.albumOrganizeBodyView,
required this.albumOrganizeFabView,
});

final Widget albumOrganizeAppBar;
final Widget albumOrganizeDrawer;
final Widget albumOrganizeBodyView;
final Widget albumOrganizeFabView;

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
100 changes: 0 additions & 100 deletions lib/presentation/album_organize/view/album_organize_fab_view.dart

This file was deleted.

17 changes: 13 additions & 4 deletions lib/presentation/common/layout/grimity_uploading_layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ import 'package:grimity/presentation/common/widget/grimity_modal_loading.dart';
import 'package:grimity/presentation/common/widget/grimity_pop_scope.dart';

class GrimityUploadingLayout extends StatelessWidget {
const GrimityUploadingLayout({super.key, required this.child, required this.uploading});
const GrimityUploadingLayout({
super.key,
required this.child,
required this.title,
required this.description,
required this.uploading,
});

final Widget child;
final String title;
final String description;
final bool uploading;

@override
Expand All @@ -18,11 +26,12 @@ class GrimityUploadingLayout extends StatelessWidget {
child: Stack(
children: [
child,
if (uploading)
if (uploading) ...[
GrimityModalLoading(
title: '이미지를 업로드 중이에요',
description: '이미지 업로드 도중 화면을 닫거나\n뒤로가면 업로드가 중단될 수 있어요',
title: title,
description: description,
),
],
],
),
);
Expand Down
Loading
Loading