Add clips, antennas hint

This commit is contained in:
Freeplay 2023-05-29 09:11:42 -04:00
parent eeb4a41d6c
commit ee08e1bdda
6 changed files with 108 additions and 61 deletions

View File

@ -404,6 +404,7 @@ avoidMultiCaptchaConfirm: "Using multiple Captcha systems may cause interference
\ them. Would you like to disable the other Captcha systems currently active? If\ \ them. Would you like to disable the other Captcha systems currently active? If\
\ you would like them to stay enabled, press cancel." \ you would like them to stay enabled, press cancel."
antennas: "Antennas" antennas: "Antennas"
antennasDesc: "Antennas display new posts matching the criteria you set!\n They can be accessed from the timelines page."
manageAntennas: "Manage Antennas" manageAntennas: "Manage Antennas"
name: "Name" name: "Name"
antennaSource: "Antenna source" antennaSource: "Antenna source"
@ -771,6 +772,7 @@ pageLikedCount: "Number of received Page likes"
contact: "Contact" contact: "Contact"
useSystemFont: "Use the system's default font" useSystemFont: "Use the system's default font"
clips: "Clips" clips: "Clips"
clipsDesc: "Clips are like share-able categorized bookmarks. You can create clips from the menu of individual posts."
experimentalFeatures: "Experimental features" experimentalFeatures: "Experimental features"
developer: "Developer" developer: "Developer"
makeExplorable: "Make account visible in \"Explore\"" makeExplorable: "Make account visible in \"Explore\""

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="fpezltsf" :class="{ warn }"> <div class="info" :class="{ warn, card }">
<i v-if="warn" class="ph-warning ph-bold ph-lg"></i> <i v-if="warn" class="ph-warning ph-bold ph-lg"></i>
<i v-else class="ph-info ph-bold ph-lg"></i> <i v-else class="ph-bold ph-lg" :class="icon ? `ph-${icon}` : 'ph-info'"></i>
<slot></slot> <slot></slot>
</div> </div>
</template> </template>
@ -10,12 +10,14 @@
import {} from "vue"; import {} from "vue";
defineProps<{ defineProps<{
icon?: string;
warn?: boolean; warn?: boolean;
card?: boolean;
}>(); }>();
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.fpezltsf { .info {
padding: 16px; padding: 16px;
font-size: 90%; font-size: 90%;
background: var(--infoBg); background: var(--infoBg);
@ -27,6 +29,28 @@ defineProps<{
color: var(--infoWarnFg); color: var(--infoWarnFg);
} }
&.card {
background: var(--panel);
color: var(--fg);
padding: 48px;
font-size: 1em;
text-align: center;
> i {
display: block;
font-size: 4em;
margin: 0;
}
> :deep(*) {
margin-inline: auto;
}
> :deep(:not(:last-child)) {
margin-bottom: 20px;
}
> :deep(p) {
max-width: 30em;
}
}
> i { > i {
margin-right: 4px; margin-right: 4px;
} }

View File

@ -17,7 +17,7 @@
</slot> </slot>
</div> </div>
<div v-else ref="rootEl"> <div v-else ref="rootEl" class="list">
<div <div
v-show="pagination.reversed && more" v-show="pagination.reversed && more"
key="_more_" key="_more_"
@ -487,4 +487,8 @@ defineExpose({
margin-right: auto; margin-right: auto;
} }
} }
.list > :deep(._button) {
margin-inline: auto;
margin-bottom: 16px;
}
</style> </style>

View File

@ -1,7 +1,9 @@
<template> <template>
<MkSpacer :content-max="700">
<div class="geegznzt"> <div class="geegznzt">
<XAntenna :antenna="draft" @created="onAntennaCreated" /> <XAntenna :antenna="draft" @created="onAntennaCreated" />
</div> </div>
</MkSpacer>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>

View File

@ -8,6 +8,18 @@
/></template> /></template>
<MkSpacer :content-max="700"> <MkSpacer :content-max="700">
<div class="ieepwinx"> <div class="ieepwinx">
<div class="">
<MkPagination
ref="list"
:pagination="pagination"
>
<template #empty>
<MkInfo
:icon="'flying-saucer'"
:card="true"
>
<p>{{ i18n.ts.antennasDesc }}</p>
<MkButton <MkButton
:link="true" :link="true"
to="/my/antennas/create" to="/my/antennas/create"
@ -16,12 +28,16 @@
><i class="ph-plus ph-bold ph-lg"></i> ><i class="ph-plus ph-bold ph-lg"></i>
{{ i18n.ts.add }}</MkButton {{ i18n.ts.add }}</MkButton
> >
</MkInfo>
<div class=""> </template>
<MkPagination <template #default="{ items }">
v-slot="{ items }" <MkButton
ref="list" :link="true"
:pagination="pagination" to="/my/antennas/create"
primary
class="add"
><i class="ph-plus ph-bold ph-lg"></i>
{{ i18n.ts.add }}</MkButton
> >
<div v-for="antenna in items" :key="antenna.id"> <div v-for="antenna in items" :key="antenna.id">
<MkA <MkA
@ -45,6 +61,7 @@
<div class="name">{{ antenna.name }}</div> <div class="name">{{ antenna.name }}</div>
</MkA> </MkA>
</div> </div>
</template>
</MkPagination> </MkPagination>
</div> </div>
</div> </div>
@ -56,6 +73,7 @@
import { onActivated, onDeactivated, ref } from "vue"; import { onActivated, onDeactivated, ref } from "vue";
import MkPagination from "@/components/MkPagination.vue"; import MkPagination from "@/components/MkPagination.vue";
import MkButton from "@/components/MkButton.vue"; import MkButton from "@/components/MkButton.vue";
import MkInfo from "@/components/MkInfo.vue";
import { i18n } from "@/i18n"; import { i18n } from "@/i18n";
import { definePageMetadata } from "@/scripts/page-metadata"; import { definePageMetadata } from "@/scripts/page-metadata";
@ -101,10 +119,6 @@ definePageMetadata({
<style lang="scss" scoped> <style lang="scss" scoped>
.ieepwinx { .ieepwinx {
> .add {
margin: 0 auto 16px auto;
}
.uopelskx { .uopelskx {
float: left; float: left;
min-width: 25px; min-width: 25px;

View File

@ -8,17 +8,20 @@
/></template> /></template>
<MkSpacer :content-max="700"> <MkSpacer :content-max="700">
<div class="qtcaoidl"> <div class="qtcaoidl">
<MkButton primary class="add" @click="create"
><i class="ph-plus ph-bold ph-lg"></i>
{{ i18n.ts.add }}</MkButton
>
<MkPagination <MkPagination
v-slot="{ items }"
ref="pagingComponent" ref="pagingComponent"
:pagination="pagination" :pagination="pagination"
class="list" class="list"
> >
<template #empty>
<MkInfo
:icon="'paperclip'"
:card="true"
>
<p>{{ i18n.ts.clipsDesc }}</p>
</MkInfo>
</template>
<template #default="{ items }">
<MkA <MkA
v-for="item in items" v-for="item in items"
:key="item.id" :key="item.id"
@ -30,6 +33,7 @@
{{ item.description }} {{ item.description }}
</div> </div>
</MkA> </MkA>
</template>
</MkPagination> </MkPagination>
</div> </div>
</MkSpacer> </MkSpacer>
@ -40,6 +44,7 @@
import {} from "vue"; import {} from "vue";
import MkPagination from "@/components/MkPagination.vue"; import MkPagination from "@/components/MkPagination.vue";
import MkButton from "@/components/MkButton.vue"; import MkButton from "@/components/MkButton.vue";
import MkInfo from "@/components/MkInfo.vue";
import * as os from "@/os"; import * as os from "@/os";
import { i18n } from "@/i18n"; import { i18n } from "@/i18n";
import { definePageMetadata } from "@/scripts/page-metadata"; import { definePageMetadata } from "@/scripts/page-metadata";
@ -100,10 +105,6 @@ definePageMetadata({
<style lang="scss" scoped> <style lang="scss" scoped>
.qtcaoidl { .qtcaoidl {
> .add {
margin: 0 auto 16px auto;
}
> .list { > .list {
> .item { > .item {
display: block; display: block;