mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 02:39:19 +08:00
feat: integrate dashbot tab for desktop devices
This commit is contained in:
@@ -25,6 +25,16 @@ class DashbotWindow extends ConsumerWidget {
|
||||
final settings = ref.watch(settingsProvider);
|
||||
final currentRequest = ref.watch(selectedRequestModelProvider);
|
||||
|
||||
// Close the overlay when the window is not popped anymore
|
||||
ref.listen(
|
||||
dashbotWindowNotifierProvider.select((s) => s.isPopped),
|
||||
(prev, next) {
|
||||
if (prev == true && next == false) {
|
||||
onClose();
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
ref.listen(
|
||||
selectedRequestModelProvider,
|
||||
(current, next) {
|
||||
@@ -108,6 +118,20 @@ class DashbotWindow extends ConsumerWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.open_in_new,
|
||||
color:
|
||||
Theme.of(context).colorScheme.onPrimary,
|
||||
),
|
||||
onPressed: () {
|
||||
ref
|
||||
.read(dashbotWindowNotifierProvider
|
||||
.notifier)
|
||||
.togglePopped();
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.close,
|
||||
|
||||
Reference in New Issue
Block a user