diff --git a/README.md b/README.md
index 36f6709..d5c936f 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,9 @@
-# OYS Borrow a Boat (bab-project)
+# OYS Borrow a Boat (oys_bab)
Manage a Borrow a Boat program for a Yacht Club
## Install the dependencies
+
```bash
yarn
# or
@@ -10,32 +11,33 @@ npm install
```
### Start the app in development mode (hot-code reloading, error reporting, etc.)
+
```bash
quasar dev
```
-
### Lint the files
+
```bash
yarn lint
# or
npm run lint
```
-
### Format the files
+
```bash
yarn format
# or
npm run format
```
-
-
### Build the app for production
+
```bash
quasar build
```
### Customize the configuration
+
See [Configuring quasar.config.js](https://v2.quasar.dev/quasar-cli-vite/quasar-config-js).
diff --git a/package.json b/package.json
index 901371a..6ec4356 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "bab-project",
+ "name": "oys_bab",
"version": "0.0.1",
"description": "Manage a Borrow a Boat program for a Yacht Club",
"productName": "OYS Borrow a Boat",
@@ -15,6 +15,7 @@
"dependencies": {
"@quasar/extras": "^1.16.4",
"appwrite": "^13.0.0",
+ "pinia": "^2.1.7",
"quasar": "^2.6.0",
"vue": "^3.0.0",
"vue-router": "^4.0.0"
diff --git a/quasar.config.js b/quasar.config.js
index 46e5c8d..aeeb676 100644
--- a/quasar.config.js
+++ b/quasar.config.js
@@ -185,7 +185,7 @@ module.exports = configure(function (/* ctx */) {
builder: {
// https://www.electron.build/configuration/configuration
- appId: 'bab-project',
+ appId: 'oys_bab',
},
},
diff --git a/src/App.vue b/src/App.vue
index ddfb546..4023881 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -6,6 +6,6 @@
import { defineComponent } from 'vue';
export default defineComponent({
- name: 'App'
+ name: 'OYS Borrow-a-Boat',
});
diff --git a/src/assets/oys_lighthouse.jpg b/src/assets/oys_lighthouse.jpg
new file mode 100644
index 0000000..3d13209
Binary files /dev/null and b/src/assets/oys_lighthouse.jpg differ
diff --git a/src/assets/oys_lighthouse_modern.jpg b/src/assets/oys_lighthouse_modern.jpg
new file mode 100644
index 0000000..123b2a8
Binary files /dev/null and b/src/assets/oys_lighthouse_modern.jpg differ
diff --git a/src/boot/appwrite.ts b/src/boot/appwrite.ts
index 93c1527..785dfd0 100644
--- a/src/boot/appwrite.ts
+++ b/src/boot/appwrite.ts
@@ -1,5 +1,5 @@
import { boot } from 'quasar/wrappers';
-import { Client, Account, ID } from 'appwrite';
+import { Client, Account } from 'appwrite';
export const client = new Client();
@@ -7,13 +7,17 @@ client
.setEndpoint('https://cloud.appwrite.io/v1')
.setProject('653ef6f76baf06d68034');
+client.subscribe('account', (response) => {
+ console.log(response);
+});
+
export const account = new Account(client);
-// "async" is optional;
-// more info on params: https://v2.quasar.dev/quasar-cli/boot-files
-export default boot(async ({ app }) => {
- console.log('Appwrite Instantiation');
- app.config.globalProperties.$appwrite_client = client;
- app.config.globalProperties.$appwrite_account = account;
- app.config.globalProperties.$appwrite_ID = ID;
+export default boot(({ app, urlPath, redirect }) => {
+ // Redirect to login page if unauthenticated.
+ try {
+ const current = await account.get();
+ } catch (err) {
+ redirect('/Login');
+ }
});
diff --git a/src/css/quasar.variables.scss b/src/css/quasar.variables.scss
index 3996ce1..9f2ae80 100644
--- a/src/css/quasar.variables.scss
+++ b/src/css/quasar.variables.scss
@@ -12,14 +12,14 @@
// to match your app's branding.
// Tip: Use the "Theme Builder" on Quasar's documentation website.
-$primary : #1976D2;
-$secondary : #26A69A;
-$accent : #9C27B0;
+$primary: #14539a;
+$secondary: #999999;
+$accent: #ed323a;
-$dark : #1D1D1D;
-$dark-page : #121212;
+$dark: #1d1d1d;
+$dark-page: #121212;
-$positive : #21BA45;
-$negative : #C10015;
-$info : #31CCEC;
-$warning : #F2C037;
+$positive: #21ba45;
+$negative: #c10015;
+$info: #31ccec;
+$warning: #f2c037;
diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue
index 4c347c2..cb85f42 100644
--- a/src/layouts/MainLayout.vue
+++ b/src/layouts/MainLayout.vue
@@ -11,25 +11,13 @@
@click="toggleLeftDrawer"
/>
-
- {{ loggedInUser ? `Logged in as ${loggedInUser.name}` : 'Not logged in' }} -
- - -+ {{ + loggedInUser + ? `Logged in as ${loggedInUser.name}` + : 'Not logged in' + }} +
+