update:添加firebase管控

This commit is contained in:
mason369 2023-04-14 15:45:18 +08:00
parent 4fe8f44ec8
commit 560bfc515d
5 changed files with 1053 additions and 4 deletions

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

73
.idea/workspace.xml Normal file
View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="095f8482-7199-413b-83e3-876b2fdc1c5d" name="更改" comment="">
<change beforePath="$PROJECT_DIR$/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/package-lock.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/rustedwarfareapicode/.vitepress/theme/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/rustedwarfareapicode/.vitepress/theme/index.js" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectId" id="2OOylpSRR2AkPWNLKl3zviW6T1A" />
<component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="2" id="Add" />
</component>
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;ASKED_SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
&quot;git-widget-placeholder&quot;: &quot;main&quot;,
&quot;last_opened_file_path&quot;: &quot;D:/RW-API-Code/rustedwarfareapicode/.vitepress/theme&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;prettierjs.PrettierConfiguration.Package&quot;: &quot;C:\\Program Files\\nodejs\\node_modules\\prettier&quot;,
&quot;ts.external.directory.path&quot;: &quot;D:\\Program Files (x86)\\WebStorm 2022.1\\plugins\\javascript-impl\\jsLanguageServicesImpl\\external&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}
}</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="D:\RW-API-Code\rustedwarfareapicode\.vitepress\theme" />
</key>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="默认任务">
<changelist id="095f8482-7199-413b-83e3-876b2fdc1c5d" name="更改" comment="" />
<created>1681446079288</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1681446079288</updated>
<workItem from="1681446081525" duration="1375000" />
<workItem from="1681457010083" duration="1000" />
<workItem from="1681457192270" duration="722000" />
<workItem from="1681457929740" duration="336000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
</project>

953
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -7,5 +7,8 @@
"devDependencies": {
"vitepress": "^1.0.0-alpha.65"
},
"version": "0.0.2-DEV1.0"
"version": "0.0.2-DEV1.0",
"dependencies": {
"firebase": "^9.19.1"
}
}

View File

@ -1,11 +1,28 @@
// .vitepress/theme/index.js
import DefaultTheme from "vitepress/theme";
import "./style/custom.css";
// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
import { getAnalytics } from "firebase/analytics";
import { getPerformance } from "firebase/performance";
const firebaseConfig = {
apiKey: "AIzaSyANVvapu0ihi1cM8ZzuXTkwjx9lM_J1RyQ",
authDomain: "rw-api-code-d0779.firebaseapp.com",
projectId: "rw-api-code-d0779",
storageBucket: "rw-api-code-d0779.appspot.com",
messagingSenderId: "363611843335",
appId: "1:363611843335:web:f15aef7ab427f52b4033a2",
measurementId: "G-XJH5TKP5VL"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);
const perf = getPerformance(app);
function wait(timeout) {
return new Promise((resolve) => setTimeout(resolve, timeout));
}
async function requestClipboardPermission() {
try {
await navigator.permissions.query({ name: "clipboard-write" });
@ -13,7 +30,6 @@ async function requestClipboardPermission() {
console.error(error);
}
}
async function init() {
try {
await wait(1000);