1405/05/29-add tv page
This commit is contained in:
+139
-3
@@ -46,7 +46,7 @@
|
||||
</transition>
|
||||
|
||||
<div
|
||||
v-if="showSupportButton && !showSplash && route.name !== 'support'"
|
||||
v-if="showSupportButton && !showSplash && route.name !== 'support' && !hideAppChrome"
|
||||
id="support-button"
|
||||
ref="supportButtonEl"
|
||||
class="draggable-support-button"
|
||||
@@ -80,10 +80,24 @@
|
||||
<VersionUpdateModal />
|
||||
|
||||
<PwaInstallGuideModal
|
||||
v-if="!hideAppChrome"
|
||||
v-model:open="guideOpen"
|
||||
:platform="platform"
|
||||
@complete="completeGuide()"
|
||||
/>
|
||||
|
||||
<div
|
||||
v-if="!showSplash && !hideAppChrome && !isDesktop"
|
||||
class="app-credit-footer app-credit-footer--mobile"
|
||||
>
|
||||
<AppCreditLink variant="mobile" />
|
||||
</div>
|
||||
<div
|
||||
v-if="!showSplash && !hideAppChrome && showDesktopFloatingCredit"
|
||||
class="app-credit-footer app-credit-footer--desktop-float"
|
||||
>
|
||||
<AppCreditLink variant="float" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -103,7 +117,8 @@ import { useSupportMessenger } from '@/composables/useSupportMessenger'
|
||||
import { loadSupportMessengerFromSettings } from '@/utils/supportMessenger'
|
||||
import SupportMessengerPicker from '@/components/SupportMessengerPicker.vue'
|
||||
import { useDraggableFloatingButton } from '@/utils/useDraggableFloatingButton'
|
||||
import { useApplyDesktopLayoutClass } from '@/layouts/composables/useAppLayout'
|
||||
import { useApplyDesktopLayoutClass, useDesktopBreakpoint } from '@/layouts/composables/useAppLayout'
|
||||
import AppCreditLink from '@/components/AppCreditLink.vue'
|
||||
import { usePwaInstall } from '@/composables/usePwaInstall'
|
||||
import PwaInstallGuideModal from '@/components/pwa/PwaInstallGuideModal.vue'
|
||||
import { useUserStore } from '@/store/userStore'
|
||||
@@ -125,11 +140,23 @@ const indicator = h(LoadingOutlined, {
|
||||
spin: true
|
||||
})
|
||||
const displayVersion = getDisplayAppVersion(pkg.version)
|
||||
const showSplash = ref(true)
|
||||
const showSplash = ref(!isTvBoardPath())
|
||||
const route = useRoute()
|
||||
const hideAppChrome = computed(() => route.meta.hideChrome === true || route.name === 'tvMonitor')
|
||||
|
||||
function isTvBoardPath() {
|
||||
const path = window.location.pathname.replace(/\/+$/, '')
|
||||
return path.endsWith('/tv') || path.endsWith('/monitor')
|
||||
}
|
||||
|
||||
useApplyDesktopLayoutClass()
|
||||
|
||||
const isDesktop = useDesktopBreakpoint()
|
||||
const showDesktopFloatingCredit = computed(() => {
|
||||
if (!isDesktop.value) return false
|
||||
return route.name === 'login' || !!route.meta.hideMenu
|
||||
})
|
||||
|
||||
const {
|
||||
guideOpen,
|
||||
platform,
|
||||
@@ -185,11 +212,19 @@ function handleSupportPointerUp(event: PointerEvent) {
|
||||
|
||||
onMounted(async () => {
|
||||
await loadSupportMessengerFromSettings()
|
||||
if (hideAppChrome.value) {
|
||||
showSplash.value = false
|
||||
return
|
||||
}
|
||||
setTimeout(() => {
|
||||
showSplash.value = false
|
||||
}, 2000)
|
||||
})
|
||||
|
||||
watch(hideAppChrome, (hidden) => {
|
||||
if (hidden) showSplash.value = false
|
||||
})
|
||||
|
||||
const userStore = useUserStore()
|
||||
const settingsStore = useSettingsStore()
|
||||
const { latestIncomingNotification } = useChatService()
|
||||
@@ -252,6 +287,107 @@ watch(latestIncomingNotification, (payload) => {
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.app-credit-footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000000;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.app-credit-footer--mobile {
|
||||
width: 100%;
|
||||
max-width: 426px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
min-height: var(--app-credit-bar-inner);
|
||||
padding-bottom: var(--app-safe-bottom);
|
||||
background: #fff;
|
||||
box-shadow: 0 -2px 4px -2px #0000001a;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.app-credit-footer--desktop-float {
|
||||
left: auto;
|
||||
right: 20px;
|
||||
bottom: 16px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.app-credit-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
transition: opacity 0.15s ease;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
&__text {
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&__logo {
|
||||
width: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
&--mobile {
|
||||
gap: 4px;
|
||||
padding: 4px 0;
|
||||
color: inherit;
|
||||
|
||||
.app-credit-link__logo {
|
||||
height: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
&--sidebar {
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
padding: 4px;
|
||||
color: #9ca3af;
|
||||
font-size: 10px;
|
||||
|
||||
.app-credit-link__logo {
|
||||
height: 15px;
|
||||
opacity: 0.85;
|
||||
}
|
||||
}
|
||||
|
||||
&--float {
|
||||
gap: 6px;
|
||||
padding: 7px 14px;
|
||||
font-size: 10px;
|
||||
color: #6b7280;
|
||||
background: #fff;
|
||||
border-radius: 999px;
|
||||
border: 1px solid rgba(15, 23, 42, 0.08);
|
||||
box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
|
||||
|
||||
.app-credit-link__logo {
|
||||
height: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
&--tv {
|
||||
gap: 8px;
|
||||
padding: 6px 0;
|
||||
font-size: 12px;
|
||||
color: #6b7280;
|
||||
|
||||
.app-credit-link__logo {
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.updateButton .van-dialog__confirm .van-button__text {
|
||||
color: @primary-color !important;
|
||||
font-weight: 600;
|
||||
|
||||
Reference in New Issue
Block a user