all: Add receive only folder type (#5027)
Adds a receive only folder type that does not send changes, and where the user can optionally revert local changes. Also changes some of the icons to make the three folder types distinguishable.
This commit is contained in:
@@ -19,10 +19,18 @@ type DeviceID [DeviceIDLength]byte
|
||||
type ShortID uint64
|
||||
|
||||
var (
|
||||
LocalDeviceID = DeviceID{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
|
||||
EmptyDeviceID = DeviceID{ /* all zeroes */ }
|
||||
LocalDeviceID = repeatedDeviceID(0xff)
|
||||
GlobalDeviceID = repeatedDeviceID(0xf8)
|
||||
EmptyDeviceID = DeviceID{ /* all zeroes */ }
|
||||
)
|
||||
|
||||
func repeatedDeviceID(v byte) (d DeviceID) {
|
||||
for i := range d {
|
||||
d[i] = v
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// NewDeviceID generates a new device ID from the raw bytes of a certificate
|
||||
func NewDeviceID(rawCert []byte) DeviceID {
|
||||
var n DeviceID
|
||||
|
||||
Reference in New Issue
Block a user