remove third party notice

This commit is contained in:
hippoz 2022-11-12 17:43:44 +02:00
parent 70687e1943
commit 64478b5804
Signed by: hippoz
GPG key ID: 7C52899193467641
5 changed files with 2 additions and 86 deletions

View file

@ -1,9 +1,7 @@
<script> <script>
import { quadInOut } from "svelte/easing"; import { quadInOut } from "svelte/easing";
import { maybeFly, maybeFlyIf } from "../animations"; import { maybeFly, maybeFlyIf } from "../animations";
import { getItem } from "../storage"; import { channels, gatewayStatus, overlayStore, selectedChannel, showSidebar, smallViewport, userInfoStore, unreadStore, OverlayType } from "../stores";
import { channels, gatewayStatus, overlayStore, selectedChannel, showSidebar, smallViewport, userInfoStore, unreadStore, OverlayType, thirdPartyServicePresenceStore } from "../stores";
import ThirdPartyNotice from "./overlays/ThirdPartyNotice.svelte";
import UserTopBar from "./UserTopBar.svelte"; import UserTopBar from "./UserTopBar.svelte";
const selectChannel = (channel) => { const selectChannel = (channel) => {
@ -45,13 +43,6 @@
<span class="sidebar-button-text">Settings</span> <span class="sidebar-button-text">Settings</span>
</button> </button>
</div> </div>
{#if $thirdPartyServicePresenceStore && getItem("ui:showThirdPartyNotice")}
<div class="top-bar darker">
<span class="material-icons-outlined">cloud</span>
<span class="text-small top-bar-heading">some third party services may have additional terms</span>
<button class="button" on:click={ () => overlayStore.push(OverlayType.ThirdPartyNotice) }>Review</button>
</div>
{/if}
{#if !$gatewayStatus.ready} {#if !$gatewayStatus.ready}
<div class="top-bar darker"> <div class="top-bar darker">
<span class="material-icons-outlined">cloud</span> <span class="material-icons-outlined">cloud</span>

View file

@ -10,7 +10,6 @@
import Settings from "./Settings.svelte"; import Settings from "./Settings.svelte";
import Prompt from "./Prompt.svelte"; import Prompt from "./Prompt.svelte";
import UserInfo from "./UserInfo.svelte"; import UserInfo from "./UserInfo.svelte";
import ThirdPartyNotice from "./ThirdPartyNotice.svelte";
const OverlayComponent = { const OverlayComponent = {
0: CreateChannel, 0: CreateChannel,
@ -22,7 +21,6 @@
6: Settings, 6: Settings,
7: Prompt, 7: Prompt,
8: UserInfo, 8: UserInfo,
9: ThirdPartyNotice,
}; };
</script> </script>

View file

@ -1,53 +0,0 @@
<script>
import { maybeModalFade, maybeModalScale } from "../../animations";
import { overlayStore, OverlayType, presenceStore } from "../../stores";
export let close = () => {};
</script>
<style>
.info-modal {
max-width: 560px;
}
.notice-user-card {
display: flex;
align-items: center;
justify-content: left;
padding: var(--space-md);
}
.notice-user-card-buttons {
margin-left: auto;
}
.full-width {
width: 100%;
}
</style>
<div class="modal-backdrop" transition:maybeModalFade on:click="{ close }">
<div class="modal info-modal" transition:maybeModalScale on:click|stopPropagation>
<div class="modal-header">
<span class="h4">Third Party Services</span>
</div>
<p>Certain third-party services on this server may have different data processing, data usage, and data collection policies, as well as Terms of Service or similar. Please carefully review each service in the list below. If you do not agree with any of these policies, you may be able to ask the user to opt out, or make an account deletion request to the server owner. The server owner may be able to aid you in the process of opting out.</p>
{#each $presenceStore as entry (entry.user.id)}
{#if entry.bridgesTo || entry.terms || entry.privacy}
<div class="notice-user-card full-width">
<span class="material-icons-outlined">alternate_email</span>
<span class="h5 top-bar-heading">{ entry.user.username }</span>
<div class="notice-user-card-buttons">
<button class="button" on:click="{ () => overlayStore.push(OverlayType.UserInfo, { presenceEntry: entry }) }">View Info</button>
</div>
</div>
{/if}
{/each}
<div class="modal-footer">
<button class="button modal-secondary-action" on:click="{ close }">Cancel</button>
</div>
</div>
</div>

View file

@ -11,7 +11,6 @@ const defaults = {
"ui:stateful:presistSelectedChannel": true, "ui:stateful:presistSelectedChannel": true,
"ui:showSidebarToggle": false, "ui:showSidebarToggle": false,
"ui:alwaysUseMobileChatBar": false, "ui:alwaysUseMobileChatBar": false,
"ui:showThirdPartyNotice": true,
"ui:online:processRemoteTypingEvents": true, "ui:online:processRemoteTypingEvents": true,
"ui:online:processRemotePresenceEvents": true, "ui:online:processRemotePresenceEvents": true,
"ui:online:loadMessageHistory": true, "ui:online:loadMessageHistory": true,

View file

@ -407,8 +407,7 @@ export const OverlayType = {
EditMessage: 5, EditMessage: 5,
Settings: 6, Settings: 6,
Prompt: 7, Prompt: 7,
UserInfo: 8, UserInfo: 8
ThirdPartyNotice: 9
}; };
class OverlayStore extends Store { class OverlayStore extends Store {
constructor() { constructor() {
@ -658,23 +657,6 @@ class PluginStore extends Store {
} }
} }
class ThirdPartyServicePresenceStore extends Store {
constructor() {
super(false, "ThirdPartyServicePresenceStore");
presenceStore.subscribe((value) => {
let hasService = false;
value.forEach(e => {
if (e.bridgesTo || e.privacy || e.terms) {
hasService = true;
return;
}
});
this.set(hasService);
});
}
}
export const selectedChannel = new Store({ id: -1, name: "none", creator_id: -1 }, "selectedChannel"); export const selectedChannel = new Store({ id: -1, name: "none", creator_id: -1 }, "selectedChannel");
export const showSidebar = new Store(true, "showSidebar"); export const showSidebar = new Store(true, "showSidebar");
export const showPresenceSidebar = new Store(false, "showPresenceSidebar"); export const showPresenceSidebar = new Store(false, "showPresenceSidebar");
@ -691,7 +673,6 @@ export const typingStore = new TypingStore();
export const presenceStore = new PresenceStore(); export const presenceStore = new PresenceStore();
export const unreadStore = new UnreadStore(); export const unreadStore = new UnreadStore();
export const pluginStore = new PluginStore(); export const pluginStore = new PluginStore();
export const thirdPartyServicePresenceStore = new ThirdPartyServicePresenceStore();
export const setMessageInputEvent = new Store(null, "event:setMessageInput"); export const setMessageInputEvent = new Store(null, "event:setMessageInput");
export const sendMessageAction = createAction("sendMessageAction", async ({channelId, content}) => { export const sendMessageAction = createAction("sendMessageAction", async ({channelId, content}) => {