Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit10ac9fb

Browse files
committed
remove site changes
1 parentc06558e commit10ac9fb

File tree

5 files changed

+1
-67
lines changed

5 files changed

+1
-67
lines changed

‎site/src/api/api.ts‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2371,28 +2371,6 @@ class ApiMethods {
23712371
awaitthis.axios.post<void>("/api/v2/notifications/test");
23722372
};
23732373

2374-
createNotificationPushSubscription=async(
2375-
userId:string,
2376-
req:TypesGen.WebpushSubscription,
2377-
)=>{
2378-
awaitthis.axios.post<void>(
2379-
`/api/v2/users/${userId}/webpush/subscription`,
2380-
req,
2381-
);
2382-
};
2383-
2384-
deleteNotificationPushSubscription=async(
2385-
userId:string,
2386-
req:TypesGen.DeleteWebpushSubscription,
2387-
)=>{
2388-
awaitthis.axios.delete<void>(
2389-
`/api/v2/users/${userId}/webpush/subscription`,
2390-
{
2391-
data:req,
2392-
},
2393-
);
2394-
};
2395-
23962374
requestOneTimePassword=async(
23972375
req:TypesGen.RequestOneTimePasscodeRequest,
23982376
)=>{

‎site/src/index.tsx‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,5 @@ if (element === null) {
1414
thrownewError("root element is null");
1515
}
1616

17-
// The service worker handles push notifications.
18-
if("serviceWorker"innavigator){
19-
navigator.serviceWorker.register("/serviceWorker.js");
20-
}
21-
2217
constroot=createRoot(element);
2318
root.render(<App/>);

‎site/src/modules/dashboard/Navbar/NavbarView.tsx‎

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
import{API}from"api/api";
2-
import{experiments}from"api/queries/experiments";
32
importtype*asTypesGenfrom"api/typesGenerated";
4-
import{Button}from"components/Button/Button";
53
import{ExternalImage}from"components/ExternalImage/ExternalImage";
64
import{CoderIcon}from"components/Icons/CoderIcon";
75
importtype{ProxyContextValue}from"contexts/ProxyContext";
8-
import{useWebpushNotifications}from"contexts/useWebpushNotifications";
9-
import{useEmbeddedMetadata}from"hooks/useEmbeddedMetadata";
106
import{NotificationsInbox}from"modules/notifications/NotificationsInbox/NotificationsInbox";
117
importtype{FC}from"react";
12-
import{useQuery}from"react-query";
138
import{NavLink,useLocation}from"react-router-dom";
149
import{cn}from"utils/cn";
1510
import{DeploymentDropdown}from"./DeploymentDropdown";
@@ -48,9 +43,6 @@ export const NavbarView: FC<NavbarViewProps> = ({
4843
canViewAuditLog,
4944
proxyContextValue,
5045
})=>{
51-
const{ subscribed, enabled, loading, subscribe, unsubscribe}=
52-
useWebpushNotifications();
53-
5446
return(
5547
<divclassName="border-0 border-b border-solid h-[72px] flex items-center leading-none px-6">
5648
<NavLinkto="/workspaces">
@@ -63,7 +55,7 @@ export const NavbarView: FC<NavbarViewProps> = ({
6355

6456
<NavItemsclassName="ml-4"/>
6557

66-
<divclassName=" hidden md:flex items-center gap-3 ml-auto">
58+
<divclassName="flex items-center gap-3 ml-auto">
6759
{proxyContextValue&&(
6860
<divclassName="hidden md:block">
6961
<ProxyMenuproxyContextValue={proxyContextValue}/>
@@ -79,18 +71,6 @@ export const NavbarView: FC<NavbarViewProps> = ({
7971
/>
8072
</div>
8173

82-
{enabled ?(
83-
subscribed ?(
84-
<Buttonvariant="outline"disabled={loading}onClick={unsubscribe}>
85-
Disable WebPush
86-
</Button>
87-
) :(
88-
<Buttonvariant="outline"disabled={loading}onClick={subscribe}>
89-
Enable WebPush
90-
</Button>
91-
)
92-
) :null}
93-
9474
<NotificationsInbox
9575
fetchNotifications={API.getInboxNotifications}
9676
markAllAsRead={API.markAllInboxNotificationsAsRead}

‎site/src/testHelpers/entities.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ export const MockBuildInfo: TypesGen.BuildInfoResponse = {
227227
workspace_proxy:false,
228228
upgrade_message:"My custom upgrade message",
229229
deployment_id:"510d407f-e521-4180-b559-eab4a6d802b8",
230-
webpush_public_key:"fake-public-key",
231230
telemetry:true,
232231
};
233232

‎site/vite.config.mts‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import*aspathfrom"node:path";
22
importreactfrom"@vitejs/plugin-react";
3-
import{buildSync}from"esbuild";
43
import{visualizer}from"rollup-plugin-visualizer";
54
import{typePluginOption,defineConfig}from"vite";
65
importcheckerfrom"vite-plugin-checker";
@@ -29,19 +28,6 @@ export default defineConfig({
2928
emptyOutDir:false,
3029
// 'hidden' works like true except that the corresponding sourcemap comments in the bundled files are suppressed
3130
sourcemap:"hidden",
32-
rollupOptions:{
33-
input:{
34-
index:path.resolve(__dirname,"./index.html"),
35-
serviceWorker:path.resolve(__dirname,"./src/serviceWorker.ts"),
36-
},
37-
output:{
38-
entryFileNames:(chunkInfo)=>{
39-
returnchunkInfo.name==="serviceWorker"
40-
?"[name].js"
41-
:"assets/[name]-[hash].js";
42-
},
43-
},
44-
},
4531
},
4632
define:{
4733
"process.env":{
@@ -103,10 +89,6 @@ export default defineConfig({
10389
target:process.env.CODER_HOST||"http://localhost:3000",
10490
secure:process.env.NODE_ENV==="production",
10591
},
106-
"/serviceWorker.js":{
107-
target:process.env.CODER_HOST||"http://localhost:3000",
108-
secure:process.env.NODE_ENV==="production",
109-
},
11092
},
11193
allowedHosts:true,
11294
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp