Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Plus" to the website navigation bar #1716

Merged
merged 1 commit into from
Aug 20, 2024
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
20 changes: 12 additions & 8 deletions website/lib/page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ class PageTemplate extends StatelessWidget {
title: const Text("Hauptseite"),
onTap: () => context.go('/'),
),
ListTile(
leading: const Icon(Icons.home),
title: const Text("Plus"),
onTap: () => context.go('/plus'),
),
ListTile(
leading: const Icon(Icons.question_answer),
title: const Text("Docs"),
Expand Down Expand Up @@ -129,15 +134,14 @@ class _AppBarTitle extends StatelessWidget implements PreferredSizeWidget {
mainAxisAlignment: MainAxisAlignment.end,
children: [
if (!isPhone(context)) ...[
if (isSharezonePlusPageEnabledFlag)
Padding(
padding: const EdgeInsets.only(right: 30),
child: TransparentButton(
child: const Text("Plus"),
onTap: () =>
context.go('/${SharezonePlusPage.tag}'),
),
Padding(
padding: const EdgeInsets.only(right: 30),
child: TransparentButton(
child: const Text("Plus"),
onTap: () =>
context.go('/${SharezonePlusPage.tag}'),
),
),
TransparentButton(
child: const Text("Support"),
onTap: () => context.go('/${SupportPage.tag}'),
Expand Down
4 changes: 0 additions & 4 deletions website/lib/sharezone_plus/sharezone_plus_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// SPDX-License-Identifier: EUPL-1.2

import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
import 'package:go_router/go_router.dart';
Expand All @@ -18,9 +17,6 @@ import 'package:sharezone_website/page.dart';
import 'package:sharezone_website/utils.dart';
import 'package:sharezone_widgets/sharezone_widgets.dart';

final isSharezonePlusPageEnabledFlag =
kDebugMode || Flavor.fromEnvironment() == Flavor.dev;

typedef UserData = ({String username, String userId});

String getFirebaseProjectId() {
Expand Down
Loading