refactor(client): Refine routing (#8846)
This commit is contained in:
parent
30a39a296d
commit
699f24f3dc
149 changed files with 6312 additions and 6670 deletions
|
|
@ -64,8 +64,8 @@ import FormSection from '@/components/form/section.vue';
|
|||
import FormSwitch from '@/components/form/switch.vue';
|
||||
import * as os from '@/os';
|
||||
import { defaultStore } from '@/store';
|
||||
import * as symbols from '@/symbols';
|
||||
import { i18n } from '@/i18n';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||
|
||||
let reactions = $ref(JSON.parse(JSON.stringify(defaultStore.state.reactions)));
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ function remove(reaction, ev: MouseEvent) {
|
|||
text: i18n.ts.remove,
|
||||
action: () => {
|
||||
reactions = reactions.filter(x => x !== reaction);
|
||||
}
|
||||
},
|
||||
}], ev.currentTarget ?? ev.target);
|
||||
}
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ async function setDefault() {
|
|||
|
||||
function chooseEmoji(ev: MouseEvent) {
|
||||
os.pickEmoji(ev.currentTarget ?? ev.target, {
|
||||
showPinned: false
|
||||
showPinned: false,
|
||||
}).then(emoji => {
|
||||
if (!reactions.includes(emoji)) {
|
||||
reactions.push(emoji);
|
||||
|
|
@ -120,16 +120,18 @@ watch($$(reactions), () => {
|
|||
deep: true,
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
[symbols.PAGE_INFO]: {
|
||||
title: i18n.ts.reaction,
|
||||
icon: 'fas fa-laugh',
|
||||
action: {
|
||||
icon: 'fas fa-eye',
|
||||
handler: preview,
|
||||
},
|
||||
bg: 'var(--bg)',
|
||||
const headerActions = $computed(() => []);
|
||||
|
||||
const headerTabs = $computed(() => []);
|
||||
|
||||
definePageMetadata({
|
||||
title: i18n.ts.reaction,
|
||||
icon: 'fas fa-laugh',
|
||||
action: {
|
||||
icon: 'fas fa-eye',
|
||||
handler: preview,
|
||||
},
|
||||
bg: 'var(--bg)',
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue