no message
This commit is contained in:
parent
3d1d756a3e
commit
1fb84090b0
@ -32,7 +32,10 @@ export default () => {
|
||||
// const isLoading = () => !!$loadingStateMap()[$currentConversationId()]
|
||||
createEffect(() => {
|
||||
const conversation = currentConversation()
|
||||
document.title = conversation ? `${(conversation.name || t('conversations.untitled'))} - Ansnid` : 'Ansnid'
|
||||
const currentDomain = window.location.hostname;
|
||||
const contentDomain = currentDomain=='Gtering.com'?currentDomain:'Ansnid.Com';
|
||||
|
||||
document.title = conversation ? `${(conversation.name || t('conversations.untitled'))} - ` + contentDomain : contentDomain
|
||||
const link = document.querySelector("link[rel~='icon']") as HTMLLinkElement
|
||||
if (link) {
|
||||
const conversationIcon = conversation?.icon ? `data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>${conversation.icon}</text></svg>` : null
|
||||
|
@ -12,6 +12,8 @@ export default () => {
|
||||
const { t } = useI18n()
|
||||
const $providerSettingsMap = useStore(providerSettingsMap)
|
||||
// bug: someTimes providerSettingsMap() is {}
|
||||
const currentDomain = window.location.hostname;
|
||||
const contentDomain = currentDomain=='Gtering.com'?currentDomain:'Ansnid.Com';
|
||||
const generalSettings = () => {
|
||||
return ($providerSettingsMap().general || {}) as unknown as GeneralSettings
|
||||
}
|
||||
@ -40,7 +42,7 @@ export default () => {
|
||||
<ThemeToggle />
|
||||
<div text-xs op-40 px-2>
|
||||
<a href="/chat/lists" target="_blank" rel="noreferrer" class="hv-foreground">
|
||||
Ansnid.Com
|
||||
{contentDomain}
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
@ -7,9 +7,13 @@ import { createEffect, createSignal, useEffect,onMount } from 'solid-js'
|
||||
import { fetchData } from '../../http/api'
|
||||
|
||||
export default () => {
|
||||
|
||||
const currentDomain = window.location.hostname;
|
||||
const contentDomain = currentDomain=='Gtering.com'?currentDomain:'Ansnid.Com';
|
||||
|
||||
const [views, setViews] = createSignal(0)
|
||||
const [url, setUrl] = createSignal('')
|
||||
const [title, setTitle] = createSignal('Ansnid')
|
||||
const [title, setTitle] = createSignal(contentDomain)
|
||||
const [items, setItems] = createSignal([])
|
||||
|
||||
// localStorage.setItem('theme', 'light');
|
||||
@ -19,13 +23,14 @@ export default () => {
|
||||
|
||||
|
||||
|
||||
|
||||
fetchData(null, function(data){
|
||||
|
||||
setViews(data.data.views);
|
||||
setUrl(data.data.url);
|
||||
setItems(data.data.items);
|
||||
setTitle(data.data.title);
|
||||
document.title = data.data.title ? `${(data.data.title || t('conversations.untitled'))} - Ansnid` : 'Ansnid'
|
||||
document.title = data.data.title ? `${(data.data.title || t('conversations.untitled'))} - ` + contentDomain : contentDomain
|
||||
|
||||
}, "/chatgptApi/conversations?url="+encodeURIComponent(window.location.href))
|
||||
|
||||
|
@ -11,6 +11,9 @@ export default function Banner({ views, url }: { views: number }) {
|
||||
alert('已复制:'+text);
|
||||
}
|
||||
|
||||
const currentDomain = window.location.hostname;
|
||||
const contentDomain = currentDomain=='Gtering.com'?currentDomain:'Ansnid.Com';
|
||||
|
||||
|
||||
return (
|
||||
<div
|
||||
@ -21,7 +24,7 @@ export default function Banner({ views, url }: { views: number }) {
|
||||
>
|
||||
<div className="w-40 flex flex-col items-center justify-center">
|
||||
<a
|
||||
href="https://ansnid.com"
|
||||
href="/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="flex space-x-2 items-center justify-center font-medium text-gray-600 px-4 py-1.5 rounded-md hover:bg-gray-100 active:bg-gray-200 transition-all"
|
||||
@ -33,7 +36,7 @@ export default function Banner({ views, url }: { views: number }) {
|
||||
height={20}
|
||||
className="rounded-sm"
|
||||
/>
|
||||
<p>Ansnid.Com</p>
|
||||
<p>{contentDomain}</p>
|
||||
</a>
|
||||
</div>
|
||||
<div className="border-l border-gray-200 h-12 w-1" />
|
||||
|
@ -3,7 +3,7 @@ import Layout from '@/layouts/Layout.astro'
|
||||
import BuildStores from '@/components/client-only/BuildStores'
|
||||
import Share from '@/components/Share.astro'
|
||||
---
|
||||
<Layout title="Ansnid" type="ansnidshare">
|
||||
<Layout title="分享" type="ansnidshare">
|
||||
<div class="h-100vh w-screen flex">
|
||||
<Share />
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user