Add clips, antennas hint

This commit is contained in:
Freeplay 2023-05-29 09:11:42 -04:00
parent 02f2470791
commit ca8d63c2b0
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>
<div class="geegznzt"> <MkSpacer :content-max="700">
<XAntenna :antenna="draft" @created="onAntennaCreated" /> <div class="geegznzt">
</div> <XAntenna :antenna="draft" @created="onAntennaCreated" />
</div>
</MkSpacer>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>

View file

@ -8,43 +8,60 @@
/></template> /></template>
<MkSpacer :content-max="700"> <MkSpacer :content-max="700">
<div class="ieepwinx"> <div class="ieepwinx">
<MkButton
:link="true"
to="/my/antennas/create"
primary
class="add"
><i class="ph-plus ph-bold ph-lg"></i>
{{ i18n.ts.add }}</MkButton
>
<div class=""> <div class="">
<MkPagination <MkPagination
v-slot="{ items }"
ref="list" ref="list"
:pagination="pagination" :pagination="pagination"
> >
<div v-for="antenna in items" :key="antenna.id"> <template #empty>
<MkA <MkInfo
class="uopelskx" :icon="'flying-saucer'"
:card="true"
>
<p>{{ i18n.ts.antennasDesc }}</p>
<MkButton
:link="true"
to="/my/antennas/create"
primary
class="add"
><i class="ph-plus ph-bold ph-lg"></i>
{{ i18n.ts.add }}</MkButton
>
</MkInfo>
</template>
<template #default="{ items }">
<MkButton
:link="true" :link="true"
:to="`/timeline/antenna/${antenna.id}`" to="/my/antennas/create"
primary
class="add"
><i class="ph-plus ph-bold ph-lg"></i>
{{ i18n.ts.add }}</MkButton
> >
<i class="ph-flying-saucer ph-bold ph-lg"></i <div v-for="antenna in items" :key="antenna.id">
><i <MkA
:class="`${ class="uopelskx"
antenna.hasUnreadNote :link="true"
? 'ph-circle ph-fill' :to="`/timeline/antenna/${antenna.id}`"
: 'ph-check' >
} ph-xs notify-icon`" <i class="ph-flying-saucer ph-bold ph-lg"></i
></i> ><i
</MkA> :class="`${
<MkA antenna.hasUnreadNote
class="ljoevbzj" ? 'ph-circle ph-fill'
:to="`/my/antennas/${antenna.id}`" : 'ph-check'
> } ph-xs notify-icon`"
<div class="name">{{ antenna.name }}</div> ></i>
</MkA> </MkA>
</div> <MkA
class="ljoevbzj"
:to="`/my/antennas/${antenna.id}`"
>
<div class="name">{{ antenna.name }}</div>
</MkA>
</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,28 +8,32 @@
/></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"
> >
<MkA <template #empty>
v-for="item in items" <MkInfo
:key="item.id" :icon="'paperclip'"
:to="`/clips/${item.id}`" :card="true"
class="item _panel _gap" >
> <p>{{ i18n.ts.clipsDesc }}</p>
<b>{{ item.name }}</b> </MkInfo>
<div v-if="item.description" class="description"> </template>
{{ item.description }} <template #default="{ items }">
</div> <MkA
</MkA> v-for="item in items"
:key="item.id"
:to="`/clips/${item.id}`"
class="item _panel _gap"
>
<b>{{ item.name }}</b>
<div v-if="item.description" class="description">
{{ item.description }}
</div>
</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;