Compare commits

...

3 commits

3 changed files with 26 additions and 10 deletions

View file

@ -27,3 +27,10 @@ version() {
COMMIT_HASH_INITIAL=$(printf '%s' "$(git rev-parse FETCH_HEAD)" | cut -c 1) COMMIT_HASH_INITIAL=$(printf '%s' "$(git rev-parse FETCH_HEAD)" | cut -c 1)
printf '%s+neko:%s.%s' "${UPSTREAM_VERSION}" "${COMMIT_DATE}" "${COMMIT_HASH_INITIAL}" printf '%s+neko:%s.%s' "${UPSTREAM_VERSION}" "${COMMIT_DATE}" "${COMMIT_HASH_INITIAL}"
} }
version_ci() {
UPSTREAM_VERSION=$(grep '"version":' package.json | cut -d '"' -f 4)
COMMIT_DATE=$(git show --no-patch --pretty='%cs' HEAD | sed -e 's/-//g' | cut -c 3-)
COMMIT_HASH_INITIAL=$(printf '%s' "$(git rev-parse HEAD)" | cut -c 1)
printf '%s+neko:%s.%s' "${UPSTREAM_VERSION}" "${COMMIT_DATE}" "${COMMIT_HASH_INITIAL}"
}

View file

@ -1090,13 +1090,21 @@ async function post() {
const languages = Object.keys(langmap); const languages = Object.keys(langmap);
const maxLength = 6; const maxLength = 6;
defaultStore.state.recentlyUsedPostLanguages = [language.value] defaultStore.set(
.concat( "recentlyUsedPostLanguages",
defaultStore.state.recentlyUsedPostLanguages.filter((lang) => { [language.value]
return lang !== language.value && languages.includes(lang); .concat(
}), defaultStore.state.recentlyUsedPostLanguages.filter(
) (lang) => {
.slice(0, maxLength); return (
lang !== language.value &&
languages.includes(lang)
);
},
),
)
.slice(0, maxLength),
);
} }
} }

View file

@ -7,9 +7,9 @@
<button v-if="removable" class="_button" @click="remove()"> <button v-if="removable" class="_button" @click="remove()">
<i :class="icon('ph-trash')"></i> <i :class="icon('ph-trash')"></i>
</button> </button>
<button v-if="draggable" class="drag-handle _button"> <div v-if="draggable" class="drag-handle _button">
<i :class="icon('ph-list')"></i> <i :class="icon('ph-list')"></i>
</button> </div>
<button class="_button" @click="toggleContent(!showBody)"> <button class="_button" @click="toggleContent(!showBody)">
<template v-if="showBody" <template v-if="showBody"
><i :class="icon('ph-caret-up')"></i ><i :class="icon('ph-caret-up')"></i
@ -139,11 +139,12 @@ export default defineComponent({
top: 0; top: 0;
inset-inline-end: 0; inset-inline-end: 0;
> button { > ._button {
padding: 0; padding: 0;
width: 42px; width: 42px;
font-size: 0.9em; font-size: 0.9em;
line-height: 42px; line-height: 42px;
text-align: center;
} }
.drag-handle { .drag-handle {