Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Commit ecf1298

Browse files
committed
Switch off of unwalled.garden drive types
1 parent fbd9efc commit ecf1298

8 files changed

Lines changed: 22 additions & 27 deletions

File tree

app/bg/browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export async function setup () {
8989
if (!defaultUser) {
9090
let drive = await hyper.drives.createNewDrive({
9191
title: 'Anonymous',
92-
type: 'unwalled.garden/person'
92+
type: 'user'
9393
})
9494
await drive.pda.writeFile('/thumb.jpg', await jetpack.cwd(__dirname).cwd('assets/img').readAsync('default-user-thumb.jpg', 'buffer'), 'binary')
9595
await users.add(drive.url, true)

app/bg/ui/tab-manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ class Tab {
272272
}
273273

274274
get canFollow () {
275-
return this.datInfo && this.datInfo.type === 'unwalled.garden/person' && !this.isMyProfile
275+
return this.datInfo && !this.isMyProfile
276276
}
277277

278278
get canInstall () {

app/bg/web-apis/bg/users.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export default {
8080

8181
// create new drive
8282
var drive = await hyper.drives.createNewDrive({
83-
type: 'unwalled.garden/person',
83+
type: 'user',
8484
title: opts.title,
8585
description: opts.description
8686
})
@@ -102,7 +102,7 @@ export default {
102102

103103
// create new drive
104104
var drive = await hyper.drives.createNewDrive({
105-
type: 'unwalled.garden/person',
105+
type: 'user',
106106
title: 'Temporary User',
107107
description: 'Created ' + (new Date()).toLocaleString()
108108
})

app/lib/fs-template/.settings/type-registry.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
"type": "type-registry",
33
"driveTypes": [
44
{
5-
"id": "unwalled.garden/person",
6-
"title": "Person"
5+
"id": "user",
6+
"title": "User"
77
},
88
{
99
"id": "webterm.sh/cmd-pkg",
1010
"title": "Command Package"
1111
}
1212
],
1313
"defaultDriveHandlers": {
14-
"unwalled.garden/person": "system",
14+
"user": "system",
1515
"webterm.sh/cmd-pkg": "system",
1616
"default": "system"
1717
}

app/userland/app-stdlib/js/strings.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ export function changeURLScheme (url = '', scheme = '') {
123123

124124
export function toNiceDriveType (type = '') {
125125
if (!type) return 'files drive'
126-
if (type === 'unwalled.garden/person') return 'beaker user'
127-
if (type === 'unwalled.garden/template') return 'template'
126+
if (type === 'webterm.sh/cmd-pkg') return 'webterm command'
128127
return type
129128
}
130129

131130
export function getDriveTypeIcon (type = '') {
132131
switch (type) {
133-
case 'unwalled.garden/person': return 'fas fa-user'
134-
case 'unwalled.garden/template': return 'fas fa-drafting-compass'
132+
case 'user': return 'fas fa-user'
133+
case 'template': return 'fas fa-drafting-compass'
134+
case 'webterm.sh/cmd-pkg': return 'fas fa-terminal'
135135
case 'module': return 'fas fa-cube'
136136
case 'website': return 'fas fa-desktop'
137137
default: return 'far fa-folder-open'

app/userland/explorer/js/com/sidebar/drive-info.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class DriveInfo extends LitElement {
5050
${this.renderType()}
5151
${this.renderSize()}
5252
</p>
53-
${this.driveInfo.type === 'unwalled.garden/person' ? html`
53+
${this.driveInfo.type === 'user' ? html`
5454
<div class="bottom-ctrls">
5555
${this.driveInfo.url !== this.userUrl ? '' : html`
5656
<span class="label verified"><span class="fas fa-fw fa-check-circle"></span> My profile</span>
@@ -82,11 +82,11 @@ export class DriveInfo extends LitElement {
8282
}
8383

8484
renderType () {
85-
if (this.driveInfo.type === 'unwalled.garden/person') {
86-
return html`<span><span class="fas fa-fw fa-user-circle"></span> Person</span>`
85+
if (this.driveInfo.type === 'user') {
86+
return html`<span><span class="fas fa-fw fa-user-circle"></span> User</span>`
8787
}
88-
if (this.driveInfo.type === 'unwalled.garden/website') {
89-
return html`<span><span class="far fa-fw fa-file-alt"></span> Website</span>`
88+
if (this.driveInfo.type === 'website') {
89+
return html`<span><span class="far fa-fw fa-desktop"></span> Website</span>`
9090
}
9191
}
9292

app/userland/explorer/js/lib/files.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,13 @@ const ICONS = {
88
'/library/documents': 'fas fa-file-word',
99
'/library/media': 'fas fa-photo-video',
1010
'/library/projects': 'fas fa-coffee',
11-
'/system': 'fas fa-cog',
12-
'/system/drives': 'fas fa-hdd',
13-
'/system/templates': 'fas fa-drafting-compass',
14-
'/system/webterm': 'fas fa-terminal'
11+
'/system': 'fas fa-cog'
1512
},
16-
person: {
13+
common: {
1714
'/comments': 'fas fa-comment',
1815
'/follows': 'fas fa-user-friends',
1916
'/posts': 'fa fa-rss',
2017
'/votes': 'fas fa-vote-yea'
21-
},
22-
common: {
2318
}
2419
}
2520

@@ -54,7 +49,7 @@ export function toSemanticItemGroups (items) {
5449
for (let i of items) {
5550
if (i.stat.mount && i.stat.mount.key) {
5651
switch (i.mount.type) {
57-
case 'unwalled.garden/person': add('users', 'Users', i); break
52+
case 'user': add('users', 'Users', i); break
5853
case 'website': add('websites', 'Websites', i); break
5954
case 'application': add('applications', 'Applications', i); break
6055
case 'webterm.sh/cmd-pkg': add('commands', 'Webterm Commands', i); break
@@ -80,8 +75,8 @@ export function toSemanticItemGroups (items) {
8075
export function getSubicon (driveKind, item) {
8176
if (driveKind === 'root') {
8277
return ICONS.root[item.realPath] || ICONS.common[item.realPath]
83-
} else if (driveKind === 'person') {
84-
return ICONS.person[item.realPath] || ICONS.common[item.realPath]
78+
} else {
79+
return ICONS.common[item.realPath] || ICONS.common[item.realPath]
8580
}
8681
}
8782

app/userland/explorer/js/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export class ExplorerApp extends LitElement {
267267
async readDirectory (drive) {
268268
let driveKind = ''
269269
if (this.currentDriveInfo.url === navigator.filesystem.url) driveKind = 'root'
270-
if (this.currentDriveInfo.type === 'unwalled.garden/person') driveKind = 'person'
270+
else driveKind = 'common'
271271

272272
var items = await this.attempt(
273273
`Reading directory (${location.pathname})`,

0 commit comments

Comments
 (0)