more fixes

This commit is contained in:
ThatOneCalculator 2022-11-14 18:35:01 -08:00
parent e1a38c0d5d
commit 59b33b08ce
5 changed files with 12 additions and 23 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "calckey", "name": "calckey",
"version": "12.119.0-calc.13-rc.9", "version": "12.119.0-calc.13-rc.10",
"codename": "aqua", "codename": "aqua",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -42,9 +42,6 @@ const app = new Koa();
//#region Bull Dashboard //#region Bull Dashboard
const bullBoardPath = '/queue'; const bullBoardPath = '/queue';
// used as a url param to prevent caching css and images
const nowDateMs = Date.now();
// Authenticate // Authenticate
app.use(async (ctx, next) => { app.use(async (ctx, next) => {
if (ctx.path === bullBoardPath || ctx.path.startsWith(bullBoardPath + '/')) { if (ctx.path === bullBoardPath || ctx.path.startsWith(bullBoardPath + '/')) {
@ -298,7 +295,6 @@ router.get(['/@:user', '/@:user/:sub'], async (ctx, next) => {
icon: meta.iconUrl, icon: meta.iconUrl,
themeColor: meta.themeColor, themeColor: meta.themeColor,
privateMode: meta.privateMode, privateMode: meta.privateMode,
nowDateMs: nowDateMs,
}); });
ctx.set('Cache-Control', 'public, max-age=15'); ctx.set('Cache-Control', 'public, max-age=15');
} else { } else {
@ -344,7 +340,6 @@ router.get('/notes/:note', async (ctx, next) => {
icon: meta.iconUrl, icon: meta.iconUrl,
privateMode: meta.privateMode, privateMode: meta.privateMode,
themeColor: meta.themeColor, themeColor: meta.themeColor,
nowDateMs: nowDateMs,
}); });
ctx.set('Cache-Control', 'public, max-age=15'); ctx.set('Cache-Control', 'public, max-age=15');
@ -382,7 +377,6 @@ router.get('/@:user/pages/:page', async (ctx, next) => {
icon: meta.iconUrl, icon: meta.iconUrl,
themeColor: meta.themeColor, themeColor: meta.themeColor,
privateMode: meta.privateMode, privateMode: meta.privateMode,
nowDateMs: nowDateMs,
}); });
if (['public'].includes(page.visibility)) { if (['public'].includes(page.visibility)) {
@ -416,7 +410,6 @@ router.get('/clips/:clip', async (ctx, next) => {
privateMode: meta.privateMode, privateMode: meta.privateMode,
icon: meta.iconUrl, icon: meta.iconUrl,
themeColor: meta.themeColor, themeColor: meta.themeColor,
nowDateMs: nowDateMs,
}); });
ctx.set('Cache-Control', 'public, max-age=15'); ctx.set('Cache-Control', 'public, max-age=15');
@ -443,7 +436,6 @@ router.get('/gallery/:post', async (ctx, next) => {
icon: meta.iconUrl, icon: meta.iconUrl,
themeColor: meta.themeColor, themeColor: meta.themeColor,
privateMode: meta.privateMode, privateMode: meta.privateMode,
nowDateMs: nowDateMs,
}); });
ctx.set('Cache-Control', 'public, max-age=15'); ctx.set('Cache-Control', 'public, max-age=15');
@ -469,7 +461,6 @@ router.get('/channels/:channel', async (ctx, next) => {
icon: meta.iconUrl, icon: meta.iconUrl,
themeColor: meta.themeColor, themeColor: meta.themeColor,
privateMode: meta.privateMode, privateMode: meta.privateMode,
nowDateMs: nowDateMs,
}); });
ctx.set('Cache-Control', 'public, max-age=15'); ctx.set('Cache-Control', 'public, max-age=15');
@ -545,7 +536,6 @@ router.get('(.*)', async ctx => {
themeColor: meta.themeColor, themeColor: meta.themeColor,
randomMOTD: motd[Math.floor(Math.random() * motd.length)], randomMOTD: motd[Math.floor(Math.random() * motd.length)],
privateMode: meta.privateMode, privateMode: meta.privateMode,
nowDateMs: nowDateMs,
}); });
ctx.set('Cache-Control', 'public, max-age=3'); ctx.set('Cache-Control', 'public, max-age=3');
}); });

View File

@ -20,23 +20,26 @@ doctype html
html html
- var timestamp = Date.now();
head head
meta(charset='utf-8') meta(charset='utf-8')
meta(name='application-name' content='Calckey') meta(name='application-name' content='Calckey')
meta(name='referrer' content='origin') meta(name='referrer' content='origin')
meta(name='darkreader-lock' content='')
meta(name='theme-color' content= themeColor || '#31748f') meta(name='theme-color' content= themeColor || '#31748f')
meta(name='theme-color-orig' content= themeColor || '#31748f') meta(name='theme-color-orig' content= themeColor || '#31748f')
meta(property='twitter:card' content='summary') meta(property='twitter:card' content='summary')
meta(property='og:site_name' content= instanceName || 'Calckey') meta(property='og:site_name' content= instanceName || 'Calckey')
meta(name='viewport' content='width=device-width, initial-scale=1') meta(name='viewport' content='width=device-width, initial-scale=1')
link(rel='icon' href= icon || `/favicon.ico?${ nowDateMs }`) link(rel='icon' href= icon || `/favicon.ico?${ timestamp }`)
link(rel='apple-touch-icon' href= icon || `/apple-touch-icon.png?${ nowDateMs }`) link(rel='apple-touch-icon' href= icon || `/apple-touch-icon.png?${ timestamp }`)
link(rel='manifest' href='/manifest.json') link(rel='manifest' href='/manifest.json')
link(rel='prefetch' href=`/static-assets/badges/info.png?${ nowDateMs }`) link(rel='prefetch' href=`/static-assets/badges/info.png?${ timestamp }`)
link(rel='prefetch' href=`/static-assets/badges/not-found.png?${ nowDateMs }`) link(rel='prefetch' href=`/static-assets/badges/not-found.png?${ timestamp }`)
link(rel='prefetch' href=`/static-assets/badges/error.png?${ nowDateMs }`) link(rel='prefetch' href=`/static-assets/badges/error.png?${ timestamp }`)
link(rel='stylesheet' href='/assets/phosphor/icons.css') link(rel='stylesheet' href='/assets/phosphor/icons.css')
link(rel='stylesheet' href=`/static-assets/instance.css?${ nowDateMs }`) link(rel='stylesheet' href=`/static-assets/instance.css?${ timestamp }`)
link(rel='modulepreload' href=`/assets/${clientEntry.file}`) link(rel='modulepreload' href=`/assets/${clientEntry.file}`)
each href in clientEntry.css each href in clientEntry.css
@ -77,7 +80,7 @@ html
br br
| Please turn on your JavaScript | Please turn on your JavaScript
div#splash div#splash
img#splashIcon(src= splashIcon || `/static-assets/splash.png?${ nowDateMs }`) img#splashIcon(src= splashIcon || `/static-assets/splash.png?${ timestamp }`)
span#splashText span#splashText
block randomMOTD block randomMOTD
= randomMOTD = randomMOTD

View File

@ -2,7 +2,7 @@
<XModalWindow <XModalWindow
ref="dialog" ref="dialog"
:width="800" :width="800"
@close="dialog.close()" @close="dialog?.close()"
@closed="$emit('closed')" @closed="$emit('closed')"
> >
<template #header>{{ i18n.ts._tutorial.title }}</template> <template #header>{{ i18n.ts._tutorial.title }}</template>

View File

@ -84,10 +84,6 @@ watch(() => props.tag, () => {
if (tagsEl) tagsEl.toggleContent(props.tag == null); if (tagsEl) tagsEl.toggleContent(props.tag == null);
}); });
watch(() => pinnedUsersList, () => {
if (pinnedUsersList?.length > 0) thereArePinnedUsers = true;
});
const tagUsers = $computed(() => ({ const tagUsers = $computed(() => ({
endpoint: 'hashtags/users' as const, endpoint: 'hashtags/users' as const,
limit: 30, limit: 30,