Skip to content

Commit

Permalink
Rename document directory to data directory
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Oct 10, 2023
1 parent 78c1c5e commit 6902fde
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 43 deletions.
2 changes: 1 addition & 1 deletion app/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"copyVersion": "Copy version",
"input": "Input",
"behaviors": "Behaviors",
"documentDirectory": "Document directory",
"dataDirectory": "Data directory",
"defaultPath": "Default path",
"dateFormat": "Date format",
"updatedAt": "Updated at: {dateTime}",
Expand Down
78 changes: 41 additions & 37 deletions app/lib/selections/tools/layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,44 +132,48 @@ class LayerToolSelection extends ToolSelection<LayerTool> {
AppLocalizations.of(context).defaultLayer)),
const Divider(),
...List.generate(
layers.length,
(index) => Dismissible(
key: ObjectKey(layers[index]),
background: Container(color: Colors.red),
onDismissed: (direction) {
context
.read<DocumentBloc>()
.add(LayerRemoved(layers[index]));
layers.length,
(index) {
final visible =
state.isLayerVisible(layers[index]);
return Dismissible(
key: ObjectKey(layers[index]),
background: Container(color: Colors.red),
onDismissed: (direction) {
context
.read<DocumentBloc>()
.add(LayerRemoved(layers[index]));
},
child: ListTile(
onTap: () {
context.read<DocumentBloc>().add(
CurrentLayerChanged(layers[index]));
},
child: ListTile(
onTap: () {
context.read<DocumentBloc>().add(
CurrentLayerChanged(
layers[index]));
},
selected:
layers[index] == state.currentLayer,
leading: IconButton(
icon: PhosphorIcon(state
.isLayerVisible(layers[index])
? PhosphorIconsLight.eye
: PhosphorIconsLight.eyeSlash),
tooltip: AppLocalizations.of(context)
.visibility,
onPressed: () {
context.read<DocumentBloc>().add(
LayerVisibilityChanged(
layers[index]));
},
),
trailing: IconTheme.merge(
data: Theme.of(context).iconTheme,
child: LayerDialog(
popupMenu: true,
layer: layers[index],
)),
title: Text(layers[index])),
))
selected:
layers[index] == state.currentLayer,
leading: IconButton(
icon: PhosphorIcon(visible
? PhosphorIconsLight.eye
: PhosphorIconsLight.eyeSlash),
tooltip: visible
? AppLocalizations.of(context).hide
: AppLocalizations.of(context).show,
onPressed: () {
context.read<DocumentBloc>().add(
LayerVisibilityChanged(
layers[index]));
},
),
trailing: IconTheme.merge(
data: Theme.of(context).iconTheme,
child: LayerDialog(
popupMenu: true,
layer: layers[index],
)),
title: Text(layers[index])),
);
},
)
]);
}),
),
Expand Down
4 changes: 2 additions & 2 deletions app/lib/settings/data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class _DataSettingsPageState extends State<DataSettingsPage> {
if (!kIsWeb)
ListTile(
title: Text(
AppLocalizations.of(context).documentDirectory),
AppLocalizations.of(context).dataDirectory),
leading:
const PhosphorIcon(PhosphorIconsLight.folder),
subtitle: state.documentPath.isNotEmpty
Expand Down Expand Up @@ -77,7 +77,7 @@ class _DataSettingsPageState extends State<DataSettingsPage> {
trailing: state.documentPath.isNotEmpty
? IconButton(
icon: const PhosphorIcon(
PhosphorIconsLight.trash),
PhosphorIconsLight.clockClockwise),
tooltip: AppLocalizations.of(context)
.defaultPath,
onPressed: () => _changePath(
Expand Down
4 changes: 2 additions & 2 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -563,10 +563,10 @@ packages:
dependency: "direct main"
description:
name: go_router
sha256: a07c781bf55bf11ae85133338e4850f0b4e33e261c44a66c750fc707d65d8393
sha256: "1bd28265168045adb2df3da178bdbd44d37dddca0e7cfc867f8665d4f6b31f0c"
url: "https://pub.dev"
source: hosted
version: "11.1.2"
version: "11.1.3"
graphs:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies:
share_plus: ^8.0.0
package_info_plus: ^5.0.0
idb_shim: ^2.3.1
go_router: ^11.1.2
go_router: ^11.1.3
xml: ^6.4.2
collection: ^1.18.0
bloc_concurrency: ^0.2.2
Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/74.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
* Change dropdown in text and paragraph style view to disable if no elements are to be added
* Change the zoom slider to operate in realtime in style view
* Change reload button icon in remote button
* Rename document directory to data directory

View all changes in the blog: https://linwood.dev/butterfly/2.0.0-beta.10

0 comments on commit 6902fde

Please sign in to comment.