From e86c9df39d1fc486a19f0fe348ad53645ebe4a77 Mon Sep 17 00:00:00 2001 From: Evan Song <52982404+ferothefox@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:12:54 -0700 Subject: [PATCH] Platform page UX improvements (#3009) * chore: initial fixes from app redesign merge Signed-off-by: Evan Song * fix: ccpa hydration error Signed-off-by: Evan Song * fix: migrate tailwind to esm Signed-off-by: Evan Song * feat: default platform selection to current mc version Signed-off-by: Evan Song * fix: navigating and installing content Signed-off-by: Evan Song * chore: respect sentence case Signed-off-by: Evan Song * fix: match new page padding Signed-off-by: Evan Song * feat: allow user to erase all data when installing from modpack Signed-off-by: Evan Song * chore: hide hide installed content check if modpack search Signed-off-by: Evan Song * chore: wording Signed-off-by: Evan Song * chore: make erase data toggle more prominent Signed-off-by: Evan Song --------- Signed-off-by: Evan Song --- apps/frontend/src/pages/legal/ccpa.vue | 206 +++++++++--------- .../src/pages/search/[searchProjectType].vue | 41 +++- .../src/pages/servers/manage/[id].vue | 5 +- .../src/pages/servers/manage/[id]/backups.vue | 2 +- .../servers/manage/[id]/content/index.vue | 15 +- .../src/pages/servers/manage/[id]/index.vue | 2 +- .../servers/manage/[id]/options/loader.vue | 2 +- apps/frontend/tailwind.config.js | 4 +- 8 files changed, 159 insertions(+), 118 deletions(-) diff --git a/apps/frontend/src/pages/legal/ccpa.vue b/apps/frontend/src/pages/legal/ccpa.vue index 95f401ab3..d1487ec3d 100644 --- a/apps/frontend/src/pages/legal/ccpa.vue +++ b/apps/frontend/src/pages/legal/ccpa.vue @@ -21,108 +21,110 @@ within the last twelve (12) months:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoryExamplesCollected
A. Identifiers. - A real name, alias, postal address, unique personal identifier, online identifier, - Internet Protocol address, email address, account name, Social Security number, driver's - license number, passport number, or other similar identifiers. - YES
- B. Personal information categories listed in the California Customer Records statute (Cal. - Civ. Code § 1798.80(e)). - - A name, signature, Social Security number, physical characteristics or description, - address, telephone number, passport number, driver's license or state identification card - number, insurance policy number, education, employment, employment history, bank account - number, credit card number, debit card number, or any other financial information, medical - information, or health insurance information.

- Some personal information included in this category may overlap with other categories. -
NO
C. Protected classification characteristics. - Age (40 years or older), race, color, ancestry, national origin, citizenship, religion or - creed, marital status, medical condition, physical or mental disability, sex (including - gender, gender identity, gender expression, pregnancy or childbirth and related medical - conditions), sexual orientation, veteran or military status, genetic information - (including familial genetic information). - NO
D. Commercial information. - Records of personal property, products or services purchased, obtained, or considered, or - other purchasing or consuming histories or tendencies. - NO
E. Biometric information. - Genetic, physiological, behavioral, and biological characteristics, or activity patterns - used to extract a template or other identifier or identifying information, such as, - fingerprints, faceprints, and voiceprints, iris or retina scans, keystroke, gait, or other - physical patterns, and sleep, health, or exercise data. - NO
F. Internet or other similar network activity. - Browsing history, search history, information on a consumer's interaction with a website, - application, or advertisement. - YES
G. Geolocation data.Physical location or movements.YES
H. Sensory data.Audio, electronic, visual, thermal, olfactory, or similar information.NO
I. Professional or employment-related information.Current or past job history or performance evaluations.NO
- J. Non-public education information (per the Family Educational Rights and Privacy Act (20 - U.S.C. Section 1232g, 34 C.F.R. Part 99)). - - Education records directly related to a student maintained by an educational institution - or party acting on its behalf, such as grades, transcripts, class lists, student - schedules, student identification codes, student financial information, or student - disciplinary records. - NO
K. Inferences drawn from other personal information. - Profile reflecting a person's preferences, characteristics, psychological trends, - predispositions, behavior, attitudes, intelligence, abilities, and aptitudes. - NO
CategoryExamplesCollected
A. Identifiers. + A real name, alias, postal address, unique personal identifier, online identifier, + Internet Protocol address, email address, account name, Social Security number, driver's + license number, passport number, or other similar identifiers. + YES
+ B. Personal information categories listed in the California Customer Records statute + (Cal. Civ. Code § 1798.80(e)). + + A name, signature, Social Security number, physical characteristics or description, + address, telephone number, passport number, driver's license or state identification + card number, insurance policy number, education, employment, employment history, bank + account number, credit card number, debit card number, or any other financial + information, medical information, or health insurance information.

+ Some personal information included in this category may overlap with other categories. +
NO
C. Protected classification characteristics. + Age (40 years or older), race, color, ancestry, national origin, citizenship, religion + or creed, marital status, medical condition, physical or mental disability, sex + (including gender, gender identity, gender expression, pregnancy or childbirth and + related medical conditions), sexual orientation, veteran or military status, genetic + information (including familial genetic information). + NO
D. Commercial information. + Records of personal property, products or services purchased, obtained, or considered, + or other purchasing or consuming histories or tendencies. + NO
E. Biometric information. + Genetic, physiological, behavioral, and biological characteristics, or activity patterns + used to extract a template or other identifier or identifying information, such as, + fingerprints, faceprints, and voiceprints, iris or retina scans, keystroke, gait, or + other physical patterns, and sleep, health, or exercise data. + NO
F. Internet or other similar network activity. + Browsing history, search history, information on a consumer's interaction with a + website, application, or advertisement. + YES
G. Geolocation data.Physical location or movements.YES
H. Sensory data.Audio, electronic, visual, thermal, olfactory, or similar information.NO
I. Professional or employment-related information.Current or past job history or performance evaluations.NO
+ J. Non-public education information (per the Family Educational Rights and Privacy Act + (20 U.S.C. Section 1232g, 34 C.F.R. Part 99)). + + Education records directly related to a student maintained by an educational institution + or party acting on its behalf, such as grades, transcripts, class lists, student + schedules, student identification codes, student financial information, or student + disciplinary records. + NO
K. Inferences drawn from other personal information. + Profile reflecting a person's preferences, characteristics, psychological trends, + predispositions, behavior, attitudes, intelligence, abilities, and aptitudes. + NO

Personal information does not include:

    diff --git a/apps/frontend/src/pages/search/[searchProjectType].vue b/apps/frontend/src/pages/search/[searchProjectType].vue index 06cc84190..b42659de3 100644 --- a/apps/frontend/src/pages/search/[searchProjectType].vue +++ b/apps/frontend/src/pages/search/[searchProjectType].vue @@ -84,7 +84,26 @@ -
    +
    +
    +

    Options

    +
    +
    + + +
    +
    + If enabled, existing mods, worlds, and configurations, will be deleted before installing + the selected modpack. +
    +
    +
    [projectType.value.id]); const server = ref(); const serverHideInstalled = ref(false); +const eraseDataOnInstall = ref(false); const PERSISTENT_QUERY_PARAMS = ["sid", "shi"]; @@ -342,7 +362,7 @@ async function updateServerContext() { if (!auth.value.user) { router.push("/auth/sign-in?redirect=" + encodeURIComponent(route.fullPath)); } else if (route.query.sid !== null) { - server.value = await usePyroServer(route.query.sid, ["general", "mods"]); + server.value = await usePyroServer(route.query.sid, ["general", "content"]); } } @@ -382,7 +402,7 @@ const serverFilters = computed(() => { } if (serverHideInstalled.value) { - const installedMods = server.value.mods?.data + const installedMods = server.value.content?.data .filter((x) => x.project_id) .map((x) => x.project_id); @@ -461,7 +481,14 @@ async function serverInstall(project) { ) ?? versions[0]; if (projectType.value.id === "modpack") { - await server.value.general?.reinstall(route.query.sid, false, project.project_id, version.id); + await server.value.general?.reinstall( + route.query.sid, + false, + project.project_id, + version.id, + undefined, + eraseDataOnInstall.value, + ); project.installed = true; navigateTo(`/servers/manage/${route.query.sid}/options/loader`); } else if (projectType.value.id === "mod") { @@ -817,4 +844,8 @@ useSeoMeta({ mask-image: linear-gradient(to bottom, black, transparent); opacity: 0.25; } + +.stylized-toggle:checked::after { + background: var(--color-accent-contrast) !important; +} diff --git a/apps/frontend/src/pages/servers/manage/[id].vue b/apps/frontend/src/pages/servers/manage/[id].vue index b425eb9a7..4c8a9c278 100644 --- a/apps/frontend/src/pages/servers/manage/[id].vue +++ b/apps/frontend/src/pages/servers/manage/[id].vue @@ -86,10 +86,12 @@
    + +
    ; + server: Server<["general", "content", "backups", "network", "startup", "ws", "fs"]>; isServerRunning: boolean; }>(); diff --git a/apps/frontend/src/pages/servers/manage/[id]/content/index.vue b/apps/frontend/src/pages/servers/manage/[id]/content/index.vue index 30a17092a..122140c3a 100644 --- a/apps/frontend/src/pages/servers/manage/[id]/content/index.vue +++ b/apps/frontend/src/pages/servers/manage/[id]/content/index.vue @@ -102,10 +102,10 @@ - Add {{ type }} + Add {{ type.toLocaleLowerCase() }}
    @@ -241,9 +241,9 @@

    No {{ type }}s found!

    Add some {{ type }}s to your server to manage them here.

    - + - Add {{ type }} + Add {{ type.toLocaleLowerCase() }} @@ -299,7 +299,7 @@ const props = defineProps<{ const type = computed(() => { const loader = props.server.general?.loader?.toLowerCase(); - return loader === "paper" || loader === "purpur" ? "plugin" : "mod"; + return loader === "paper" || loader === "purpur" ? "Plugin" : "Mod"; }); interface Mod { @@ -460,7 +460,10 @@ async function removeMod(mod: Mod) { mod.changing = true; try { - await props.server.content?.remove(type.value, `/${type.value}s/${mod.filename}`); + await props.server.content?.remove( + type.value as "Mod" | "Plugin", + `/${type.value.toLowerCase()}s/${mod.filename}`, + ); await props.server.refresh(["general", "content"]); } catch (error) { console.error("Error removing mod:", error); diff --git a/apps/frontend/src/pages/servers/manage/[id]/index.vue b/apps/frontend/src/pages/servers/manage/[id]/index.vue index 240e590df..37d687c66 100644 --- a/apps/frontend/src/pages/servers/manage/[id]/index.vue +++ b/apps/frontend/src/pages/servers/manage/[id]/index.vue @@ -198,7 +198,7 @@ type ServerProps = { exit_code?: number; }; isServerRunning: boolean; - server: Server<["general", "mods", "backups", "network", "startup", "ws", "fs"]>; + server: Server<["general", "content", "backups", "network", "startup", "ws", "fs"]>; }; const props = defineProps(); diff --git a/apps/frontend/src/pages/servers/manage/[id]/options/loader.vue b/apps/frontend/src/pages/servers/manage/[id]/options/loader.vue index 1c115e44b..22651b4c6 100644 --- a/apps/frontend/src/pages/servers/manage/[id]/options/loader.vue +++ b/apps/frontend/src/pages/servers/manage/[id]/options/loader.vue @@ -703,7 +703,7 @@ watch(selectedMCVersion, async () => { }); const onShow = () => { - selectedMCVersion.value = ""; + selectedMCVersion.value = props.server.general?.mc_version || ""; selectedLoaderVersion.value = ""; }; diff --git a/apps/frontend/tailwind.config.js b/apps/frontend/tailwind.config.js index f0f538ea2..31df3b2a9 100644 --- a/apps/frontend/tailwind.config.js +++ b/apps/frontend/tailwind.config.js @@ -1,5 +1,5 @@ /** @type {import('tailwindcss').Config} */ -module.exports = { +const config = { content: [ "./src/components/**/*.{js,vue,ts}", "./src/layouts/**/*.vue", @@ -152,3 +152,5 @@ module.exports = { preflight: false, }, }; + +export default config;