Skip to content

Commit

Permalink
made yesand no upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
andzejsp committed Jun 17, 2023
1 parent 0d2d74f commit 29a3e16
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 70 deletions.
35 changes: 29 additions & 6 deletions web/src/components/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,33 @@
<ul class="flex flex-col font-medium p-4 md:p-0 mt-4 md:flex-row md:space-x-8 md:mt-0 ">

<li>
<RouterLink :to="{ name: 'discussions' }" class="p-2" active-class="p-2 bg-bg-light-tone dark:bg-bg-dark-tone rounded-t-lg ">
<RouterLink :to="{ name: 'discussions' }" class="p-2"
active-class="p-2 bg-bg-light-tone dark:bg-bg-dark-tone rounded-t-lg ">
<a href="#" class=" hover:text-primary duration-150">Discussions</a>
</RouterLink>
</li>
<li>
<RouterLink :to="{ name: 'settings' }" class="p-2" active-class="p-2 bg-bg-light-tone dark:bg-bg-dark-tone rounded-t-lg ">
<RouterLink :to="{ name: 'settings' }" class="p-2"
active-class="p-2 bg-bg-light-tone dark:bg-bg-dark-tone rounded-t-lg ">
<a href="#" class=" hover:text-primary duration-150">Settings</a>
</RouterLink>
</li>
<li>
<RouterLink :to="{ name: 'extensions' }" class="p-2" active-class="p-2 bg-bg-light-tone dark:bg-bg-dark-tone rounded-t-lg ">
<RouterLink :to="{ name: 'extensions' }" class="p-2"
active-class="p-2 bg-bg-light-tone dark:bg-bg-dark-tone rounded-t-lg ">
<a href="#" class=" hover:text-primary duration-150">Extensions</a>
</RouterLink>
</li>

<li>
<RouterLink :to="{ name: 'training' }" class="p-2" active-class="p-2 bg-bg-light-tone dark:bg-bg-dark-tone rounded-t-lg ">
<RouterLink :to="{ name: 'training' }" class="p-2"
active-class="p-2 bg-bg-light-tone dark:bg-bg-dark-tone rounded-t-lg ">
<a href="#" class=" hover:text-primary duration-150">Training</a>
</RouterLink>
</li>
<li>
<RouterLink :to="{ name: 'help' }" class="p-2" active-class="p-2 bg-bg-light-tone dark:bg-bg-dark-tone rounded-t-lg ">
<RouterLink :to="{ name: 'help' }" class="p-2"
active-class="p-2 bg-bg-light-tone dark:bg-bg-dark-tone rounded-t-lg ">
<a href="#" class=" hover:text-primary duration-150">Help</a>
</RouterLink>
</li>
Expand All @@ -35,7 +40,25 @@
</template>

<script setup>
import {nextTick} from 'vue'
import { nextTick } from 'vue'
import feather from 'feather-icons'
import { RouterLink } from 'vue-router'
</script>
<script>
export default {
data() {
return {
};
},
activated() {
},
methods: {
},
};
</script>
15 changes: 9 additions & 6 deletions web/src/components/YesNoDialog.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div v-if="show" class="fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50">
<div class="relative w-full max-w-md max-h-full">
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
<div class="relative w-full max-w-md max-h-full ">
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700 ">
<button type="button" @click="hide(false)"
class="absolute top-3 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white">
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"
Expand All @@ -21,11 +21,10 @@
<h3 class="mb-5 text-lg font-normal text-gray-500 dark:text-gray-400 select-none">{{ message }}</h3>
<button @click="hide(true)" type="button"
class="text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center mr-2">
Yes, I'm sure
{{ConfirmButtonText}}
</button>
<button @click="hide(false)" type="button"
class="text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600">No,
cancel</button>
class="text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600">{{DenyButtonText}}</button>
</div>
</div>
</div>
Expand All @@ -39,6 +38,8 @@ export default {
show: false,
message: "",
resolve: null,
ConfirmButtonText: "Yes, I'm sure",
DenyButtonText: "No, cancel",
};
},
methods: {
Expand All @@ -49,7 +50,9 @@ export default {
this.resolve = null;
}
},
askQuestion(message) {
askQuestion(message, ConfirmButtonText, DenyButtonText) {
this.ConfirmButtonText =ConfirmButtonText || this.ConfirmButtonText
this.DenyButtonText =DenyButtonText || this.DenyButtonText
return new Promise((resolve) => {
this.message = message;
this.show = true;
Expand Down
11 changes: 6 additions & 5 deletions web/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ const app = createApp(App)
const store = createStore({
state () {
return {
count: 0,
mountedPersonalities: {}
// count: 0,
mountedPersonalities: {},
settingsChanged:false
}
},
mutations: {
increment (state) {
state.count++
}
// increment (state) {
// state.count++
// }
}
})

Expand Down
2 changes: 1 addition & 1 deletion web/src/views/DiscussionsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ export default {
// To fix scrolling back to last message, this hook is needed.
// If anyone knows hor to fix scroll issue when changing pages, please do fix it :D
console.log("Websocket connected (activated)", this.socketConnected)
console.log('settings changed acc', this.$store.state.settingsChanged)
await this.getPersonalityAvatars()
if (this.isCreated) {
Expand Down
Loading

0 comments on commit 29a3e16

Please sign in to comment.