Chg: コミュニティ・チャンネルのUI
This commit is contained in:
@@ -54,7 +54,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content-main">
|
<div class="content-main">
|
||||||
<div class="content-header">
|
<div
|
||||||
|
class="content-header"
|
||||||
|
:class='isHiddenTitleBar
|
||||||
|
? "isHidden"
|
||||||
|
: ""'
|
||||||
|
>
|
||||||
{{
|
{{
|
||||||
title
|
title
|
||||||
?? (serverInfo?.success
|
?? (serverInfo?.success
|
||||||
@@ -187,6 +192,7 @@ main.layout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.content-header {
|
.content-header {
|
||||||
|
display: block;
|
||||||
padding: 1rem 1.25rem;
|
padding: 1rem 1.25rem;
|
||||||
font-size: 1.3rem;
|
font-size: 1.3rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -198,6 +204,10 @@ main.layout {
|
|||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content-header.isHidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.route-main {
|
.route-main {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -256,6 +266,7 @@ const router = useRouter();
|
|||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const isFullRoute = computed(() => route.meta.isFullRoute === true);
|
const isFullRoute = computed(() => route.meta.isFullRoute === true);
|
||||||
|
const isHiddenTitleBar = computed(() => route.meta.isHiddenTitleBar === true);
|
||||||
|
|
||||||
watch(route, () => {
|
watch(route, () => {
|
||||||
if (typeof route.meta.title === "string")
|
if (typeof route.meta.title === "string")
|
||||||
|
|||||||
@@ -151,6 +151,13 @@ const deleteMessage = async () => {
|
|||||||
resolve();
|
resolve();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
createTopNotice({
|
||||||
|
props: {
|
||||||
|
icon: "material-symbols:error-outline-rounded",
|
||||||
|
iconColor: "var(--error-color)",
|
||||||
|
message: "キャンセルしました。",
|
||||||
|
},
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ const router = createRouter({
|
|||||||
meta: {
|
meta: {
|
||||||
title: "コミュニティ",
|
title: "コミュニティ",
|
||||||
isFullRoute: true,
|
isFullRoute: true,
|
||||||
|
isHiddenTitleBar: true,
|
||||||
},
|
},
|
||||||
component: () => import("@/routes/community/index.vue"),
|
component: () => import("@/routes/community/index.vue"),
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -9,6 +9,12 @@
|
|||||||
v-if="!isProcessing && channel"
|
v-if="!isProcessing && channel"
|
||||||
class="channel"
|
class="channel"
|
||||||
>
|
>
|
||||||
|
<div class="community-top-info">
|
||||||
|
<Icon icon="material-symbols:chat-rounded" />
|
||||||
|
{{ channel.name }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="main">
|
||||||
<div class="messages" @scroll.passive="messagesScroll">
|
<div class="messages" @scroll.passive="messagesScroll">
|
||||||
<div class="none-message" v-if="messages.length === 0">
|
<div class="none-message" v-if="messages.length === 0">
|
||||||
<span>何ということでしょう!!</span>
|
<span>何ということでしょう!!</span>
|
||||||
@@ -48,6 +54,7 @@
|
|||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@@ -55,6 +62,12 @@
|
|||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.community-top-info svg {
|
||||||
|
margin: auto 0;
|
||||||
|
width: 1.25rem;
|
||||||
|
height: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
.channel {
|
.channel {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -62,6 +75,13 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.main {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex-grow: 1;
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
.messages {
|
.messages {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -91,7 +111,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
margin-bottom: 1rem;
|
|
||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
background-color: var(--bg-sub-color);
|
background-color: var(--bg-sub-color);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<span>チャンネルを選びやがれ</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
span {
|
||||||
|
margin: auto;
|
||||||
|
font-size: 1.25rem;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -6,9 +6,14 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="!isProcessing && channels"
|
v-if="!isProcessing && presentCommunity && channels"
|
||||||
class="community"
|
class="community"
|
||||||
>
|
>
|
||||||
|
<div class="left">
|
||||||
|
<div class="community-top-info">
|
||||||
|
{{ presentCommunity.name }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="channels">
|
<div class="channels">
|
||||||
<RouterLink
|
<RouterLink
|
||||||
v-for="channel of channels"
|
v-for="channel of channels"
|
||||||
@@ -21,6 +26,7 @@
|
|||||||
<span>{{ channel.name }}</span>
|
<span>{{ channel.name }}</span>
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<span class="border" />
|
<span class="border" />
|
||||||
|
|
||||||
@@ -32,6 +38,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.community-top-info {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.25rem;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
border-bottom: 1px solid var(--border-color);
|
||||||
|
padding: 1rem;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
font-weight: bold;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.processing-progress {
|
.processing-progress {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
@@ -40,16 +62,13 @@
|
|||||||
.community {
|
.community {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-left: 1rem;
|
|
||||||
padding-right: 1rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.channels {
|
.left {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding-top: 1rem;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 16rem;
|
width: 18rem;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-top-right-radius: 2rem;
|
border-top-right-radius: 2rem;
|
||||||
border-bottom-right-radius: 2rem;
|
border-bottom-right-radius: 2rem;
|
||||||
@@ -60,10 +79,22 @@
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.channels {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 100%;
|
||||||
|
flex-grow: 1;
|
||||||
|
gap: 1rem;
|
||||||
|
overflow: scroll;
|
||||||
|
padding: 1rem 1rem 0 1rem;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
.channels a {
|
.channels a {
|
||||||
display: flex;
|
display: flex;
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
padding-left: 1rem;
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
@@ -101,13 +132,10 @@
|
|||||||
.community .border {
|
.community .border {
|
||||||
width: 1px;
|
width: 1px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin-right: 1rem;
|
|
||||||
margin-left: 1rem;
|
|
||||||
background-color: var(--border-color);
|
background-color: var(--border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.community .community-inner {
|
.community .community-inner {
|
||||||
padding-top: 1rem;
|
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
Reference in New Issue
Block a user