-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from iori2333/master
v1.0.9
- Loading branch information
Showing
17 changed files
with
247 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>NJU Mirror</title> | ||
</head> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>NJU Mirror</title> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
|
||
</html> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
<script> | ||
if (window.ActiveXObject || 'ActiveXObject' in window) { | ||
document.getElementById('app').innerHTML = | ||
'Internet Explorer is no longer supported. Please use modern browsers such as Chrome, Firefox, Edge, etc.'; | ||
} | ||
</script> | ||
</body> | ||
</html> |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"request": { | ||
"github": "https://github.com/nju-lug/NJU-Mirror-Issue/issues/new?assignees=yaoge123&labels=enhancement&template=new-mirror-request.md&title=%5BNMR%5D+New+Mirror+Request+for+%5BName%5D" | ||
}, | ||
"mirror": { | ||
"github": "https://github.com/nju-lug/NJU-Mirror-Issue/issues/new?assignees=yaoge123&labels=bug&template=mirror-error-report.md&title=%5BMER%5D+Mirror+Error+Report+for+%5BName%5D" | ||
}, | ||
"document": { | ||
"github": "https://github.com/nju-lug/NJU-Mirror-Configs/issues/new?assignees=&labels=documentation&template=mirror-doc-error-report.md&title=%5BMDR%5D+Mirror+Doc+Error+Report+for+%5BRepo+Name%5D", | ||
"mail": "mailto:git+nju-lug-nju-mirror-configs-4009-yj7mew73nctozbsgnpupb3zn-issue@yaoge123.cn", | ||
"gitlab": "https://git.nju.edu.cn/nju-lug/NJU-Mirror-Configs/-/issues" | ||
}, | ||
"frontend": { | ||
"github": "https://github.com/nju-lug/Mira/issues/new?assignees=yaoge123&labels=bug&template=mirror-front-error-report.md&title=%5BMFR%5D+Mirror+Front+End+Error+Report", | ||
"mail": "mailto:[email protected]", | ||
"gitlab": "https://git.nju.edu.cn/nju-lug/mira/-/issues" | ||
}, | ||
"other": { | ||
"github": "https://github.com/nju-lug/NJU-Mirror-Issue/issues/new?assignees=yaoge123&labels=question&template=other-usage-issues.md&title=%5BNOI%5D+New+Mirror+Other+Issue+for+%5BRepo+Name%5D" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<script setup lang="ts"> | ||
import { | ||
NButton, | ||
NSelect, | ||
NDivider, | ||
NH3, | ||
NButtonGroup, | ||
NModal, | ||
useMessage | ||
} from 'naive-ui'; | ||
import { computed } from 'vue'; | ||
import { useI18n } from 'vue-i18n'; | ||
import reports from '@/assets/report.json'; | ||
import { useMutableRef } from '@/hooks'; | ||
import NamedIcon from './NamedIcon.vue'; | ||
const { t } = useI18n(); | ||
const message = useMessage(); | ||
const [show, setShow] = useMutableRef(false); | ||
const [selected, setSelected] = useMutableRef<string | null>(null); | ||
type RequestKey = keyof typeof reports; | ||
const options = computed(() => { | ||
const options = []; | ||
for (const key in reports) { | ||
const value = reports[key as RequestKey]; | ||
console.log(key, value); | ||
options.push({ label: t(`report.${key}`), value: key }); | ||
} | ||
return options; | ||
}); | ||
const selectedValue = computed( | ||
() => selected.value && reports[selected.value as RequestKey] | ||
); | ||
const onLinkClicked = (url: string) => { | ||
window.open(url); | ||
setShow(false); | ||
setSelected(null); | ||
message.info(`${t('report.prompt.done')} ❤`); | ||
}; | ||
</script> | ||
|
||
<template> | ||
<NButton text @click="setShow(true)"> | ||
<template #icon> | ||
<NamedIcon name="bug" :size="16" /> | ||
</template> | ||
{{ t('footer.bug') }} | ||
</NButton> | ||
<NModal | ||
style="width: min(600px, 90%)" | ||
preset="card" | ||
size="huge" | ||
:bordered="true" | ||
:title="t('report.title')" | ||
v-model:show="show" | ||
aria-modal | ||
> | ||
<NH3 prefix="line">step.1 {{ t('report.prompt.type') }}</NH3> | ||
<NSelect | ||
:options="options" | ||
v-model:value="selected" | ||
:placeholder="t('report.prompt.type')" | ||
/> | ||
<div v-if="selectedValue"> | ||
<NDivider /> | ||
<NH3 prefix="line">step.2 {{ t('report.prompt.link') }}</NH3> | ||
<NButtonGroup> | ||
<NButton | ||
v-for="(url, name) in selectedValue" | ||
:key="name" | ||
@click="onLinkClicked(url)" | ||
> | ||
<template #icon> | ||
<NamedIcon :name="name" :size="16" /> | ||
</template> | ||
{{ t(`report.${name}`) }} | ||
</NButton> | ||
</NButtonGroup> | ||
</div> | ||
</NModal> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,10 @@ | ||
<script setup lang="ts"> | ||
import { useI18n } from 'vue-i18n'; | ||
import { | ||
NH2, | ||
NP, | ||
NSpace, | ||
NDropdown, | ||
NButton, | ||
NButtonGroup, | ||
NIcon, | ||
MenuOption | ||
} from 'naive-ui'; | ||
import { BugOutline, CodeOutline, MaleOutline } from '@vicons/ionicons5'; | ||
import { NH2, NP, NSpace, NButton, NButtonGroup } from 'naive-ui'; | ||
import FeedbackButton from '@/components/FeedbackButton.vue'; | ||
import NamedIcon from '@/components/NamedIcon.vue'; | ||
const { t } = useI18n(); | ||
const reports = [ | ||
{ | ||
label: 'Via Mail', | ||
key: 'mailto:[email protected]' | ||
}, | ||
{ | ||
label: 'Via GitHub', | ||
key: 'https://github.com/iori2333/NJU-Mirror-Frontend/issues' | ||
}, | ||
{ | ||
label: 'Via NJU Git', | ||
key: 'https://git.nju.edu.cn/nju-lug/' | ||
} | ||
] as MenuOption[]; | ||
function handleSelect(key: string) { | ||
window.open(key); | ||
|
@@ -46,34 +24,16 @@ function handleSelect(key: string) { | |
<NP class="footer-text">{{ t('footer.special') }}</NP> | ||
</div> | ||
<NButtonGroup vertical> | ||
<NDropdown | ||
trigger="click" | ||
@select="handleSelect" | ||
placement="left-start" | ||
:options="reports" | ||
> | ||
<NButton text> | ||
<template #icon> | ||
<NIcon size="16"> | ||
<BugOutline /> | ||
</NIcon> | ||
</template> | ||
{{ t('footer.bug') }} | ||
</NButton> | ||
</NDropdown> | ||
<FeedbackButton /> | ||
<NButton text @click="handleSelect('https://github.com/iori2333/Mira')"> | ||
<template #icon> | ||
<NIcon size="16"> | ||
<CodeOutline /> | ||
</NIcon> | ||
<NamedIcon name="code" :size="16" /> | ||
</template> | ||
{{ t('footer.source') }} | ||
</NButton> | ||
<NButton text @click="handleSelect('https://git.nju.edu.cn/nju-lug')"> | ||
<template #icon> | ||
<NIcon size="16"> | ||
<MaleOutline /> | ||
</NIcon> | ||
<NamedIcon name="male" :size="16" /> | ||
</template> | ||
{{ t('footer.lug') }} | ||
</NButton> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.