Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
SunWuyuan committed Oct 20, 2024
1 parent 3b62894 commit 23729e3
Show file tree
Hide file tree
Showing 5 changed files with 188 additions and 160 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "zerocatnext",
"version": "0.0.0",
"scripts": {
"dev": "vite --port 3003 --host",
"dev": "vite --port 3141 --host",
"build": "vite build",
"build:scratch-gui": "cd ./scratch-gui && npm run build && cd ../",
"preview": "vite preview",
Expand Down
93 changes: 60 additions & 33 deletions src/components/Comment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,7 @@
></v-img>
</v-avatar>
</template>
<template v-slot:append>
<v-btn icon="mdi-reply" border> </v-btn
><v-btn
color="red-darken-1"
border
icon="mdi-delete"
@click="deleteCommnet({ id: comment.id })"
v-if="comment.user_id == localuser.user.userid"
>
</v-btn>
</template>

<v-card-title :to="'/user/' + comment.user_id">{{
users[comment.user_id].display_name
}}</v-card-title>
Expand All @@ -49,7 +39,7 @@
class="pb-3 pl-10 pr-3"
v-if="comment.children && comment.children.length"
>
<v-list density="default">
<v-list density="default" >
<v-list-item
v-for="children in comment.children.slice(0, 2)"
:key="children.id"
Expand Down Expand Up @@ -84,7 +74,9 @@
</v-card>
</v-card>

<v-btn @click="getComments" :disabled="loadbuttondisabled" border class="mr-2">继续加载</v-btn>
<v-btn @click="getComments" :disabled="loadbuttondisabled" border class="mr-2"
>继续加载</v-btn
>
<v-btn @click="changesort" border>{{ sort }}</v-btn>

<v-card class="mt-2" elevation hover border>
Expand All @@ -99,9 +91,13 @@
:rules="commentrules"
required
></v-textarea>
<v-btn color="primary" @click="addComment({ pid: null, rid: null })" border>
<v-btn
color="primary"
@click="addComment({ pid: null, rid: null })"
border
>
评论 </v-btn
><v-btn variant="text" >{{ info }}</v-btn></v-form
><v-btn variant="text">{{ info }}</v-btn></v-form
>
</v-card-text>
</v-card>
Expand All @@ -122,14 +118,27 @@
</v-avatar>
</template>
<template v-slot:append>
<v-btn
border
color="red-darken-1"
icon="mdi-delete"
@click="deleteCommnet({ id: morecommnets.id })"
v-if="morecommnets.user_id == localuser.user.userid"
>
</v-btn>
<v-menu>
<template v-slot:activator="{ props }">
<v-btn icon="mdi-dots-vertical" v-bind="props" border></v-btn>
</template>
<v-list border>
<v-list-item
v-if="morecommnets.user_id == localuser.user.userid"
prepend-icon="mdi-delete"
@click="deleteCommnet({ id: morecommnets.id })"
>
<v-list-item-title>删除</v-list-item-title>
</v-list-item>
<v-list-item
prepend-icon="mdi-reply"
@click="replyid = morecommnets.id"
>
<v-list-item-title>回复</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>

</template>
<v-card-title :to="'/user/' + morecommnets.user_id">{{
users[morecommnets.user_id].display_name
Expand Down Expand Up @@ -167,17 +176,35 @@
></v-img>
</v-avatar>
</template>
<template v-slot:append>
<v-btn icon="mdi-reply" @click="replyid = comment.id" border> </v-btn
><v-btn
color="red-darken-1"

border
icon="mdi-delete"
@click="deleteCommnet({ id: comment.id })"
v-if="comment.user_id == localuser.user.userid"
<template v-slot:append>
<v-btn
icon="mdi-reply"
@click="replyid = comment.id"
border
v-if="comment.user_id != localuser.user.userid"
>
</v-btn>
<v-menu>
<template v-slot:activator="{ props }">
<v-btn icon="mdi-dots-vertical" v-bind="props" border></v-btn>
</template>
<v-list border>
<v-list-item
v-if="comment.user_id == localuser.user.userid"
prepend-icon="mdi-delete"
@click="deleteCommnet({ id: comment.id })"
>
<v-list-item-title>删除</v-list-item-title>
</v-list-item>
<v-list-item
prepend-icon="mdi-reply"
@click="replyid = comment.id"
>
<v-list-item-title>回复</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
</template>
<v-card-title :to="'/user/' + comment.user_id">{{
users[comment.user_id].display_name
Expand All @@ -201,8 +228,8 @@
<v-card-title class="headline"
>回复评论{{ replyid
}}<v-btn @click="replyid = null" v-if="replyid != null"
>取消</v-btn
></v-card-title
>取消</v-btn
></v-card-title
>
<v-card-text>
<v-form @submit.prevent>
Expand Down
1 change: 1 addition & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ inject();

registerPlugins(app);
app.mount("#app");

125 changes: 0 additions & 125 deletions src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -219,133 +219,8 @@
variant="text"
/>
</v-container>
<!--<v-container class="pa-md-12 pa-sm-6" fluid>
<v-responsive
class="text-center mx-auto mb-6 mb-md-12"
max-width="700"
>
<h1 class="text-md-h4 font-weight-bold mb-4 text-sm-h5">
Gain access for One Price
</h1>
<p class="text-subtitle-1 text-medium-emphasis">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Commodi,
ratione debitis quis est labore voluptatibus! Eaque cupiditate
minima, at placeat totam.
</p>
</v-responsive>
<v-sheet
border
class="mx-auto pa-2"
max-width="1000"
rounded="xl"
>
<v-row>
<v-col cols="12" md="4">
<v-card
border
class="h-100 flex-column d-flex align-center justify-center pa-4"
color="grey"
rounded="xl"
variant="tonal"
>
<div class="text-subtitle-1 font-weight-medium mb-3 opacity-70 text-high-emphasis">
Pay once, get access forever
</div>
<div class="text-h3 mb-8 text-high-emphasis font-weight-bold">
$199
<small class="text-overline">USD</small>
</div>
<v-btn
class="mb-5 text-none"
color="success"
max-height="36"
max-width="256"
rounded="lg"
text="Get access"
variant="flat"
width="100%"
/>
<div class="text-caption text-medium-emphasis w-75 text-center">
Lorem ipsum dolor sit amet consectetur adipisicing elit.
</div>
</v-card>
</v-col>
<v-col class="pa-6" cols="12" md="8">
<h2 class="text-h5 font-weight-bold mb-4">Lifetime subscription</h2>
<p class="text-medium-emphasis mb-4">
Get the most out of Vuetify with a lifetime subscription. This
is a limited time offer and will not be available in the future.
Get access to all current and future features, including full
access to all snips components.
</p>
<div class="d-flex align-center mb-8">
<span
class="text-primary text-no-wrap text-body-2 font-weight-medium me-4"
>What you get</span>
<v-divider />
</div>
<v-row dense>
<v-col
v-for="feature in features"
:key="feature"
cols="12"
md="6"
>
<v-icon color="success" icon="$success" />
<span class="text-caption ms-2"> {{ feature }} </span>
</v-col>
</v-row>
</v-col>
</v-row>
</v-sheet>
</v-container>-->
</template>

<style scoped>
.v-bg {
filter: blur(128px);
pointer-events: none;
}
.v-bg > div {
background: linear-gradient(
to bottom right,
rgb(var(--v-theme-surface-variant)),
rgb(var(--v-theme-primary))
);
z-index: -10;
clip-path: polygon(
5% 20%,
15% 10%,
30% 15%,
40% 5%,
50% 25%,
60% 15%,
75% 30%,
85% 20%,
90% 40%,
70% 50%,
85% 70%,
65% 60%,
50% 85%,
35% 70%,
20% 80%,
10% 60%,
5% 40%
);
}
</style>
<script>
import { ref } from "vue";
import request from "../axios/axios";
Expand Down
Loading

0 comments on commit 23729e3

Please sign in to comment.