Skip to content

Commit 18cf59f

Browse files
Merge pull request #32 from stepbystepcode/dev
update
2 parents 74d060a + f341443 commit 18cf59f

File tree

12 files changed

+4174
-22
lines changed

12 files changed

+4174
-22
lines changed

pnpm-lock.yaml

Lines changed: 4151 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

quasar.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ module.exports = configure(function (/* ctx */) {
106106
// directives: [],
107107

108108
// Quasar plugins
109-
plugins: ['LocalStorage']
109+
plugins: ['LocalStorage','Notify']
110110
},
111111

112112
// https://v2.quasar.dev/options/animations

src/components/commandReq.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import axios from 'axios'
22
import {LocalStorage} from "quasar";
33

44
export default function commandReq(com,params1,params2) {
5-
return axios.post('http://8.130.48.157:8081/api/file/commands',{
5+
return axios.post('http://8.130.101.128:8081/api/file/commands',{
66
command: com.toString(),
77
params: [params1,params2]
88
},{

src/pages/AvatarPage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const selectAvatar = (num) => {
3030
};
3131
const setAvatar = () => {
3232
axios
33-
.post(`http://8.130.48.157:8081/api/avatar?avatar=${avatar.value}`, {}, {
33+
.post(`http://8.130.101.128:8081/api/avatar?avatar=${avatar.value}`, {}, {
3434
headers: {
3535
'Authorization': `Bearer ${$q.localStorage.getItem('token')}`,
3636
}

src/pages/ChatPage.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const config = {
5252
}
5353
5454
// const update = () => {
55-
// axios.post('http://8.130.48.157:8081/api/check', {
55+
// axios.post('http://8.130.101.128:8081/api/check', {
5656
// person: route.params.id
5757
// }, config
5858
// ).then((res) => {
@@ -66,7 +66,7 @@ const Profile = (e) => {
6666
}
6767
onMounted(() => {
6868
// setInterval(update, 500);
69-
axios.post('http://8.130.48.157:8081/api/info', {
69+
axios.post('http://8.130.101.128:8081/api/info', {
7070
person: route.params.id
7171
}, config
7272
).then((res) => {
@@ -102,12 +102,13 @@ const sendMessage = async () => {
102102
if (message.value.length>100) {
103103
$q.notify({
104104
message: 'Message too long!',
105-
color: 'negative',
106-
position: 'top'
105+
type:'warning',
106+
color:'yellow',
107+
position: 'bottom'
107108
})
108109
return
109110
}
110-
await axios.post('http://8.130.48.157:8081/api/chat', {
111+
await axios.post('http://8.130.101.128:8081/api/chat', {
111112
content: message.value,
112113
receiver: route.params.id
113114
}, config

src/pages/EditorPage.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const save = () => {
142142
filename: selectFolder.value + '/' + selectFile.value,
143143
//time: new Date().getTime()
144144
});
145-
axios.post('http://8.130.48.157:8081/api/file/save', json, {
145+
axios.post('http://8.130.101.128:8081/api/file/save', json, {
146146
headers: {
147147
'Content-Type': 'application/json',
148148
'Authorization': `Bearer ${$q.localStorage.getItem('token')}`
@@ -290,13 +290,13 @@ const imgAdd = (pos, file) => {
290290
console.log(file);
291291
const formData = new FormData()
292292
formData.append('image', file);
293-
axios.post('http://8.130.48.157:8081/api/upload', formData, {
293+
axios.post('http://8.130.101.128:8081/api/upload', formData, {
294294
headers: {
295295
'Authorization': `Bearer ${$q.localStorage.getItem('token')}`,
296296
'content-type': 'multipart/form-data'
297297
}
298298
}).then((res) => {
299-
const url = `http://8.130.48.157:8081/api/file/get?filename=${res.data.message}`;
299+
const url = `http://8.130.101.128:8081/api/file/get?filename=${res.data.message}`;
300300
content.value = content.value.replace(/!\[[^\]]+\]\([^)]+\)/, `![](${url})`);
301301
})
302302
}

src/pages/ListPage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const time = (time) => {
5353
const router = useRouter();
5454
const list = ref();
5555
const token = $q.localStorage.getItem('token');
56-
axios.post('http://8.130.48.157:8081/api/info', '', {
56+
axios.post('http://8.130.101.128:8081/api/info', '', {
5757
headers: {
5858
'Authorization': `Bearer ${token}`,
5959
'Content-Type': 'application-json'

src/pages/LoginPage.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const login = () => {
4343
icon: 'error',
4444
});
4545
else axios
46-
.post('http://8.130.48.157:8081/api/login', {
46+
.post('http://8.130.101.128:8081/api/login', {
4747
username: username.value,
4848
password: password.value,
4949
})
@@ -55,7 +55,7 @@ const login = () => {
5555
$q.localStorage.set('token', res.data.token)
5656
$q.localStorage.set('info', res.data)
5757
const token=res.data.token;
58-
axios.post('http://8.130.48.157:8081/api/info', {
58+
axios.post('http://8.130.101.128:8081/api/info', {
5959
person: ''
6060
}, {
6161
headers: {
@@ -67,7 +67,7 @@ const login = () => {
6767
store.info = {...store.info,...res.data.message[store.info.username]};
6868
$q.localStorage.set('info', store.info)
6969
});
70-
axios.post('http://8.130.48.157:8081/api/check?type=all', null, {
70+
axios.post('http://8.130.101.128:8081/api/check?type=all', null, {
7171
headers: {
7272
'Authorization': `Bearer ${token}`
7373
}})

src/pages/NewFriends.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const search = ref('');
4141
const token = $q.localStorage.getItem('token')
4242
const username = $q.localStorage.getItem('info').username
4343
const request = (atti) => {
44-
axios.post(`http://8.130.48.157:8081/api/newfriends?username=${search.value}&operation=${atti}`, {}, {
44+
axios.post(`http://8.130.101.128:8081/api/newfriends?username=${search.value}&operation=${atti}`, {}, {
4545
headers: {
4646
'Authorization': `Bearer ${token}`,
4747
}
@@ -53,7 +53,7 @@ const request = (atti) => {
5353
5454
}
5555
const handle = (req, atti) => {
56-
axios.post(`http://8.130.48.157:8081/api/nfmgr?info=${atti}&username=${req}`, {}, {
56+
axios.post(`http://8.130.101.128:8081/api/nfmgr?info=${atti}&username=${req}`, {}, {
5757
headers: {
5858
'Authorization': `Bearer ${token}`,
5959
}
@@ -63,7 +63,7 @@ const handle = (req, atti) => {
6363
icon: res.data.code===200?'success':'error',
6464
});
6565
list.value = list.value.filter((item) => item.username !== req);
66-
axios.post('http://8.130.48.157:8081/api/info', '', {
66+
axios.post('http://8.130.101.128:8081/api/info', '', {
6767
headers: {
6868
'Authorization': `Bearer ${token}`,
6969
'Content-Type': 'application-json'
@@ -76,7 +76,7 @@ const handle = (req, atti) => {
7676
7777
}
7878
79-
axios.post('http://8.130.48.157:8081/api/info', '', {
79+
axios.post('http://8.130.101.128:8081/api/info', '', {
8080
headers: {
8181
'Authorization': `Bearer ${token}`,
8282
'Content-Type': 'application-json'

src/pages/ProfilePage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const token = $q.localStorage.getItem('token')
5353
const delFriend=()=>{
5454
Swal.fire({title:'Are you sure to delete this friend?',text:'You will not be able to recover this friend!',icon:'warning',showCancelButton:true,reverseButtons:true}).then((res)=>{
5555
if(res.isConfirmed) {
56-
axios.post(`http://8.130.48.157:8081/api/newfriends?operation=delete&username=${route.params.id}`,'',{headers:{Authorization:`Bearer ${token}`}}).then((res)=>{
56+
axios.post(`http://8.130.101.128:8081/api/newfriends?operation=delete&username=${route.params.id}`,'',{headers:{Authorization:`Bearer ${token}`}}).then((res)=>{
5757
if(res.data.code===200){
5858
Swal.fire('Deleted!','Your friend has been deleted.','success').then(()=>{
5959
router.push('/chat')

0 commit comments

Comments
 (0)