Skip to content

Commit

Permalink
fix: lets just hope this works (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
invertedEcho authored Sep 8, 2024
1 parent f280e6e commit 490b0f4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 104 deletions.
48 changes: 11 additions & 37 deletions backend/src/client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login via Invite Code</title>
<title>Flatshare</title>
<style>
body {
font-family: Arial, sans-serif;
Expand All @@ -19,53 +19,27 @@
text-align: center;
background: #fff;
padding: 30px;
margin: 30px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 {
color: #1560BD;
margin-bottom: 20px;
}
a#invite-link {
display: inline-block;
background: #1560BD;
color: white;
padding: 10px 20px;
text-decoration: none;
border-radius: 5px;
transition: background 0.3s ease;
}
a#invite-link:hover {
background: #1E90FF;
}
p#warning {
color: red;
margin-top: 20px;
}
.description {
display: flex;
flex-direction: column;
}
</style>
<script>
window.onload = function() {
const urlParams = new URLSearchParams(window.location.search);
const inviteCode = urlParams.get('inviteCode');
const linkElement = document.getElementById('invite-link');
const warningElement = document.getElementById('warning');

if (inviteCode) {
linkElement.href = `wg-app://group?inviteCode=${inviteCode}`;
linkElement.style.display = 'inline-block';
warningElement.style.display = 'none';
} else {
linkElement.style.display = 'none';
warningElement.style.display = 'block';
}
}
</script>
</head>
<body>
<div class="container">
<h1>Login via Invite Code</h1>
<a id="invite-link" href="#" style="display: none;">Open in app</a>
<p id="warning" style="display: none;">Warning: Broken link, no invite code provided.</p>
<h1>Flatshare</h1>
<div class="description">
<span>Welcome to Flatshare, the mobile app that helps you keep track of everything in your shared apartment!</span>
<span>If you are coming to this page via an invite code and see this page, it most likely means you haven't installed the Flatshare App yet. Please install it first.</span>
</div>
</div>
</body>
</html>
1 change: 0 additions & 1 deletion backend/src/db/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { drizzle } from 'drizzle-orm/postgres-js';
import * as postgres from 'postgres';

// TODO: Switch to t3-oss/env
const connectionString = process.env.DATABASE_URL;

if (connectionString === undefined) {
Expand Down
3 changes: 2 additions & 1 deletion frontend/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="https" android:host="flatshare.invertedecho.com" />
<data android:scheme="https" />
<data android:host="flatshare.invertedecho.com" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
Expand Down
68 changes: 3 additions & 65 deletions frontend/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,17 @@
name: flatshare
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
description: " Track everything you need in your shared apartment with ease"

publish_to: 'none'

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1

environment:
sdk: '>=3.4.0 <4.0.0'

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter:
sdk: flutter


# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.6
http: ^1.2.1
flutter_secure_storage: ^9.2.2
Expand All @@ -50,49 +28,9 @@ dev_dependencies:
flutter_test:
sdk: flutter

# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^3.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter packages.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true

assets:
- .env

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware

# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages

# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages

0 comments on commit 490b0f4

Please sign in to comment.