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