diff --git a/src/examples/footers/FooterDefault.vue b/src/examples/footers/FooterDefault.vue index d60799b..7c3fcbe 100644 --- a/src/examples/footers/FooterDefault.vue +++ b/src/examples/footers/FooterDefault.vue @@ -12,33 +12,7 @@ defineProps({ route: "/" }) }, - socials: { - type: Array, - icon: String, - link: String, - default: () => [ - { - icon: '', - link: "https://www.facebook.com/CreativeTim/" - }, - { - icon: '', - link: "https://twitter.com/creativetim" - }, - { - icon: '', - link: "https://dribbble.com/creativetim" - }, - { - icon: '', - link: "https://github.com/creativetimofficial" - }, - { - icon: '', - link: "https://www.youtube.com/channel/UCVyTG4sCw-rOvB9oHkzZD1w" - } - ] - }, + menus: { type: Array, name: String, @@ -127,51 +101,17 @@ defineProps({
-
- - - -
{{ brand.name }}
-
-
- -
-
-
-
{{ name }}
- + +
+

- All rights reserved. Copyright © + Екатерина Кузнецова, Ирина Комарова. {{ new Date().getFullYear() }} - Material Kit by + . Использованы материалы Creative Tim. diff --git a/src/examples/navbars/NavbarDefault.vue b/src/examples/navbars/NavbarDefault.vue index c8ec9cd..a728fd5 100644 --- a/src/examples/navbars/NavbarDefault.vue +++ b/src/examples/navbars/NavbarDefault.vue @@ -1,6 +1,6 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/views/LandingPages/Profile/AllProfiles.vue b/src/views/LandingPages/Profile/AllProfiles.vue new file mode 100644 index 0000000..453b7b0 --- /dev/null +++ b/src/views/LandingPages/Profile/AllProfiles.vue @@ -0,0 +1,124 @@ + + + + + + \ No newline at end of file diff --git a/src/views/LandingPages/Profile/EditProfile.vue b/src/views/LandingPages/Profile/EditProfile.vue new file mode 100644 index 0000000..b89691f --- /dev/null +++ b/src/views/LandingPages/Profile/EditProfile.vue @@ -0,0 +1,177 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/views/LandingPages/Project/AddProject.vue b/src/views/LandingPages/Project/AddProject.vue new file mode 100644 index 0000000..bb34dc3 --- /dev/null +++ b/src/views/LandingPages/Project/AddProject.vue @@ -0,0 +1,147 @@ + + + + + \ No newline at end of file diff --git a/src/views/LandingPages/Project/AllProjects.vue b/src/views/LandingPages/Project/AllProjects.vue new file mode 100644 index 0000000..a6c6dc5 --- /dev/null +++ b/src/views/LandingPages/Project/AllProjects.vue @@ -0,0 +1,124 @@ + + + + + + \ No newline at end of file diff --git a/src/views/LandingPages/Project/EditProject.vue b/src/views/LandingPages/Project/EditProject.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/LandingPages/Project/ViewProject.vue b/src/views/LandingPages/Project/ViewProject.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/LandingPages/SignIn/BasicRegister.vue b/src/views/LandingPages/SignIn/BasicRegister.vue new file mode 100644 index 0000000..bbd6d93 --- /dev/null +++ b/src/views/LandingPages/SignIn/BasicRegister.vue @@ -0,0 +1,177 @@ + + + + + + diff --git a/src/views/LandingPages/SignIn/BasicView.vue b/src/views/LandingPages/SignIn/BasicView.vue index 9b85c21..7dfb09d 100644 --- a/src/views/LandingPages/SignIn/BasicView.vue +++ b/src/views/LandingPages/SignIn/BasicView.vue @@ -16,7 +16,8 @@ const password = ref(''); const errorMessage = ref(''); const isAuthenticated = computed(() => !!sessionStorage.getItem('access_token')); // Computed property to check if the user is authenticated - +const userId = computed(() => sessionStorage.getItem('user_id')); +const loggedUserName = computed(() => sessionStorage.getItem('username')); const login = async () => { if (!username.value || !password.value) { @@ -33,28 +34,30 @@ const login = async () => { try { const response = await axios.post(url, body, { headers }); - errorMessage.value = `Request:\nPOST ${url}\nHeaders: ${JSON.stringify(headers)}\nBody: ${JSON.stringify(body)}\n\nResponse:\nStatus: ${response.status}\nHeaders: ${JSON.stringify(response.headers)}\nBody: ${JSON.stringify(response.data)}`; - sessionStorage.setItem('access_token', response.data.access); // Save the access token in sessionStorage (new line) + // Removed debug information from output + sessionStorage.setItem('access_token', response.data.access); + sessionStorage.setItem('username', username.value); // Save username in sessionStorage + sessionStorage.setItem('user_id', response.data.id); // Save the user id in sessionStorage + location.reload(); // Refresh page } catch (error) { if (error.response) { - // The request was made and the server responded with a status code that falls out of the range of 2xx - errorMessage.value = `Request:\nPOST ${url}\nHeaders: ${JSON.stringify(headers)}\nBody: ${JSON.stringify(body)}\n\nResponse:\nStatus: ${error.response.status}\nHeaders: ${JSON.stringify(error.response.headers)}\nBody: ${JSON.stringify(error.response.data)}`; + errorMessage.value = "Incorrect login or password."; // Simplified error message } else if (error.request) { - // The request was made but no response was received - errorMessage.value = `Request:\nPOST ${url}\nHeaders: ${JSON.stringify(headers)}\nBody: ${JSON.stringify(body)}\n\nError: No response received from server. Please try again later.`; + errorMessage.value = "No response received from server. Please try again later."; } else { - // Something happened in setting up the request that triggered an error - errorMessage.value = `Request:\nPOST ${url}\nHeaders: ${JSON.stringify(headers)}\nBody: ${JSON.stringify(body)}\n\nError: ${error.message}`; + errorMessage.value = error.message; } } } }; -const logout = () => { // Method to logout the user by clearing the session storage (new function) +const logout = () => { sessionStorage.removeItem('access_token'); + sessionStorage.removeItem('username'); // Also clear the username from sessionStorage + sessionStorage.removeItem('user_id'); + location.reload(); // Refresh page after logout }; - onMounted(() => { setMaterialInput(); }); @@ -117,13 +120,13 @@ export default {

-

Опять Ты!

+

Вы вошли в аккаунт {{ loggedUserName }}, ваш ID {{ userId }}

-

Ты с какого района?

+

Пожалуйста, введите логин и пароль

@@ -160,9 +163,17 @@ export default {

Нет аккаунта? Пока что нахер идитеЗарегистироваться +

+

+ + Забыли пароль

diff --git a/src/views/LandingPages/SignIn/ForgotPassword.vue b/src/views/LandingPages/SignIn/ForgotPassword.vue new file mode 100644 index 0000000..6bcf42a --- /dev/null +++ b/src/views/LandingPages/SignIn/ForgotPassword.vue @@ -0,0 +1,33 @@ + + + + + + + + \ No newline at end of file diff --git a/src/views/Presentation/PresentationView.vue b/src/views/Presentation/PresentationView.vue index c8c55d4..8ab68b9 100644 --- a/src/views/Presentation/PresentationView.vue +++ b/src/views/Presentation/PresentationView.vue @@ -22,7 +22,6 @@ import DefaultFooter from "../../examples/footers/FooterDefault.vue"; import Header from "../../examples/Header.vue"; // sections -import PresentationCounter from "./Sections/PresentationCounter.vue"; import PresentationSearch from "./Sections/PresentationSearch.vue"; @@ -31,6 +30,8 @@ import vueMkHeader from "@/assets/img/space-background.jpg"; //authentification const isAuthenticated = computed(() => !!sessionStorage.getItem('access_token')); +const userId = computed(() => sessionStorage.getItem('user_id')); +const loggedUserName = computed(() => sessionStorage.getItem('username')); //hooks const body = document.getElementsByTagName("body")[0]; @@ -46,21 +47,24 @@ onUnmounted(() => { @@ -85,16 +89,23 @@ export default {

LinkedMin

+

+ + + + + +

-

- Тариф Премиум

+ Привет, {{ loggedUserName }}
@@ -114,19 +125,7 @@ export default {
- - - -
- -
-
-

{{ project.title }}

-

{{ project.description }}

-
-
-
- + diff --git a/src/views/Presentation/Sections/PresentationSearch.vue b/src/views/Presentation/Sections/PresentationSearch.vue index 012ada6..b7b9c24 100644 --- a/src/views/Presentation/Sections/PresentationSearch.vue +++ b/src/views/Presentation/Sections/PresentationSearch.vue @@ -3,10 +3,11 @@ import { onMounted, onUnmounted } from "vue"; import axios from 'axios'; import { ref } from "vue"; + const searchQuery = ref(''); const searchResultProjects = ref([]); const searchResultUsers = ref([]); - +const searchButtonIsPressed = ref(false); const search = async () => { try { const projectsResponse = await axios.get(`http://somebodyhire.me/api/search/projects/?search_query=${searchQuery.value}`); @@ -14,6 +15,7 @@ const search = async () => { const usersResponse = await axios.get(`http://somebodyhire.me/api/search/profiles/?search_query=${searchQuery.value}`); searchResultUsers.value = usersResponse.data; + searchButtonIsPressed.value = true; } catch (error) { console.error('There was an error fetching the search results', error); } @@ -27,38 +29,116 @@ const search = async () => { \ No newline at end of file