Move app installation entry into About settings
This commit is contained in:
1 parent
606e08ca39
commit
903a617439
2 files changed
+7
-6
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { installApp, installPrompt, online, waitingWorker } from './pwa'
|
||||
import { online, waitingWorker } from './pwa'
|
||||
import { flushAll, readyToReload, toast } from './workspace'
|
||||
|
||||
const busy = ref(false)
|
||||
@@ -48,15 +48,11 @@ async function update() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="!online || waitingWorker || activated || installPrompt" class="rm-app-status" role="status">
|
||||
<div v-if="!online || waitingWorker || activated" class="rm-app-status" role="status">
|
||||
<span v-if="!online">离线,无法加载或保存笔记</span>
|
||||
<template v-else-if="waitingWorker || activated">
|
||||
<span>有新版本</span>
|
||||
<button class="rm-btn" :disabled="busy" @click="update">{{ busy ? '正在保存…' : '保存并刷新' }}</button>
|
||||
</template>
|
||||
<template v-else-if="installPrompt">
|
||||
<span>将 RawMark 添加到主屏幕</span>
|
||||
<button class="rm-btn" @click="installApp">安装</button>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
@@ -5,6 +5,7 @@ import { allCommands, formatKeys, runCommand } from './commands'
|
||||
import Icon, { type IconName } from './Icon.vue'
|
||||
import AppearanceSettings from './AppearanceSettings.vue'
|
||||
import PluginsPanel from './PluginsPanel.vue'
|
||||
import { installApp, installPrompt } from './pwa'
|
||||
import { CONTENT_WIDTHS, FONT_SIZES, TAB_SIZES, loadSettings, settings, updateSettings, type Settings } from './settings'
|
||||
import SharePanel from './SharePanel.vue'
|
||||
import TokensPanel from './TokensPanel.vue'
|
||||
@@ -184,6 +185,10 @@ async function changePassword() {
|
||||
<template v-else-if="section === 'about'">
|
||||
<div class="rm-setting"><h3>RawMark</h3></div>
|
||||
<p class="rm-share-note">纯 Markdown 笔记编辑器,文件即真源。</p>
|
||||
<div v-if="installPrompt" class="rm-setting">
|
||||
<span class="rm-setting-label">安装应用</span>
|
||||
<button class="rm-btn" @click="installApp">安装 RawMark</button>
|
||||
</div>
|
||||
<div class="rm-setting">
|
||||
<span class="rm-setting-label">构建版本</span>
|
||||
<code>{{ buildVersion }}</code>
|
||||
|
||||
Reference in new issue
Block a user