Skip to content

Commit

Permalink
,
Browse files Browse the repository at this point in the history
  • Loading branch information
mo9a7i committed Oct 28, 2023
1 parent 2a6a665 commit ef5cd4c
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 86 deletions.
13 changes: 0 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@ Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introdu

Make sure to install the dependencies:

```bash
# npm
npm install

# pnpm
pnpm install

# yarn
yarn install

# bun
bun install
```

## Development Server

Expand Down
10 changes: 0 additions & 10 deletions components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,3 @@

</footer>
</template>

<script>
export default {
}
</script>

<style>
</style>
14 changes: 7 additions & 7 deletions components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
</header>
</template>

<script>
export default {
methods:{
async logout() {
await this.$auth.logout().catch(e => {
<script setup lang="ts">
const logout = async() =>{
const nuxtApp = useNuxtApp()
await nuxtApp.$auth.logout().catch(e => {
console.log('logged out with error', e)
})
console.log('logged out')
}
}
}
</script>

<style>
Expand Down
109 changes: 53 additions & 56 deletions components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,61 +79,58 @@
</template>

<script>
export default {
data(){
return {
user: null,
configs: {
enabled: false,
loading: true,
checkins: {
enabled: false,
loading: true,
venues: {},
}
},
venue_search: '',
bot_enabled_spinner: '',
auto_check_in_enabled_spinner: '',
}
},
mounted() {

},
watch: {
venue_search: async function(val){
if(val.length != 0){
//console.log(val);
let venue_name = await this.$MFO_UTILS.searchVenues(val);
console.log(venue_name[0]?.name);
}

},
'configs.enabled': async function(val, oldVal) {
this.bot_enabled_spinner = '';
console.log(val);
try {
let toggle = await this.$MFO_UTILS.setBotStatus(val);
} catch (error) {
console.log(error)
}

this.bot_enabled_spinner = 'd-none';
},
'configs.checkins.enabled': async function(val, oldVal) {
this.auto_check_in_enabled_spinner = '';
console.log(val);
try {
let toggle = await this.$MFO_UTILS.setAutoCheckinStatus(val);
} catch (error) {
console.log(error)
}

this.auto_check_in_enabled_spinner = 'd-none';
}
},
methods: {

const user = ref(null);
const configs = ref({
enabled: false,
loading: true,
checkins: {
enabled: false,
loading: true,
venues: {},
}
});
const venue_search = ref('');
const bot_enabled_spinner = ref('');
const auto_check_in_enabled_spinner = ref('');

onMounted(async () => {

});

watch(() => configs.value.enabled, async (val, oldVal) => {
bot_enabled_spinner.value = '';
console.log(val);
try {
let toggle = await $MFO_UTILS.setBotStatus(val);
} catch (error) {
console.log(error)
}

bot_enabled_spinner.value = 'd-none';
});

watch(() => configs.value.checkins.enabled, async (val, oldVal) => {
auto_check_in_enabled_spinner.value = '';
console.log(val);
try {
let toggle = await $MFO_UTILS.setAutoCheckinStatus(val);
} catch (error) {
console.log(error)
}

auto_check_in_enabled_spinner.value = 'd-none';
});

const logout = async() =>{

const nuxtApp = useNuxtApp()

await nuxtApp.$auth.logout().catch(e => {
console.log('logged out with error', e)
})
console.log('logged out')
}


},
};
</script>

0 comments on commit ef5cd4c

Please sign in to comment.