Skip to content

Commit

Permalink
style changes and preparing for re-implementing conversation component
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian committed Oct 3, 2023
1 parent 96cf492 commit 92ee292
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 43 deletions.
59 changes: 36 additions & 23 deletions frontend/components/ThreadList/ThreadList.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
<script lang="ts">
<script lang="ts" >
import { MessageData, emitter, state, } from '../../lib/global';
import ThreadPreview from '../ThreadPreview/ThreadPreview.vue';
import { RouterLink } from 'vue-router';
// type ThreadListInterface = {
// username: String,
// }
export default {
props: {
export default{
props:{
username: String,
},
components:{ThreadPreview}
}
/*
get the user extension this is handled in threadlist.php
Expand All @@ -32,7 +38,7 @@ export default {
<input type='hidden' name='key_uuid' id='key_uuid'/>
</form>
*/
}
</script>

<style>
Expand Down Expand Up @@ -77,8 +83,16 @@ export default {
table-layout: fixed;
}
@media screen and (width <=700) {
div.action_bar{
top: 0px;
}
}
</style>



<template>

<div class="threadlist_container">
Expand All @@ -89,32 +103,31 @@ export default {


<div class='action_bar' id='action_bar'>
<div class='heading'><b>WebTexting</b> this.props.username </div>
<div class='heading'><b>WebTexting</b> {{username}} </div>
<div class='actions'>
</div>
<div style='clear: both;'></div>
</div>
<div class='table'>
<!-- <ThreadPreview v-for="preview in this.threads" /> -->
<div class="preview_list_container">
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12063801161"><span class="thread-name">12063801161</span><br><span class="thread-last-message">Test </span><span class="timestamp" data-timestamp="2023-09-13 21:39:05.45867">9 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">dan ryan</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">Franklin</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">Oogway</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">Pope</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">Poe</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">Tai Lung</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">Roshi</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">Goku</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12063801161"><span class="thread-name">12063801161</span><br><span class="thread-last-message">Test </span><span class="timestamp" data-timestamp="2023-09-13 21:39:05.45867">9 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">dan ryan</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">Franklin</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">Oogway</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">Pope</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">Poe</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">Tai Lung</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">Roshi</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><a href="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"><span class="thread-name">Goku</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></a></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">dan ryan</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">Franklin</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">Oogway</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">Pope</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">Poe</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">Tai Lung</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">Roshi</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">Goku</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12063801161"> <span class="thread-name">12063801161</span><br><span class="thread-last-message">Test </span><span class="timestamp" data-timestamp="2023-09-13 21:39:05.45867">9 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">dan ryan</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">Franklin</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">Oogway</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">Pope</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">Poe</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">Tai Lung</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">Roshi</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
<div class='tr_replace'><div class=td_preview><router-link to="thread.php?extension_uuid=fe91be7c-ecb2-4661-9d3a-bcf27099221b&amp;number=12068589310"> <span class="thread-name">Goku</span><br><span class="thread-last-message">Hmm</span><span class="timestamp" data-timestamp="2023-09-06 21:57:12.733721">16 days ago</span></router-link></div ></div >
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
import Conversation from '../conversation/Conversation.vue';
import ThreadList from '../ThreadList/ThreadList.vue'
import { useRoute } from 'vue-router';
import { MessageData } from '../../lib/global';
export default {
Expand Down Expand Up @@ -36,9 +37,11 @@ export default {
<!-- This container should default to threadlist on the left and blank space on the right.
The blank space should notify the user that they can select a thread to display that thread in the threadContainer -->
<template>
<Router-View>

<div id="WEB_TEXT_ROOT">
<link type="text/css" href="../../../js/style.css">
<ThreadList />
<ThreadList username='Steve'/>
<!-- <div class="threadlist_container">
<div class='action_bar' id='action_bar'>
<div class='heading'><b>WebTexting</b> this.props.username </div>
Expand All @@ -54,7 +57,7 @@ The blank space should notify the user that they can select a thread to display
</table> -->
<!-- </div> -->
<div id="conversation" data-v-app="">
<div class="thread-header">12063801161 <!----><!----></div>
<div class="thread-header">12063801161 <!----> as {{this.$route.query.number ? this.$route.query.number : this.$route.query.extension_uuid}}<!----></div>
<div class="thread">
<div class="message-container">
<backfill backfillavailable="false"></backfill>
Expand Down Expand Up @@ -170,6 +173,7 @@ The blank space should notify the user that they can select a thread to display
</div>
</div>
</div>
</Router-View>
</template>

<style scoped>
Expand Down
6 changes: 6 additions & 0 deletions frontend/components/conversation/Conversation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,10 @@ table {
width: 100%;
table-layout: fixed;
}
@media screen and (width <=700px){
#conversation{
display: none;
}
}
</style>
17 changes: 17 additions & 0 deletions frontend/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createApp } from 'vue';
import {createWebHistory, createRouter} from 'vue-router';
import router from './routes';
import { RunSIPConnection } from './lib/SIP';
import Conversation from './components/conversation/Conversation.vue'; //remove once initializeThreadListJS works
Expand Down Expand Up @@ -82,6 +83,22 @@ export const initializeWebTextingContainer = function initializeWebTextingContai
console.log("error from within vue:", info, err, instance);
console.error(err);
}

const router = createRouter({
history: createWebHistory("/app/webtexting/"),
routes:[
{
path:"/threadlist.php",
name:"Home",
component:WebTextingContainer
},
{
path:"/thread.php",
name:"ThreadView",
component: WebTextingContainer
}
]
})
app.use(router);
app.mount("#TEST_DIV_FOR_TESTING_WEBTEXTING");

Expand Down
17 changes: 0 additions & 17 deletions frontend/routes/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +0,0 @@

import {createWebHistory, createRouter} from 'vue-router';


const router = createRouter({
history: createWebHistory(),
routes:[
{
path:'/',
name:'Home',
component: Vue.component('Home', require('../components/WebTextingContainer/WebTextingContainer.vue'))

}
]
})

export default router;
7 changes: 6 additions & 1 deletion threadlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@

<script src="js/webtexting.umd.js"></script>
<script type="text/javascript">
//window.notification_data = <?php echo json_encode($threads); ?>;
window.notification_data = <?php echo json_encode(array("extension_uuid" => $extension['extension_uuid'])); ?>;
function clean_number() { // clean any non-digits out of the phone number box
document.querySelector("#new-thread-number").value = document.querySelector("#new-thread-number").value.replace(/[^\d+]/g, "");
Expand All @@ -221,7 +220,13 @@ function clean_number() { // clean any non-digits out of the phone number box
grid-template-columns: 30% 1fr;
grid-template-rows: auto;
}
@media screen and (width <= 700px) {
#WEB_TEXT_ROOT{
grid-template-columns:100%;
grid-template-rows:80vh;
}

}



Expand Down

0 comments on commit 92ee292

Please sign in to comment.