mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 15:51:01 +08:00
Made the about news org clickable & commit somethings that are not
pushed in the last commit.
This commit is contained in:
parent
4d49554a0e
commit
083fae51de
@ -1,13 +1,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// Check if the env is in development
|
// Check if the env is in development
|
||||||
const addForceRefreshButtonInWindow = ref(false);
|
/*const addForceRefreshButtonInWindow = ref(false);
|
||||||
const nuxtdeven1v = process.env.NUXT_DEV_ENV?.toLowerCase() === "true";
|
const nuxtdeven1v = process.env.NUXT_DEV_ENV?.toLowerCase() === "true";
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
addForceRefreshButtonInWindow.value = nuxtdeven1v || false;
|
addForceRefreshButtonInWindow.value = nuxtdeven1v || false;
|
||||||
});
|
});
|
||||||
const forceRefresh = () => {
|
const forceRefresh = () => {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
};
|
};*/
|
||||||
|
|
||||||
import { useThrottleFn } from "@vueuse/core";
|
import { useThrottleFn } from "@vueuse/core";
|
||||||
import { XIcon, MinusIcon, RefreshCcwDotIcon } from "lucide-vue-next";
|
import { XIcon, MinusIcon, RefreshCcwDotIcon } from "lucide-vue-next";
|
||||||
@ -95,13 +95,13 @@ const stopDrag = () => {
|
|||||||
{{ title }}
|
{{ title }}
|
||||||
</h3>
|
</h3>
|
||||||
<div class="flex flex-row gap-1">
|
<div class="flex flex-row gap-1">
|
||||||
<button
|
<!--<button
|
||||||
@click="forceRefresh"
|
@click="forceRefresh"
|
||||||
class="p-1 hover:bg-gray-300 dark:hover:bg-gray-600 rounded transition duration-200"
|
class="p-1 hover:bg-gray-300 dark:hover:bg-gray-600 rounded transition duration-200"
|
||||||
v-if="addForceRefreshButtonInWindow"
|
v-if="addForceRefreshButtonInWindow"
|
||||||
>
|
>
|
||||||
<RefreshCcwDotIcon />
|
<RefreshCcwDotIcon />
|
||||||
</button>
|
</button>-->
|
||||||
<button
|
<button
|
||||||
@click="emit('min')"
|
@click="emit('min')"
|
||||||
class="p-1 hover:bg-gray-300 dark:hover:bg-gray-600 rounded transition duration-200"
|
class="p-1 hover:bg-gray-300 dark:hover:bg-gray-600 rounded transition duration-200"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import logoutUser from "~/components/logoutuser";
|
||||||
// Imports
|
// Imports
|
||||||
const { t, locale } = useI18n();
|
const { t, locale } = useI18n();
|
||||||
// Values
|
// Values
|
||||||
@ -15,7 +16,10 @@ try {
|
|||||||
if (sendError.value) {
|
if (sendError.value) {
|
||||||
error.value = true;
|
error.value = true;
|
||||||
}
|
}
|
||||||
if (true) {
|
if (data.requested_action === "LOGOUT_USER") {
|
||||||
|
logoutUser();
|
||||||
|
}
|
||||||
|
if (false) {
|
||||||
allowed.value = true;
|
allowed.value = true;
|
||||||
} else {
|
} else {
|
||||||
allowed.value = false;
|
allowed.value = false;
|
||||||
@ -32,9 +36,11 @@ try {
|
|||||||
>
|
>
|
||||||
<div v-if="!allowed && !error" class="m-2">
|
<div v-if="!allowed && !error" class="m-2">
|
||||||
{{ t("error") }}
|
{{ t("error") }}
|
||||||
|
<button>Update</button>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="error" class="m-2">
|
<div v-if="error" class="m-2">
|
||||||
<span>{{ errorMsg ? errorMsg : "" }} {{ t("systemerror") }}</span>
|
<span>{{ errorMsg ? errorMsg : "" }} {{ t("systemerror") }}</span>
|
||||||
|
<button>Update</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
|
3
components/logoutuser.ts
Normal file
3
components/logoutuser.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export default function logoutuser() {
|
||||||
|
return;
|
||||||
|
}
|
@ -91,6 +91,9 @@ export default defineEventHandler(async (event) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const pushNewsOrg = await sql`
|
||||||
|
insert into
|
||||||
|
`
|
||||||
cache[slug] = {
|
cache[slug] = {
|
||||||
slug: slug,
|
slug: slug,
|
||||||
title: newsOrgName,
|
title: newsOrgName,
|
||||||
|
@ -70,7 +70,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
`;
|
`;
|
||||||
setCookie(event, "token", newToken);
|
setCookie(event, "token", newToken);
|
||||||
return {
|
return {
|
||||||
user: fetchUserInfoAgain,
|
user: ,
|
||||||
};
|
};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user